FPGA multi-version program switching system in milliseconds

Through the dual-layer architecture and flow control mechanism, dynamic data retransmission strategy and intelligent response module, the problems of long FPGA multi-version program switching time, poor hardware control flexibility and low FLASH utilization are solved, and millisecond-level processing of FPGA multi-version programs is achieved. Switching and resource optimization meet the fast response and efficient needs of modern electronic systems.

CN118132140BActive Publication Date: 2024-08-30HANGZHOU XINZHENG MICROELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410562209.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-08
Publication Date
2024-08-30
Estimated Expiration
2044-05-08

AI Technical Summary

Technical Problem

The existing technology has too long switching time when switching between FPGA multi-version programs, poor hardware control flexibility, and low FLASH space utilization, and cannot meet the needs of modern electronic systems for speed, flexibility, and efficiency.

Method used

Adopting a two-layer architecture design, through the collaborative work of the main control processor unit and the management FPGA, combined with the cache and flow control mechanism, the dynamic data retransmission strategy and intelligent response module are implemented to achieve efficient and flexible switching of FPGA multi-version programs and resources. optimization.

Benefits of technology

It significantly reduces the version switching time, achieves millisecond-level fast switching, improves the flexibility and scalability of hardware design, improves the utilization of storage resources, and meets the needs of real-time systems for fast response and system resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118132140B
    Figure CN118132140B
Patent Text Reader

Abstract

The present invention proposes a system for millisecond-level switching of FPGA multi-version programs, including a main control processor unit, specifically a DSP, which is connected to a management FPGA through an SRIO x1 interface or a PCIE x2 interface, and is mounted with a DDR3 memory and a NOR FLASH mounted through an EMIF 16 interface; the management FPGA receives configuration data from the main control processor unit through the SRIO x1 interface or the PCIE x2 interface, and is connected to the service FPGA through the SelectMap x32 interface to achieve bidirectional data transmission. The switching configuration process can be completed within milliseconds.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of embedded applications, and in particular to a system involving millisecond-level switching of FPGA multi-version programs. Background Art

[0002] In modern electronic system design, especially in the field of high-performance embedded applications, Field-Programmable Gate Array (FPGA) is widely used due to its powerful parallel processing capabilities and high flexibility. However, in order to meet the needs of different application scenarios or to cope with software updates, FPGAs usually need to support fast switching of multiple versions of programs. At present, a common technical solution is to burn multiple versions of FPGA configuration programs into a FLASH memory, and through the active loading mode of FPGA (such as FPGA model), combined with the control of the high address line of FLASH and specific pins inside FPGA (such as PROGRAM_B, INIT_B), dynamic switching of multiple versions of programs can be achieved.

[0003] Although the above technical solution can meet the requirements of FPGA multi-version program switching to a certain extent, it still has the following significant problems in practical application:

[0004] 1. The switching time is too long: This solution uses asynchronous sequential reading to obtain configuration program data from FLASH. Since the asynchronous reading speed is relatively slow, the time required for switching between multiple versions of programs cannot meet the millisecond-level efficiency requirements, which may become a system performance bottleneck in real-time control systems that have strict requirements on response speed.

[0005] 2. Limited flexibility in hardware control: In the existing technical solutions, the switching of version programs mainly relies on DSP (such as DSP6678 model) to control the high address lines of FLASH (such as A27, A28) through GPIO to select the target version. This hardware control method has low flexibility when facing the demand for expanding the number of versions in the future. Specifically, for each additional version, it may be necessary to add control of an additional high address line of FLASH, which not only increases the complexity of hardware design, but also limits the scalability of the system.

[0006] 3. Low FLASH space utilization: In existing technical solutions, FLASH chips are only used to store FPGA configuration programs, and their storage resources are not fully utilized. At the same time, as system functions continue to be enriched and upgraded, it may be necessary to provide multi-version program support for other key components such as DSP, but existing solutions cannot meet this demand, resulting in a waste of FLASH space and insufficient effective utilization of system resources.

[0007] In summary, although the current technology has realized FPGA multi-version program switching based on FLASH, there are still obvious defects in switching speed, hardware control flexibility and FLASH space utilization. It is urgent to propose a new technical solution to overcome the limitations of the existing technology, realize fast, flexible and efficient multi-version program switching, and effectively improve the utilization of FLASH storage resources to meet the growing functional and performance requirements of modern electronic systems. Summary of the invention

[0008] The embodiment of the present invention provides a system for millisecond-level switching of FPGA multi-version programs, which aims to solve the problems of long switching time, poor hardware control flexibility and low FLASH space utilization in the current technology.

[0009] The core technology of the present invention is to realize efficient and flexible switching and resource optimization of FPGA multi-version programs by building a two-layer architecture, realizing high-speed cache and flow control mechanism, adopting dynamic data retransmission strategy and designing intelligent response module.

[0010] In a first aspect, the present invention provides a system for millisecond-level switching of FPGA multi-version programs, comprising:

[0011] The main control processor unit, specifically a DSP, is connected to the management FPGA through an SRIO x1 interface or a PCIE x2 interface, and is connected to a DDR3 memory and a NOR FLASH connected through an EMIF 16 interface;

[0012] The management FPGA receives configuration data from the main control processor unit through the SRIO x1 interface or PCIE x2 interface, and connects to the service FPGA through the SelectMap x32 interface to achieve bidirectional data transmission;

[0013] The main processor unit performs the following operations:

[0014] a) In the initialization phase, the DDR3, EMIF16 and SRIO interfaces are configured to be in working state;

[0015] b) Read FPGA multi-version programs from NOR FLASH to DDR3 memory;

[0016] c) When the FPGA program version needs to be switched, the selected FPGA configuration program is sent to the management FPGA through the SRIO interface or PCIE interface;

[0017] e) Continue to run the corresponding algorithm service after the data transmission is completed.

[0018] Furthermore, in the execution steps of the main control processor unit, the NWrite_R service with a retransmission mechanism is used for data transmission for the SRIO interface to ensure data integrity; and for the PCIE interface, the Memory read packet and Memory write packet of the PCIE are used for data transmission.

[0019] Furthermore, managing the FPGA further includes:

[0020] A data cache module, used to temporarily store configuration data received from the main control processor unit;

[0021] The flow control mechanism module dynamically adjusts the matching relationship between the data transmission rate between the main control processor unit and the business FPGA according to the status of the data cache module.

[0022] Furthermore, the flow control mechanism module includes:

[0023] The SRIO interface data receiving module processes the received configuration sub-packet data;

[0024] The SRIO data response module generates a DONE or ERROR response according to the status of the data receiving FIFO to coordinate the data sending behavior of the main control processor unit; The SRIO data receiving FIFO is used to cache the sub-packet data received by the SRIO;

[0025] The data moving module is responsible for moving the data in the SRIO data receiving FIFO to the data sending FIFO;

[0026] The data transmission FIFO module is used to temporarily store the data to be sent to the business FPGA, and when its FIFO space is insufficient, it triggers the SRIO data response module to generate an ERROR response;

[0027] The SelectMap data sending module sends the data in the data sending FIFO to the business FPGA according to the SelectMap interface timing;

[0028] or,

[0029] The PCIE interface data receiving module processes the received configuration sub-packet data;

[0030] The PCIE protocol data parsing module is connected to the PCIE interface data receiving FIFO and the data receiving and sending identification register through the IP core, and is used to receive and parse the PCIE request packet sent by the PCIE interface of the DSP;

[0031] Data transmission and reception identification register space, used to feedback FPGA data transmission status and FIFO buffer status to DSP;

[0032] The data transfer module is responsible for transferring the data in the PCIE data receiving FIFO to the data sending FIFO.

[0033] The data transmission FIFO module is used to temporarily store the data to be sent to the business FPGA, and when its FIFO space is insufficient, it triggers the PCIE data response module to generate a FIFO space insufficient signal, and reflects it to the data transmission and reception identification register space;

[0034] The SelectMap data sending module sends the data in the data sending FIFO to the business FPGA according to the SelectMap interface timing.

[0035] Furthermore, the initialization phase of the main control processor unit also includes configuring the line rate of the SRIO interface or the PCIE interface, setting it to 5 Gbps to ensure high-speed data communication.

[0036] Furthermore, when executing step c), the main control processor unit implements a retransmission mechanism of the data sub-packet based on the received DONE or ERROR response until all the sub-packet data are correctly delivered to the management FPGA.

[0037] Furthermore, after receiving the complete FPGA configuration program, the management FPGA sends it to the configuration IO pin of the business FPGA through the SelectMap interface, realizing millisecond-level program version switching.

[0038] Furthermore, in step b), the main control processor unit uses multi-threading technology to simultaneously read different versions of FPGA programs, so as to preload multiple versions into the DDR3 memory in parallel.

[0039] Furthermore, the main control processor unit also includes a version management module for recording and managing information of various versions of FPGA programs loaded into the DDR3 memory, including version number, program size, loading time and associated business scenarios, so as to quickly select the appropriate version for switching according to real-time needs.

[0040] Furthermore, when the management FPGA receives the complete new version of the program and starts sending it to the service FPGA, it simultaneously sends a confirmation signal to the main control processor unit, indicating that the switching process has been started, and the main control processor unit can execute the corresponding service logic switching operation accordingly.

[0041] The main contributions and innovations of the present invention are as follows: 1. Compared with the prior art, the present invention significantly reduces the time for version switching by adopting an efficient two-layer architecture design, namely, the coordinated work of the master control DSP and the management FPGA, as well as an optimized data cache and flow control mechanism, and realizes millisecond-level fast switching, effectively solving the problem of long switching time in the prior art and meeting the demand for fast response of real-time systems;

[0042] 2. Compared with the prior art, the present invention uses the software-level dynamic data retransmission strategy and the design of the intelligent response module to enable the master DSP to more flexibly control and manage the FPGA version switching process, while reducing the need for hardware changes. In addition, the introduction of the management FPGA enables the system to more easily cope with the expansion of the number of future versions, enhancing the hardware design flexibility and scalability of the entire system.

[0043] 3. Compared with the prior art, the present invention utilizes the management FPGA325T to realize the integrated utilization of DDR3 and NOR FLASH resources, which is not only used to store the multi-version programs of FPGA690T, but also to store the program data of DSP6678 at the same time, thus improving the overall utilization of storage resources. At the same time, the double-layer architecture simplifies the hardware connection, improves the system integration, and is conducive to simplifying system design and maintenance.

[0044] 4. Compared with the prior art, the present invention innovatively adopts the SRIO x1 interface or PCIE x2 between the master DSP and the management FPGA and the SelectMap x32 interface between the management FPGA and the business FPGA to build a high-speed and stable multi-version program data transmission channel, ensuring high efficiency and low latency of data exchange.

[0045] 5. Compared with the prior art, the present invention innovatively designs a dynamic data retransmission strategy based on the NWrite_R service to ensure the reliability of data transmission; at the same time, the intelligent response module in the management FPGA325T can adjust the response type in real time according to the status of the data transmission FIFO, thereby achieving precise matching of the data transmission rate between the main control DSP and the management FPGA.

[0046] 6. Compared with the prior art, the present invention innovatively constructs a complete data cache and flow control system including SRIO data receiving FIFO, data moving module, data sending FIFO and SelectMap data sending module inside the management FPGA325T, ensuring seamless data connection between devices with different rates and significantly improving the overall operation efficiency of the system.

[0047] 7. Compared with the prior art, the present invention significantly improves the efficiency, flexibility and resource utilization of FPGA multi-version program switching, and the innovation lies in the unique two-layer architecture design, dynamic data retransmission and intelligent response mechanism, as well as efficient data caching and flow control system. These innovative designs together constitute an advanced, reliable and adaptable FPGA multi-version program millisecond-level switching architecture.

[0048] The details of one or more embodiments of the invention are set forth in the following drawings and description so that other features, objects, and advantages of the invention are more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0050] Figure 1 is a system diagram of millisecond-level switching of FPGA multi-version programs according to an embodiment of the present invention;

[0051] Figure 2 Schematic diagram of main modules of FPGA325T logic coding implementation according to an embodiment of the present invention;

[0052] Figure 3 is a data sending sequence diagram of the SelectMap data sending module according to an embodiment of the present invention;

[0053] Figure 4 is another architecture diagram of millisecond-level switching of FPGA multi-version programs according to an embodiment of the present invention;

[0054] Figure 5 It is another schematic diagram of the main modules of the FPGA325T logic coding implementation according to an embodiment of the present invention. DETAILED DESCRIPTION

[0055] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0056] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0057] Embodiment 1

[0058] The present invention aims to propose a system for millisecond-level switching of FPGA multi-version programs, and specifically, reference Figure 1 The architecture includes business FPGA690T, management FPGA325T, DSP6678, DDR3 memory and NOR FLASH.

[0059] Hardware design implementation:

[0060] DSP6678 is connected to 2GB DDR3 memory, and EMIF 16 interface is connected to 128MB NOR FLASH. DSP6678 and management FPGA325T are connected by srio x1 interface, and the communication line rate is designed to be 5Gbps. Management FPGA325T and business FPGA690T are connected by selectMap x32 interface.

[0061] Software implementation process:

[0062] S00, the module is powered on, and DSP6678 initializes the DDR3 memory, EMIF16 interface, SRIO and other interfaces.

[0063] Among them, initialization is that DSP6678 runs an initialization program:

[0064] 1. Make DDR3 start to work and have the function of reading and writing data normally.

[0065] 2. Configure the interface timing of EMIF16 and have the function of reading FLASH space data.

[0066] 3. The initialization of the SRIO interface includes: turning on the module power, configuring the module working clock, configuring the interface line rate, making the SRIO interface link between DSP6678 and management FPGA325T normal and having data communication capability.

[0067] S10, read all the multi-version programs of FPGA690T stored in NOR FLASH into the DDR3 space of DSP6678.

[0068] S20, DSP runs the business algorithm. When the FPGA690T program version needs to be switched, the configuration program of the FPGA690T is sent to the management FPGA325T from the DDR3 space through the SRIO interface.

[0069] S30 and DSP6678 use SRIO's NWrite_R service to realize data transmission and implement a retransmission mechanism during the transmission process. Since NWrite_R is a service with response, if a sub-packet is not received with a DONE response during the sub-packet transmission process, the sub-packet data is retransmitted until the sub-packet receives a correct DONE response and then the next sub-packet data is sent.

[0070] Among them, in the SRIO (Serial RapidIO) interface protocol, NWrite_R (Notified Write with Response) is a specific transaction type used to perform write operations with responses. Compared with ordinary write operations (such as NWRITE), after writing data to the target device, NWrite_R will also wait for and receive a confirmation response from the target device to ensure that the data has been successfully written and processed correctly. SRIO's NWrite_R service is designed to provide a higher level of data transmission reliability, transaction integrity, and error detection and handling capabilities, and is suitable for embedded systems and real-time applications that have strict requirements on data consistency.

[0071] NWrite_R Response service: When a NWrite_R transaction is executed, it includes two main phases: data writing phase and response receiving phase. The response service refers to the process in which the target device returns a response message to the sender after the data writing phase is completed. This response message contains information about the result of the write operation, such as:

[0072] Operation status: Indicates whether the write operation is completed successfully, that is, whether the data has been correctly written to the target address.

[0073] Error code (if any): If any exception or error occurs during the writing process, the response will contain a specific error code, such as target address does not exist, data conflict, device failure, etc.

[0074] Other status information: May also include additional status related to the write operation, such as whether a device-specific event or condition was triggered.

[0075] Done Response: In the SRIO protocol, the term "Done Response" usually refers to a specific response type, indicating that a transaction (such as NWrite_R) has been completed and no errors have occurred that caused the transaction to fail. DoneResponse is a subset of the response service, specifically:

[0076] Success confirmation: Done Response as the response to the NWrite_R transaction indicates that the write operation was successfully executed and the data has been received and processed by the target device as expected.

[0077] No error report: Unlike responses that contain error codes, Done Response means that no problems occurred during the transaction execution and no additional error handling or retry operations are required.

[0078] Transaction End: After receiving the Done Response, the sender can consider that the NWrite_R transaction has completed its life cycle and can clean up related resources and prepare for the next operation.

[0079] S40 and DSP6678 configuration is complete, and the algorithm service continues to run.

[0080] Among them, this business algorithm has no direct relationship with the present invention, but is a digital signal processing algorithm of the system application layer. A relatively common digital signal processing process. It is worth mentioning that it is written here to indicate that the DSP can continue to process other signal processing related tasks after completing the configuration process.

[0081] Management FPGA325T implementation:

[0082] The management FPGA325T is connected to the DSP6678 through the SRIO x1 interface and to the business FPGA690T through the SelectMapx32 interface. The management FPGA receives the configuration data sent by the DSP6678 through the SRIO x1 interface, and converts the received configuration data into the SelectMap configuration timing and sends it to the configuration IO pin of the FPGA690T through the selectMap interface.

[0083] The management FPGA325T needs to cache data internally. Since the speeds of receiving and sending data do not match, the SRIO end receives data quickly, while the SelectMap end sends data slowly. Therefore, the FPGA325T needs to implement a data cache and data transmission flow control mechanism.

[0084] When the data transmission FIFO of FPGA325T is almost full, the SRIO data response module replies with the ERRORresponse packet. If DSP6678 does not receive the correct DONE response, it will resend the current configuration data packet. When the data transmission FIFO of FPGA325T has enough space to receive data packets, the SRIO data response module replies with the DONEresponse packet to notify DSP6678 to send the next data packet, thereby matching the data receiving speed of the FPGA325T SRIO end with the data sending speed of the Selectmap end.

[0085] In this embodiment, the main modules implemented by FPGA325T logic coding are as follows: Figure 2 As shown, specifically including:

[0086] 1.SRIO interface data receiving module

[0087] Receive the configuration packet data sent by the SRIO interface of DSP6678. The communication line rate of SRIO is 5Gbps. This module is directly used to communicate with the SRIO of DSP6678. This module can be implemented using the IP core of Xilinx. The IP core is instantiated in the x15Gbps working mode. The user interface of the IP core is connected to the SRIO data response module.

[0088] 2.SRIO data response module

[0089] This module processes valid data and response packets in the SRIO communication process. When the module receives valid data, it writes the valid data directly into the SRIO data receiving FIFO for data caching.

[0090] After FPGA325T SRIO completes receiving a data packet, the module needs to send a response packet to DSP6678. This response packet is divided into two cases: DONE response packet and ERROR response packet.

[0091] The response packet reply logic of this module is designed as follows:

[0092] a) After receiving valid data, when the remaining space in the data transmission FIFO is greater than or equal to the amount of data sent by DSP6678, the response packet returns a DONE response.

[0093] b) After receiving valid data, when the remaining space in the data transmission FIFO is less than the amount of data to be sent by DSP6678, the response packet returns an ERROR response.

[0094] 3.SRIO data receive FIFO

[0095] This module is used to cache the packet data received by SRIO6678. It can be directly instantiated using Xilinx IP. The FIFO space can be set to the data size of 2~3 data packets.

[0096] 4.Data migration module

[0097] This module will read the data from the SRIO data receive FIFO and write it to the data transmit FIFO module. As long as the SRIO data receive FIFO is not empty and the data transmit FIFO is not full, the data move module will continuously read the data from the SRIO data receive FIFO and write it to the data transmit FIFO module. Otherwise, data move will be suspended.

[0098] 5. Data transmission FIFO module

[0099] This module is used to store the data to be sent. The FIFO space size of the module is set to the size of 3 to 5 sub-packet data. The module will monitor the size of the remaining FIFO space in real time. When the remaining FIFO space is less than the amount of data in a data sub-packet, the module will trigger a FIFO space shortage signal, which will be used by the data response module to generate a response packet.

[0100] 6.SelectMap data sending module

[0101] The module first needs to read the data in the data transmission FIFO and send the data according to the SelectMap interface timing. The data transmission timing is as follows Figure 3 shown.

[0102] In the above content, DSP6678, namely TMS320C6678, is a multi-core digital signal processor (DSP) based on KeyStone architecture developed by Texas Instruments (TI). This processor is designed for high-performance signal processing applications and is widely used in communications, radar, sonar, fire control, electronic countermeasures and other fields. It is a powerful digital signal processor with rich interfaces suitable for processing complex signal processing tasks. It has multi-core parallel processing capabilities, efficient data transmission mechanism, rich peripheral interfaces and flexible programming and configuration features.

[0103] FPGA690T is Xilinx's XC7VX690T FPGA chip. This chip belongs to the Virtex-7 series, is manufactured using a 28-nanometer process, has 692,000 programmable logic cells (CLBs), and has high logic density and performance. It is also equipped with high-speed interfaces such as PCI Express 3.0 x8 and FMC (FPGA Mezzanine Card) interfaces, which can be used to expand various functional modules. XC7VX690T is suitable for applications that require extremely high processing power, low latency, and flexible reconfigurability, such as high-speed data communications, high-end test and measurement, military aviation, high-performance computing, etc.

[0104] FPGA325T refers to an FPGA model in the Xilinx Kintex-7 series, specifically XC7K325T. The Kintex-7 series FPGA is designed and produced by Xilinx, using 28nm process technology, with high performance and high number of logic units, suitable for demanding application scenarios.

[0105] NOR FLASH is a non-volatile memory (NVM). It is a member of the Flash Memory family and is named for its unique storage structure and access characteristics.

[0106] DDR3 is the abbreviation of Double Data Rate Type 3 Synchronous Dynamic Random-Access Memory, which is a widely used computer system memory technology. DDR3 is the successor to DDR2 SDRAM (Double Data Rate 2 Synchronous Dynamic Random-Access Memory), designed to provide higher performance, lower power consumption and greater bandwidth to meet the growing computing needs.

[0107] The EMIF16 interface is an interface standard designed specifically for connecting a digital signal processor (DSP) with external memory or peripherals. EMIF16 usually refers to a 16-bit wide external memory interface (External Memory Interface), which provides a set of standardized signal lines and protocols, allowing the DSP to efficiently and reliably exchange data with external memory chips (such as SRAM, DRAM, FLASH, etc.) or other peripherals that support the corresponding interface standards.

[0108] SRIO interface refers to Serial RapidIO interface, which is a high-performance, low-latency serial point-to-point or point-to-multipoint interconnection technology designed for high-speed data transmission between processors, digital signal processors (DSPs), field programmable gate arrays (FPGAs) and other high-speed data processing devices in embedded systems. Based on the RapidIO standard, the SRIO interface is designed to provide high-bandwidth, low-latency, and high-reliability data communication services, and is suitable for complex systems that require large amounts of real-time data exchange and processing, such as telecommunications infrastructure, aerospace electronics, defense systems, medical imaging equipment, high-performance computing clusters, etc.

[0109] SelectMap is an interface provided by Xilinx for programming and configuring FPGA chips. The SelectMap interface allows programs or configuration files to be loaded into FPGA chips to complete FPGA programming and configuration operations.

[0110] FIFO (First-In, First-Out) is a data structure or buffer that works on the principle of "first in, first out". This means that the data units that enter the FIFO first will be the first to leave, that is, data are accessed strictly in the order in which they enter.

[0111] in, Figure 3 The signals are as follows (all can be found in the XILINX user guide file):

[0112] PROGRAM_B: Reset FPGA configuration logic signal. Pulling this signal low clears the current FPGA configuration logic and initiates a new configuration process.

[0113] NIT_B: When this signal is pulled low, it indicates that the FPGA is in the configuration reset state.

[0114] CCLK: is the clock signal during the configuration process.

[0115] CSI_B: Chip select signal during the configuration process.

[0116] RDWR_B: Read and write control signal.

[0117] D[0:31]: Data signal for configuration output.

[0118] DONE: Configuration completion signal output by the configured FPGA.

[0119] Embodiment 2

[0120] like Figure 4 and Figure 5As shown, the difference between this embodiment and the first embodiment is that on the basis of the first embodiment, the SRIO x1 interface between the DSP6678 and the management FPGA 325T is replaced with a PCIE x2 interface, and at the same time, a data transceiver status register space is added in the management FPGA 325T.

[0121] Hardware design implementation:

[0122] DSP6678 is connected to 2GB of DDR3, and the EMIF 16 interface is connected to 128MB of NOR FLASH. DSP6678 and management FPGA325T are connected using the PCIE x2 interface, and the communication line rate is designed to be 5Gbps. Management FPGA325T and business FPGA690T are connected through the selectMap x32 interface.

[0123] DSP6678 software coding implementation:

[0124] Software implementation process:

[0125] 1. The module is powered on, and DSP initializes interfaces such as DDR3, EMIF16, and PCIE. The PCIE interface works in RC mode.

[0126] 2. Read all the multi-version programs of FPGA690T stored in NOR FLASH into the DDR3 space of DSP6678.

[0127] 3. DSP runs the business algorithm. When the FPGA690T program version needs to be switched, the configuration program of the FPGA690T is sent to the management FPGA325T from the DDR3 space through the PCIE interface using EDMA.

[0128] 4. DSP6678 first uses PCIE's Memory read packet to read the status of FPGA325T's transmit FIFO. According to the cache status of the transmit FIFO, it uses PCIE's Memory write packet to transmit the configuration data of FPGA690T through EDMA. If the transmit FIFO cache is insufficient, the Memory write packet transmission is suspended until the transmit FIFO cache meets the transmission conditions, thereby achieving the purpose of DSP6678's transmit data flow control.

[0129] 5. The process of DSP6678 configuring FPGA690T is completed, and the algorithm service continues to run (same as in Example 1).

[0130] Management FPGA325T implementation:

[0131] The management FPGA325T is connected to the DSP6678 through the PCIE x2 interface and is connected to the business FPGA690T through the SelectMapx32 interface. The management FPGA325T receives the configuration data sent by the DSP6678 through the PCIE x2 interface. The PCIE on the management FPGA325T side works in EP mode and is instantiated into 2 Bar spaces. The BAR1 space is the configuration data transmission space for transmitting configuration data, and the BAR2 space is the configuration status register space for feedback of the data status of the FPGA325T and the cache status of the FIFO. The FPGA325T converts the received configuration data into the SelectMap configuration timing through the SelectMap interface and sends it to the configuration IO pin of the FPGA690T.

[0132] The management FPGA325T needs to cache data internally. Since the speeds of receiving and sending data do not match, the PCIE end receives data quickly, while the SelectMap end sends data slowly. FPGA325T needs to cooperate with DSP6678 to implement a data cache and data transmission flow control mechanism through BAR2 configuration status register space.

[0133] When the data transmission FIFO of FPGA325T is about to be full, the status will be fed back to the data transmission and reception status register space. Before sending the next Memory write packet, DSP6678 will first read the data transmission and reception status register of BAR2 space through Memory read. If DSP6678 reads that the data transmission FIFO cache status is about to be full, DSP6678 will suspend the sending of Memorywrite packets until DSP6678 reads that the data transmission FIFO cache status is normal.

[0134] This achieves the purpose of managing the data receiving speed at the FPGA325T PCIE end and matching the data sending speed at the Selectmap end.

[0135] like Figure 4 In the FPGA325T logic coding implementation, the main modules are:

[0136] 1. PCIE protocol data analysis module

[0137] This module receives the PCIE request packet sent by the DSP6678 PCIE interface. The communication line rate of PCIE is 5Gbps. This module is directly used to communicate with the PCIE of DSP. This module can be implemented using the Xilinx IP core. The IP core is instantiated as the EP working mode of 5Gbps x2. The user interface of the IP core is connected to the PCIE data receiving FIFO and the data receiving and sending identification register space.

[0138] 2. PCIE data receiving FIFO

[0139] This module is used to cache the packet data received by PCIE. It can be directly instantiated using Xilinx IP. The FIFO space can be set to the data size of 2~3 data packets.

[0140] 3.Data migration module

[0141] This module will read the data from the PCIE data receiving FIFO and write it into the data sending FIFO module. As long as the PCIE data receiving FIFO is not empty and the data sending FIFO is not full, the data moving module will continuously read the data from the PCIE data receiving FIFO and write it into the data sending FIFO module, otherwise the data moving will be suspended.

[0142] 4. Data transmission FIFO module

[0143] This module is used to store the data to be sent. The FIFO space size of the module is set to the size of 3~5 sub-packet data. The module will monitor the size of the remaining FIFO space in real time. When the remaining FIFO space is less than the amount of data in a data sub-packet, the module will trigger a signal of insufficient FIFO space, which will be reflected in the data receiving identification register space. Before sending the sub-packet data, DSP6678 will read the register space status value first, and then decide whether to send the sub-packet configuration data.

[0144] 5. Data transmit and receive flag register space

[0145] This module is used to feedback the FPGA325T data transmission status and FIFO cache status to DSP6678. DSP6678 can read the value of this register space through the Memory read packet and decide whether to send the next configuration packet data according to the status value.

[0146] 6.SelectMap data sending module

[0147] The module first needs to read the data in the data transmission FIFO and send the data according to the SelectMap interface timing. The data transmission timing diagram is as shown in the first embodiment. Figure 3 Same.

[0148] Among them, PCI Express (PCIe for short) is a high-speed interface standard used to connect computer motherboards with external devices, such as graphics cards, network cards, solid-state drives, sound cards and other high-performance peripherals. It is an evolution of the Peripheral Component Interconnect (PCI) bus technology, originally proposed by Intel in 2001 to replace the original PCI, PCI-X and AGP bus standards to meet the demand for higher data transfer rates and higher performance.

[0149] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0150] In general, various embodiments may be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. Some aspects of the invention may be implemented in hardware, while other aspects may be implemented in firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flow charts, or using some other graphical representation, it should be understood that, as non-limiting examples, the boxes, devices, systems, techniques, or methods described herein may be implemented in hardware, software, firmware, dedicated circuits or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.

[0151] Embodiments of the present invention can be implemented by computer software, which is executable by a data processor of a mobile device, such as in a processor entity, or implemented by hardware, or implemented by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets and / or macros can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. Computer program products can include one or more computer executable components configured to perform embodiments when the program is running. One or more computer executable components can be at least one software code or a part thereof. In addition, at this point, it should be noted that any box of the logic flow in the figure can represent program steps, or interconnected logic circuits, boxes and functions, or a combination of program steps and logic circuits, boxes and functions. Software can be stored in physical media such as memory chips or storage blocks implemented in processors, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and data variants thereof, CDs. Physical media are non-transient media.

[0152] Those skilled in the art should understand that the technical features of the above embodiments may be arbitrarily combined. 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.

[0153] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.

Claims

1. A system for switching FPGA multi-version programs in milliseconds, characterized by: include: The main control processor unit, specifically a DSP, is connected to the management FPGA through an SRIO x1 interface or a PCIE x2 interface, and is connected to a DDR3 memory and a NOR FLASH connected through an EMIF 16 interface; A data cache module, used to temporarily store configuration data received from the main control processor unit; A flow control mechanism module dynamically adjusts the matching relationship between the data transmission rate between the main control processor unit and the service FPGA according to the state of the data cache module; The management FPGA receives configuration data from the main control processor unit through the SRIO x1 interface or the PCIE x2 interface, and connects with the service FPGA through the SelectMap x32 interface to achieve bidirectional data transmission; The main control processor unit performs the following operations: a) In the initialization phase, the DDR3, EMIF16 and SRIO interfaces are configured to be in working state; b) Read FPGA multi-version programs from NOR FLASH to DDR3 memory; c) When the FPGA program version needs to be switched, the selected FPGA configuration program is sent to the management FPGA through the SRIO interface or PCIE interface; e) Continue to run the corresponding algorithm service after the data transmission is completed; The flow control mechanism module includes: The SRIO interface data receiving module processes the received configuration sub-packet data; The SRIO data response module generates a DONE or ERROR response according to the status of the data receiving FIFO to coordinate the data sending behavior of the main control processor unit; the SRIO data receiving FIFO is used to cache the packetized data received by the SRIO; The data moving module is responsible for moving the data in the SRIO data receiving FIFO to the data sending FIFO; The data transmission FIFO module is used to temporarily store the data to be sent to the business FPGA, and when its FIFO space is insufficient, it triggers the SRIO data response module to generate an ERROR response; The SelectMap data sending module sends the data in the data sending FIFO to the business FPGA according to the SelectMap interface timing; or, The PCIE interface data receiving module processes the received configuration sub-packet data; The PCIE protocol data parsing module is connected to the PCIE interface data receiving FIFO and the data receiving and sending identification register through the IP core, and is used to receive and parse the PCIE request packet sent by the PCIE interface of the DSP; Data transmission and reception identification register space, used to feedback FPGA data transmission status and FIFO buffer status to DSP; The data transfer module is responsible for transferring the data in the PCIE data receiving FIFO to the data sending FIFO. The data transmission FIFO module is used to temporarily store the data to be sent to the business FPGA, and when its FIFO space is insufficient, it triggers the PCIE data response module to generate a FIFO space insufficient signal, and reflects it to the data transmission and reception identification register space; The SelectMap data sending module sends the data in the data sending FIFO to the business FPGA according to the SelectMap interface timing; Among them, in the execution steps of the main control processor unit, the NWrite_R service with a retransmission mechanism is used for data transmission for the SRIO interface to ensure data integrity; for the PCIE interface, the PCIE Memory read packet and Memorywrite packet are used for data transmission.

2. The system for millisecond-level switching of FPGA multi-version programs as claimed in claim 1, characterized in that: The initialization phase of the master control processor unit also includes configuring the line rate of the SRIO interface or the PCIE interface to 5 Gbps to ensure high-speed data communication.

3. The system for millisecond-level switching of FPGA multi-version programs as claimed in claim 1, characterized in that: After receiving the complete FPGA configuration program, the management FPGA sends it to the configuration IO pin of the service FPGA through the SelectMap interface, realizing millisecond-level program version switching.

4. The system for millisecond-level switching of FPGA multi-version programs as claimed in claim 1, characterized in that: In step b), the main control processor unit uses multi-threading technology to simultaneously read different versions of FPGA programs, so as to preload multiple versions into the DDR3 memory in parallel.

5. The system for millisecond-level switching of FPGA multi-version programs as claimed in claim 1, characterized in that: The main control processor unit also includes a version management module for recording and managing information of various versions of FPGA programs loaded into the DDR3 memory, including version number, program size, loading time and associated business scenarios, so as to quickly select the appropriate version for switching according to real-time needs.

6. The system for millisecond-level switching of FPGA multi-version programs as claimed in claim 1, characterized in that: When the management FPGA receives the complete new version program and starts sending it to the service FPGA, it simultaneously sends a confirmation signal to the main control processor unit to indicate that the switching process has been started, and the main control processor unit can execute the corresponding service logic switching operation accordingly.

Citation Information

Patent Citations

  • High-reliability SRAM type FPGA online upgrading method and system

    CN113377408A

  • Circuit and method for configuring FPGA program based on ZYNQ processor

    CN116088927A