An adaptive interface FPGA hardware and software co-simulation acceleration system

The FPGA software and hardware co-simulation acceleration system through the adaptive interface uses DMA writing functions and cache mechanisms, combined with PCIE and USB communications, to solve the problem of low efficiency of traditional FPGA simulation testing, achieve fast loading and efficient simulation verification, and improve simulation Speed ​​and adaptability.

CN114297962BActive Publication Date: 2024-09-20BEIJING XUANYU INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202111491603.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-08
Publication Date
2024-09-20
Estimated Expiration
2041-12-08

AI Technical Summary

Technical Problem

The existing FPGA simulation test system is inefficient, especially in large-scale FPGA designs. Traditional software simulation methods are time-consuming, resulting in extended test cycles and increased R&D costs, and it is impossible to accelerate testing of the overall design.

Method used

An adaptive interface FPGA software and hardware co-simulation acceleration system is designed. Through the combination of the host computer and the hardware board, the DMA write function and cache mechanism are used to achieve high-speed transmission of stimulus data and test data, using PCIE and USB dual communication modes. , supports automatic loading and waveform display, improving simulation efficiency and adaptability.

Benefits of technology

It achieves fast loading and simulation verification of the FPGA design under test, reduces the operating burden of the simulation environment, improves simulation speed and flexibility, has strong adaptability, and meets different testing needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114297962B
    Figure CN114297962B
Patent Text Reader

Abstract

The present invention discloses an adaptive interface FPGA hardware and software collaborative simulation acceleration system. The system comprises: a host computer and a hardware board end, the host computer comprises a simulation software unit and a communication unit, the hardware board end comprises a master FPGA unit and a slave FPGA unit, the simulation software unit controls the configuration stream bit file of the tested design to be loaded into the slave FPGA unit before running the simulation, and writes stimulus data to the master FPGA unit; the communication unit is responsible for the transmission and communication of simulation stimulus data, simulation test data and tested design configuration data, and selects one of the communication modes of PCIE XDMA or USB GPIF II according to the user's test requirements; the master FPGA unit receives the simulation result of the tested FPGA design and sends it to the communication unit; the slave FPGA unit performs simulation test on the tested design according to the stimulus data to obtain test data. The present invention can improve the efficiency of FPGA design simulation verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of FPGA simulation test technology, in particular to an adaptive interface FPGA software and hardware collaborative simulation acceleration system. Background Art

[0002] FPGA (Field-Programmable Gate Array) simulation verification is a necessary step in FPGA design testing and is one of the effective means to ensure the quality of FPGA design. In the design of programmable logic devices, when performing functional simulation of circuits, the existing traditional methods are all pure software simulation, such as IES, Modelsim, Questasim, NC_Sim, Active-HDL and other software, which are all software simulations on computers or servers. With the increasing complexity of system design, the scale of use and design complexity of programmable logic gate array (FPGA) devices have grown rapidly, especially for large-scale FPGA logic design, the simulation running time is long and the efficiency is low, especially in the later stage of design, when regression testing is required, the circuit scale is huge, and there are many simulation scenarios. It will take several hours, days or even weeks to use traditional software simulation, which will greatly extend the test cycle, and the R&D cost will also increase accordingly, which will eventually reduce the market competitiveness of the product. Therefore, it is necessary to invent an acceleration method for simulation verification of FPGA design to meet the actual application needs.

[0003] At present, the commonly used FPGA hardware-software co-simulation system mainly includes a software system part set in the user's PC and a hardware system part for simulating the FPGA. During the FPGA simulation test process, the software system part is used to generate test stimulus signals and process part of the FPGA design under test, and the hardware system part is used to test other parts of the FPGA design under test to obtain test data. The currently publicly available FPGA hardware-software co-simulation system has a single communication interface, and the loading of the design under test must be manually loaded using a download line. When simulating the FPGA, it is only for the simulation acceleration of part of the FPGA design project under test, but it cannot accelerate the test of the entire FPGA design project under test, resulting in low efficiency of simulation testing and weak system adaptability. Summary of the invention

[0004] The technical problem solved by the present invention is to overcome the deficiencies of the prior art and provide an adaptive interface FPGA software and hardware co-simulation acceleration system.

[0005] In order to solve the above technical problems, an embodiment of the present invention provides an adaptive interface FPGA hardware and software collaborative simulation acceleration system, the system includes: a host computer and a hardware board end, the host computer includes: a simulation software unit and a communication unit, the hardware board end includes: a master FPGA unit and a slave FPGA unit, wherein,

[0006] The simulation software unit is configured to generate stimulus data for the simulation of the design under test, write the stimulus data to the master FPGA unit through a DMA write function, and read back the simulation test data through a DMA read function, control the configuration stream bit file of the design under test to be loaded into the slave FPGA unit through the communication unit and the master FPGA unit before running the simulation, and control the simulation software to display waveforms at the same time;

[0007] The communication unit is configured to transmit and communicate simulation stimulus data, simulation test data, and tested design configuration data;

[0008] The master FPGA unit is configured to receive the stimulus data, and after caching, send it to the slave FPGA unit through the communication interface, and receive the simulation result of the FPGA design under test from the slave FPGA unit through the communication interface, and after caching, send it to the communication unit through the communication interface, and receive the slave FPGA configuration file from the communication module before the simulation starts to complete the configuration loading of the slave FPGA unit;

[0009] The slave FPGA unit is configured to cache the stimulus data, perform simulation testing on the design under test according to the stimulus data, obtain test data, and send the test data to the master FPGA unit.

[0010] Optionally, the simulation software unit includes: a software simulation environment, a software interface module and an automatic loading control module, wherein:

[0011] The software simulation environment is configured to perform simulation control on the simulation software, generate stimulus data and read-back simulation test data of the design under test simulation according to a preset bit sequence, and display the stimulus data waveform and the simulation test data waveform in real time on the software interface of the simulation software;

[0012] The software interface module is configured to use C language programming to complete the encapsulation of the set sub-function and the function scheduling program, and to perform data interface interaction with the software simulation environment through a preset interface;

[0013] The automatic loading control module is configured to control the configuration stream bit file of the design under test to be loaded into the slave FPGA through the communication unit and the master FPGA unit before running the simulation, so as to automatically load the design under test.

[0014] Optionally, the communication unit includes: a PCIE communication module and a USB communication module, wherein:

[0015] The PCIE communication module is configured to send the stimulus data to the hardware board end through PCIE, and read the simulation test data from the hardware board end and transmit it to the simulation software unit through PCIE;

[0016] The USB communication module is configured to send the stimulus data to the hardware board end via USB, and read the simulation test data from the hardware board end and transmit it to the simulation software unit via USB.

[0017] Optionally, the PCIE communication module includes: a PCIE driver interface and a PCIE slot interface, wherein:

[0018] The PCIE driver interface is called through a C language interface in the form of a library function, so that the host computer program can communicate with the main FPGA unit through the PCIE bus;

[0019] The stimulus data generated by the simulation software unit is sent to the PCIE slot interface through the driver function interface corresponding to the PCIE application program, and the simulation test data is obtained from the PCIE slot interface;

[0020] The PCIE slot interface is an X16 gold finger slot of the PC mainboard, which is used to send the stimulus data to the hardware board end, and read the simulation test data from the hardware board end and transmit it to the simulation software unit program.

[0021] Optionally, the USB communication module includes: a USB 3.0 controller FX3 and a USB 3.0 data line,

[0022] The simulation software unit is connected to the main FPGA unit through the USB3.0 data line, and performs high-speed data communication with the main FPGA unit through the USB3.0 controller FX3 chip.

[0023] Optionally, the master FPGA unit includes: an XDMA communication / GPIF II communication logic module, a DDR3 cache logic module, a DDR3 read-write arbitration logic module, a GTX communication logic module and a slave FPGA configuration logic module.

[0024] Optionally, the slave FPGA unit includes: a design under test DUT logic module, a DUT control logic module and a GTX communication logic module, wherein:

[0025] The DUT logic module of the design under test is configured to load the design under test, and load the entire design under test project that needs simulation acceleration into the logic framework of the slave FPGA unit. Before the simulation starts, the simulation software unit first sends the configuration stream file of the slave FPGA unit design to the master FPGA unit through the communication unit, automatically configures the slave FPGA unit, and then performs hardware simulation test of the design under test;

[0026] The DUT control logic module is configured to control the working state of the simulated clock tree of the design under test and control the reading and writing of the interface data of the design under test; cache the stimulus data and output the stimulus data to the FPGA design under test; cache the test data output by the FPGA design under test and send the test data to the main FPGA unit through the GTX communication module;

[0027] The GTX communication logic module is configured to implement link layer functions according to the protocol, and implement user data interaction with the transmitting end and the receiving end through the AXI4_Stream protocol interface.

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] 1. The present invention completes the test verification of the FPGA design under test by combining software and hardware, transplants the traditional simulation test implemented on the software platform to the platform combined with software and hardware, loads the FPGA design under test into the hardware FPGA chip for operation, fully utilizes the advantages of FPGA hardware acceleration, reduces the operation burden of the simulation environment, and improves the speed of FPGA simulation;

[0030] 2. The present invention sends the configuration stream bit file of the tested design to the main FPGA cache through the simulation software unit, so as to realize automatic loading configuration of the slave FPGA. This design does not require manual configuration, reduces the complexity of the platform, and improves the flexibility of the platform application. For different tested designs, the configuration stream bit file can be replaced, thereby improving work efficiency.

[0031] 3. The present invention adopts PCIE and USB dual communication modes. Users can select any one of the communication modes according to the test hardware conditions. The simulation software unit can automatically adapt the communication mode according to the user's selection, making the platform more adaptable and meeting the different testing needs of users. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A schematic diagram of the structure of an adaptive interface FPGA hardware and software co-simulation acceleration system provided by an embodiment of the present invention;

[0033] Figure 2 A logical architecture diagram of a main FPGA unit provided in an embodiment of the present invention;

[0034] Figure 3 A logical architecture diagram of a PCIE XDMA communication module provided in an embodiment of the present invention;

[0035] Figure 4 A logical architecture diagram of a USB 3.0 communication module provided in an embodiment of the present invention;

[0036] Figure 5 A logical architecture diagram of DDR3 cache control provided by an embodiment of the present invention;

[0037] Figure 6 A logic block diagram of automatic configuration from FPGA provided by an embodiment of the present invention;

[0038] Figure 7 A schematic diagram of an automatic configuration process from an FPGA provided by an embodiment of the present invention;

[0039] Figure 8 A logical architecture diagram of a slave FPGA unit provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] Embodiment 1

[0041] Reference Figure 1 , shows a schematic diagram of the structure of an adaptive interface FPGA hardware and software co-simulation acceleration system provided by an embodiment of the present invention, such as Figure 1 As shown, the system may include: a host computer and a hardware board end, the host computer includes: a simulation software unit 101 and a communication unit 102, and the hardware board end includes: a master FPGA unit 103 and a slave FPGA unit 104, wherein,

[0042] The simulation software unit can be configured to generate stimulus data for the simulation of the design under test, write the stimulus data to the master FPGA unit through a DMA write function, and read back the simulation test data through a DMA read function, control the configuration stream bit file of the design under test to be loaded into the slave FPGA unit through the communication unit and the master FPGA unit before running the simulation, and control the simulation software to display waveforms at the same time;

[0043] The communication unit may be configured to transmit and communicate simulation stimulus data, simulation test data, and configuration data of the design under test;

[0044] The master FPGA unit may be configured to receive the stimulus data, and after caching, send it to the slave FPGA unit through the communication interface, and receive the simulation result of the FPGA design under test from the slave FPGA unit through the communication interface, and after caching, send it to the communication unit through the communication interface, and receive the slave FPGA configuration file from the communication module before the simulation starts to complete the configuration loading of the slave FPGA unit;

[0045] The slave FPGA unit may be configured to cache the stimulus data, perform simulation testing on the design under test according to the stimulus data, obtain test data, and send the test data to the master FPGA unit.

[0046] In an embodiment of the present invention, the PC end includes a simulation software unit and a communication unit, and the hardware board end includes a master FPGA unit and a slave FPGA unit. The platform can improve the simulation verification efficiency of the FPGA design through a simulation method combining software and hardware, and has the advantages of high-speed computing, easy maintenance, easy operation, and strong adaptability.

[0047] The simulation software unit on the PC side runs on the Windows operating system, and cyclically generates parallel stimulus data of the design under test within a preset time segment according to the preset simulation clock frequency, and transmits it to the main FPGA unit on the hardware board side quickly and efficiently through the communication unit, completing the caching function of a large amount of stimulus data to be tested, and then sends the stimulus data to the slave FPGA unit through the high-speed serial interface GTX to complete the simulation verification of the design under test, and converts the generated intermediate simulation test data into the simulation results of the FPGA design under test according to the corresponding bit sequence, and transmits it back to the main FPGA unit through the high-speed serial interface GTX for data caching. After the simulation of this time segment is completed, the main FPGA unit generates an interrupt to notify the simulation software unit, and then the simulation software unit on the PC side reads the test results cached by the main FPGA through the communication unit and displays them on the simulation software interface. At the same time, the simulation software unit can start the simulation verification of the design under test function in the next simulation time segment.

[0048] In another specific implementation of the present invention, the simulation software unit includes: a software simulation environment, a software interface module and an automatic loading control module, wherein:

[0049] The software simulation environment is configured to perform simulation control on the simulation software, generate stimulus data and read-back simulation test data of the design under test simulation according to a preset bit sequence, and display the stimulus data waveform and the simulation test data waveform in real time on the software interface of the simulation software;

[0050] The software interface module is configured to use C language programming to complete the encapsulation of the set sub-function and the function scheduling program, and to perform data interface interaction with the software simulation environment through a preset interface;

[0051] The automatic loading control module is configured to control the configuration stream bit file of the design under test to be loaded into the slave FPGA unit through the communication unit and the master FPGA unit before running the simulation, so as to automatically load the design under test.

[0052] In another specific implementation of the present invention, the communication unit includes: a PCIE communication module and a USB communication module, wherein:

[0053] The PCIE communication module is configured to send the stimulus data to the hardware board end through PCIE, and read the simulation test data from the hardware board end and transmit it to the simulation software unit through PCIE;

[0054] The USB communication module is configured to send the stimulus data to the hardware board end via USB, and read the simulation test data from the hardware board end and transmit it to the simulation software unit via USB.

[0055] In another specific implementation of the present invention, the PCIE communication module includes: a PCIE driver interface and a PCIE slot interface, wherein:

[0056] The PCIE driver interface is called through a C language interface in the form of a library function, so that the host computer program can communicate with the main FPGA unit through the PCIE bus;

[0057] The stimulus data generated by the simulation software unit is sent to the PCIE slot interface through the driver function interface corresponding to the PCIE application program, and the simulation test data is obtained from the PCIE slot interface;

[0058] The PCIE slot interface is an X16 gold finger slot of the PC mainboard, which is used to send the stimulus data to the hardware board end, and read the simulation test data from the hardware board end and transmit it to the simulation software unit program.

[0059] In another specific implementation of the present invention, the USB communication module includes: a USB 3.0 controller FX3 and a USB 3.0 data line.

[0060] The simulation software unit is connected to the main FPGA through the USB3.0 data line, and performs high-speed data communication with the main FPGA through the USB3.0 controller FX3 chip.

[0061] In another specific implementation of the present invention, the master FPGA unit includes: an XDMA communication / GPIF II communication logic module, a DDR3 cache logic module, a DDR3 read-write arbitration logic module, a GTX communication logic module and a slave FPGA configuration logic module.

[0062] In another specific implementation of the present invention, the slave FPGA unit includes: a design under test DUT logic module, a DUT control logic module and a GTX communication logic module, wherein:

[0063] The DUT logic module of the design under test is configured to load the design under test, and load the entire design under test project that needs simulation acceleration into the logic framework of the slave FPGA unit. Before the simulation starts, the simulation software unit first sends the configuration stream file of the slave FPGA unit design to the master FPGA unit through the communication unit, automatically configures the slave FPGA unit, and then performs hardware simulation test of the design under test;

[0064] The DUT control logic module is configured to control the working state of the simulated clock tree of the design under test and control the reading and writing of the interface data of the design under test; cache the stimulus data and output the stimulus data to the FPGA design under test; cache the test data output by the FPGA design under test and send the test data to the main FPGA unit through the GTX communication module;

[0065] The GTX communication logic module is configured to implement link layer functions according to the protocol, and implement user data interaction with the transmitting end and the receiving end through the AXI4_Stream protocol interface.

[0066] In the embodiment of the present invention, the simulation software unit, the communication unit, the master FPGA unit and the slave FPGA unit are described in detail as follows.

[0067] First, simulation software unit

[0068] The software simulation unit includes a software simulation environment, a software interface module and an automatic loading control module, wherein the software simulation environment can complete the simulation control of the simulation software, adopts System Verilog programming, generates the stimulus data and read-back simulation test data of the tested design simulation according to the corresponding bit sequence, and displays the stimulus data waveform and the simulation test data waveform in real time on the simulation software interface; the software interface module adopts C language programming, completes the encapsulation of sub-functions such as DMA read, DMA write, register read, register write and function scheduling of the PCIE XDMA channel or USB GPIF II channel, and can realize data interface interaction with the simulation software environment through the DPI interface of System Verilog; the automatic loading control module can control the configuration stream bit file of the tested design to be loaded into the slave FPGA through the communication unit and the main FPGA unit before running the simulation, thereby realizing the automatic loading of the tested design.

[0069] The simulation software unit writes stimulus data to the main FPGA unit through the DMA write function. The minimum unit in PCIE communication mode is 4KB, and the minimum unit in USB communication mode is 1KB. When performing one simulation acceleration, the maximum stimulus data packet processed is 256MB. The maximum size of each DMA read and write started by the simulation software unit does not exceed 1MB. If the stimulus data packet is larger than 256MB, the simulation acceleration processing is performed multiple times. If the final data is less than 4KB (1KB), it needs to be padded with zeros.

[0070] The following table gives the relevant register configuration definitions when the simulation software unit interacts with the main FPGA. The simulation software unit determines the relevant registers in a query manner, thereby realizing automatic configuration of the slave FPGA, selection of USB or PCIE communication mode, and corresponding read and write control of the acceleration board.

[0071] Table 1. List of registers for interaction between FPGA and simulation software units

[0072]

[0073]

[0074] USB / PCIE communication mode adaptive implementation

[0075] The default communication mode of the software interface module of the simulation software unit is PCIE communication, and the Usb_work register is configured to 0. When the user selects PCIE communication, the simulation software unit does not need to configure the Usb_work register; when the user selects USB3.0 communication, the simulation software unit first needs to configure the Usb_work register of the user logic register module of the main FPGA unit to 1. When exiting USB3.0 communication, the Usb_work register needs to be configured to 0 to restore to the default mode.

[0076] Automatically load the implementation from the FPGA configuration

[0077] The application functions of the simulation software unit implement the configuration of the FPGA and the hardware simulation of the design under test respectively. The two are independent of each other and each executes the main function file.

[0078] The design file under test is extracted and loaded into the slave FPGA. The bit file is compiled and synthesized. The simulation software unit writes it to the master FPGA through DMA write and stores it in DDR3. Then the master FPGA configures the slave FPGA through Slave selectMap.

[0079] Before the simulation starts, the automatic loading control module of the simulation software unit first automatically reads the configuration bit file of the slave FPGA, sets the slave FPGA configuration enable signal S_fpga_config to 1, notifies the master FPGA to prepare for the slave FPGA configuration, and informs the master FPGA of the data volume Config_data_len of the configuration file. After the master FPGA successfully completes the configuration of the slave FPGA, it sends the FPGA status register to the automatic loading control module to inform it of the configuration status of the slave FPGA. 1 means successful configuration and 0 means failed configuration.

[0080] Second, communication unit

[0081] In order to increase the flexibility and usability of the simulation acceleration platform, there are two ways for the simulation software unit to communicate with the FPGA, one is PCIE communication and the other is USB3.0 communication. The function of USB3.0 high-speed data communication is similar to the PCIE XDMA communication function. In the Windows system scenario, users can choose to use PCIE XDMA or USB3.0GPIF II communication to communicate with the main FPGA of the hardware board according to actual test requirements.

[0082] The communication unit includes a PCIE communication module and a USB communication module.

[0083] The PCIE communication module includes the PCIE driver interface and PCIE slot interface under the Windows system. The PCIE driver interface under the Windows system is called through the C language interface in the form of a library function, so that the host computer program can communicate with the hardware FPGA board through the PCIE bus. The stimulus data generated by the simulation software unit is sent to the PCIE slot interface through the driver function interface corresponding to the PCIE application, and the simulation test data can also be obtained from the PCIE slot interface; the PCIE slot interface is the X16 gold finger slot that comes with the PC motherboard, which can send the stimulus data to the hardware board end; at the same time, the simulation test data can also be read from the hardware board end and transmitted to the simulation software unit program.

[0084] The USB communication module mainly includes a USB3.0 controller FX3 and a USB3.0 data line. The simulation software unit completes high-speed data communication with the main FPGA through the USB3.0 controller FX3 chip. The firmware code used in this platform adopts SF_loopback.img officially provided by Cypress, which can realize duplex communication of stimulus data and simulation test data. USB3.0 and PCIE use the same set of register address lists, see Table 1 for details. Since the USB communication protocol is only a serial transmission of data and there is no specific communication protocol, the present invention designs a read-write communication protocol, see Tables 2 to 6 for details.

[0085] The simulation software unit sends a write instruction with a length of 1KB, and the main FPGA finally extracts the write configuration information of the register, including the register address and configuration data.

[0086] Table 2. Register write instructions

[0087] Head(4byte) R / W(4byte) Addr(4byte) Data(4byte) Padding data (1020 bytes) Frame Header 1: Write instruction Register Address Register configuration data 0

[0088] The register read instruction issued by the simulation software unit is 1KB of data in length, and the main FPGA finally extracts the register configuration information, which only includes the register address. After the instruction is completed, the simulation software unit needs to start the DMA read instruction to complete the 1KB data acquisition.

[0089] Table 3. Register read instructions

[0090] Head(4byte) R / W(4byte) Addr(4byte) Data(4byte) Padding data (1020 bytes) Frame Header 2: Read instruction Register Address 0 (ignore) 0

[0091] After the simulation software unit issues the register read instruction, it starts the DMA read instruction to complete the 1KB data acquisition. The actual valid register value finally read by the simulation software unit is the first 4 bytes of the 1KB data frame, and the padding data is an invalid value.

[0092] Table 4, DMA read: (get register value)

[0093] Data(4byte) Padding data (1023 bytes) Register value read 0

[0094] Since the length of a single DMA write is 1KB, the amount of stimulus data sent by the simulation software unit is a multiple of 1KB.

[0095] Table 5. Single DMA write: (stimulus data)

[0096] Stimulus data (1024 bytes) Data

[0097] The length of a single DMA read of the simulation software unit is 1KB, and the final simulation data volume is twice the amount of stimulus data.

[0098] Table 6. Single DMA read: (Simulation result data)

[0099] Simulation data (1024 bytes) Data

[0100] The hardware board of the present invention includes two FPGAs, a master FPGA unit and a slave FPGA unit. When the master FPGA unit is powered on, it needs to read the program that has been solidified in the flash chip and load the configuration stream. The slave FPGA unit is not connected to the flash externally, so before starting the simulation, the simulation software unit writes to the master FPGA through PCIE or USB DMA write, and then the master FPGA configures the slave FPGA through the Slave selectMap method to complete the automatic loading of the slave FPGA configuration stream. The specific introduction is as follows:

[0101] Third, the main FPGA unit

[0102] The main FPGA unit logic functions mainly include XDMA communication / GPIF II communication, DDR3 data cache, DDR3 read and write arbitration, high-speed serial GTX communication and slave FPGA configuration logic. Its logic architecture is as follows: Figure 2 As shown, FIFO is used for data caching between each logic module. The master FPGA unit receives the stimulus data from the XDMA communication / GPIF II communication module, and after DDR3 caching, sends it to the slave FPGA unit through the GTX communication interface; at the same time, the simulation results of the FPGA design under test from the slave FPGA unit are received through the GTX communication interface, and after DDR3 caching, they are sent to the communication unit through the PCIE XDMA / USB3.0 communication interface. The functions of each logic module are described in detail as follows:

[0103] XDMA communication / GPIF II communication logic module: The selection of the two communication mode logics is determined according to the Usb_work register configuration sent by the simulation software unit. When the Usb_work register is configured to 1, the GPIF II communication logic is selected, and when it is 0, the XDMA communication logic is selected. The default is the XDMA communication mode.

[0104] XDMA communication logic: XDMA is Xilinx's packaged PCIE DMA transmission IP, which can easily map the data transmission transactions on the PCIE bus to the AXI bus, so that the host computer can directly read and write the AXI bus, and automatically package and unpack the PCIE TLP. Figure 3 As shown in the figure, this module mainly realizes the high-speed serial interconnection between the simulation software unit and the main FPGA, including the register read / write control, H2C write channel control and C2H read channel control of the simulation software unit on the main FPGA logic. The simulation software unit interacts with the XDMA IP of the main FPGA through the communication unit to perform stimulus data and test data. The maximum amount of data that the simulation software unit starts each DMA read and write operation does not exceed 1MB. If it exceeds 1MB, it will be divided into multiple read and write operations.

[0105] GPIF II communication logic: Figure 4 As shown in the figure, the GPIF II timing adopts two transmission modes, STREAMIN and STREAMOUT. The size of a single data stream is 1KB. The logic includes an instruction data parsing and function control module, a DMA read / write module, and a register read / write control module. Among them, the instruction data parsing and function control module parses the instructions issued by the simulation software unit. The instructions include register write, register read, DMA write, and DMA read. The main FPGA completes the corresponding operation for the corresponding instructions received. The simulation software unit sends stimulus data to the main FPGA through the USB3.0 DMA write channel. The size of a single packet data stream is 1KB. The stimulus data is first cached and then transmitted to DDR3 to complete a large amount of data caching. When the simulation software unit reads the FPGA register value or reads the simulation data through the DMA read channel, the data stream with a unit of 1KB can be uploaded in the form of reading the cache, and the register or simulation data reading is selected according to the register read instruction or DMA read instruction issued by the simulation software unit.

[0106] DDR3 cache logic module: stores the stimulus data from the XDMA communication / GPIF II communication module in the space specified by DDR3. When the amount of stored data reaches the specified amount, the stimulus data is written into the design under test and control module through the GTX communication module. Similarly, the test data from the design under test and control module is received through the GTX communication module and stored in the space specified by DDR3. When the amount of stored data reaches the specified amount, the simulation software unit is notified to perform a PCIE or GPIF II DMA read operation and send all stored test data to the communication unit.

[0107] In the present invention, the DDR3 storage space is 1GB, which is mainly used to store stimulus data, test result data and FPGA configuration stream file data. In order to prevent data storage confusion, the DDR3 space is mainly divided into three parts.

[0108] Table 7. DDR3 space division

[0109]

[0110] DDR3 read and write arbitration logic module: Figure 5 As shown in the figure, when performing read and write operations on the DDR3 chip, the read timing and write timing cannot be performed at the same time because the read and write share a set of data buses. In order to prevent read and write conflicts, the read and write priority of DDR3 adopts the write priority mode. The PCIE user working clock is 125MHz, the DDR3 user clock is 100MHz, and the stimulus data packet sent by the simulation software unit is cached in the asynchronous WFIFO. The control logic of DDR3 determines in real time whether the amount of data stored in the WFIFO has reached 4KB. If the requirements are met, a DDR3 write operation is started, and the 4KB data in the WFIFO is read and stored in the DDR3. At the same time, if the write operation is not busy, the 4KB data is read and stored in the RFIFO.

[0111] GTX communication logic module: The IP core of the Aurora protocol provided by Xilinx is mainly based on the GTX transmitter as the physical layer, forms a link layer function according to the protocol, and uses the AXI4_Stream protocol interface to interact with the transmitter and receiver to realize user data. The present invention uses the Aurora64B / 66B IP provided by Xilinx to achieve high-speed optical fiber communication, with a channel rate of 10.3125Gb / s, and completes the full-duplex working mode.

[0112] Slave FPGA configuration logic module: This module completes the simulation software unit's logic configuration of the slave FPGA through PCIE. The simulation software unit stores the configuration stream file in the master FPGA's DDR3 through PCIE, and then the master FPGA completes the configuration of the slave FPGA. The configuration clock is 5MHz. Figure 6 As shown in the figure, this module mainly includes configuration status detection and data cache functions. It is connected to the slave FPGA through the configuration interface. When the master FPGA receives the slave FPGA configuration instruction sent by the simulation software unit, it sends the PROGRAM_B signal through the interface with the slave FPGA configuration signal, waits for the slave FPGA to be initialized, and sends the cached slave FPGA configuration BIT stream to the slave FPGA to complete the configuration of the slave FPGA; it is connected to the slave FPGA through the status interface, responsible for controlling the entire process of the slave FPGA configuration, and completes the writing of the slave FPGA configuration program; the configuration file stored in DDR3 is read out for caching. Since the data bit width of DDR3 reading and writing is 256 bits, and the data bit width of the Slave SelectMAP16 mode configured for the slave FPGA is 16 bits, in order to match the data bit width of the two, the 256 bits of data needs to be converted into 16 bits of data.

[0113] Figure 7 The configuration process of the slave FPGA is as follows:

[0114] 1. Wait for the simulation software unit to configure the enable signal. If the configuration enable signal is high, send a PROGRAM_B low signal to the slave FPGA and continue to execute a);

[0115] 2. Wait for the FPGA to be initialized. If the INIT_B signal is set low, continue to execute c). If the INIT_B signal is not pulled low, output the error status to the simulation software unit.

[0116] 3. Start reading the slave FPGA configuration data cached in DDR3, and send it to the slave FPGA in sequence through the configuration data line after being cached;

[0117] 4. After the configuration data is sent, check whether the DONE signal returned from the FPGA becomes high. If it becomes high, it means that the configuration operation is successful and the new data is effective; if it is low, it means that the configuration operation failed and the error status is output to the simulation software unit.

[0118] 5. User logic register module: This module mainly implements the relevant register configuration when the simulation software unit interacts with the main FPGA. The simulation software unit judges the relevant registers by querying, thereby realizing the corresponding read and write control of the acceleration board.

[0119] Fourth, from the FPGA unit

[0120] The FPGA unit logic function mainly includes the DUT, DUT control logic, and high-speed serial GTX communication. Its logic architecture is as follows: Figure 8 The functions of each logic module are described in detail as follows:

[0121] Design under test (DUT) logic module: used to load the design under test. The design under test project that needs simulation acceleration is loaded as a whole into the logic framework of the slave FPGA unit. After comprehensive layout and routing to generate the bit file, before the simulation starts, the simulation software unit first sends the configuration stream file of the slave FPGA design to the main FPGA through the communication unit, automatically configures the slave FPGA, and then the hardware simulation test of the design under test can be carried out.

[0122] DUT control logic module: This module completes the work scheduling of the slave FPGA, mainly controls the working state of the simulated clock tree of the design under test and controls the reading and writing of the interface data of the design under test, etc. Cache the stimulus data and output the stimulus data to the FPGA design under test; cache the test data output by the FPGA design under test, and send the test data to the main FPGA unit through the GTX communication module, and then pass it to the simulation software unit for waveform display.

[0123] GTX communication logic module: has the same function as the GTX communication module of the main FPGA unit.

[0124] The specific implementation methods described in this application can enable those skilled in the art to understand this application more comprehensively, but do not limit this application in any way. Therefore, those skilled in the art should understand that this application can still be modified or replaced by equivalents; and all technical solutions and improvements that do not deviate from the spirit and technical essence of this application should be included in the protection scope of the patent of this application.

[0125] The contents not described in detail in the specification of the present invention belong to the common knowledge of those skilled in the art.

Claims

1. An adaptive interface FPGA hardware and software co-simulation acceleration system, characterized in that: The system includes: a host computer and a hardware board end, the host computer includes: a simulation software unit and a communication unit, the hardware board end includes: a master FPGA unit and a slave FPGA unit, wherein, The simulation software unit is configured to generate stimulus data for the simulation of the design under test, write the stimulus data to the master FPGA unit through a DMA write function, and read back the simulation test data through a DMA read function, and control the configuration stream bit file of the design under test to be loaded to the slave FPGA unit through the communication unit and the master FPGA unit before running the simulation, and control the simulation software to display the waveform at the same time; The communication unit is configured to transmit and communicate simulation stimulus data, simulation test data, and tested design configuration data; The master FPGA unit is configured to receive the stimulus data, and after caching, send it to the slave FPGA unit through the communication interface, and receive the simulation result of the FPGA design under test from the slave FPGA unit through the communication interface, and after caching, send it to the communication unit through the communication interface, and receive the slave FPGA configuration file from the communication module before the simulation starts to complete the configuration loading of the slave FPGA unit; The slave FPGA unit is configured to cache the stimulus data, perform simulation testing on the design under test according to the stimulus data, obtain test data, and send the test data to the master FPGA unit.

2. The system according to claim 1, characterized in that The simulation software unit includes: a software simulation environment, a software interface module and an automatic loading control module, wherein: The software simulation environment is configured to perform simulation control on the simulation software, generate stimulus data and read-back simulation test data of the design under test simulation according to a preset bit sequence, and display the stimulus data waveform and the simulation test data waveform in real time on the software interface of the simulation software; The software interface module is configured to use C language programming to complete the encapsulation of the set sub-function and the function scheduling program, and to perform data interface interaction with the software simulation environment through a preset interface; The automatic loading control module is configured to control the configuration stream bit file of the design under test to be loaded into the slave FPGA unit through the communication unit and the master FPGA unit before running the simulation, so as to automatically load the design under test.

3. The system according to claim 1, characterized in that The communication unit includes: a PCIE communication module and a USB communication module, wherein: The PCIE communication module is configured to send the stimulus data to the hardware board end through PCIE, and read the simulation test data from the hardware board end and transmit it to the simulation software unit through PCIE; The USB communication module is configured to send the stimulus data to the hardware board end via USB, and read the simulation test data from the hardware board end and transmit it to the simulation software unit via USB.

4. The system according to claim 3, characterized in that The PCIE communication module includes: a PCIE driver interface and a PCIE slot interface, wherein: The PCIE driver interface is called through a C language interface in the form of a library function, so that the host computer program can communicate with the main FPGA unit through the PCIE bus; The stimulus data generated by the simulation software unit is sent to the PCIE slot interface through the driver function interface corresponding to the PCIE application program, and the simulation test data is obtained from the PCIE slot interface; The PCIE slot interface is an X16 gold finger slot of the PC mainboard, which is used to send the stimulus data to the hardware board end, and read the simulation test data from the hardware board end and transmit it to the simulation software unit program.

5. The system according to claim 3, characterized in that The USB communication module includes: a USB 3.0 controller FX3 and a USB 3.0 data line, The simulation software unit is connected to the main FPGA unit through the USB3.0 data line, and performs high-speed data communication with the main FPGA unit through the USB3.0 controller FX3 chip.

6. The system according to claim 1, characterized in that The master FPGA unit includes: an XDMA communication / GPIF II communication logic module, a DDR3 cache logic module, a DDR3 read-write arbitration logic module, a GTX communication logic module and a slave FPGA configuration logic module.

7. The system according to claim 1, characterized in that The slave FPGA unit includes: a DUT logic module, a DUT control logic module and a GTX communication logic module, wherein: The DUT logic module of the design under test is configured to load the design under test, and load the entire design under test project that needs simulation acceleration into the logic framework of the slave FPGA unit. Before the simulation starts, the simulation software unit first sends the configuration stream file of the slave FPGA unit design to the master FPGA unit through the communication unit, automatically configures the slave FPGA unit, and then performs hardware simulation test of the design under test; The DUT control logic module is configured to control the working state of the simulated clock tree of the design under test and control the reading and writing of the interface data of the design under test; cache the stimulus data and output the stimulus data to the FPGA design under test; cache the test data output by the FPGA design under test and send the test data to the main FPGA unit through the GTX communication module; The GTX communication logic module is configured to implement link layer functions according to the protocol, and implement user data interaction with the transmitting end and the receiving end through the AXI4_Stream protocol interface.

Citation Information

Cited By

  • An FPGA hardware-software co-simulation acceleration architecture based on network communication

    CN122987796A