Method for DSP (Digital Signal Processor) to apply base bootstrap program in distributed environment
By adopting the three-level boot mode DSP application base boot program in a distributed environment, using PPC and SRIO technology, the cumbersome problem of traditional DSP boot program update is solved, and DSP application update is realized without serial port or network. Reduces hardware dependency and simplifies the update process.
Patent Information
- Application Number
- CN202411475732.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-10-22
AI Technical Summary
In a distributed environment, traditional DSP boot program updates are cumbersome and has low hardware support. Especially when there is no emulator or serial port hardware conditions support, it is difficult to update DSP applications.
Using the method of applying base boot program in a distributed environment, the RBOOT boot program is booted through RBL, and the RBOOT program boots the base boot program. The base program decides to update the application and starts it through the commands issued by PPC, or starts directly, and then boots the DSP system. application. The Base boot program functions are divided into two modules: booting DSP application startup module and updating DSP application module, and using SRIO technology to realize startup control and application update of DSP operating system.
It realizes the update of DSP application without serial port or network, reduces the hardware dependence, simplifies the DSP update process, and achieves the effect of one-click update, solving the cumbersome and cumbersome update of DSP applications in the actual process. question.
Smart Images

Figure CN119396476A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of embedded operating systems, and 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. It is widely used in audio processing, image processing, communication systems, and control systems. The design goal of a DSP is to efficiently perform mathematical operations, especially multiplication-accumulation operations (MAC), to meet the requirements of real-time processing. A DSP operating system (DSP Operating System) is an operating system designed specifically for DSP. Since DSP application scenarios usually require efficient real-time data processing, DSP operating systems usually have the following characteristics:
[0003] 1. Real-time: DSP operating system is usually a real-time operating system (RTOS), which can ensure data processing within strict time constraints.
[0004] 2. Lightweight: In order to adapt to DSP hardware with limited resources, 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 have a unique role in the signal processing platform. PowerPC is usually used to perform complex control and processing tasks, providing high computing power and flexibility. DSP is specially designed to process digital signals efficiently and is suitable for real-time processing needs. FPGA provides a high degree of parallel processing capabilities and can be customized as needed, suitable for specific algorithm implementations. They are often used in combination to achieve optimal performance and flexibility. To give full play to their respective advantages. In such a distributed environment, DSP applications also need to be dynamically updated according to changes in application scenarios and requirements. Therefore, developing a base boot program with the function of updating DSP applications and starting DSP applications is an urgent problem to be solved.
[0008] The traditional DSP boot program is started through RBL (ROM Boot Loader, read-only memory boot loader). RBL is a program solidified in the DSP chip, permanently stored in the DSP's ROM, and cannot be modified by the user. After the chip is powered on and reset, RBL reads the RBOOT boot program stored in the internal memory into the internal high-speed memory and runs it. RBOOT then downloads the image from the host through the network card, PCle, and SRIO interfaces, and can also download the image from the external memory through the EMIF, SPI, and I2C interfaces to complete the startup process. This is the traditional secondary boot mode.
[0009] In such a secondary boot mode, if there is a need to update the DSP application, it is necessary to re-burn the application through the emulator or serial port. However, in the actual debugging scenario of the DSP application, sometimes there is not even the support of hardware conditions such as emulators or serial ports. Especially in a distributed environment, if multiple 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 an RBOOT boot program is booted through an RBL, and the RBOOT program boots the base boot program, and the base program decides to start after updating the application through a command issued by a PPC, or starts directly, and then boots the DSP system application;
[0013] The Base boot program function is divided into two modules, the boot DSP application startup module and the update DSP application 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 file system of PowerPC through the network, and PPC completes the update of the DSP application by issuing files;
[0014] 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, operating system entry address and other information from the file header; based on this information, copy the data in the ELF file to the memory address and perform verification;
[0015] In the update function, there are two update methods according to the different distributed topology structures 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 structure, 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 structure, the distributed centralized update method is adopted; the distributed centralized update method is: PowerPC assigns the forwarding task to multiple DSPs, and calls these DSPs master, 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, wait for PPC to complete their SRIO enumeration and set four semaphores as shown below:
[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 are waiting for semaphore A; when PowerPC has numbered all DSPs, it will send doorbell messages to DSP one by one; after DSP receives the doorbell, it 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 PowerPC receives the startup information, it writes the update information to the specified address of DSP through SRIO NWRITE, and after the writing is completed, it notifies DSP to parse the written information; after the parsing is completed, DSP will release semaphore B, write the updated image information into Nand Flash, and then notify PowerPC to perform the above forwarding operation 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 main Master DSP waits for semaphore A through thread task_base, waiting for PowerPC to complete the enumeration operation. After receiving the doorbell message and message information sent by 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 PowerPC, indicating that the Master DSP has been 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 thread task_base. When receiving 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 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, and the Master DSP releases semaphore C after receiving the doorbell. 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 issuing function.
[0027] Furthermore, on a distributed signal processing platform, PowerPC can also be used 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 is enumerated through SRIO, so that each DSP in the 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 involve 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] Secondly, it solves the problem of tedious DSP system application update process in digital signal processing platform. The application files to be updated can be directly sent to the DSP module through the PowerPC module, which simplifies the DSP update process and achieves the effect of one-click update. In this way, the problem of tedious solidification and tedious update of DSP application in actual process is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is the system block diagram of the signal processing platform;
[0035] Figure 2 Base guide flow chart of the present invention;
[0036] Figure 3 This is a timing diagram of the centralized updating method of the present invention;
[0037] Figure 4 This is a timing diagram of the distributed centralized updating method of the present invention. DETAILED DESCRIPTION
[0038] The present invention is described in detail below in conjunction with 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, and its functions are mainly divided into two modules, booting the DSP application startup module and updating the DSP application 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 PPC completes the update of the DSP application by issuing files.
[0041] On a distributed signal processing platform, PowerPC can also be used 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: message header and 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 give each DSP in a distributed environment a 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.
[0044] For 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 from the file header. Based on this information, the data in the ELF file is copied to the memory address and verified. This part of the function is the same as the traditional boot program, so it will not be repeated here.
[0045] The characteristic of the Base boot program is the update function for DSP applications. According to the different distributed topology structures of the signal processing platform, there are two update methods, namely the centralized update method and the distributed centralized update method. For distributed digital signal processing platforms with relatively simple topology structures, only PowerPC completes the task of forwarding SRIO information to each node, that is, the centralized update method is adopted. For distributed platforms with complex topology structures, a distributed centralized update method is adopted. The distributed centralized update method is: PowerPC assigns the forwarding task to multiple DSPs, and calls these DSPs 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 four 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. 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 PowerPC receives the startup information, it writes the update information to the specified address of DSP through SRIO NWRITE (SRIO write operation), and notifies DSP to parse the written information after the write is completed. After the parsing is completed, 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 operation for the remaining DSPs. The timing diagram is as follows Figure 3 shown.
[0052] 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.
[0053] The main Master DSP waits for semaphore A through thread task_base, waiting for PowerPC to complete the enumeration operation. After receiving the doorbell message and message information sent by PowerPC, the interrupt function is triggered to release semaphore A, and the Master DSP parses the message. After the parsing is completed, a status message is sent to PowerPC, indicating that the Master DSP has started. The distributed centralized update method is that the Master DSP forwards the update message to the Slave DSP.
[0054] The Slave DSP waits for semaphore A in the thread task_base, 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, writes the specified data packet to the specified memory address of the Slave DSP, and waits for semaphore B.
[0055] After waiting for 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, 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 point of the present invention is the update process and update algorithm of the digital signal processing platform DSP module system application. The Srio communication method inside the digital signal processing platform is used to realize a simple and efficient method for updating the DSP module system application. A three-level boot mode is used to facilitate the development of DSP application by technicians and the update of DSP application.
[0057] The above-mentioned embodiment only expresses one implementation mode of the present invention, and its description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.
Claims
1. A method for DSP application base boot program 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 PPC, or starts directly, and then boots the DSP system application; The Base boot program function is divided into two modules, the boot DSP application startup module and the update DSP application 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 file system of PowerPC through the network, and PPC completes the update of the DSP application by issuing files; 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, operating system entry address and other 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 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 structure, 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 structure, the distributed centralized update method is adopted; the distributed centralized update method is: PowerPC assigns the forwarding task to multiple DSPs, and calls these DSPs master, and then forwards the SRIO data to other Slave DSPs.
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 PPC to complete their SRIO enumeration and set four semaphores 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 information, 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 DSPs 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. Meanwhile, DSP is waiting for semaphore B. After PowerPC receives the startup message, it writes the update message to the specified address of DSP through SRIO NWRITE, and notifies DSP to parse the written message after the writing is completed. 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 rest of the DSPs.
3. The method for DSP application base boot program in a distributed environment according to claim 1, characterized in that: 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 main Master DSP waits for semaphore A through thread task_base, waiting for PowerPC to complete the enumeration operation. After receiving the doorbell message and message information sent by 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 PowerPC, indicating that the Master DSP has been started. The distributed centralized update method is that the Master DSP forwards the update message to the Slave DSP. The Slave DSP waits for semaphore A in the thread task_base. When receiving 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 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, and the Master DSP releases semaphore C after receiving the doorbell. This completes the entire image update operation.
4. The method for DSP application base boot program in a distributed environment according to claim 1, characterized in that: 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.
5. The method for DSP application base boot program in a distributed environment according to claim 1, characterized in that: On the distributed architecture signal processing platform, PowerPC can also be used as a manager to control the DSP operating system and use 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, 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 is enumerated through SRIO, so that each DSP in the 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.
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
Embedded DSP equipment upgrading method and device based on CAN bus
CN110209419A
Event tracking synchronization method based on TMS320C6678 distributed system
CN114138503A