A multi-core DSP chip supporting multiple communication interfaces, an upgrade method and a product
By configuring multiple communication interfaces and boot programs in the DSP chip, the online software upgrade method of multi-core DSP chip is realized, solving the problem of relying on a single interface and complex control rights switching in the existing technology, and improving the flexibility and maintenance of the system Convenience reduces costs.
Patent Information
- Application Number
- CN202411187672.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-08-28
AI Technical Summary
The existing DSP chip upgrade method relies on a single communication interface, limits system flexibility, increases costs, and requires additional hardware circuits and complex communication interface control switching, resulting in complex and inflexible upgrade process.
Design a multi-core DSP chip that supports multi-communication interfaces. By configuring multiple communication interfaces and boot programs in one sub-core, the online software upgrade method is realized, and the communication module, scheduling module and FLASH operation module are used to parse packets and FLASH operation. , avoid switching of the communication interface control rights and multiplexing the communication interface that is actually used by the system.
It realizes that the system does not need to reserve a special communication interface for software upgrade, which reduces cost and complexity, improves the flexibility and maintenance convenience of the system, and avoids the disadvantages of switching communication control rights.
Smart Images

Figure CN118708214B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of DSP chip technology, and in particular to a DSP chip architecture and an upgrade method. Background Art
[0002] As one of the computing cores of embedded systems, DSP chips have been widely used in various industries. With the continuous iteration and update of system functions, it is usually necessary to upgrade the firmware of DSP chips.
[0003] Normally, you can choose software tools provided by the DSP manufacturer or a third party, connect to the DSP chip through a JTAG burner and perform upgrade operations. The disadvantage is that a special JTAG burner is required, which is usually not available at the terminal application site. The second is that the JTAG interface is usually inside the product, and the device casing needs to be removed for upgrading. Another conventional upgrade method is to use the BOOT mode supported by the chip itself, design related hardware circuits to control the chip to enter the default boot program, and then complete the upgrade operation. The disadvantage of this type of solution is that additional circuits are required to support the upgrade function, which increases the complexity and cost of the system.
[0004] In addition, there are several software upgrade solutions developed by DSP users to make up for the shortcomings of conventional upgrade methods. Among them, the more representative ones are: 1) Patent document "A dual-core DSP detachable remote upgrade system and upgrade method" (publication number CN115469901A) designs a detachable ARM upgrader, which is inserted into the CAN interface of the DSP device to realize firmware distribution. Its disadvantage is that it relies on a dedicated hardware upgrader, which is similar to the traditional JTAG solution. It is difficult to ensure that each terminal site is equipped with this hardware tool.
[0005] 2) Patent documents "A dual-core DSP firmware upgrade method and system based on CAN bus" (publication number CN108845811A), "A dual-core DSP online upgrade method" (publication number CN112363746A), and "Software online upgrade method and device based on dual-core DSP ring line drive" (publication number CN117687654A) respectively proposed DSP upgrade methods based on CAN, SCI, and EtherCAT communication. Their common feature is to establish a communication connection between the host computer and the DSP through a specific communication interface. After the main core is burned, The control of the communication interface needs to be transferred to another core. Similar architectures have two defects. First, it relies on a single communication interface, which limits the flexibility of the system. For example, when the system application uses the EtherCAT interface, but the upgrade program relies on the CAN interface, it is necessary to reserve additional CAN-related hardware circuits for software upgrades. This circuit will not be used when the system is operating normally, which adds additional costs. Second, the above methods all involve the transfer of control of the communication interface, but not all sub-cores of the DSP chip support these communication interfaces. Once some sub-cores do not support the communication interface, the upgrade plan will not be available. Summary of the invention
[0006] The present application provides a multi-core DSP chip, upgrade method and product supporting multiple communication interfaces, aiming to address the deficiencies of the solutions in the above-mentioned background technology and realize a multi-core DSP chip supporting multiple communication interfaces at the same time and its online software upgrade method, so that system users can choose the most convenient communication method to upgrade the DSP software according to actual conditions.
[0007] In a first aspect, a multi-core DSP chip supporting multiple communication interfaces includes multiple sub-cores, each sub-core having at least an application FLASH for storing application programs of each sub-core, being responsible for completing various normal functions of the system when the system is operating normally, and being the object actually modified during each software upgrade; characterized in that one of the sub-cores is recorded as a first sub-core, and the first sub-core is also configured with: a plurality of different communication interfaces for selecting physical connections with corresponding interfaces of external hardware circuits as needed; a boot program for supporting the plurality of different communication interfaces; and the boot program will not be erased or modified during the software upgrade process.
[0008] The boot program includes the following software modules: a communication module, as a software module supporting multiple communication channels, for receiving software upgrade data packets sent by a host computer; a scheduling module, as a software module for processing software upgrade data packets, for parsing the upgrade data packets after receiving them, identifying the number of the sub-core that needs to be upgraded, the specific FLASH address and the FLASH data that needs to be written, and passing the FLASH address and FLASH data to the target sub-core, thereby starting the FLASH data update of the target sub-core; a FLASH operation module, as a software module that actually performs FLASH operations, for writing the received FLASH data into the target address area of the application FLASH of the target sub-core.
[0009] In the above scheme, further optionally, except for the first sub-core, other sub-cores also have a FLASH operation module as a software module for executing the FLASH operation of this sub-core, which is used to write the FLASH data received by this sub-core into the target address area of the FLASH applied by this sub-core; the multiple sub-cores all adopt the same FLASH operation structure.
[0010] In a second aspect, a multi-core DSP online upgrade method supporting multiple communication interfaces is provided, the method being based on the multi-core DSP chip supporting multiple communication interfaces described in the first aspect, wherein a host computer is adapted to be connected to a communication interface of the first sub-core; the online upgrade method comprising: a communication module of the first sub-core identifying the state of the communication interface, responding to an upgrade command and a data packet sent by the host computer, sending the data packet to a scheduling module, and closing all communication interfaces except the current communication interface to avoid data conflicts; the scheduling module of the first sub-core parses the data packet, identifies the sub-core that needs to be upgraded and the corresponding FLASH address and data, the sub-core that needs to be upgraded being recorded as a target sub-core; if the target sub-core has a FLASH operation module, the scheduling module of the first sub-core transmits the FLASH address and data to the FLASH operation module of the target sub-core, and the FLASH content of the target sub-core is updated by the FLASH operation module of the target sub-core; if the target sub-core does not have a FLASH operation module, the FLASH content of the target sub-core is updated directly by the FLASH operation module of the first sub-core according to the FLASH address.
[0011] In the above scheme, further optionally, the communication module includes: confirming whether the data packet is the last data packet each time the data packet is sent to the scheduling module. If it is the last data packet, the communication module ends its operation; if it is not the last data packet, querying whether the current communication interface has received a new data packet. If no new data packet is received, cyclically checking the current communication interface; otherwise, sending the new data packet to the scheduling module and confirming whether it is the last data packet.
[0012] In the third aspect, a multi-core DSP online upgrade system supporting multiple communication interfaces is provided, characterized in that it includes a host computer and the multi-core DSP chip supporting multiple communication interfaces as described in the first aspect; the host computer is adaptively connected to a communication interface of the first sub-core in the multi-core DSP chip.
[0013] In a fourth aspect, a computer program product comprises a computer program / instruction, wherein the computer program / instruction implements the steps of the above method when executed by a processor.
[0014] Compared with the prior art, the present application has at least the following beneficial effects: the present application realizes the monitoring of multiple communication interfaces and the interlocking between interfaces by deploying a software module supporting multiple communication interfaces in a certain DSP sub-core, and the system does not need to reserve a special communication interface for the software upgrade function, and the communication interface actually used by the system can be reused as the upgrade interface. On this basis, by decoupling the communication function and the FLASH operation, the disadvantage of switching the communication control right when upgrading different sub-cores is avoided, and at the same time, each sub-core adopts the same FLASH operation structure, which is easy to operate and maintain. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic diagram of a multi-core DSP online upgrade system supporting multiple communication interfaces provided in the first embodiment of the present application.
[0016] Figure 2 A schematic diagram of a multi-core DSP online upgrade system supporting multiple communication interfaces provided in the second embodiment of the present application.
[0017] Figure 3 A schematic diagram of a multi-core DSP online upgrade system supporting multiple communication interfaces provided in the third embodiment of the present application.
[0018] Figure 4 A flowchart of an online upgrade method for a multi-core DSP supporting multiple communication interfaces is provided in accordance with an embodiment of the present application.
[0019] Figure 5 The figure is a flowchart of the scheduling module in one embodiment of the present application.
[0020] Figure 6 This is a flow chart of the FLASH operation module in one embodiment of the present application.
[0021] Figure 7 The figure is a flow chart of the communication module in one embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0023] In the description of the present application: unless otherwise specified, "plurality" means two or more.
[0024] The terms "first", "second", "third", etc. in this application are intended to distinguish the objects they refer to and do not have any special meaning in terms of technical connotation (for example, they should not be understood as an emphasis on importance or order, etc.).
[0025] The expressions “including”, “comprising”, “having”, etc. also mean “not limited to” (certain units, components, materials, steps, etc.).
[0026] In one embodiment, Figure 1 As shown, a multi-core DSP online upgrade system supporting multiple communication interfaces is provided, including a host computer and a multi-core DSP chip, wherein the multi-core DSP chip includes multiple sub-cores, each sub-core has at least an application FLASH, which is used to store the application programs of each sub-core, is responsible for completing the normal functions of the system when the system is operating normally, and is also the object actually modified during each software upgrade; it is characterized in that one of the sub-cores is recorded as the first sub-core, and the first sub-core is also configured with: a plurality of different communication interfaces, which are used to select the corresponding interface physical connection with the external hardware circuit as needed; a boot program, which supports a plurality of different communication interfaces; the boot program will not be erased or modified during the software upgrade process.
[0027] The boot program includes the following software modules: a communication module, as a software module supporting multiple communication channels, used to receive software upgrade data packets sent by the host computer; a scheduling module, as a software module for processing software upgrade data packets, used to parse the upgrade data packets after receiving them, identify the number of the sub-core that needs to be upgraded, the specific FLASH address and the FLASH data that needs to be written, and pass the FLASH address and FLASH data to the target sub-core, thereby starting the FLASH data update of the target sub-core; a FLASH operation module, as a software module that actually performs FLASH operations, used to write the received FLASH data into the target address area of the application FLASH of the target sub-core.
[0028] In this embodiment, the application FLASH is used to store the application programs of each sub-core, which is responsible for completing the normal functions of the system when the system is operating normally, and is also the object that is actually modified during each software upgrade. In other words, the "software upgrade" mentioned in this embodiment can be equivalent to "updating the data content in the application FLASH".
[0029] Regarding a variety of different communication interfaces: the present invention supports various communication methods, such as SCI, CAN, EtherCAT, SPI, USB and other common communication forms. These interfaces are all supported in the "boot program", and the actual external hardware circuit can be selected according to the actual situation of the system application. The communication interface actually equipped with the application can be connected to the "boot program" as the interface for software upgrade.
[0030] The boot program exists in the program segment of each sub-core FLASH and will not be erased or modified during the software upgrade process. It is responsible for writing the data sent from the host computer to the sub-core into the "application FLASH".
[0031] The structures of each sub-core in a DSP chip may be the same or different. For example, TI's TMS320C28388D DSP chip has three sub-cores, including two TMS320C28x 32-bit CPUs, commonly known as CPU1 and CPU2, and an Arm Cortex-M4 core. In this embodiment, core 1 is designated as the first sub-core, which is used to support the communication interface and scheduling functions, and the other sub-cores only support the FLASH operation function of the core. For cores of different architectures, such as the C28 core and ARM core mentioned above, the difference is only reflected in the specific programming implementation of the "FLASH operation" module, which does not affect the functional structure mentioned in this embodiment.
[0032] In this embodiment, through the cooperation of the communication module (i.e., a software module supporting multiple communication channels) and the communication interface, multiple communication interfaces are supported without relying on additional hardware burners or adapters; no additional hardware circuit support is required, and only the communication interface required for normal application of the system is used as the hardware interface; at the same time, through the cooperation of the communication module, the scheduling module and the FLASH operation module, more specifically, the FLASH operation of each DSP sub-core is decoupled from the communication layer through the scheduling module, and there is no need to switch the control right of the communication interface.
[0033] This embodiment implements simultaneous monitoring of multiple communication interfaces and interlocking between interfaces by deploying a software module supporting multiple communication interfaces in a certain DSP sub-core. The system does not need to reserve a special communication interface for the software upgrade function, and can reuse the communication interface actually used by the system as the upgrade interface. On this basis, by decoupling the communication function and the FLASH operation, the disadvantage of switching the communication control right when upgrading different sub-cores is avoided. At the same time, each sub-core adopts the same FLASH operation structure, which is easy to operate and maintain.
[0034] exist Figure 1In the example, the communication and scheduling modules are located in core 1. In this case, core 1 is the first sub-core mentioned above. All sub-cores including core 1 have FLASH operation modules. Figure 1 On the basis of the above, the present embodiment also has the following design changes: (1) The number of DSP sub-cores, the number of communication interfaces and the communication mode can be flexibly configured according to actual conditions and should not be limited to the number or communication mode mentioned in the present embodiment.
[0035] (2) The communication and scheduling modules are not limited to core 1 or the DSP main core. Other sub-cores that support multiple communication functions can take on these functions. For example, Figure 2 shown.
[0036] (3) For some DSP products, a single sub-core can operate the FLASH of all sub-cores. In this case, the FLASH operation modules of other sub-cores can be omitted, and only the FLASH operation module of core 1 can directly update the FLASH according to the received target address. For details, refer to Figure 3 .
[0037] In one embodiment, except for the first sub-core, other sub-cores also have a FLASH operation module as a software module for executing the FLASH operation of the sub-core, which is used to write the FLASH data received by the sub-core into the target address area of the FLASH applied by the sub-core; multiple sub-cores all use the same FLASH operation structure.
[0038] In this embodiment, multiple sub-cores all use the same FLASH operating structure, which means that each sub-core can use exactly the same operating mode to process data. Although there are differences in the underlying architecture of each sub-core, these differences are limited to the specific programming implementation within each sub-core and do not affect the ability of each sub-core to execute the same operating mode.
[0039] When each sub-core performs FLASH operation, each sub-core only focuses on its own FLASH operation and does not need to care about the implementation method of the communication layer. That is, the specific implementation of the communication layer is completed by the scheduling module and is transparent to the FLASH operation performed by each sub-core, thus achieving decoupling between the communication layer and the FLASH operation layer.
[0040] In one embodiment, Figure 4As shown, a multi-core DSP online upgrade method supporting multiple communication interfaces is provided, the method is based on the multi-core DSP chip supporting multiple communication interfaces of the first aspect, and the host computer is adapted to connect with a certain communication interface of the first sub-core; the online upgrade method comprises: the communication module of the first sub-core identifies the state of the communication interface, responds to the upgrade command and the data packet sent by the host computer, sends the data packet to the scheduling module, and closes all other communication interfaces except the current communication interface to avoid data conflict; the scheduling module of the first sub-core parses the data packet, identifies the sub-core that needs to be upgraded and the corresponding FLASH address and data, and the sub-core that needs to be upgraded is recorded as the target sub-core; if the target sub-core has a FLASH operation module, the scheduling module of the first sub-core transmits the FLASH address and data to the FLASH operation module of the target sub-core, and the FLASH content of the target sub-core is updated by the FLASH operation module of the target sub-core; if the target sub-core does not have a FLASH operation module, the FLASH content of the target sub-core is updated directly by the FLASH operation module of the first sub-core according to the FLASH address.
[0041] In this embodiment, the host computer refers to an industrial computer, a PC or other equipment that supports specific communication functions, and is responsible for sending software data packets to the DSP through the communication interface. In this embodiment, the "communication interface" actually assumes the function of the "upgrade interface", that is, through the communication interface of the first sub-core, not only conventional data communication can be performed, but also online upgrade of the DSP can be performed.
[0042] In this embodiment, the DSP software upgrade process generally follows the following steps: 1) The host computer sends a "start upgrade" command to the DSP. After receiving the command, the DSP switches each sub-core to the "boot program" standby state; after the first sub-core receives the upgrade command, it commands other sub-cores to interrupt their current tasks through the scheduling module and enter the "waiting to receive firmware data" state. In addition to being responsible for the distribution of firmware data, the scheduling module is also responsible for managing the operating mode of each sub-core.
[0043] 2) The host computer sends a software data packet to the DSP through the communication interface. Accordingly, the DSP will perform the following operations: a) The communication module of the first sub-core identifies the status of the communication interface and completes the reception of the data packet. b) The scheduling module of the first sub-core parses the data packet to identify the FLASH sub-core that needs to be upgraded and the corresponding FLASH address and data. c) When the target sub-core has a FLASH operation module, the FLASH operation module of the target sub-core completes the FLASH content update of the sub-core; otherwise, the FLSAH operation module of the first sub-core completes the FLASH content update of the target sub-core.
[0044] 3) If data packets are continuously received, step 2) is executed repeatedly.
[0045] 4) When the host computer sends the last data packet, it notifies the DSP that the upgrade is complete. After receiving the data packet, the DSP exits the upgrade process.
[0046] The operation process of the scheduling module is as follows Figure 5 As shown in the figure, the scheduling module realizes the decoupling of communication and FLASH operation. After receiving a new data packet, the scheduling module performs parsing and distribution. Each sub-core only needs to focus on its own FLASH operation and does not need to care about the implementation method of the communication layer, which helps to simplify the development and maintenance of each subsystem.
[0047] The FLASH operation module runs as follows: Figure 6 As shown, it is only necessary to implement the FLASH burning of this sub-core. Even if the underlying architecture of the processors of each sub-core is different, they can adopt exactly the same operating mode, and their architectural differences are only reflected in the specific programming implementation.
[0048] Since each sub-core can adopt exactly the same operating mode, the core logic code of FLASH operation can be shared by multiple sub-cores, and there is no need to design unique burning logic for each sub-core, which improves code reusability and reduces development and maintenance costs.
[0049] In one embodiment, the communication module includes: each time a data packet is sent to the scheduling module, confirming whether the data packet is the last data packet, and if it is the last data packet, the communication module ends operation.
[0050] If it is not the last data packet, query whether the current communication interface has received a new data packet. If no new data packet is received, check the current communication interface in a loop; otherwise, send the new data packet to the scheduling module and confirm whether it is the last data packet.
[0051] The communication module operates as follows Figure 7 As shown, as one of the core modules of this embodiment, its working mechanism is as follows: i) after entering the software upgrade state, the communication module will open all communication interfaces until a certain interface receives a valid data packet.
[0052] ii) Assuming that after receiving the first data packet through interface x, the communication module believes that the host computer selects interface x as the next communication interface, then all other interfaces are closed to avoid data conflict (interface interlocking), and only interface x is retained (wherein interface x represents any one of interfaces 1 to interface n, and is also a communication interface that the host computer and the first sub-core are adapted to connect in the multi-core DSP online upgrade method that supports multiple communication interfaces in this embodiment).
[0053] iii) Whenever the communication module receives a data packet, it forwards it to the scheduling module for further processing.
[0054] In this embodiment, by shutting down all other communication interfaces except the current communication interface, data conflicts can be effectively avoided during the software upgrade process, the integrity and accuracy of the data packet can be ensured, and errors caused by the simultaneous operation of multiple communication interfaces can be avoided. Shutting down other communication interfaces can also reduce unnecessary interference and improve the reliability of data transmission.
[0055] In one embodiment, a multi-core DSP online upgrade system supporting multiple communication interfaces is also provided, including a host computer and a multi-core DSP chip supporting multiple communication interfaces in the above embodiment; the host computer is adaptively connected to a communication interface of the first sub-core in the multi-core DSP chip.
[0056] In one embodiment, a computer program product is also provided, including a computer program / instruction, which implements the steps of the above-mentioned embodiment method when executed by a processor.
[0057] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A multi-core DSP chip supporting multiple communication interfaces, including multiple sub-cores, each of which has at least an application FLASH for storing the application programs of each sub-core. It is responsible for completing the normal functions of the system when the system is running normally, and is also the object that is actually modified during each software upgrade; It is characterized in that One of the sub-cores is recorded as the first sub-core, and the first sub-core is further configured with: A variety of different communication interfaces are used to select the corresponding interface physical connection with the external hardware circuit as needed; A boot program supports the multiple different communication interfaces; the boot program will not be erased or modified during the software upgrade process, and the boot program includes the following software modules: The communication module, as a software module supporting multiple communication channels, is used to receive software upgrade data packets sent by the host computer; The scheduling module, as a software module for processing software upgrade data packets, is used to parse the upgrade data packets after receiving them, identify the number of the sub-core that needs to be upgraded, the specific FLASH address and the FLASH data that needs to be written, and pass the FLASH address and FLASH data to the target sub-core, thereby starting the FLASH data update of the target sub-core; The FLASH operation module, as a software module that actually performs the FLASH operation, is used to write the received FLASH data into the target address area of the application FLASH of the target sub-core.
2. The multi-core DSP chip supporting multiple communication interfaces according to claim 1, It is characterized in that include: Except for the first sub-core, the other sub-cores also have a FLASH operation module, which is a software module for executing the FLASH operation of the sub-core, and is used to write the FLASH data received by the sub-core into the target address area of the FLASH application of the sub-core; The multiple sub-cores all adopt the same FLASH operation structure.
3. A multi-core DSP online upgrade method supporting multiple communication interfaces, It is characterized in that Based on the multi-core DSP chip supporting multiple communication interfaces as claimed in claim 1, the host computer is adapted and connected to a certain communication interface of the first sub-core; the online upgrade method comprises: The communication module of the first sub-core identifies the state of the communication interface, responds to the upgrade command and data packet sent by the host computer, sends the data packet to the scheduling module, and closes all communication interfaces except the current communication interface to avoid data conflict; The scheduling module of the first sub-core parses the data packet, identifies the sub-core that needs to be upgraded and the corresponding FLASH address and data, and the sub-core that needs to be upgraded is recorded as the target sub-core; If the target sub-core has a FLASH operation module, the scheduling module of the first sub-core transmits the FLASH address and data to the FLASH operation module of the target sub-core, and the FLASH operation module of the target sub-core completes the FLASH content update of the sub-core; If the target sub-core does not have a FLASH operation module, the FLASH operation module of the first sub-core directly completes the update of the FLASH content of the target sub-core according to the FLASH address.
4. The online upgrade method for a multi-core DSP supporting multiple communication interfaces according to claim 3, It is characterized in that The communication module comprises: Each time a data packet is sent to the scheduling module, it is confirmed whether the data packet is the last data packet. If it is the last data packet, the communication module ends its operation; If it is not the last data packet, query whether the current communication interface has received a new data packet. If no new data packet is received, check the current communication interface in a loop; otherwise, send the new data packet to the scheduling module and confirm whether it is the last data packet.
5. A multi-core DSP online upgrade system supporting multiple communication interfaces, It is characterized in that The invention comprises a host computer and the multi-core DSP chip supporting multiple communication interfaces as claimed in claim 1; the host computer is adaptively connected to a communication interface of the first sub-core in the multi-core DSP chip.
6. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instructions are executed by a processor, the steps of the method as claimed in claim 3 are implemented.
