FPGA program multi-version management online upgrading system and method

By designing the FPGA program multi-version management online upgrade system, using the communication between the CPU module and the remote CPU module and CRC verification, the online smooth upgrade of the FPGA program is achieved, solving the cumbersome and reliability problems of the traditional upgrade method, and improving power The system's safe operation and maintenance efficiency.

CN119292639APending Publication Date: 2025-01-10NANJING GUODIAN NANZI POWER GRID AUTOMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411673688.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The traditional FPGA program upgrade method is complicated to operate, which can easily lead to program error recording and writing failure, affecting the reliability and stability of the relay protection device, and is not convenient for online upgrades, affecting the safe operation and maintenance efficiency of the power system.

Method used

Design an online upgrade system for multi-version management of FPGA programs, including FPGA module, CPU module and Flash storage module, communicate with remote CPU module through the CPU module, and perform version comparison and CRC verification according to control commands to ensure the safe writing of FPGA module. , realize online smooth upgrade.

Benefits of technology

Improves the ease of use and reliability of FPGA program management, enhances system flexibility and adaptability, ensures the security and stability of online upgrades, reduces maintenance costs and downtime, and prevents potential errors or malware execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292639A_ABST
    Figure CN119292639A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power system automation, in particular to an FPGA program multi-version management online upgrading system and method, and the system comprises an FPGA module, a CPU module, a Flash storage module and a remote CPU module; a plurality of FPGA (Field Programmable Gate Array) programs with different function versions are stored in the Flash storage module; the Flash storage module is connected with the CPU module; the CPU module obtains a control command from the remote CPU module through the FPGA module; and the CPU module controls the FPGA module to program the corresponding FPGA version program according to the FPGA program version information in the control command. According to the method, the flexibility and the reliability of FPGA program management are improved, continuous updating and maintenance of the system are ensured through an online upgrading function, physical contact or hardware replacement is not needed, and therefore the maintenance cost is reduced, and the availability of the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power system automation, and in particular to an FPGA program multi-version management online upgrade system and method. Background Art

[0002] With the continuous evolution of smart grids, the application of digital relay protection devices is becoming more and more extensive. Among them, field programmable gate arrays (FPGAs) have gradually become the core components of these devices due to their powerful parallel processing capabilities and flexibility. At present, the upgrade of FPGA programs and configurations mainly relies on traditional offline methods, specifically writing the updated program code into the FPGA or the associated auxiliary management CPU chip through a special burner or using a local communication interface. Although the program update using a burner is straightforward, it is relatively complicated for non-professional technicians, and the burner itself has the limitation of being non-portable. On the other hand, although online updates through communication interfaces provide higher flexibility, they are accompanied by the risk of update failure, which may affect the reliability and stability of relay protection.

[0003] As relay protection devices develop towards platformization and modularization, the device boards used on site generally have high versatility. Through the highly standardized design of software and hardware, different functional requirements can be achieved by simply switching the software version, which greatly improves the flexibility and adaptability of the equipment. However, this trend also puts higher requirements on FPGA program management. The traditional on-site burning method is not only cumbersome to operate, but also faces the risk of hardware damage caused by program error burning and burning failure. These problems directly threaten the safe operation and maintenance efficiency of the power system. Summary of the invention

[0004] The purpose of the present invention is to provide an FPGA program multi-version management online upgrade system and method in order to solve at least one of the above technical problems, so as to ensure the online smooth upgrade of multi-version programs without affecting the stable operation of the system.

[0005] The present invention achieves the above-mentioned purpose through the following technical solutions:

[0006] An FPGA program multi-version management online upgrade system, comprising: an FPGA module, a CPU module, a Flash storage module and a remote CPU module;

[0007] The Flash storage module stores a plurality of FPGA programs of different functional versions; the Flash storage module is connected to the CPU module;

[0008] The CPU module obtains control commands from the remote CPU module through the FPGA module;

[0009] The CPU module controls the FPGA module to burn the corresponding FPGA version program according to the FPGA program version information in the control command.

[0010] Furthermore, the FPGA module includes: a routing unit and a service unit; the Flash storage module stores an FPGA basic function program;

[0011] The routing unit is used to communicate with the remote CPU module and the CPU module; the routing unit distributes the data communicated with the remote CPU module into a business data stream and a control data stream according to the destination address, and transmits them to the business unit and the CPU module respectively;

[0012] The business unit burns the FPGA program according to the command of the CPU module, and the business unit implements the corresponding data function according to the burned FPGA program;

[0013] The CPU module controls the FPGA module to burn the FPGA basic function program when powered on; the FPGA basic function program only implements the routing unit function.

[0014] Furthermore, the Flash storage module also stores FPGA program version data sets corresponding to FPGA programs of different functional versions;

[0015] The CPU module sends the FPGA program version data set to the remote CPU module through the routing unit.

[0016] Furthermore, the FPGA program version data set includes characteristic flags of the FPGA programs of various functional versions, and the characteristic flags include CRC and version number of the FPGA program version.

[0017] Furthermore, the control command includes an operation command and target FPGA version information;

[0018] When the control command includes target FPGA version information, the CPU module compares the target FPGA version information with the current FPGA version information of the FPGA module. If the two are inconsistent, the CPU module is controlled to burn the FPGA version program corresponding to the target FPGA version information.

[0019] Further, the control command includes an FPGA version upgrade command and FPGA upgrade version program data;

[0020] When the control command includes an FPGA version upgrade command and FPGA upgrade version data, the CPU module performs a CRC check on the FPGA upgrade version program data;

[0021] If the verification is passed, the CPU module updates the FPGA program version data set stored in the Flash storage module and sends it to the remote CPU module;

[0022] If the verification fails, the CPU module deletes the received FPGA upgrade version program data and sends the FPGA program version data set stored in the Flash storage module to the remote CPU module.

[0023] Furthermore, the CPU module is also used to monitor the programming status of the FPGA module.

[0024] Furthermore, the CPU module includes a data processor and a data buffer; the Flash storage module includes at least one of a NOR Flash storage medium, a NAND Flash storage medium, and an EMMC storage medium.

[0025] A method for online upgrade of multi-version management of FPGA programs, using any of the above-mentioned systems for online upgrade of multi-version management of FPGA programs, the method comprising:

[0026] The CPU module controls the FPGA module to burn the FPGA basic function program when the system is powered on; the FPGA basic function program only implements the routing unit function of the FPGA module to ensure basic communication capabilities;

[0027] The CPU module obtains control commands from a remote CPU module through the FPGA module;

[0028] When the control command includes target FPGA version information, the CPU module compares the target FPGA version information with the current FPGA version information of the FPGA module;

[0029] If the two are inconsistent, the CPU module controls the FPGA module to burn the FPGA version program corresponding to the target FPGA version information; the burning step includes:

[0030] The CPU module obtains the FPGA version program corresponding to the target FPGA version information from the Flash storage module;

[0031] The CPU module sets the FPGA reset signal PROG_B to be valid, and resets the FPGA module;

[0032] Detecting whether the reset completion signal INIT of the FPGA module is valid, if the reset is completed, the CPU module burns the FPGA version program corresponding to the target FPGA version information to the FPGA module through the bus;

[0033] Check whether the FPGA program burning completion signal DONE is valid; if it is valid, the burning step is completed; if the DONE signal times out, the burning step is executed again.

[0034] Furthermore, the method further comprises:

[0035] When the control command includes an FPGA version upgrade command and FPGA upgrade version data, the CPU module controls the FPGA module to burn the FPGA upgrade version program; specifically including:

[0036] The CPU module performs CRC check on the FPGA upgrade version program data;

[0037] If the verification is passed, the CPU module updates the FPGA program version data set stored in the Flash storage module and sends it to the remote CPU module;

[0038] If the verification fails, the CPU module deletes the received FPGA upgrade version program data and sends the FPGA program version data set stored in the Flash storage module to the remote CPU module.

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

[0040] The present invention provides an FPGA program multi-version management online upgrade system and method, thereby realizing the smooth online upgrade of multiple versions of FPGA programs without affecting the stable operation of the system. The system ensures accurate management and safe upgrade of program versions through the collaborative work of the CPU module and the FPGA module, as well as communication with the remote CPU module. The CPU module is responsible for executing the burning command, performing version comparison, CRC check and updating the version data set, while the FPGA module is responsible for receiving and executing the burning program. This method improves the ease of device upgrade and enhances the reliability of the protection device through standardized software version management.

[0041] The present invention not only optimizes the management process of FPGA programs, but also improves the flexibility and adaptability of the system through the online upgrade function. It allows the system to receive and install new program versions during operation without interrupting service, thereby reducing maintenance costs and downtime. In addition, by ensuring that all program versions are CRC-checked, the present invention enhances the security of the system, prevents potential errors or the execution of malicious software, and ensures the stability of the system and the integrity of the data. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A schematic diagram of the structure of an FPGA program multi-version management online upgrade system according to an embodiment of the present invention;

[0043] Figure 2 A flowchart of a method for online upgrading of multi-version management of FPGA programs according to an embodiment of the present invention;

[0044] Figure 3 A flowchart of FPGA program burning according to an embodiment of the present invention;

[0045] Figure 4 The present invention is a flowchart of an online upgrade method for managing multiple versions of an FPGA program according to another embodiment of the present invention. DETAILED DESCRIPTION

[0046] The content of the present invention will now be discussed with reference to exemplary embodiments. It should be understood that the embodiments discussed are only to enable those skilled in the art to better understand and thus implement the content of the present invention, rather than implying any limitation on the scope of the present invention.

[0047] As used herein, the term “including” and variations thereof are to be interpreted as open-ended terms meaning “including, but not limited to.” The term “based on” is to be interpreted as “based, at least in part, on.” The terms “one embodiment” and “an embodiment” are to be interpreted as “at least one embodiment.”

[0048] Embodiment 1

[0049] Figure 1 FIG. 1 is a schematic diagram of the structure of an FPGA program multi-version management online upgrade system according to an embodiment of the present invention. Figure 1 As shown, according to one embodiment of the present invention, an FPGA program multi-version management online upgrade system includes: an FPGA module, a CPU module, a Flash storage module and a remote CPU module;

[0050] The Flash storage module stores multiple FPGA programs with different functional versions; the Flash storage module is connected to the CPU module;

[0051] The CPU module obtains control commands from the remote CPU module through the FPGA module;

[0052] The CPU module controls the FPGA module to burn the corresponding FPGA version program according to the FPGA program version information in the control command.

[0053] Preferably, the CPU module is also used to monitor the programming status of the FPGA module.

[0054] Preferably, the CPU module includes a data processor and a data buffer; the Flash storage module includes at least one of a NOR Flash storage medium, a NAND Flash storage medium, and an EMMC storage medium.

[0055] In this embodiment, the FPGA program multi-version management online upgrade system realizes efficient management and safe upgrade of the FPGA program by integrating the FPGA module, CPU module, Flash storage module and remote CPU module. The Flash storage module stores multiple FPGA programs with different functional versions and is connected to the CPU module. The CPU module is responsible for receiving control commands from the remote CPU module, and controls the burning signal and burning data flow of the FPGA module according to the version information in these commands, and controls the FPGA module to burn the corresponding FPGA version program. In addition, the CPU module is also responsible for monitoring the burning status of the FPGA module to ensure the success and stability of the burning process.

[0056] The design of the CPU module includes a data processor and a data buffer, where the data processor can be ARM or MCU, etc., and the data buffer is responsible for temporarily storing data, such as DDR or SDRAM. This design enables the CPU module to effectively process and cache data transmitted from the Flash storage module so that the FPGA module can accurately burn the required FPGA version program. The Flash storage module can use different storage media such as NOR Flash, NAND Flash or EMMC, which can be selected according to the specific needs and cost considerations of the system.

[0057] The present invention not only improves the flexibility and reliability of FPGA program management, but also ensures continuous updating and maintenance of the system through the online upgrade function, without the need for physical contact or replacement of hardware, thereby reducing maintenance costs and improving system availability. In addition, the multi-version management function enables the system to flexibly cope with different application scenarios and quickly respond to software update requirements, thereby enhancing the adaptability and competitiveness of the system.

[0058] According to an embodiment of the present invention, the FPGA module includes: a routing unit and a service unit; the FPGA basic function program is stored in the Flash storage module;

[0059] The routing unit is used to communicate with the remote CPU module and the CPU module; the routing unit distributes the data communicated with the remote CPU module into business data flow and control data flow according to the destination address, and transmits them to the business unit and the CPU module respectively;

[0060] The business unit burns the FPGA program according to the command of the CPU module, and the business unit realizes the corresponding data function according to the burned FPGA program;

[0061] The CPU module controls the FPGA module to burn the FPGA basic function program when powered on; the FPGA basic function program only implements the routing unit function.

[0062] Preferably, the Flash storage module also stores FPGA program version data sets corresponding to FPGA programs of different functional versions;

[0063] The CPU module sends the FPGA program version data set to the remote CPU module through the routing unit.

[0064] Preferably, the FPGA program version data set includes characteristic marks of the FPGA program of each functional version, and the characteristic marks include the CRC and version number of the FPGA program version.

[0065] In this embodiment, the FPGA module includes a routing unit and a service unit, wherein the routing unit is responsible for communicating with the remote CPU module and the local CPU module, and distributes the received data stream into a service data stream and a control data stream according to the destination address, and transmits them to the service unit and the CPU module respectively. The service unit burns different FPGA programs according to the command of the CPU module, and implements the corresponding data functions according to the burned FPGA program. When the system is powered on, the CPU module controls the FPGA module to burn the FPGA basic function program (i.e., the Golden program), which only implements the routing unit function to ensure basic communication capabilities.

[0066] The Flash storage module stores FPGA basic function programs and multiple FPGA programs with different function versions, as well as the corresponding FPGA program version data sets. The FPGA program version data set includes characteristic marks such as the CRC checksum and version number of the FPGA program, so that the remote CPU module can identify FPGA programs with different function versions based on the file. The CPU module sends these version data sets to the remote CPU module through the routing unit, and after receiving the control command of the remote CPU module, controls the FPGA module to burn the corresponding FPGA version program according to the version information in the command. In addition, the CPU module also monitors the burning status of the FPGA module to ensure the success and stability of the burning process; for example, by listening to the FPGA program burning completion signal (such as the DONE signal), the burning status of the FPGA module can be monitored.

[0067] The FPGA module of the present invention burns different FPGA programs through the CPU module after power-on to realize different functions, and supports the power-on startup mode of the slave mode, that is, after power-on, the CPU module burns the FPGA program of the FPGA module to realize different program functions. This design not only improves the flexibility and reliability of the system, but also ensures the continuous update and maintenance of the system through the online upgrade function, without physical contact or replacement of hardware, thereby reducing maintenance costs and improving system availability. In addition, the multi-version management function enables the system to flexibly respond to different application scenarios, quickly respond to software update requirements, and enhance the adaptability and competitiveness of the system.

[0068] According to an implementation mode of the present invention, the control command includes an operation command and target FPGA version information;

[0069] When the control command includes the target FPGA version information, the CPU module compares the target FPGA version information with the current FPGA version information of the FPGA module. If the two are inconsistent, the CPU module is controlled to burn the FPGA version program corresponding to the target FPGA version information.

[0070] In this embodiment, the FPGA program multi-version management online upgrade system realizes the automatic and intelligent upgrade of the FPGA program through precise control command processing and version management. The control command received by the system includes the run command and the target FPGA version information. When the target FPGA version information is inconsistent with the FPGA version information currently running by the FPGA module, the CPU module triggers the burning process. The specific steps are as follows: First, the CPU module reads the program corresponding to the target FPGA version information from the local Flash storage module; then, the CPU module resets the FPGA module by setting the FPGA reset signal PROG_B to be valid; then, the FPGA module reset completion signal INIT is detected, and after confirming that the reset is completed, the CPU module burns the FPGA version program corresponding to the target FPGA version information to the FPGA module through the bus; finally, the FPGA program burning completion signal DONE is detected; if it is valid, the burning is completed; if it times out, the burning process is re-executed. This process ensures that the FPGA module can automatically load and run the correct FPGA program according to the latest control command and version information, thereby improving the flexibility and reliability of the system, and also simplifies the management and upgrade process of the FPGA program.

[0071] The present invention can adapt to constantly changing application requirements, quickly respond to software updates, and enhance the adaptability and competitiveness of the system.

[0072] According to one embodiment of the present invention, the control command includes an FPGA version upgrade command and FPGA upgrade version program data;

[0073] When the control command includes an FPGA version upgrade command and FPGA upgrade version data, the CPU module performs a CRC check on the FPGA upgrade version program data;

[0074] If the verification passes, the CPU module updates the FPGA program version data set stored in the Flash storage module and sends it to the remote CPU module;

[0075] If the verification fails, the CPU module deletes the received FPGA upgrade version program data and sends the FPGA program version data set stored in the Flash storage module to the remote CPU module.

[0076] In the present embodiment, when the control command includes an FPGA version upgrade command and FPGA upgrade version program data, the CPU module first performs a CRC check on these data to ensure the integrity and correctness of the data. If the check is passed, the CPU module will update the FPGA program version data set stored in the Flash storage module, and send the updated FPGA program version data set to the remote CPU module. If the check fails, the CPU module will delete the received FPGA upgrade version program data, and send the current FPGA program version data set stored in the Flash storage module to the remote CPU module to ensure that the program data running in the system is verified. The CPU module downloads the program through a specific interface (such as an SPI interface or a parallel data interface) with the FPGA module. When receiving the program upgrade command sent by the remote CPU module, the upgrade program data is received through the FPGA routing unit, and the FPGA program version data set is updated to complete the FPGA program update stored in the Flash storage module.

[0077] The present invention ensures that the FPGA module can automatically load and run the correct FPGA program according to the latest control command and version information, thereby improving the flexibility and reliability of the system and simplifying the management and upgrade process of the FPGA program. In this way, the system can adapt to changing application requirements, quickly respond to software updates, and enhance the adaptability and competitiveness of the system.

[0078] Embodiment 2

[0079] According to one embodiment of the present invention, an FPGA program multi-version management online upgrade system includes a CPU module and an FPGA module;

[0080] The CPU module completes the FPGA program burning by controlling the FPGA module burning signal and burning data flow and detecting the FPGA module burning completion status; the CPU module stores the Golden program and multiple functional versions of the program and the corresponding version data sets in the local Flash storage module.

[0081] The FPGA module includes a routing unit and a business unit. The routing unit divides the data communicated with the remote CPU module into business data flow and control data flow according to the destination address, and transmits them to the business unit and CPU module respectively. The business unit implements different data functions according to different burning programs.

[0082] In this embodiment, when the CPU module is powered on, it first loads the Golden program to the FPGA module, implements only the routing unit function, sends a local version data set to the remote CPU module, and waits for the running command and running version number of the remote CPU module. After receiving the corresponding version running command, the FPGA module loads the corresponding FPGA program to run. If it receives a program upgrade command sent by the remote CPU module, it receives the upgraded program data through the routing unit of the FPGA module and updates it to the version data set to complete the program update.

[0083] The CPU module includes data processors such as ARM and MCU, and also includes buffers such as DDR and SDRAM to complete data caching. The Flash storage module can use a variety of storage media such as NOR Flash, NAND Flash, and EMMC.

[0084] The Flash storage module contains the Golden program, which only implements the routing unit function of the FPGA module and the communication function between the local CPU module and the remote CPU module. At the same time, the Flash storage module stores multiple FPGA program function versions and version data sets. Each function version can implement different business unit functions of the FPGA module. The version data set contains characteristic flags of multiple function versions, including but not limited to the CRC and version number of the program version, so that the remote CPU module can identify different function versions through this file.

[0085] The CPU module can download programs to the FPGA module through specific interfaces between the CPU module and the FPGA module, such as the SPI interface and the parallel data interface, and monitor the burning status of the FPGA module by listening to the FPGA program burning completion signal, such as the DONE signal.

[0086] The present invention controls the burning process of the FPGA module through the CPU module, and manages the Golden program and multiple functional versions of the program and version data sets in the local Flash storage module, thereby realizing multi-version online smooth upgrade of the FPGA program without affecting the stable operation of the system, solving the problem that the traditional upgrade method is cumbersome and error-prone, and improving the safe operation and maintenance efficiency of the power system.

[0087] Embodiment 3

[0088] Figure 2 This is a flow chart of an FPGA program multi-version management online upgrade method according to an embodiment of the present invention. Figure 2 As shown, according to an embodiment of the present invention, a method for online upgrading of multi-version management of FPGA programs adopts any one of the multi-version management online upgrading systems of FPGA programs of the present invention, and the method comprises:

[0089] Step S102, the CPU module controls the FPGA module to burn the FPGA basic function program when the system is powered on; the FPGA basic function program only implements the routing unit function of the FPGA module to ensure basic communication capabilities;

[0090] Step S104, the CPU module obtains a control command from the remote CPU module through the FPGA module;

[0091] Step S106, when the control command includes the target FPGA version information, the CPU module compares the target FPGA version information with the current FPGA version information of the FPGA module; if the two are inconsistent, the CPU module controls the FPGA module to burn the FPGA version program corresponding to the target FPGA version information; the burning step includes:

[0092] Step S1062, the CPU module obtains the FPGA version program corresponding to the target FPGA version information from the Flash storage module;

[0093] Step S1064, the CPU module sets the FPGA reset signal PROG_B to be valid, and resets the FPGA module;

[0094] Step S1066, detecting whether the FPGA module reset completion signal INIT is valid, if the reset is completed, the CPU module burns the FPGA version program corresponding to the target FPGA version information to the FPGA module through the bus;

[0095] Step S1068, detecting whether the FPGA program burning completion signal DONE is valid; if it is valid, the burning step is completed; if the DONE signal times out, the burning step is executed again.

[0096] In this embodiment, the FPGA program multi-version management online upgrade method realizes the automatic management and upgrade of the FPGA program through a series of precisely controlled steps. After the system is powered on, the CPU module will load the FPGA basic function program (Golden program) to the FPGA module. The program only contains basic routing functions to realize communication with the remote CPU. The CPU module sends the current FPGA program version data set stored in the Flash storage module to the remote CPU module at a fixed frequency, that is, the local version data set. The CPU module obtains the control command from the remote CPU module through the FPGA module. When the control command contains the target FPGA version information, the CPU module will compare it with the current version information of the FPGA module. If the version is inconsistent, the CPU module will start the burning process: first read the corresponding FPGA version program from the Flash storage module, then set the FPGA reset signal PROG_B, detect the FPGA module reset completion signal INIT, once the FPGA reset is completed, the CPU module will burn the new version program to the FPGA module through the bus, and detect the burning completion signal DONE. If the DONE signal is valid, the burning step is completed; if it times out, the burning step is re-executed.

[0097] After receiving the run command and version number sent by the remote CPU, the CPU module will load the corresponding version of the FPGA program, implement the corresponding functions, and continue to listen to the version switching command of the remote CPU. If a version switching command is received, the CPU module will re-burn the Golden program and continue to perform related operations. The CPU module obtains the corresponding FPGA program from the Flash storage module and controls the FPGA module to burn the new version program.

[0098] The present invention ensures that the system always runs the latest and verified program version while maintaining communication and data synchronization with the remote CPU module. The present invention improves the reliability and flexibility of the system, reduces human intervention, reduces the risk of errors during the upgrade process, and ensures the stability and security of the system.

[0099] According to one embodiment of the present invention, the method further comprises:

[0100] Step S108, when the control command includes the FPGA version upgrade command and the FPGA upgrade version data, the CPU module controls the FPGA module to burn the FPGA upgrade version program; specifically including:

[0101] Step S1082, the CPU module performs CRC check on the FPGA upgrade version program data;

[0102] Step S1084, if the verification passes, the CPU module updates the FPGA program version data set stored in the Flash storage module and sends it to the remote CPU module;

[0103] Step S1086: If the verification fails, the CPU module deletes the received FPGA upgrade version program data and sends the FPGA program version data set stored in the Flash storage module to the remote CPU module.

[0104] In this embodiment, the FPGA program multi-version management online upgrade method realizes the automatic management and upgrade of the FPGA program version through the close cooperation of the CPU module and the FPGA module. When receiving a control command containing an FPGA version upgrade command and FPGA upgrade version data, the CPU module first performs a CRC check on these data to ensure the integrity and correctness of the data. If the check passes, the CPU module will update the FPGA program version data set stored in the Flash storage module and send the updated data to the remote CPU module. If the check fails, the CPU module will delete the received FPGA upgrade version program data and send the FPGA program version data set currently stored in the Flash storage module to the remote CPU module to ensure that the program data running in the system is verified.

[0105] The CPU module downloads the program through a specific interface (such as an SPI interface or a parallel data interface) with the FPGA module, and monitors the burning completion signal (such as a DONE signal) of the FPGA module to monitor the FPGA burning status. In the case of not receiving the running command and version number, the CPU module will listen to the program upgrade command and upgrade version number of the remote CPU. Once the version data sent by the remote CPU is received, the CPU module will perform a CRC check, and update the local version data set or delete the program data according to the check result, and send the corresponding version data set to the remote CPU, and then continue to perform related operations.

[0106] The present invention improves the flexibility and reliability of the system, ensures the security and correctness of the FPGA program, and also simplifies the management and upgrade process of the FPGA program, so that the system can quickly adapt to software updates and function expansions, thereby enhancing the adaptability and competitiveness of the system.

[0107] Embodiment 4

[0108] Figure 3 A flowchart of FPGA program burning according to an embodiment of the present invention; Figure 4 FIG. 1 is a flow chart of an FPGA program multi-version management online upgrade method according to another embodiment of the present invention. Figure 3-4As shown, according to an embodiment of the present invention, a method for online upgrade of multi-version management of FPGA programs is applied to any FPGA program multi-version management online upgrade system of the present invention, and the method comprises the following steps:

[0109] Step 1: The CPU module loads the corresponding version of the program and sets the FPGA reset signal PROG_B to be valid to reset the FPGA module;

[0110] Step 2: Check whether the reset completion signal INIT of the FPGA module is valid. If the reset is completed, the CPU module downloads the corresponding version of the program to the FPGA module through the bus;

[0111] Step 3: After the program is downloaded, check whether the FPGA program burning completion signal DONE is valid. If it is valid, the program loading is completed. If the DONE signal times out, re-execute the burning program.

[0112] In this implementation, the FPGA module needs to support the power-on startup mode of the slave mode, that is, after power-on, the CPU module burns the program of the FPGA module to realize different program functions. The FPGA module includes two basic functional units, the routing unit and the business unit. The routing unit allocates the communication data with the remote CPU module into business data flow and control data flow according to the destination address, and transmits them to the business unit and the CPU module respectively. The business unit realizes different data functions according to different burning programs.

[0113] The steps for multi-version management and burning are as follows:

[0114] Step 1: After power-on, the CPU module loads the Golden program to the FPGA module to implement the function of communicating with the remote CPU module, and sends the local version data set to the remote CPU module at a fixed frequency;

[0115] Step 2: When the CPU module receives the running command and running version number sent by the remote CPU module, it loads the corresponding version program to the FPGA module to implement the corresponding function. It also monitors the version switching command of the remote CPU module synchronously. If it receives the version switching command, it re-burns the Golden program to the FPGA module and continues the related operations.

[0116] Step 3: If the running command and running version number are not received, monitor whether the program upgrade command and the corresponding upgrade version number of the remote CPU module are received. If the version data sent by the remote CPU module is received, the received program will be CRC checked. If the program check passes, the updated local version data set will be sent to the remote CPU module, and related operations will continue. If the program check fails, the program upgrade fails, the program data will be deleted, and the local version data set will be sent to the remote CPU module, and related operations will continue.

[0117] In this implementation, the burning process of the FPGA module is controlled by the CPU module, thereby realizing smooth online upgrade of multiple versions of the FPGA program. The method includes the steps of loading the corresponding version program, resetting the FPGA module, downloading the program, detecting the burning completion signal, etc., thereby ensuring the accuracy and reliability of the program upgrade, effectively solving the problem of cumbersome and error-prone operation of the traditional upgrade method, and improving the safe operation and maintenance efficiency of the power system.

[0118] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the method described above can refer to the corresponding process in the aforementioned system embodiment, and will not be repeated here.

[0119] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the present application.

[0120] It should be understood that the size of the serial numbers of each step in the content of the invention and the embodiments of the present invention does not absolutely mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

Claims

1. An FPGA program multi-version management online upgrade system, characterized in that: include: FPGA module, CPU module, Flash storage module and remote CPU module; The Flash storage module stores a plurality of FPGA programs of different functional versions; The Flash storage module is connected to the CPU module; The CPU module obtains control commands from the remote CPU module through the FPGA module; The CPU module controls the FPGA module to burn the corresponding FPGA version program according to the FPGA program version information in the control command.

2. The FPGA program multi-version management online upgrade system according to claim 1, characterized in that: The FPGA module includes: a routing unit and a service unit; the Flash storage module stores an FPGA basic function program; The routing unit is used to communicate with the remote CPU module and the CPU module; the routing unit distributes the data communicated with the remote CPU module into a business data stream and a control data stream according to the destination address, and transmits them to the business unit and the CPU module respectively; The business unit burns the FPGA program according to the command of the CPU module, and the business unit implements the corresponding data function according to the burned FPGA program; The CPU module controls the FPGA module to burn the FPGA basic function program when powered on; the FPGA basic function program only implements the routing unit function.

3. The FPGA program multi-version management online upgrade system according to claim 2, characterized in that: The Flash storage module also stores FPGA program version data sets corresponding to FPGA programs of different functional versions; The CPU module sends the FPGA program version data set to the remote CPU module through the routing unit.

4. The FPGA program multi-version management online upgrade system according to claim 3, characterized in that: The FPGA program version data set includes characteristic marks of the FPGA program of each functional version, and the characteristic marks include the CRC and version number of the FPGA program version.

5. The FPGA program multi-version management online upgrade system according to claim 1, characterized in that: The control command includes an operation command and target FPGA version information; When the control command includes the target FPGA version information, the CPU module compares the target FPGA version information with the current FPGA version information of the FPGA module. If the two are inconsistent, the CPU module is controlled to burn the FPGA version program corresponding to the target FPGA version information.

6. The FPGA program multi-version management online upgrade system according to claim 1, characterized in that: The control command includes an FPGA version upgrade command and FPGA upgrade version program data; When the control command includes the FPGA version upgrade command and the FPGA upgrade version data, the CPU module performs a CRC check on the FPGA upgrade version program data; If the verification is passed, the CPU module updates the FPGA program version data set stored in the Flash storage module and sends it to the remote CPU module; If the verification fails, the CPU module deletes the received FPGA upgrade version program data and sends the FPGA program version data set stored in the Flash storage module to the remote CPU module.

7. The FPGA program multi-version management online upgrade system according to claim 1, characterized in that: The CPU module is also used to monitor the programming status of the FPGA module.

8. The FPGA program multi-version management online upgrade system according to claim 1, characterized in that: The CPU module includes a data processor and a data buffer; the Flash storage module includes at least one of a NOR Flash storage medium, a NAND Flash storage medium, and an EMMC storage medium.

9. A method for online upgrade of multi-version management of FPGA programs, using the online upgrade system for multi-version management of FPGA programs as described in any one of claims 1 to 8, characterized in that: The method comprises: The CPU module controls the FPGA module to burn the FPGA basic function program when the system is powered on; the FPGA basic function program only implements the routing unit function of the FPGA module to ensure basic communication capabilities; The CPU module obtains control commands from a remote CPU module through the FPGA module; When the control command includes target FPGA version information, the CPU module compares the target FPGA version information with the current FPGA version information of the FPGA module; If the two are inconsistent, the CPU module controls the FPGA module to burn the FPGA version program corresponding to the target FPGA version information; the burning step includes: The CPU module obtains the FPGA version program corresponding to the target FPGA version information from the Flash storage module; The CPU module sets the FPGA reset signal PROG_B to be valid, and resets the FPGA module; Detecting whether the reset completion signal INIT of the FPGA module is valid, if the reset is completed, the CPU module burns the FPGA version program corresponding to the target FPGA version information to the FPGA module through the bus; Check whether the FPGA program burning completion signal DONE is valid; if it is valid, the burning step is completed; if the DONE signal times out, the burning step is executed again.

10. The FPGA program multi-version management online upgrade method according to claim 9, characterized in that: The method further comprises: When the control command includes an FPGA version upgrade command and FPGA upgrade version data, the CPU module controls the FPGA module to burn the FPGA upgrade version program; specifically including: The CPU module performs CRC check on the FPGA upgrade version program data; If the verification is passed, the CPU module updates the FPGA program version data set stored in the Flash storage module and sends it to the remote CPU module; If the verification fails, the CPU module deletes the received FPGA upgrade version program data and sends the FPGA program version data set stored in the Flash storage module to the remote CPU module.