Hybrid verification method and apparatus based on hardware simulation accelerator and FPGA chip
By using a hybrid verification method combining hardware simulation accelerators and FPGA chips, the problems of limited resources and slow speed in chip verification are solved, achieving an efficient and accurate verification process. By leveraging the high speed of FPGAs and the strong testing capabilities of hardware simulation accelerators, the reliability and efficiency of chip design are improved.
Patent Information
- Application Number
- CN202311135541.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-31
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2043-08-31
AI Technical Summary
In current chip verification, hardware simulation accelerator resources are limited in number and slow in speed, and FPGA debugging is difficult, which affects verification efficiency and accuracy.
A hybrid verification method based on hardware simulation accelerator and FPGA chip is adopted. By obtaining the module architecture information of the target chip, the functional modules are divided into hardware simulation functional modules and FPGA functional modules. Cross-clock domain connection and code version compilation are performed. The high speed of FPGA and the strong testing capability of hardware simulation accelerator are used for joint debugging.
It improves the efficiency and accuracy of chip verification, reduces the resource pressure on hardware simulation accelerators, makes full use of the high operating speed of FPGAs and the superior debugging capabilities of hardware simulation accelerators, discovers and fixes problems early, and shortens the design cycle.
Smart Images

Figure CN117217143B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of chip verification technology, and in particular to a hybrid verification method, apparatus, device and medium based on hardware simulation accelerator and FPGA chip. Background Technology
[0002] Currently, functional verification is an important and time-consuming step in the chip development process. For chip verification, there are two main platforms that are widely used: hardware emulation accelerators and FPGAs. FPGAs run faster, but have problems with poor debugging performance and a very limited number of signals to capture. Hardware emulation accelerators have stronger debugging capabilities and are more suitable for high-precision verification, but they run slower.
[0003] In addition, the following problems exist in the application of hardware emulation accelerators: First, the high price of hardware emulation accelerators limits the amount of resources that projects can obtain, forcing verification personnel to use limited resources carefully and apply them to where they can maximize their value; Second, the operating frequency of hardware emulation accelerators is generally low, around 1MHz, which takes a long time to run test cases involving Linux systems, such as the Linux system taking several hours to boot, which seriously affects the efficiency of verification. Summary of the Invention
[0004] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.
[0005] This invention provides a hybrid verification method, apparatus, device, and medium based on hardware simulation accelerators and FPGA chips, aiming to solve the technical problems of limited resources, slow speed, and difficult FPGA debugging in current hardware simulation accelerator verification, and improve the efficiency and accuracy of chip verification.
[0006] To achieve the above objectives, a first aspect of the present invention proposes a hybrid verification method based on a hardware simulation accelerator and an FPGA chip, comprising:
[0007] Obtain the module architecture information of the target chip, divide the target chip into functional modules based on the module architecture information, and determine the functional modules as hardware simulation functional modules and FPGA functional modules respectively;
[0008] The functional code of the target chip is divided to obtain the module code corresponding to the hardware simulation functional module and the FPGA functional module;
[0009] The hardware simulation accelerator and the FPGA chip are connected across clock domains via an I / O multiplexing module.
[0010] The module code corresponding to the hardware simulation function module and the FPGA function module are respectively compiled to obtain the hardware simulation code version and the FPGA code version. The hardware simulation code version is configured into the hardware simulation accelerator, and the FPGA code version is configured into the FPGA chip.
[0011] Multiple test cases were obtained based on the hardware simulation code version and the FPGA code version, respectively.
[0012] Based on multiple test cases, the hardware simulation code version and the FPGA code version are jointly debugged to obtain the verification test results of the target chip.
[0013] In some embodiments, the step of dividing the target chip into functional modules based on the module architecture information and identifying the functional modules as hardware simulation functional modules and FPGA functional modules respectively includes:
[0014] Based on the module architecture information, the target chip is divided into a central processing unit module, a DDR controller module, a first bus module, a second bus module, a serial bus module, and a network communication module. The central processing unit module, the DDR controller module, and the second bus module are respectively connected to the first bus module, and the serial bus module and the network communication module are respectively connected to the second bus module.
[0015] The central processing unit module, the DDR controller module, and the first bus module are identified as FPGA functional modules;
[0016] The second bus module, serial bus module, and network communication module are identified as hardware simulation function modules.
[0017] In some embodiments, the first bus module is further connected to a third bus module, a boot read-only memory, and a direct memory access controller. The third bus module is connected to a timer, a universal asynchronous receiver / transmitter, a serial peripheral interface, and an interconnect integrated circuit.
[0018] The method further includes:
[0019] The third bus module, the timer, the universal asynchronous transceiver, the serial peripheral interface, the interconnect integrated circuit, the boot read-only memory, and the direct memory access controller are identified as FPGA functional modules.
[0020] In some embodiments, the first bus module has a cross-clock domain conversion unit, and the cross-clock domain connection processing between the hardware emulation accelerator and the FPGA chip via the I / O multiplexing module includes:
[0021] The first bus module and the second bus module are connected by an I / O multiplexing module, so that the first bus module is deployed to an FPGA chip and the second bus module is deployed to a hardware simulation accelerator; wherein, the first bus module obtains the slow clock domain signal of the second bus module through the I / O multiplexing module;
[0022] The signal in the slow clock domain is clock-converted by the cross-clock domain conversion unit on the first bus module to obtain the processed signal.
[0023] In some embodiments, the FPGA chip has an AXI clock conversion module, and the cross-clock domain connection processing between the hardware emulation accelerator and the FPGA chip via the IO multiplexing module includes:
[0024] The first bus module and the second bus module are connected through the IO multiplexing module and the AXI clock conversion module, so that the first bus module is deployed to the FPGA chip and the second bus module is deployed to the hardware simulation accelerator; wherein, the AXI clock conversion module obtains the slow clock domain signal of the second bus module through the IO multiplexing module;
[0025] The AXI clock conversion module performs clock conversion processing on the signal in the slow clock domain and sends the processed signal to the first bus module.
[0026] In some embodiments, the cross-clock domain connection processing between the hardware emulation accelerator and the FPGA chip via the I / O multiplexing module includes:
[0027] An asynchronous conversion module is deployed on the FPGA chip, and the asynchronous conversion module is connected to the first bus module;
[0028] The asynchronous conversion module and the second bus module are connected via an I / O multiplexing module, so that the first bus module is deployed to the FPGA chip and the second bus module is deployed to the hardware simulation accelerator; wherein, the asynchronous conversion module obtains the slow clock domain signal of the second bus module through the I / O multiplexing module;
[0029] The asynchronous conversion module performs clock conversion processing on the signal in the slow clock domain and sends the processed signal to the first bus module.
[0030] In some embodiments, the asynchronous conversion module includes an asynchronous first-in-first-out memory, and the clock conversion processing of the signal in the slow clock domain through the asynchronous conversion module includes:
[0031] Obtain the full indicator bit, the write address valid indicator bit, and the write address ready indicator bit of the asynchronous first-in-first-out memory;
[0032] When the full indicator bit is 0 and the emulation end write address valid indicator bit is 1, the signal of the slow clock domain is written into the asynchronous first-in-first-out memory.
[0033] When the write address ready indicator bit on the FPGA is 1, the signal of the slow clock domain is sent to the first bus module through the asynchronous first-in-first-out memory.
[0034] In some embodiments, the step of dividing the functional code of the target chip to obtain the module code corresponding to the hardware simulation functional module and the FPGA functional module includes:
[0035] The functional code of the target chip is divided to obtain the first split code corresponding to the hardware simulation functional module and the second split code corresponding to the FPGA functional module.
[0036] The first and second split codes are subjected to automated electronic design verification to obtain electronic design verification results.
[0037] Based on the electronic design verification results, the first split code is determined as the module code of the hardware simulation function module, and the second split code is determined as the module code of the FPGA function module.
[0038] In some embodiments, the joint debugging of the hardware simulation code version and the FPGA code version based on multiple test cases to obtain the verification test results of the target chip includes:
[0039] Multiple test cases are loaded into the FPGA chip using a preset debugger, so that the central processing unit module executes the multiple test cases;
[0040] During the execution of multiple test cases, test data of the FPGA functional module and the hardware simulation functional module are acquired;
[0041] The verification test results of the target chip are obtained based on the test data of the FPGA functional module and the hardware simulation functional module.
[0042] In some embodiments, a target functional module to be detected is connected to the second bus module, and after loading multiple test cases into the FPGA chip using a preset debugger, the method further includes:
[0043] During the execution of multiple test cases, waveform data of the target test module is obtained through the trigger control mechanism of the hardware simulation function module.
[0044] The target detection module is functionally verified based on the waveform data to obtain the verification test results of the target detection module.
[0045] To achieve the above objectives, a second aspect of the present invention provides a hybrid verification device based on a hardware simulation accelerator and an FPGA, comprising:
[0046] The functional module division unit is used to obtain the module architecture information of the target chip, divide each functional module from the target chip according to the module architecture information, and determine the functional modules as hardware simulation functional modules and FPGA functional modules respectively.
[0047] The function code partitioning unit is used to partition the function code of the target chip to obtain the module code corresponding to the hardware simulation function module and the FPGA function module;
[0048] A cross-clock domain connection unit is used to perform cross-clock domain connection processing between the hardware simulation accelerator and the FPGA chip through an IO multiplexing module;
[0049] The code version compilation unit is used to perform version compilation processing on the module code corresponding to the hardware simulation function module and the FPGA function module respectively to obtain the hardware simulation code version and the FPGA code version, and configure the hardware simulation code version into the hardware simulation accelerator and the FPGA code version into the FPGA chip.
[0050] The test case generation unit is used to generate multiple test cases based on the hardware simulation code version and the FPGA code version, respectively.
[0051] The joint debugging unit is used to jointly debug the hardware simulation code version and the FPGA code version based on multiple test cases to obtain the verification test results of the target chip.
[0052] To achieve the above objectives, a third aspect of the present invention provides an electronic device, the electronic device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method described in the first aspect.
[0053] To achieve the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.
[0054] This invention proposes a hybrid verification method, apparatus, device, and medium based on a hardware simulation accelerator and an FPGA chip. It acquires the module architecture information of a target chip, divides the target chip into functional modules based on the module architecture information, and identifies these functional modules as hardware simulation functional modules and FPGA functional modules. Further, it performs a partitioning process on the functional code of the target chip to obtain the module codes corresponding to the hardware simulation functional modules and the FPGA functional modules. Further, it performs cross-clock domain connection processing on the hardware simulation accelerator and the FPGA chip through an I / O multiplexing module. Further, it performs version compilation processing on the module codes corresponding to the hardware simulation functional modules and the FPGA functional modules to obtain hardware simulation code versions and FPGA code versions, configuring the hardware simulation code version in the hardware simulation accelerator and the FPGA code version in the FPGA chip. Further, it obtains multiple test cases based on the hardware simulation code versions and the FPGA code versions. Furthermore, based on multiple test cases, the hardware simulation code version and the FPGA code version are jointly debugged to obtain the verification test results of the target chip. Since the FPGA can interface with real peripherals, the test accuracy and real-world environment are closer, and it has a higher operating speed. Therefore, this application utilizes the FPGA to quickly verify modules with fixed, high-performance requirements. Simultaneously, because the hardware simulation accelerator provides clear internal signal visibility in the verification of newly developed or problematic modules, making problem diagnosis and resolution more convenient, this application utilizes the hardware simulation accelerator to verify newly developed or problematic modules. Thus, this application not only extensively utilizes the high operating speed advantage of the FPGA but also fully leverages the superior debugging capabilities of the hardware simulation accelerator, thereby improving both the efficiency and accuracy of chip verification and debugging. Moreover, when facing the high cost and limited resources of the hardware simulation accelerator, the hybrid verification method of this application can alleviate the resource pressure on the hardware simulation accelerator and effectively reduce costs. Attached Figure Description
[0055] Figure 1 This is a flowchart of a hybrid verification method based on a hardware simulation accelerator and an FPGA chip provided in an embodiment of the present invention;
[0056] Figure 2This is a SoC architecture diagram provided in another embodiment of the present invention;
[0057] Figure 3 This is a SoC split diagram provided in another embodiment of the present invention;
[0058] Figure 4 This is a clock conversion schematic diagram provided in another embodiment of the present invention;
[0059] Figure 5 This is another clock conversion schematic diagram provided by another embodiment of the present invention;
[0060] Figure 6 This is another clock conversion schematic diagram provided by another embodiment of the present invention;
[0061] Figure 7 This is a schematic diagram of an asynchronous conversion module provided in another embodiment of the present invention;
[0062] Figure 8 This is an example diagram of a hybrid verification method provided in another embodiment of the present invention;
[0063] Figure 9 This is a test network diagram provided in another embodiment of the present invention;
[0064] Figure 10 This is a schematic diagram of the hardware structure of an electronic device provided in another embodiment of the present invention. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0066] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0067] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.
[0068] Currently, functional verification is a crucial and time-consuming step in chip development. Two main platforms are widely used for chip verification: hardware emulation accelerators and FPGAs. FPGAs offer faster operation but suffer from poor debugging performance and a very limited number of signals that can be captured. While hardware emulation accelerators offer stronger debugging capabilities and are more suitable for high-precision verification, they are slower. Furthermore, the application of hardware emulation accelerators presents several challenges: First, their high cost limits the resources available to a project, forcing verification personnel to use limited resources cautiously and apply them where they can maximize their value. Second, the operating frequency of hardware emulation accelerators is generally low, around 1MHz, which can lead to significant time consumption when running test cases involving Linux systems (e.g., Linux system startup can take several hours), severely impacting verification efficiency.
[0069] Based on this, embodiments of the present invention provide a hybrid verification method, apparatus, device, and medium based on hardware simulation accelerators and FPGA chips, aiming to solve the technical problems of limited resources, slow speed, and difficult FPGA debugging in current hardware simulation accelerator verification, and improve the efficiency and accuracy of chip verification.
[0070] This invention can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This invention can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0071] The embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0072] Figure 1 This is an optional flowchart of a hybrid verification method based on hardware simulation accelerators and FPGA chips provided in this embodiment of the invention. Figure 1 The method may include, but is not limited to, steps S110 to S160.
[0073] Step S110: Obtain the module architecture information of the target chip, divide the target chip into functional modules according to the module architecture information, and determine the functional modules as hardware simulation functional modules and FPGA functional modules respectively.
[0074] Step S120: Divide the functional code of the target chip to obtain the module code corresponding to the hardware simulation functional module and the FPGA functional module;
[0075] Step S130: Perform cross-clock domain connection processing on the hardware simulation accelerator and FPGA chip through the IO multiplexing module;
[0076] Step S140: Compile the module code corresponding to the hardware simulation function module and the FPGA function module respectively to obtain the hardware simulation code version and the FPGA code version. Configure the hardware simulation code version into the hardware simulation accelerator and the FPGA code version into the FPGA chip.
[0077] Step S150: Obtain multiple test cases based on the hardware simulation code version and the FPGA code version, respectively;
[0078] Step S160: Based on multiple test cases, jointly debug the hardware simulation code version and the FPGA code version to obtain the verification test results of the target chip.
[0079] In some embodiments, a hardware simulation accelerator refers to a hardware device used to accelerate the hardware simulation process. It can provide higher simulation speed and efficiency, verifying the correctness of code by simulating the function of the target chip at the hardware level. Compared with EDA (Electronic Design Automation) software simulation, hardware simulation accelerators run faster, reaching about 1MHz, and have stronger debugging capabilities than FPGAs, with all signals inside the design readily available.
[0080] In some embodiments, FPGA chip stands for Field-Programmable Gate Array, a programmable logic device that can be programmed to implement different circuit connections and functions. FPGA chips have the advantages of high operating speed and the ability to interface with real peripherals, making them suitable for custom circuit design and rapid product development.
[0081] In some embodiments, the target chip refers to a specific chip or circuit design that needs to be verified. In this application, the target chip refers to a chip that needs to be verified in a hybrid manner.
[0082] In some embodiments, module architecture information describes the module composition and structure of the target chip. The module architecture information is used to divide functional modules and then determine which modules are used for hardware simulation and which modules are used for FPGA implementation. Therefore, hardware simulation functional modules refer to functional modules that are divided in the target chip and used for hardware simulation. These modules are simulated and verified by a hardware simulation accelerator. FPGA functional modules refer to functional modules that are divided in the target chip and used for FPGA implementation. These modules are verified and tested by an FPGA chip.
[0083] In some embodiments, the I / O multiplexing module is used to handle cross-clock domain connections between the hardware emulation accelerator and the FPGA chip, to ensure that signals from different clock domains can be correctly transmitted and interacted.
[0084] In some embodiments, module code refers to the code written in the hardware description language corresponding to the functional module. In this application, the module code corresponding to the hardware simulation functional module and the FPGA functional module is obtained by dividing the functional code of the target chip.
[0085] In some embodiments, the version compilation process includes compiling the module code to generate a hardware simulation code version and an FPGA code version, so that the hardware simulation code version is configured in the hardware simulation accelerator and the FPGA code version is configured in the FPGA chip.
[0086] In some embodiments, test cases are used to verify the input data and operation sequences of the hardware simulation code version and the FPGA code version, and multiple test cases can cover different verification scenarios and functional requirements.
[0087] In some embodiments, the joint debugging of this application refers to running multiple test cases to simultaneously debug and verify the hardware simulation code version and the FPGA code version. This overcomes the problems of high hardware simulation accelerator prices, limited resources due to cost constraints, and the need for verification personnel to carefully allocate limited resources to their most valuable applications. Furthermore, the operating frequency of hardware simulation accelerators is generally around 1MHz, which takes a long time to run Linux system-related test cases (Linux boot typically takes several hours), severely impacting verification efficiency. It also overcomes the difficulties of waveform capture when using FPGAs alone (requiring the addition of probes, resynthesis, and re-layout routing to generate version files, which is time-consuming) and the limited number of signals that can be captured. By using FPGAs to verify fixed, high-performance modules and hardware simulation accelerators to verify newly developed or problematic modules, the verification test results of the target chip can be obtained.
[0088] In summary, through steps S110 to S160 as shown in the embodiments of the present invention, this application can obtain the module architecture information of the target chip, divide each functional module from the target chip according to the module architecture information, and determine the functional modules as hardware simulation functional modules and FPGA functional modules respectively; further, the functional code of the target chip is divided to obtain the module code corresponding to the hardware simulation functional module and the FPGA functional module; further, the hardware simulation accelerator and the FPGA chip are connected across clock domains through the IO multiplexing module; further, the module code corresponding to the hardware simulation functional module and the FPGA functional module are respectively compiled to obtain the hardware simulation code version and the FPGA code version, and the hardware simulation code version is configured in the hardware simulation accelerator, and the FPGA code version is configured in the FPGA chip; further, according to the hardware simulation code version and the FPGA code version, respectively... The A code version yields multiple test cases. Furthermore, based on these test cases, the hardware simulation code version and the FPGA code version are jointly debugged to obtain the verification test results of the target chip. Since the FPGA can interface with real peripherals, the test accuracy and real-world environment are closer, and it also has a higher operating speed. Therefore, this application utilizes the FPGA to quickly verify modules with fixed, high-performance requirements. Simultaneously, because the hardware simulation accelerator provides clear internal signal visibility in the verification of newly developed or problematic modules, making problem diagnosis and resolution more convenient, this application utilizes the hardware simulation accelerator to verify newly developed or problematic modules. Thus, this application not only extensively utilizes the high operating speed advantage of the FPGA but also fully leverages the superior debugging capabilities of the hardware simulation accelerator, thereby improving both the efficiency and accuracy of chip verification and debugging.
[0089] In some embodiments, when faced with high hardware emulation accelerator costs and limited resources, the hybrid verification method of this application can also alleviate the resource pressure on hardware emulation accelerators, make full use of the cost-effective FPGA, maximize its advantages, and thus more carefully allocate limited hardware resources to the places where they can play the most value. Moreover, due to the adoption of the hybrid verification method, the design team can discover and fix problems at an early stage, thereby improving the reliability of the final chip design and shortening the entire chip design cycle.
[0090] The above is a general description of steps S110 to S160. Steps S110 to S160 will be described in detail below.
[0091] In step S110, the module architecture information of the target chip is obtained, and each functional module is divided from the target chip according to the module architecture information. The functional modules are respectively identified as hardware simulation functional modules and FPGA functional modules.
[0092] Currently, most chip development models follow a "building block" approach: purchasing mature intellectual property (IP) and then adding custom modules developed in-house. For example, a typical SoC (System on Chip) chip might use an ARM CPU core or the latest PCIe 5.0 IP, and then develop custom modules such as video codecs. Since the purchased IP often comes from large companies like ARM or Synopsys, its quality is very reliable, its versions are very stable, and the probability of finding problems during verification is low. Therefore, these IPs are generally not the focus of verification. On the other hand, user-developed modules have more problems and unstable versions, making them the focus of chip verification.
[0093] Therefore, this application attempts to divide functional modules according to the module architecture information of the target chip, thereby placing high-quality IP modules into the FPGA chip and placing newly developed or problematic modules into the hardware simulation accelerator. Please refer to [reference needed]. Figure 2 , Figure 2 This is a SoC architecture diagram provided in another embodiment of the present invention, wherein the SoC is a system chip that integrates all the main components required for an electronic system, corresponding to the target chip in this application, which includes the following functional modules:
[0094] CPU (Central Processing Unit): The central processing unit module, which is generally a RISC-V core or ARM core purchased from an IP vendor. It can be a single core or a multi-core. Among them, RISC-V is an open-source instruction set architecture based on RISC (Reduced Instruction Set Computing), while ARM is a RISC architecture widely used in mobile devices.
[0095] DDR (Double Data Rate): The DDR controller module is a technology of SDRAM (Synchronous Dynamic Random Access Memory) used to improve the data transfer rate;
[0096] SoC Bus 1 (first bus module), SoC Bus 2 (second bus module), and SoC Bus 3 (third bus module). These bus modules are generally AXI interfaces. This article takes AXI4 as an example. AXI (Advanced eXtensible Interface) is an advanced extensible interface, mainly used to connect the processor and peripherals. AXI4 is the fourth generation of the AXI interface standard, which can provide better performance and higher data throughput.
[0097] Timer: A timer used to measure and control time;
[0098] UART (Universal Asynchronous Receiver-Transmitter): A universal asynchronous receiver-transmitter used for serial communication;
[0099] SPI (Serial Peripheral Interface): A synchronous serial interface used for short-distance communication;
[0100] I2C (Inter-Integrated Circuit): An interconnect integrated circuit used as a bus for communication between multiple master devices;
[0101] BOOTROM: Boot read-only memory used to store boot code. When the system is powered on or reset, the processor first executes the code stored here.
[0102] DMAC (Direct Memory Access Controller): A direct memory access controller that allows data to be transferred directly from one memory address to another outside the CPU.
[0103] USB (Universal Serial Bus): A serial bus module used to connect computers and other devices, such as printers, cameras, and external hard drives.
[0104] GMAC (Gigabit Ethernet MAC): Ethernet access controller, corresponding to the network communication module in this application, is an important component in Ethernet communication, responsible for sending and receiving data packets;
[0105] Other modules: Other modules developed by the user include the target detection function module connected to the second bus module.
[0106] Based on the above functional modules, please refer to Figure 3 , Figure 3This is a SoC breakdown diagram provided by another embodiment of the present invention. Each module in the FPGA part corresponds to an FPGA functional module, and each module in the hardware simulation accelerator part corresponds to a hardware simulation functional module. It can be seen that the FPGA part mainly includes an externally purchased CPU, bus, and some small functional modules. These modules are of high quality and have few problems. Moreover, the DDR module required for Linux to boot is also in the FPGA part. Therefore, Linux can be booted quickly without accessing the modules in the hardware simulation accelerator, thereby accelerating the verification process.
[0107] refer to Figure 3 In some embodiments, functional modules are divided from the target chip based on module architecture information, and these functional modules are respectively identified as hardware simulation functional modules and FPGA functional modules. This includes dividing the target chip into a central processing unit (CPU) module, a DDR controller module, a first bus module, a second bus module, a serial bus module, and a network communication module based on the module architecture information. The CPU module, DDR controller module, and second bus module are respectively connected to the first bus module, and the serial bus module and network communication module are respectively connected to the second bus module. The CPU module, DDR controller module, and first bus module are identified as FPGA functional modules; the second bus module, serial bus module, and network communication module are identified as hardware simulation functional modules. This embodiment utilizes the high operating frequency of the FPGA by moving the CPU module, DDR controller module, and first bus module to the FPGA to quickly boot Linux, accelerating verification. Since these modules are relatively stable, the modules that may have more problems are placed in the hardware simulation accelerator, thus maintaining the debuggability of these modules.
[0108] In some embodiments, a third bus module, a boot read-only memory, and a direct memory access controller are also connected to the first bus module. A timer, a universal asynchronous receiver / transmitter, a serial peripheral interface, and an interconnect integrated circuit are connected to the third bus module. The method further includes: defining the third bus module, the timer, the universal asynchronous receiver / transmitter, the serial peripheral interface, the interconnect integrated circuit, the boot read-only memory, and the direct memory access controller as FPGA functional modules, which can further move the aforementioned relatively stable modules from the hardware simulation accelerator to the FPGA, thereby saving valuable hardware simulation accelerator resources.
[0109] In some embodiments, when a target functional module to be tested is connected to the second bus module, after loading multiple test cases into the FPGA chip through a preset debugger, the method further includes: during the execution of multiple test cases, obtaining waveform data of the target functional module to be tested through the trigger control mechanism of the hardware simulation functional module; performing functional verification processing on the target functional module to be tested based on the waveform data to obtain the verification test result of the target functional module to be tested. Through the above steps, high visibility debugging of newly developed or problematic modules placed in the hardware simulation accelerator is achieved, effectively maintaining the debuggability of the modules.
[0110] In step S120, the functional code of the target chip is divided to obtain the module code corresponding to the hardware simulation functional module and the FPGA functional module. After formulating the splitting scheme of each functional module in the chip based on the chip architecture information in step S110, the functional code of the target chip can be divided according to the splitting results of the hardware simulation functional module and the FPGA functional module to obtain the module code corresponding to the hardware simulation functional module and the FPGA functional module. Then, in subsequent steps, the code logic version can be generated according to the module code corresponding to the hardware simulation functional module and the FPGA functional module to be configured into the FPGA chip and the hardware simulation accelerator.
[0111] In step S130, the hardware simulation accelerator and the FPGA chip are connected across clock domains through the IO multiplexing module.
[0112] In some embodiments, since the hardware emulation accelerator typically operates at a frequency of 1MHz and the FPGA typically operates at tens of MHz, the two speeds are different and cannot be directly connected. In normal operation, the FPGA should operate at the fastest possible frequency, such as 40MHz. This results in a frequency difference between the 1MHz hardware emulation accelerator signal and the 40MHz FPGA signal, making direct interconnection impossible. Therefore, a cross-clock domain conversion is required between the hardware emulation accelerator and the FPGA chip.
[0113] refer to Figure 4 , Figure 4 This is a clock conversion schematic diagram provided by another embodiment of the present invention; in some embodiments, the first bus module has a cross-clock domain conversion unit, and performs cross-clock domain connection processing between the hardware simulation accelerator and the FPGA chip through an I / O multiplexing module, including: connecting the first bus module and the second bus module through the I / O multiplexing module, so that the first bus module is deployed to the FPGA chip and the second bus module is deployed to the hardware simulation accelerator; wherein, the first bus module obtains the signal of the slow clock domain of the second bus module through the I / O multiplexing module; and performs clock conversion processing on the signal of the slow clock domain through the cross-clock domain conversion unit on the first bus module to obtain the processed signal.
[0114] In the above embodiment, since SoC bus 1 (first bus module) has a cross-clock domain conversion unit, which supports different interfaces to input independent clocks and supports cross-clock domain conversion between different interfaces, it is only necessary to input the slow clock of the hardware emulation accelerator to the corresponding interface of bus 1 to directly interconnect them. SoC bus 1 completes the cross-clock domain conversion to realize the cross-clock domain connection processing between the hardware emulation accelerator and the FPGA chip.
[0115] In some embodiments, when the number of signals between the hardware emulation accelerator and the FPGA is large, multiple I / O multiplexing modules can be used to perform cross-clock domain connection processing between the hardware emulation accelerator and the FPGA chip. The function of the I / O multiplexing module is to perform signal multiplexing within the FPGA from the FPGA chip to the EMU (hardware emulation accelerator) and demultiplexing within the FPGA from the EMU to the FPGA. For example, 4 different signals can be transmitted over a single physical connection. Different hardware emulation accelerators provide different multiplexing mechanisms. For example, Cadence's Palladium Z1 machine provides the HDDCMux mechanism, and Mentor's Strato machine provides the IO Frame mechanism. These machines can provide signal multiplexing in multiples of 2, 4, 6, 8, etc., which can significantly reduce the number of physical connections, effectively reducing the number of physical connections required in the simulation environment, thereby reducing hardware costs, improving system efficiency, and simplifying wiring design.
[0116] refer to Figure 5 , Figure 5 This is another clock conversion diagram provided by another embodiment of the present invention; in some embodiments, the FPGA chip has an AXI clock conversion module, which performs cross-clock domain connection processing between the hardware simulation accelerator and the FPGA chip through an IO multiplexing module, including: connecting a first bus module and a second bus module through the IO multiplexing module and the AXI clock conversion module, so that the first bus module is deployed to the FPGA chip and the second bus module is deployed to the hardware simulation accelerator; wherein, the AXI clock conversion module obtains the signal of the slow clock domain of the second bus module through the IO multiplexing module; performs clock conversion processing on the signal of the slow clock domain through the AXI clock conversion module, and sends the processed signal to the first bus module.
[0117] In the above embodiments, if the SoC bus 1 does not support separate input clocks for different interfaces, but the selected FPGA chip provides AXI clock conversion IP, the clock conversion can be implemented using the FPGA IP. That is, the FPGA chip has an AXI clock conversion module. For example, Xilinx's FPGA provides an AXI Clock Converter module, which can effectively realize cross-clock domain conversion between AXI4 interfaces with different clocks, thereby enabling the hardware simulation accelerator and the FPGA chip to perform cross-clock domain connection processing.
[0118] refer to Figure 6 , Figure 6 This is another clock conversion diagram provided by another embodiment of the present invention; in some embodiments, if the selected FPGA chip does not have an AXI clock conversion module, an asynchronous conversion module can be developed to perform signal clock domain conversion. Specifically, the hardware simulation accelerator and the FPGA chip are connected across clock domains through an I / O multiplexing module, including: deploying an asynchronous conversion module on the FPGA chip, the asynchronous conversion module being connected to a first bus module; connecting the asynchronous conversion module and a second bus module through an I / O multiplexing module, so that the first bus module is deployed to the FPGA chip and the second bus module is deployed to the hardware simulation accelerator; wherein, the asynchronous conversion module obtains the slow clock domain signal of the second bus module through the I / O multiplexing module; performs clock conversion processing on the slow clock domain signal through the asynchronous conversion module, and sends the processed signal to the first bus module, thereby realizing the cross-clock domain connection processing between the hardware simulation accelerator and the FPGA chip.
[0119] Please refer to Figure 7 , Figure 7 This is a schematic diagram of an asynchronous conversion module provided in another embodiment of the present invention. The asynchronous conversion module includes an asynchronous first-in-first-out (FIFO) memory. In some embodiments, the asynchronous conversion module may include an asynchronous FIFO memory. Taking the write address channel of AXI4 (direction from the hardware emulation accelerator to the FPGA) as an example, the asynchronous conversion module performs clock conversion processing on the signal in the slow clock domain, including: obtaining the full indicator bit, the emulation end write address valid indicator bit, and the FPGA end write address ready indicator bit of the asynchronous FIFO memory; when the full indicator bit is 0 and the emulation end write address valid indicator bit is 1, the signal in the slow clock domain is written to the asynchronous FIFO memory; when the FPGA end write address ready indicator bit is 1, the data read from the asynchronous FIFO memory is sent to the first bus module using a fast clock. Since the write clock and read clock of the asynchronous FIFO memory are different, the above process can effectively realize the conversion of the data clock domain.
[0120] In some embodiments, the signals in the slow clock domain refer to those signals sent by the slow clock, such as address signals. In the above process, this application does not write the slow clock into the asynchronous first-in-first-out memory, but instead writes those signals transmitted by the slow clock into the asynchronous first-in-first-out memory.
[0121] Specifically, the asynchronous conversion module includes a write control module, an asynchronous FIFO, and a read control module. The write control module receives signals from the slow side, including aclk_emu, awvalid_emu, awaddr_emu, and awid_emu, and generates a signal including awready_emu. The read control module receives signals from the fast side, including aclk_fpga and awready_fpga, and generates signals including awvalid_fpga, awaddr_fpga, and awid_fpga. Furthermore, the asynchronous FIFO is connected to both the write and read control modules to send an almost_full signal to the write control module and an empty signal to the read control module. In the AXI4 interface protocol, aclk_emu and aclk_fpga represent the clock domain signals of the hardware emulation accelerator (EMU) and the FPGA, respectively. "aclk" stands for AXI. Clock; awvalid_emu and awvalid_fpga are write address valid signals in the AXI4 protocol, indicating whether the currently transmitted write address is valid. "_emu" and "_fpga" indicate that the signal comes from the hardware emulation accelerator and FPGA, respectively. awaddr_emu and awaddr_fpga are write address signals in the AXI4 protocol, indicating the address to be written. "_emu" and "_fpga" indicate that the address comes from the hardware emulation accelerator and FPGA, respectively. awid_emu and awid_fpga, where "awid" represents the write channel ID in the AXI4 protocol, used to distinguish transaction requests from different masters. "_emu" and "_fpga" indicate that the ID comes from the hardware emulation accelerator and FPGA, respectively.
[0122] awready_emu and awready_fpga are write address ready signals in the AXI4 protocol. When it is 1, it indicates that the corresponding device is ready to receive write addresses. "_emu" and "_fpga" indicate that the ready signal comes from the hardware emulation accelerator and FPGA, respectively. The almost_full signal is used to tell the write control module that the FIFO is close to full. When the FIFO is about to be full, the "almost_full" signal will be set to 1. This is usually used to remind the write control module to slow down or pause writing data into the FIFO to prevent data overflow. The empty signal is used to indicate to the read control module that the FIFO is empty and there is no data to read. When the FIFO is empty, the "empty" signal will be set to 1. This is usually used to tell the read control module to stop reading data from the FIFO until new data arrives.
[0123] Among them, almost_full, awready_emu, and awready_fpga correspond to the full indicator bit, the emulation end write address valid indicator bit, and the FPGA end write address ready indicator bit, respectively.
[0124] Based on the asynchronous conversion module described above, the write-side processing is as follows: `awready_emu` can be independently generated based on the `almost_full` signal of the asynchronous FIFO (FIFO near full indicator, full threshold is configurable). Specifically, when `almost_full` is 0, `awready_emu` is set to 1; when `almost_full` is 1, `awready_emu` is set to 0. Then, when both `awvalid_emu` and `awready_emu` are 1, the write address channel signal is sampled and packaged into the asynchronous FIFO. The read-side processing is as follows: When the asynchronous FIFO is not empty, data in the FIFO is read and sent to the FPGA side (`awvalid_fpga` is set to 1, and the values of each signal are output). The success of the transmission is determined by whether the `awready_fpga` signal is 1. If `awready_fpga` is 0, the current data is continuously sent until successful (`awready_fpga` is 1). If the FIFO is empty, it means there is no valid data to send; in this case, `awvalid_fpga` is set to 0. Thus, through the above process, the asynchronous FIFO can achieve cross-clock domain conversion.
[0125] In some embodiments, the AXI4 interface includes a write address channel, a write data channel, a write return channel, a read address channel, and a read data channel. The other channels need to be processed in a similar manner to the write address channel to complete the cross-clock domain conversion.
[0126] In step S140, the module code corresponding to the hardware simulation function module and the FPGA function module are respectively compiled to obtain the hardware simulation code version and the FPGA code version. The hardware simulation code version is configured into the hardware simulation accelerator, and the FPGA code version is configured into the FPGA chip.
[0127] In some embodiments, the module code corresponding to the hardware simulation function module and the FPGA function module is first compiled to convert the written hardware description language code into the corresponding hardware circuit. The compilation process synthesizes the code into a logic gate-level representation, which can be used in subsequent steps to generate hardware or perform functional verification. After the compilation process is completed, a hardware simulation code version and an FPGA code version are obtained. The hardware simulation code version is used to verify the correctness and functionality of the design in a software simulation environment, while the FPGA code version is used to load the design into the target FPGA chip and perform actual hardware verification. Subsequently, the hardware simulation code version is configured into the hardware simulation accelerator, and the FPGA code version is configured into the target FPGA chip, that is, the generated code is loaded onto the corresponding hardware platform for subsequent verification and testing.
[0128] In step S150, multiple test cases are obtained based on the hardware simulation code version and the FPGA code version, respectively.
[0129] In some embodiments, multiple test cases can be generated based on the hardware simulation code version and the FPGA code version. These test cases are designed to comprehensively verify different aspects of the design. The test cases may include information such as input data, expected output, and desired behavior. By generating multiple test cases, different functions and boundary conditions of the design can be covered to ensure the correctness and robustness of the design.
[0130] In step S160, based on multiple test cases, the hardware simulation code version and the FPGA code version are jointly debugged to obtain the verification test results of the target chip.
[0131] In some embodiments, the hardware simulation code version and the FPGA code version are jointly debugged based on multiple test cases to achieve verification testing of the target chip at the entire system level. By combining the hardware simulation code version and the FPGA code version for debugging, the accuracy of the hardware simulation can be verified and any problems related to the FPGA target chip can be detected.
[0132] In some embodiments, this application, through joint debugging, runs test cases in a hardware simulation environment while monitoring the behavior and performance of the design. Based on the test results and observed behavior, potential design problems can be identified and resolved to verify the functional correctness, performance, and stability of the target chip and ensure that it meets design specifications and requirements.
[0133] In summary, steps S140 to S160 involve compiling the code corresponding to the hardware simulation function module and the FPGA function module, generating test cases, and performing joint debugging to verify the design and function of the target chip. These steps are key steps in the verification test process and are designed to ensure the correctness and reliability of the chip design.
[0134] Figure 8 This is an example diagram of a hybrid verification method provided in another embodiment of the present invention; in some embodiments, the hybrid verification method in this application specifically includes the following steps:
[0135] S801: Formulate a chip code splitting scheme, corresponding to step S110 above. Based on the chip's module architecture information, the functional modules are determined as hardware simulation functional modules and FPGA functional modules, and the code is split according to the division of functional modules.
[0136] S802: Implement code splitting and logic development. Corresponding to steps S120 and S130 above, start the actual code splitting work according to the division of functional modules. At the same time, it is necessary to develop the necessary asynchronous conversion module and IO multiplexing module, and perform cross-clock domain connection processing for hardware simulation accelerator and FPGA chip to ensure normal interaction between different modules.
[0137] S803: EDA simulation verification, using EDA (Electronic Design Automation) tools to simulate and verify the split code. This is to ensure that the split and other design modifications have not introduced new errors.
[0138] S804: Hardware simulation accelerator and FPGA version generation, corresponding to step S140 above, generates logic versions for the hardware simulation accelerator and FPGA respectively. The FPGA compilation process includes the conventional FPGA design flow, specifically: creating a project, selecting the FPGA model, reading the code, adding IP modules, writing pin / timing constraints, synthesis, placement and routing, and generating a bitstream file; however, the compilation process for the hardware simulation accelerator is slightly different from that of the FPGA, mainly achieved by writing control scripts, reading design files, configuring clocks, constraints, and machine configurations.
[0139] S805: Test software development, corresponding to step S150 above, involves writing test software based on a pre-defined chip verification plan. This software is used to verify the functionality of each hardware module. For example, to verify the DMAC, corresponding test cases need to be written based on its functions and register manual.
[0140] S806: Joint debugging, corresponding to step S160 above, after the hardware logic and test software are ready, joint debugging is performed to ensure the correct interaction between the hardware and software.
[0141] For details, please refer to Figure 9 , Figure 9 This is a schematic diagram of a test network provided in another embodiment of the present invention. The test network includes the aforementioned hardware simulation accelerator, the aforementioned FPGA chip, the Lauderbach JTAG debugger, and a PC. The test process includes: using a JTAG debugger, such as Lauderbach, to load test cases into the FPGA chip; then, executing the test under the control of the debugger, observing its output and performance; and capturing and analyzing waveform data in the hardware simulation accelerator through the more powerful and flexible waveform capture mechanism of the hardware simulation accelerator. Finally, the test case software will print the test results to the PC via the serial port to verify newly developed or problematic modules and obtain the verification test results of the target chip.
[0142] It is worth noting that in the above embodiments, this application uses the AXI4 interface (corresponding to each bus module) as an example to describe a hybrid verification method based on hardware simulation accelerator and FPGA chip. This idea is also applicable to other interfaces. Those skilled in the art can choose other interfaces to implement the solution of this application in order to obtain the verification test results of the target chip.
[0143] Secondly, embodiments of the present invention also provide a hybrid verification device based on a hardware simulation accelerator and an FPGA, comprising: a functional module partitioning unit, used to acquire module architecture information of a target chip, partition each functional module from the target chip according to the module architecture information, and determine the functional modules as hardware simulation functional modules and FPGA functional modules respectively; a functional code partitioning unit, used to partition the functional code of the target chip to obtain the module code corresponding to the hardware simulation functional module and the FPGA functional module; a cross-clock domain connection unit, used to perform cross-clock domain connection processing between the hardware simulation accelerator and the FPGA chip through an IO multiplexing module; a code version compilation unit, used to perform version compilation processing on the module code corresponding to the hardware simulation functional module and the FPGA functional module respectively to obtain a hardware simulation code version and an FPGA code version, and configure the hardware simulation code version into the hardware simulation accelerator and the FPGA code version into the FPGA chip; a test case generation unit, used to generate multiple test cases according to the hardware simulation code version and the FPGA code version respectively; and a joint debugging unit, used to perform joint debugging on the hardware simulation code version and the FPGA code version based on the multiple test cases to obtain the verification test results of the target chip.
[0144] Thirdly, embodiments of the present invention also provide an electronic device, comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for communication between the processor and the memory. When the program is executed by the processor, it implements the aforementioned hybrid verification method based on a hardware simulation accelerator and an FPGA chip. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0145] Please see Figure 10 , Figure 10 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:
[0146] The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0147] The memory 1002 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1002 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 to execute the hybrid verification method based on hardware simulation accelerator and FPGA chip of the embodiments of this invention.
[0148] Input / output interface 1003 is used to implement information input and output;
[0149] The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0150] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);
[0151] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.
[0152] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the above-described hybrid verification method based on a hardware simulation accelerator and an FPGA chip.
[0153] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0154] The embodiments described in this invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of this invention, and do not constitute a limitation on the technical solutions provided by the embodiments of this invention. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems.
[0155] It will be understood by those skilled in the art that Figure 1 The technical solutions shown do not constitute a limitation on the embodiments of the present invention, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0156] The terms "first," "second," "third," "fourth," etc. (if present) in the specification and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0157] It will be understood by those skilled in the art that all or some of the steps in the methods disclosed above, and the corresponding systems, can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer-readable storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer-readable storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer-readable storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0158] The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and spirit of the present invention should be within the scope of the claims of the present invention.
Claims
1. A hybrid verification method based on a hardware simulation accelerator and an FPGA chip, characterized in that, include: Obtain the module architecture information of the target chip, divide the target chip into functional modules based on the module architecture information, and determine the functional modules as hardware simulation functional modules and FPGA functional modules respectively; The functional code of the target chip is divided to obtain the module code corresponding to the hardware simulation functional module and the FPGA functional module; The hardware simulation accelerator and the FPGA chip are connected across clock domains via an I / O multiplexing module. The module code corresponding to the hardware simulation function module and the FPGA function module are respectively compiled to obtain the hardware simulation code version and the FPGA code version. The hardware simulation code version is configured into the hardware simulation accelerator, and the FPGA code version is configured into the FPGA chip. Multiple test cases were obtained based on the hardware simulation code version and the FPGA code version, respectively. Based on multiple test cases, the hardware simulation code version and the FPGA code version are jointly debugged to obtain the verification test results of the target chip; The step of dividing the target chip into functional modules based on the module architecture information and identifying the functional modules as hardware simulation functional modules and FPGA functional modules includes: dividing the target chip into a central processing unit (CPU) module, a DDR controller module, a first bus module, a second bus module, a serial bus module, and a network communication module based on the module architecture information, wherein the CPU module, the DDR controller module, and the second bus module are respectively connected to the first bus module, and the serial bus module and the network communication module are respectively connected to the second bus module; identifying the CPU module, the DDR controller module, and the first bus module as FPGA functional modules; and identifying the second bus module, the serial bus module, and the network communication module as hardware simulation functional modules; Additionally, the first bus module has a cross-clock domain conversion unit. The cross-clock domain connection processing between the hardware emulation accelerator and the FPGA chip via the I / O multiplexing module includes: connecting the first bus module and the second bus module via the I / O multiplexing module, so that the first bus module is deployed to the FPGA chip and the second bus module is deployed to the hardware emulation accelerator; wherein, the first bus module obtains the slow clock domain signal of the second bus module through the I / O multiplexing module; and performs clock conversion processing on the slow clock domain signal through the cross-clock domain conversion unit on the first bus module to obtain the processed signal; Furthermore, the step of jointly debugging the hardware simulation code version and the FPGA code version based on multiple test cases to obtain the verification test results of the target chip includes: loading multiple test cases into the FPGA chip through a preset debugger, so that the central processing unit module executes multiple test cases; acquiring test data of the FPGA functional module and the hardware simulation functional module during the execution of multiple test cases; and obtaining the verification test results of the target chip based on the test data of the FPGA functional module and the hardware simulation functional module.
2. The hybrid verification method based on hardware simulation accelerator and FPGA chip according to claim 1, characterized in that, The first bus module is also connected to a third bus module, a boot read-only memory, and a direct memory access controller. The third bus module is connected to a timer, a universal asynchronous receiver / transmitter, a serial peripheral interface, and an interconnect integrated circuit. The method further includes: The third bus module, the timer, the universal asynchronous transceiver, the serial peripheral interface, the interconnect integrated circuit, the boot read-only memory, and the direct memory access controller are identified as FPGA functional modules.
3. The hybrid verification method based on hardware simulation accelerator and FPGA chip according to claim 1, characterized in that, The FPGA chip has an AXI clock conversion module, and the cross-clock domain connection processing between the hardware simulation accelerator and the FPGA chip through the IO multiplexing module includes: The first bus module and the second bus module are connected through the IO multiplexing module and the AXI clock conversion module, so that the first bus module is deployed to the FPGA chip and the second bus module is deployed to the hardware simulation accelerator; wherein, the AXI clock conversion module obtains the slow clock domain signal of the second bus module through the IO multiplexing module; The AXI clock conversion module performs clock conversion processing on the signal in the slow clock domain and sends the processed signal to the first bus module.
4. The hybrid verification method based on hardware simulation accelerator and FPGA chip according to claim 1, characterized in that, The cross-clock domain connection processing between the hardware simulation accelerator and the FPGA chip via the I / O multiplexing module includes: An asynchronous conversion module is deployed on the FPGA chip, and the asynchronous conversion module is connected to the first bus module; The asynchronous conversion module and the second bus module are connected via an I / O multiplexing module, so that the first bus module is deployed to the FPGA chip and the second bus module is deployed to the hardware simulation accelerator; wherein, the asynchronous conversion module obtains the slow clock domain signal of the second bus module through the I / O multiplexing module; The asynchronous conversion module performs clock conversion processing on the signal in the slow clock domain and sends the processed signal to the first bus module.
5. The hybrid verification method based on hardware simulation accelerator and FPGA chip according to claim 4, characterized in that, The asynchronous conversion module includes an asynchronous first-in-first-out memory. The clock conversion processing of the signal in the slow clock domain through the asynchronous conversion module includes: Obtain the full indicator bit, the write address valid indicator bit, and the write address ready indicator bit of the asynchronous first-in-first-out memory; When the full indicator bit is 0 and the emulation end write address valid indicator bit is 1, the signal of the slow clock domain is written into the asynchronous first-in-first-out memory. When the write address ready indicator bit on the FPGA is 1, the signal of the slow clock domain is sent to the first bus module through the asynchronous first-in-first-out memory.
6. The hybrid verification method based on hardware simulation accelerator and FPGA chip according to claim 1, characterized in that, The process of dividing the functional code of the target chip to obtain the module code corresponding to the hardware simulation functional module and the FPGA functional module includes: The functional code of the target chip is divided to obtain the first split code corresponding to the hardware simulation functional module and the second split code corresponding to the FPGA functional module. The first and second split codes are subjected to electronic design automation verification to obtain the electronic design automation verification results. Based on the electronic design automation verification results, the first split code is determined as the module code of the hardware simulation function module, and the second split code is determined as the module code of the FPGA function module.
7. The hybrid verification method based on hardware simulation accelerator and FPGA chip according to claim 6, characterized in that, The second bus module is connected to a target detection function module. After loading multiple test cases into the FPGA chip using a preset debugger, the process further includes: During the execution of multiple test cases, waveform data of the target test module is obtained through the trigger control mechanism of the hardware simulation function module. The target detection module is functionally verified based on the waveform data to obtain the verification test results of the target detection module.
8. A hybrid verification device based on a hardware simulation accelerator and an FPGA chip, used to execute the method according to any one of claims 1 to 7, characterized in that, include: The functional module division unit is used to obtain the module architecture information of the target chip, divide each functional module from the target chip according to the module architecture information, and determine the functional modules as hardware simulation functional modules and FPGA functional modules respectively. The function code partitioning unit is used to partition the function code of the target chip to obtain the module code corresponding to the hardware simulation function module and the FPGA function module; A cross-clock domain connection unit is used to perform cross-clock domain connection processing between the hardware simulation accelerator and the FPGA chip through an IO multiplexing module; The code version compilation unit is used to perform version compilation processing on the module code corresponding to the hardware simulation function module and the FPGA function module respectively to obtain the hardware simulation code version and the FPGA code version, and configure the hardware simulation code version into the hardware simulation accelerator and the FPGA code version into the FPGA chip. The test case generation unit is used to generate multiple test cases based on the hardware simulation code version and the FPGA code version, respectively. The joint debugging unit is used to jointly debug the hardware simulation code version and the FPGA code version based on multiple test cases to obtain the verification test results of the target chip.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the hybrid verification method based on hardware simulation accelerator and FPGA chip as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The device contains a computer program that, when executed by a processor, implements the hybrid verification method based on a hardware simulation accelerator and an FPGA chip as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Verification data transmission method, rate conversion device and verification data transmission system
CN113422756A
FPGA global reset synchronization circuit, chip, verification simulation system and method
CN115543051A
