A method for DSP application base boot program in distributed environment

By introducing RBL, RBOOT and base bootloader into the DSP system and combining PowerPC and SRIO technologies, the tedious update problem of DSP applications in a distributed environment is solved, and efficient updates without hardware dependence are achieved.

CN119396476BActive Publication Date: 2025-09-26EAST CHINA INST OF COMPUTING TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411475732.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-09-26
Estimated Expiration
2044-10-22

AI Technical Summary

Technical Problem

Traditional DSP bootloaders have low hardware support in distributed environments and are cumbersome and difficult to update, especially when updating DSP applications without an emulator or serial port.

Method used

RBL is used to boot the RBOOT program, and RBOOT boots the base boot program. PowerPC issues commands to decide whether to update or start the DSP application. SRIO technology is used to implement centralized or distributed centralized update methods to simplify the update process of DSP applications.

Benefits of technology

Simplify the update of DSP applications without serial ports or networks, reduce hardware dependence, improve update efficiency, and achieve one-click update effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396476B_ABST
    Figure CN119396476B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for applying a base boot program to a DSP in a distributed environment. The method boots the RBOOT boot program through RBL, which in turn boots the base boot program. The base program decides to start after updating the application according to a command issued by the Power Processor (PPC), or directly starts, and then boots the DSP system application. The base boot program functions as a module for booting a DSP application program and a module for updating the DSP application. In the update function, a centralized update method is adopted for distributed digital signal processing platforms with relatively simple topologies; a distributed centralized update method is adopted for distributed platforms with complex topologies. The distributed centralized update method is as follows: the PowerPC assigns forwarding tasks to multiple DSPs, which are referred to as masters, and then forwards SRIO data to other slave DSPs. This method solves the problems of low hardware support and cumbersome and difficult updates in the secondary boot mode of traditional DSP boot programs. The method has low dependence on hardware functions, simplifies the DSP update process, and achieves a one-click update effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of embedded operating systems, in particular to a base boot program capable of updating and starting DSP applications in a distributed environment. Background Art

[0002] A digital signal processor (DSP) is a microprocessor specifically designed to handle real-time signal processing tasks and is widely used in fields such as audio processing, image processing, communication systems, and control systems. The design goal of a DSP is to efficiently perform mathematical operations, particularly multiplication-accumulation (MAC) operations, to meet real-time processing requirements. A DSP operating system (DSP operating system) is an operating system designed specifically for DSPs. Because DSP applications typically require efficient real-time data processing, DSP operating systems typically have the following characteristics:

[0003] 1. Real-time performance: DSP operating systems are usually real-time operating systems (RTOS), which can ensure that data is processed within strict time constraints.

[0004] 2. Lightweight: In order to adapt to the limited resources of DSP hardware, DSP operating systems are usually designed to be very streamlined to reduce memory and processor usage.

[0005] 3. Task scheduling: Ability to efficiently schedule multiple tasks to ensure that critical tasks are given priority.

[0006] 4. Hardware support: Provide support for DSP hardware features, such as dedicated instruction sets, hardware acceleration units and parallel processing capabilities.

[0007] Traditional DSP applications often use a two-level boot boot method, while in some high-performance computing and embedded systems, DSP, PPC (PowerPC, a central processing unit with a reduced instruction set architecture) and FPGA (field programmable gate array) are generally required to be used in combination, such as Figure 1As shown in the figure, PowerPC, FPGA, and DSP each play a unique role in a signal processing platform. PowerPC is typically used to perform complex control and processing tasks, providing high computing power and flexibility. DSP is specifically designed for efficient digital signal processing and is suitable for real-time processing needs. FPGA provides a high degree of parallel processing capability and can be customized as needed, suitable for specific algorithm implementations. They are often used in combination to achieve optimal performance and flexibility, leveraging their respective strengths. In such a distributed environment, DSP applications also need to be dynamically updated based on changing application scenarios and requirements. Therefore, developing a base bootloader capable of updating and launching DSP applications is a pressing issue.

[0008] Traditional DSP boot programs are initiated through the RBL (ROM Boot Loader), a program embedded within the DSP chip and permanently stored in the DSP's ROM, which cannot be modified by the user. After the chip is powered on and reset, the RBL reads the RBOOT boot program stored in internal memory into internal high-speed memory and runs it. RBOOT then downloads the image from the host via the network card, PCIe, or SRIO interfaces, or from external memory via EMIF, SPI, or I2C interfaces, completing the boot process. This is the traditional two-stage boot mode.

[0009] In this secondary boot mode, if there is a need to update the DSP application, the application needs to be re-burned through the emulator or serial port. However, in the actual debugging scenario of the DSP application, sometimes there is not even hardware support such as emulator or serial port. Especially in a distributed environment, if multiple chip applications need to be updated, it will cost a lot of money. Summary of the Invention

[0010] Aiming at the problems of low hardware support and complicated and difficult update of the secondary boot mode of traditional DSP boot program, a method of applying base boot program to DSP in distributed environment is proposed.

[0011] The technical solution of the present invention is:

[0012] A method for applying a base boot program to a DSP in a distributed environment, wherein the base boot program is booted by an RBL and then booted by an RBOOT boot program. The base boot program is started after the base program is updated according to a command issued by a PPC, or is started directly, and then boots the DSP system application.

[0013] The Base boot program is divided into two modules: the DSP application startup module and the DSP application update module. The PowerPC receives commands from the host computer and notifies the Base boot program to complete the corresponding startup or update operation. For the update operation, the host computer can upload the DSP application to the PowerPC file system through the network, and the PowerPC completes the DSP application update by issuing the file.

[0014] During the startup function, the Base bootloader needs to parse the file header of the ELF file stored in the Flash memory of the DSP module board, and parse out information such as the program header, segment header, and operating system entry address from the file header; based on this information, it copies the data in the ELF file to the memory address and performs verification;

[0015] In the update function, there are two update methods according to the distributed topology of the signal processing platform, namely the centralized update method and the distributed centralized update method; for the distributed digital signal processing platform with a relatively simple topology, only PowerPC completes the task of forwarding SRIO information to each node, that is, the centralized update method is adopted; for the distributed platform with a complex topology, the distributed centralized update method is adopted; the distributed centralized update method is: PowerPC assigns the forwarding task to multiple DSPs, and these DSPs are called masters, and then forwards the SRIO data to other slave DSPs.

[0016] Furthermore, in the centralized update method, all update forwarding tasks are completed by PowerPC; for all DSPs, waiting for PPC to complete their SRIO enumeration, three semaphores are set as follows:

[0017] sem_t srio_start_A;

[0018] sem_t srio_update_B

[0019] sem_t srio_boot_C

[0020] At the same time, set two interrupt callback functions, one is triggered when the DSP receives the doorbell information, and the other is triggered when the DSP completes the application update;

[0021] For all DSPs, they wait for semaphore A; when PowerPC has numbered all DSPs, it will send doorbell messages to DSP one by one; after receiving the doorbell, DSP triggers the doorbell interrupt function, releases semaphore A, enters the update thread, and sends a startup message to PowerPC; at the same time, DSP is waiting for semaphore B; after receiving the startup message, PowerPC writes the update information to the specified address of DSP through SRIO NWRITE, and after the writing is completed, notifies DSP to parse the written information; after the parsing is completed, DSP will release semaphore B and write the updated image information to Nand Flash, and then notify PowerPC to perform the above forwarding operations for the remaining DSPs.

[0022] Furthermore, in the distributed centralized update method, for the Master DSP, the PowerPC uses SRIONWRITE to write the data packet to the specified memory address of the Master DSP through SRIO;

[0023] The master DSP waits for semaphore A through thread task_base, waiting for the PowerPC to complete the enumeration operation. After receiving the doorbell message and message information sent by the PowerPC, the interrupt function is triggered to release semaphore A. The master DSP parses the message. After the parsing is completed, a status message is sent to the PowerPC to indicate that the master DSP has started. The distributed centralized update method is that the master DSP forwards the update message to the slave DSP.

[0024] The Slave DSP waits for semaphore A in the task_base thread. When it receives the doorbell message from the Master DSP, it releases semaphore A. The Master DSP forwards the data packet to a Slave DSP in the same way through SRIO NWRITE, writes the specified data packet to the specified memory address of the Slave DSP, and waits for semaphore B.

[0025] After waiting for the SRIO NWRITE data migration to complete, the Master DSP releases semaphore B and waits for semaphore C. After the Slave DSP parses the data packet information, it writes the application image file to the Flash through the SPI bus. After completing the above operations, the Slave DSP sends the doorbell to the Master DSP. After receiving the doorbell, the Master DSP releases semaphore C. This completes the entire image update operation.

[0026] Furthermore, on the signal processing platform, PowerPC can be used to develop corresponding communication drivers, and the collected data can be sent to the host computer through the Ethernet interface to realize functions such as data uploading; commands from the host computer can also be sent to the front-end system module through the Ethernet interface to complete the command issuance function.

[0027] Furthermore, on a distributed signal processing platform, PowerPC can also act as a manager to control the DSP operating system and use SRIO technology to implement startup control of the DSP operating system. The SRIO information sent by PowerPC consists of two parts: a message header and message information. The structure of the message header is as follows:

[0028]

[0029] The information in the message header includes the total length of the message, the command code, the destination address and source address of the message transmission; the command code indicates the startup method of the DSP operating system, which can be started directly or after the system image is updated; the destination address of the message transmission is a unified identification ID; the Base boot program uses SRIO enumeration to ensure that each DSP in a distributed environment has its own unique number; on this basis, PowerPC can accurately notify the Base boot program of each DSP, whether to update the DSP application or directly start the DSP application.

[0030] The beneficial effects of the present invention are:

[0031] The beneficial effects of the present invention mainly relate to the update problem of DSP operating system application. It mainly involves the following two aspects:

[0032] First, the dependence on hardware functions is low. For the DSP module, it only needs to support Srio (high-speed interconnection technology) transmission, and can be updated without a serial port or network.

[0033] Second, it solves the cumbersome process of updating DSP system applications in digital signal processing platforms. By directly sending the updated application files to the DSP module through the PowerPC module, the DSP update process is simplified, achieving a one-click update. This solves the problem of cumbersome solidification and updating of DSP applications in practice. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 This is the system block diagram of the signal processing platform;

[0035] Figure 2 This is the Base guide flow chart of the present invention;

[0036] Figure 3 This is a timing diagram of the centralized update method of the present invention;

[0037] Figure 4 This is a timing diagram of the distributed centralized update method of the present invention. DETAILED DESCRIPTION

[0038] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0039] In the above context, we need to introduce a three-level boot method, which boots the RBOOT boot program through RBL, and the RBOOT program boots the base boot program. The base program decides to start after updating the application through the command issued by PPC, or starts directly, and then boots the DSP system application. The purpose is to enable the DSP application to perform update operations in the current PPC, DSP and FPGA general digital signal processing platform. The flow chart is as follows Figure 2 shown.

[0040] On the signal processing platform, PowerPC can be used to develop the corresponding communication driver, and the collected data can be sent to the host computer through the Ethernet interface to realize functions such as data upload. Commands from the host computer can also be sent to the front-end system module through the Ethernet interface to complete the command issuance function. The Base boot program is also developed based on the above characteristics. Its functions are mainly divided into two modules, the DSP application startup module and the DSP application update module. PowerPC receives the command from the host computer and notifies the Base boot program to complete the corresponding startup or update operation. For the update operation, the host computer can upload the DSP application to the PowerPC file system through the network, and the PPC completes the update of the DSP application by issuing files.

[0041] On a distributed signal processing platform, PowerPC can also act as a manager to control the DSP operating system and use SRIO technology to implement startup control of the DSP operating system. The SRIO message sent by PowerPC consists of two parts: the message header and the message information. The structure of the message header is as follows:

[0042]

[0043] The information in the message header includes the total length of the message information, the command code, the destination address and source address of the message transmission. The command code indicates the startup method of the DSP operating system. It can be started directly or after the system image is updated. The destination address of the message transmission is a unified identification ID. SRIO enumeration and ID allocation operations are very common on the PowerPC platform, and the Reworks DSP operating system also supports enumeration operations. The Base boot program uses SRIO enumeration to ensure that each DSP in a distributed environment has its own unique number. On this basis, PowerPC can accurately notify the Base boot program of each DSP, specifically whether to update the DSP application or directly start the DSP application.

[0044] To boot, the Base bootloader parses the header of the ELF file stored in the DSP module's Flash memory, extracting information such as the program header, segment header, and operating system entry points. Based on this information, it copies the data from the ELF file to the memory address and performs a checksum. This functionality is similar to that of a traditional bootloader and will not be further described here.

[0045] The Base bootloader is characterized by its ability to update DSP applications. Depending on the distributed topology of the signal processing platform, there are two update methods: a centralized update method and a distributed centralized update method. For distributed digital signal processing platforms with relatively simple topologies, only the PowerPC completes the task of forwarding SRIO information to each node, using a centralized update method. For distributed platforms with complex topologies, a distributed centralized update method is used. The distributed centralized update method is as follows: the PowerPC assigns the forwarding task to multiple DSPs, which are called masters (master control devices), and then forwards the SRIO data to other slave DSPs (DSP signal processing systems, slave devices relative to the master control device).

[0046] In the centralized update method, all update forwarding tasks are completed by PowerPC. For all DSPs, wait for PPC to complete their SRIO enumeration and set three semaphores as shown below:

[0047] sem_t srio_start_A;

[0048] sem_t srio_update_B

[0049] sem_t srio_boot_C

[0050] At the same time, two interrupt callback functions are set, one is triggered when the DSP receives the doorbell information, and the other is triggered when the DSP completes the application update.

[0051] For all DSPs, they are waiting for semaphore A. After PowerPC has numbered all DSPs, it will send doorbell messages to the DSPs one by one. After receiving the doorbell, the DSP triggers the doorbell interrupt function, releases semaphore A, enters the update thread, and sends a startup message to PowerPC. At the same time, the DSP is waiting for semaphore B. After PowerPC receives the startup information, it writes the update information to the specified address of the DSP through SRIO NWRITE (SRIO write operation), and notifies the DSP to parse the written information after the write is completed. After the parsing is completed, the DSP will release semaphore B and write the updated image information to Nand Flash (NAND flash memory, a type of flash memory), and then notify PowerPC to perform the above forwarding operations for the remaining DSPs. The timing diagram is as follows Figure 3 shown.

[0052] In the distributed centralized update method, for the Master DSP, PowerPC uses SRIO NWRITE to write the data packet to the specified memory address of the Master DSP through SRIO.

[0053] The master DSP waits on semaphore A through thread task_base, waiting for the PowerPC to complete enumeration. After receiving the doorbell message and message information from the PowerPC, an interrupt function is triggered to release semaphore A. The master DSP then parses the message. After parsing, it sends a status message to the PowerPC, indicating that the master DSP has started. In a distributed centralized update method, the master DSP forwards update messages to the slave DSPs.

[0054] The Slave DSP waits for semaphore A in the task_base thread and releases semaphore A when it receives the doorbell message from the Master DSP. The Master DSP forwards the data packet to a Slave DSP in the same way through SRIO NWRITE and writes the specified data packet to the specified memory address of the Slave DSP, waiting for semaphore B.

[0055] After the SRIO NWRITE data migration is completed, the Master DSP releases semaphore B and waits for semaphore C. After the Slave DSP parses the data packet information, it writes the application image file to the Flash via the SPI bus. After completing the above operations, the Slave DSP sends the doorbell to the Master DSP, and the Master DSP releases semaphore C after receiving the doorbell. This completes the entire image update operation. The timing diagram is shown below. Figure 4 shown.

[0056] The key technical aspects of this invention lie in the update process and algorithm for the DSP module system application within the digital signal processing platform. By leveraging the SPI communication method within the digital signal processing platform, this method implements a simple and efficient method for updating the DSP module system application. A three-level bootstrap model facilitates both DSP application development and application updates.

[0057] The above-described embodiment merely represents one embodiment of the present invention. While the description is relatively specific and detailed, it should not be construed as limiting the scope of the patent. It should be noted that a person skilled in the art would be able to make various modifications and improvements without departing from the spirit of the present invention, and these modifications and improvements fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be determined by the appended claims.

Claims

1. A method for applying a base boot program to a DSP in a distributed environment, characterized in that: The RBOOT boot program is booted through RBL, and the RBOOT program boots the base boot program. The base program decides to start after updating the application through the command issued by PowerPC, or starts directly, and then boots the DSP system application; The Base bootloader is divided into two modules: a module for booting the DSP application and a module for updating the DSP application. The PowerPC receives commands from the host computer and notifies the Base bootloader to complete the corresponding startup or update operation. For the update operation, the host computer uploads the DSP application to the PowerPC file system via the network, and the PowerPC completes the DSP application update by issuing the file. In the startup function, the Base boot program needs to parse the file header of the ELF file stored in the Flash memory of the DSP module board, and parse the program header, segment header and operating system entry address information from the file header; Based on this information, the data in the ELF file is copied to the memory address and verified; In the update function, there are two update methods according to the different distributed topology structures of the distributed signal processing platform, namely the centralized update method and the distributed centralized update method; for the distributed signal processing platform with a relatively simple topology structure, only PowerPC completes the task of forwarding SRIO information to each node, that is, the centralized update method is adopted; for the distributed signal processing platform with a complex topology structure, the distributed centralized update method is adopted; the distributed centralized update method is: PowerPC assigns the forwarding task to multiple DSPs, and these DSPs are called masters, and then forwards the SRIO data to other SlaveDSPs.

2. The method for DSP application base boot program in a distributed environment according to claim 1, characterized in that: In the centralized update method, all update forwarding tasks are completed by PowerPC; for all DSPs, wait for PowerPC to complete their SRIO enumeration and set three semaphores A, B, and C, respectively, srio_start_A, srio_update_B, and srio_boot_C, as shown below: sem_t srio_start_A; sem_t srio_update_B sem_t srio_boot_C At the same time, set two interrupt callback functions, one is triggered when the DSP receives the doorbell message, and the other is triggered when the DSP completes the application update; All DSPs wait for semaphore A. After PowerPC numbers all DSPs, it sends doorbell messages to them one by one. After receiving the doorbell message, the DSP triggers the doorbell message interrupt function, releases semaphore A, enters the update thread, and sends a startup message to PowerPC. Meanwhile, the DSP is waiting for semaphore B. After receiving the startup message, PowerPC writes the update information to the specified address of the DSP via SRIO NWRITE. After the write is complete, it notifies the DSP to parse the written information. After the parsing is completed, the DSP will release the semaphore B and write the updated image information to the Nand Flash, and then notify the PowerPC to perform the above forwarding operation for the other DSPs.

3. The method for applying a base boot program to a DSP in a distributed environment according to claim 2, wherein: In the distributed centralized update method, for the Master DSP, the PowerPC uses SRIO NWRITE to write the data packet to the specified memory address of the Master DSP through SRIO; The Master DSP waits for semaphore A through thread task_base, waiting for the PowerPC to complete the enumeration operation. After receiving the doorbell message and message information sent by the PowerPC, the interrupt function is triggered to release semaphore A. The Master DSP parses the message. After the parsing is complete, a status message is sent to the PowerPC to indicate that the Master DSP has started. In the distributed centralized update method, the Master DSP forwards the update message to the Slave DSP. The Slave DSP waits for semaphore A in the task_base thread. When it receives the doorbell message from the Master DSP, it releases semaphore A. The Master DSP forwards the data packet to a Slave DSP in the same way through SRIO NWRITE, writes the specified data packet to the specified memory address of the Slave DSP, and waits for semaphore B. After waiting for the SRIO NWRITE data migration to complete, the Master DSP releases semaphore B and waits for semaphore C. After the Slave DSP parses the data packet information, it writes the application image file to the Flash through the SPI bus. After completing the above operations, the Slave DSP sends a doorbell message to the Master DSP. After receiving the doorbell message, the Master DSP releases semaphore C. This completes the entire image update operation.

4. The method for applying a base boot program to a DSP in a distributed environment according to claim 1, wherein: On the distributed signal processing platform, PowerPC is used to develop the corresponding communication driver, and the collected data can be sent to the host computer through the Ethernet interface to realize the data upload function; the commands from the host computer are sent to the front-end system module through the Ethernet interface to complete the command issuance function.

5. The method for applying a base boot program to a DSP in a distributed environment according to claim 1, wherein: On the signal processing platform of distributed architecture, PowerPC acts as a manager to control the DSP operating system and uses SRIO technology to realize the startup control of the DSP operating system. The SRIO information sent by PowerPC consists of two parts: Composition: message header and message information; the structure of the message header is as follows: struct srio_msg { u32 uiMsgLen; u32 ui_info_code; u32 srio_send_id; u32 srio_dst_id; }; The information in the message header includes the total length of the message information, the command code, the destination address and source address of the message transmission; the command code indicates the startup method of the DSP operating system, which includes direct startup and startup after the system image is updated; the destination address of the message transmission is a unified identification ID; the Base boot program uses SRIO enumeration to ensure that each DSP in the distributed environment has its own unique number; PowerPC notifies the Base boot program of each DSP to determine whether to update the DSP application or directly start the DSP application.

Citation Information

Patent Citations

  • Network topology acquisition method and device used for distributed multiple DSP system

    CN101616175A

  • Multi-DSP (Digital Signal Processor) platform based distributed type real-time multiple task operating system

    CN103019838A