FPGA software simulation verification platform and method based on model library

Through the FPGA software simulation verification platform based on the model library, it automatically builds a reusable model library and intelligently generates test cases, solving the problems of low simulation verification efficiency and high technical threshold of domestic FPGA software, and achieving efficient simulation verification and quality improvement.

CN118567982APending Publication Date: 2024-08-30AEROSPACE SOFTWARE TECH (BEIJING) CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410691164.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Domestic FPGA software simulation verification is inefficient, cannot guarantee the adequacy and completeness of simulation verification, requires a lot of human resources and time, and has a high technical threshold, resulting in a long verification cycle and poor quality.

Method used

Provides a model library-based FPGA software simulation verification platform that automatically builds a reusable model library, intelligently generates test cases, and reduces duplication through modules such as acquisition modules, building blocks, interface protocol intelligent analysis engines, and functional test point analysis intelligent engines. Work that supports formal verification of assertions and intelligent acquisition of code coverage.

Benefits of technology

It greatly improves the efficiency of FPGA software simulation verification, lowers the technical threshold, reduces manual intervention, improves test quality, and solves the problems of long simulation verification cycle and low efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567982A
    Figure CN118567982A
Patent Text Reader

Abstract

The invention relates to an FPGA software simulation verification platform and method based on a model library, and the method comprises the steps: obtaining basic information and a source file, including an FPGA chip identifier, of tested FPGA software, constructing a plurality of types of reusable model libraries, matching a corresponding FPGA library file from all FPGA library files based on the FPGA chip identifier, obtaining an interface protocol based on the basic information and the source file, and verifying the interface protocol based on the FPGA chip identifier. Generating an interface protocol test case based on the interface protocol, the model library and the scene type, obtaining a function test point based on the basic information and the source file, and generating a function test point test case based on the function test point, the model library and the scene type; and executing the interface protocol test case and the function test point test case based on the FPGA library file to obtain a plurality of code coverage rates, and combining the code coverage rates corresponding to all the test cases to obtain a final code coverage rate. Therefore, the FPGA simulation verification efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of software testing, and in particular to a FPGA (Field Programmable Gate Array) software simulation verification platform and method based on a model library. Background Art

[0002] At present, the simulation and verification work of domestic FPGA software mainly follows the relevant provisions of GJB 9433-2018 to carry out functional simulation, gate-level simulation, and timing simulation. When performing simulation and verification on domestic FPGA software, it is still necessary to manually build a simulation platform and manually write simulation stimulus code, and the simulation verification efficiency is very low.

[0003] Domestic FPGA software usually contains different types of peripheral interfaces and algorithm modules with different functions, which requires very high experience and skills of FPGA software verifiers in writing simulation stimulus code. Each FPGA software verifier has to build a simulation platform, design test cases, write simulation stimulus code, etc. from scratch. Limited by the work experience and skills of FPGA software verifiers, the quality of simulation stimulus code written by different personnel varies, which cannot guarantee the adequacy and completeness of domestic FPGA software simulation verification, and cannot guarantee the quality of domestic FPGA software.

[0004] A large amount of human resources and time costs are consumed in the processes of test case design, simulation stimulus code writing, simulation result analysis, coverage analysis, etc. Each software under test must be manually led in the entire simulation verification process, designing cases, writing test stimuli and executing them from scratch, resulting in low efficiency of simulation verification work and low degree of automation and intelligence of simulation verification. Summary of the invention

[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an FPGA software simulation verification platform and method based on a model library.

[0006] The present disclosure provides an FPGA software simulation verification platform based on a model library, comprising:

[0007] An acquisition module, used to acquire basic information and source files of the FPGA software under test; wherein the basic information includes an FPGA chip identifier;

[0008] Building blocks for constructing reusable model libraries of various types;

[0009] An FPGA library file mapping module, used for matching a corresponding FPGA library file from all FPGA library files based on the FPGA chip identifier;

[0010] An interface protocol intelligent analysis engine, configured to obtain an interface protocol based on the basic information and the source file, match a first model library from the reusable model library based on the interface protocol, determine a first scenario type from an interface protocol scenario library based on the interface protocol, and generate an interface protocol test case based on the interface protocol, the first model library and the first scenario type;

[0011] A functional test point analysis intelligent engine, configured to obtain a functional test point based on the basic information and the source file, match a second model library from the reusable model library based on the functional test point, determine a second scenario type from an interface protocol scenario library based on the functional test point, and generate a functional test point test case based on the functional test point, the second model library and the second scenario type;

[0012] The test module is used to use a script file to execute the interface protocol test case and the functional test point test case based on the FPGA library file, obtain multiple code coverage rates, and merge the code coverage rates corresponding to all test cases to obtain a final code coverage rate.

[0013] In an optional embodiment of the present disclosure, the building module is specifically used to:

[0014] Obtain FPGA peripheral chip models of multiple interface buses and build them into bus function models;

[0015] Acquire multiple algorithm models to build a basic algorithm model;

[0016] The bus function model and the basic algorithm model serve as the multiple types of reusable model libraries.

[0017] In an optional embodiment of the present disclosure, the building module is specifically used to:

[0018] The FPGA library file corresponding to the FPGA chip identifier is mapped and loaded from all FPGA library files through batch files and script files.

[0019] In an optional embodiment of the present disclosure, the interface protocol intelligent analysis engine is specifically used to:

[0020] Based on the basic information and the source file, acquiring an interface protocol;

[0021] Create an XML file for storing information of each field in the interface protocol;

[0022] Analyze each of the field information, match the first model library from the reusable model library, and determine the first normal scenario or the first abnormal scenario from the interface protocol scenario library, and generate a normal interface protocol test case or an abnormal interface protocol test case based on each of the field information, the first model library and the first normal scenario or the first abnormal scenario.

[0023] In an optional embodiment of the present disclosure, the functional test point analysis intelligent engine is specifically used to:

[0024] Based on the basic information and the source file, obtaining functional test points;

[0025] Based on the functional test point, a second model library is matched from the reusable model library, based on the functional test point, a second normal scenario or a second abnormal scenario is determined from the interface protocol scenario library, and based on the functional test point, the second model library and the second normal scenario or the second abnormal scenario, a normal functional test point test case or an abnormal functional test point test case is generated.

[0026] In an optional embodiment of the present disclosure, the functional test point analysis intelligent engine is further used to:

[0027] Add assertions for testing target timing relationships and collecting functional coverage data to the functional test point test cases; wherein the target timing relationships include the timing relationships between each target external interface and internal interface signal; and the coverage of the functional test points includes the target function in each requirement.

[0028] In an optional embodiment of the present disclosure, the test module is further used to:

[0029] Based on the final code coverage, the source file is located by a simulation tool.

[0030] The present disclosure provides an FPGA software simulation verification method based on a model library, comprising:

[0031] Obtaining basic information and source files of the FPGA software under test; wherein the basic information includes an FPGA chip identifier;

[0032] Build a library of reusable models of various types;

[0033] Matching a corresponding FPGA library file from all FPGA library files based on the FPGA chip identifier;

[0034] Based on the basic information and the source file, an interface protocol is acquired, and a first model library is matched from the reusable model library based on the interface protocol, a first scenario type is determined from an interface protocol scenario library based on the interface protocol, and an interface protocol test case is generated based on the interface protocol, the first model library and the first scenario type;

[0035] Based on the basic information and the source file, a functional test point is acquired, and a second model library is matched from the reusable model library based on the functional test point, a second scenario type is determined from an interface protocol scenario library based on the functional test point, and a functional test point test case is generated based on the functional test point, the second model library and the second scenario type;

[0036] A script file is used to execute the interface protocol test case and the functional test point test case based on the FPGA library file to obtain multiple code coverage rates, and the code coverage rates corresponding to all test cases are merged to obtain the final code coverage rate.

[0037] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0038] An FPGA software simulation verification platform based on a model library is proposed, comprising: an acquisition module, used for acquiring basic information and source files of the tested FPGA software; wherein the basic information includes an FPGA chip identifier, a construction module, used for constructing multiple types of reusable model libraries, an FPGA library file mapping module, used for matching corresponding FPGA library files from all FPGA library files based on the FPGA chip identifier, an interface protocol intelligent analysis engine, used for acquiring an interface protocol based on the basic information and the source file, matching a first model library from the reusable model library based on the interface protocol, determining a first scenario type from an interface protocol scenario library based on the interface protocol, and a basic Based on the interface protocol, the first model library and the first scenario type, an interface protocol test case is generated, and a functional test point analysis intelligent engine is used to obtain functional test points based on basic information and source files, and match the second model library from the reusable model library based on the functional test points, determine the second scenario type from the interface protocol scenario library based on the functional test points, and generate functional test point test cases based on the functional test points, the second model library and the second scenario type, and a test module is used to use a script file to execute interface protocol test cases and functional test point test cases based on the FPGA library file to obtain multiple code coverage rates, and merge the code coverage rates corresponding to all test cases to obtain the final code coverage rate. Therefore, the FPGA software simulation verification platform based on the model library can construct and intelligently manage multiple types of reusable model libraries, intelligently generate test incentives according to the interface protocol, reduce excessive repetitive work content in the simulation verification process, support the formal verification method of assertions, support intelligent acquisition of code coverage, and can solve the current problems of long simulation verification cycle and low efficiency of large-scale domestic FPGA software. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0041] Figure 1 A structural example diagram of an FPGA software simulation verification platform based on a model library provided in an embodiment of the present disclosure;

[0042] Figure 2 This is a structural example diagram of the domestic FPGA software simulation verification platform based on the model library in the embodiment of the present disclosure;

[0043] Figure 3 This is a structural example diagram of the interface protocol analysis intelligent engine of the embodiment of the present disclosure;

[0044] Figure 4 This is a structural example diagram of the functional test point analysis intelligent engine of the embodiment of the present disclosure;

[0045] Figure 5 This is a structural example diagram of an FPGA software simulation verification method based on a model library according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0046] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0047] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0048] Based on the above background description, there are currently several problems in the field of domestic FPGA software simulation verification:

[0049] 1. It takes a long time to build the verification model of the companion test device (FPGA software under test), the manual compilation of the device library file is cumbersome, and there are very few reusable model libraries, resulting in a lot of repetitive work in the simulation and verification process of domestic FPGA software.

[0050] 2. Limited by their work experience and skill levels, the quality of simulation stimulus codes written by different FPGA software verifiers varies greatly, and the adequacy and completeness of domestic FPGA software simulation verification cannot be guaranteed.

[0051] 3. At present, the simulation verification of domestic FPGA software usually uses a large number of manually written test cases (including normal and abnormal situations), manual analysis and location of defects in the code, manual statistics of function point coverage, and manual collection of code coverage, which leads to a long simulation verification cycle and poor test quality for domestic FPGA software. According to the requirements analysis of the software under test, the templates and simulation stimuli of the test cases are automatically generated. FPGA software verification personnel only need to improve the content of the simulation stimuli, which can save a lot of time and improve verification efficiency.

[0052] 4. Domestic FPGA software simulation and verification work has a high technical threshold and high requirements on the technical level of FPGA software verifiers. The accuracy, standardization and completeness of simulation stimuli written by FPGA software verifiers of different capabilities vary greatly.

[0053] 5. At present, the execution of test cases and code coverage collection of domestic FPGA software need to be done manually one by one, the execution cycle is very long, and a lot of simulation verification time is wasted.

[0054] Therefore, there are many problems in the current domestic FPGA software simulation and verification process, which seriously restricts the efficiency, test cycle and test cost of domestic FPGA software simulation and verification. With the development of domestic FPGA software simulation and verification technology, the above problems can be solved to a large extent by building a domestic FPGA software simulation and verification platform based on a model library, achieving the goal of reducing costs and increasing efficiency, and safeguarding the quality of domestic FPGA software.

[0055] In response to the above problems, the present invention proposes an FPGA software simulation and verification platform based on a model library, which can build and intelligently manage various types of reusable model libraries, intelligently generate test stimuli according to interface protocols, and reduce excessive repetitive work content in the simulation and verification process; support formal verification methods for assertions; support intelligent acquisition of code coverage; and can solve the current problems of long simulation and verification cycles and low efficiency of large-scale domestic FPGA software.

[0056] Figure 1 The following is a structural example diagram of an FPGA software simulation verification platform based on a model library provided in an embodiment of the present disclosure. Figure 1 As shown in the figure, the FPGA software simulation verification platform based on the model library includes:

[0057] The acquisition module 101 is used to acquire basic information and source files of the FPGA software under test; wherein the basic information includes the FPGA chip identification.

[0058] Among them, the FPGA chip identifier can uniquely identify a tested FPGA software, the basic information can also include pin information, etc., and the source file refers to the source code of the tested FPGA software.

[0059] The construction module 102 is used to construct various types of reusable model libraries.

[0060] In some embodiments, FPGA peripheral chip models of multiple interface buses are obtained to build a bus function model, and multiple algorithm models are obtained to build a basic algorithm model. The bus function model and the basic algorithm model serve as multiple types of reusable model libraries.

[0061] Specifically, various types of reusable model libraries are constructed and managed, and simulation verification platforms are automatically built. Various types of reusable model libraries are constructed in the domestic FPGA software simulation verification platform (hereinafter referred to as the simulation verification platform). The reusable model library contains bus function models and basic algorithm models. The bus function model mainly includes FPGA peripheral chip models based on common interface buses such as UART (Universal Asynchronous Receiver and Transmitter), SPI (Serial Peripheral Interface), 1553B (protocol for transmission between devices), and I2C (serial communication bus). The basic algorithm model mainly includes common algorithm models such as DDS (Direct Digital Synthesis), FFT (Fast Fourier Transform), and FIR (Finite Impulse Response). The reusable model library has the characteristics of parameterization and reusability. The simulation verification platform intelligently extracts the FPGA device type and intelligently analyzes the top-level file of the tested device according to the requirements and the tested device, realizes intelligent management and automatic extraction of the reusable model library, and automatically builds the simulation verification environment.

[0062] The FPGA library file mapping module 103 is used to match the corresponding FPGA library file from all FPGA library files based on the FPGA chip identifier.

[0063] In some embodiments, the FPGA library files corresponding to the FPGA chip identifiers are mapped and loaded from all FPGA library files through batch files and script files.

[0064] Specifically, the automatic mapping and loading of FPGA library files, when receiving new FPGA software under test, determines the FPGA chip model (i.e., FPGA chip identification), automatically maps the corresponding FPGA library files through batch files and script files, and automatically loads the necessary library files according to the actual situation of the project. Among them, all FPGA library files refer to the library files of all currently used software, and the library files can be used for simulation excitation and other processing.

[0065] The interface protocol intelligent analysis engine 104 is used to obtain the interface protocol based on basic information and source files, match the first model library from the reusable model library based on the interface protocol, determine the first scenario type from the interface protocol scenario library based on the interface protocol, and generate an interface protocol test case based on the interface protocol, the first model library and the first scenario type.

[0066] In some embodiments, based on basic information and the source file, an interface protocol is obtained, an XML file is created for storing each field information in the interface protocol, each field information is analyzed, a first model library is matched from a reusable model library, and a first normal scenario or a first abnormal scenario is determined from an interface protocol scenario library, and based on each field information, the first model library and the first normal scenario or the first abnormal scenario, a normal interface protocol test case or an abnormal interface protocol test case is generated.

[0067] Specifically, the interface protocol intelligent analysis engine 104 intelligently analyzes the interface protocol content, automatically generates test case code, creates an XML file for storing information of each field in the interface protocol, intelligently analyzes each field, automatically divides equivalence classes, automatically designs all normal and abnormal test cases, and automatically generates test case code by referencing tasks in the model library.

[0068] The functional test point analysis intelligent engine 105 is used to obtain functional test points based on basic information and source files, match the second model library from the reusable model library based on the functional test points, determine the second scenario type from the interface protocol scenario library based on the functional test points, and generate functional test point test cases based on the functional test points, the second model library and the second scenario type.

[0069] In some embodiments, based on basic information and source files, functional test points are obtained, a second model library is matched from a reusable model library based on the functional test points, a second normal scenario or a second abnormal scenario is determined from an interface protocol scenario library based on the functional test points, and a normal functional test point test case or an abnormal functional test point test case is generated based on the functional test point, the second model library and the second normal scenario or the second abnormal scenario.

[0070] In some embodiments, assertions for testing target (specific) timing relationships and assertions for collecting functional coverage data are added to functional test point test cases; wherein the target timing relationships include the timing relationships between each target external interface and internal interface signal; and the coverage of the functional test points includes the target functions in each requirement.

[0071] Specifically, the function coverage data is automatically collected through the function test point analysis intelligent engine 105 and combined with the assertion technology, and assertions of specific timing relationships are added to the test cases to automatically collect the function coverage data.

[0072] The test module 106 is used to execute the interface protocol test cases and the functional test point test cases based on the FPGA library file using the script file to obtain multiple code coverages, and merge the code coverages corresponding to all the test cases to obtain the final code coverage.

[0073] In some embodiments, source files are located by a simulation tool based on the final code coverage.

[0074] Specifically, it supports automatic collection of code coverage and dynamic analysis and location of code defects. It uses script files to automatically run each test case and generate the corresponding code coverage. After all test cases are executed, the code coverage corresponding to all test cases is automatically merged to obtain the final code coverage, and then the code defects are located through simulation tools.

[0075] As an example scenario, Figure 2 As shown in the figure, based on common interface protocol standards, a reusable model library is developed and built. The model library can be developed in System Verilog language, with open source code, supporting user-defined secondary development, and automatically generating test case code by analyzing the interface protocol through the "Interface Protocol Analysis Intelligent Engine". Figure 3 As shown in the figure, the "Interface Protocol Analysis Intelligent Engine" intelligently analyzes the field information in the protocol to obtain normal and abnormal test cases, template the test case writing method, and automatically generate test case code by referencing the tasks in the reusable model library. Figure 4 As shown, assertions for testing specific timing relationships and automatically collecting functional coverage data are added to the test cases through the "functional test point analysis intelligent engine". Specific timing relationships should include the timing relationships between each specific external interface, internal interface and other signals. The coverage of functional test points should include specific functions in each requirement (including the timing sequence of functional events and the correctness of data content). Finally, code coverage is automatically collected, and each test case is automatically run using a script file to generate the corresponding code coverage (the script should support automatic running of all test cases, and interruptions are not allowed during automatic running).

[0076] Thus, through the automatic mapping and loading technology of FPGA library files in the FPGA software simulation verification platform based on the model library, the library files of different FPGA chip types can be automatically mapped, and the automatic loading of the library files can be realized, reducing the time of library file compilation, which serves as the basis for subsequent simulation verification; the constructed reusable model library can help FPGA software verification personnel to quickly build a simulation verification environment according to needs, avoiding the FPGA software verification personnel to design the peripheral model of the tested device completely from scratch; the technology of automatically generating test case code by intelligently analyzing the content of the interface protocol can greatly reduce the time of test case design and test case code writing. It avoids the FPGA software verification personnel from designing test cases from scratch, and reduces the requirements for the work experience and level of the FPGA software verification personnel. A large amount of manpower and time costs are consumed in the test case design and code writing process. Each tested software is designed from scratch, which wastes a lot of manpower and time, resulting in low simulation verification efficiency. The present invention can greatly improve these common drawbacks.

[0077] In summary, the embodiments of the present disclosure fully utilize the advantages of the reusable model library, automatically establish a simulation verification environment, automatically generate test case code, introduce assertion technology and automatically collect code coverage, reduce the requirements for the level of FPGA software verification personnel, reduce the impact of differences in personnel levels on test quality, and improve the efficiency of domestic FPGA simulation verification.

[0078] Figure 5 A flow chart of an FPGA software simulation verification method based on a model library provided in an embodiment of the present disclosure, the FPGA software simulation verification method based on a model library includes:

[0079] Step 201: Obtain basic information and source files of the FPGA software under test; wherein the basic information includes an FPGA chip identifier.

[0080] Step 202: Build multiple types of reusable model libraries.

[0081] Step 203: Match the corresponding FPGA library file from all FPGA library files based on the FPGA chip identifier.

[0082] Step 204: Based on the basic information and the source file, obtain an interface protocol, match a first model library from the reusable model library based on the interface protocol, determine a first scenario type from an interface protocol scenario library based on the interface protocol, and generate an interface protocol test case based on the interface protocol, the first model library and the first scenario type.

[0083] Step 205: Based on the basic information and the source file, obtain the functional test point, match the second model library from the reusable model library based on the functional test point, determine the second scenario type from the interface protocol scenario library based on the functional test point, and generate a functional test point test case based on the functional test point, the second model library and the second scenario type.

[0084] Step 206: Use a script file to execute the interface protocol test case and the functional test point test case based on the FPGA library file to obtain multiple code coverage rates, and merge the code coverage rates corresponding to all test cases to obtain a final code coverage rate.

[0085] The FPGA software simulation verification device based on the model library provided in the embodiment of the present disclosure can execute the FPGA software simulation verification method based on the model library provided in any embodiment of the present disclosure, and has the functional modules and beneficial effects corresponding to the execution method.

[0086] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the FPGA software simulation verification method based on the model library provided by any embodiment of the present disclosure.

[0087] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:

[0088] processor;

[0089] a memory for storing instructions executable by the processor;

[0090] The processor is used to read the executable instructions from the memory and execute the instructions to implement any one of the model library-based FPGA software simulation verification methods provided in the present disclosure.

[0091] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute any of the model library-based FPGA software simulation verification methods provided by the present disclosure.

[0092] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0093] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A FPGA software simulation verification platform based on a model library, characterized in that: include: An acquisition module, used to acquire basic information and source files of the FPGA software under test; wherein the basic information includes an FPGA chip identifier; Building blocks for constructing reusable model libraries of various types; An FPGA library file mapping module, used for matching a corresponding FPGA library file from all FPGA library files based on the FPGA chip identifier; An interface protocol intelligent analysis engine, configured to obtain an interface protocol based on the basic information and the source file, match a first model library from the reusable model library based on the interface protocol, determine a first scenario type from an interface protocol scenario library based on the interface protocol, and generate an interface protocol test case based on the interface protocol, the first model library and the first scenario type; A functional test point analysis intelligent engine, configured to obtain a functional test point based on the basic information and the source file, match a second model library from the reusable model library based on the functional test point, determine a second scenario type from an interface protocol scenario library based on the functional test point, and generate a functional test point test case based on the functional test point, the second model library and the second scenario type; The test module is used to use a script file to execute the interface protocol test case and the functional test point test case based on the FPGA library file, obtain multiple code coverage rates, and merge the code coverage rates corresponding to all test cases to obtain a final code coverage rate.

2. The FPGA software simulation verification platform based on the model library according to claim 1 is characterized in that: The building blocks are specifically used for: Obtain FPGA peripheral chip models of multiple interface buses and build them into bus function models; Acquire multiple algorithm models to build a basic algorithm model; The bus function model and the basic algorithm model serve as the multiple types of reusable model libraries.

3. The FPGA software simulation verification platform based on the model library according to claim 1 is characterized in that: The building blocks are specifically used for: The FPGA library file corresponding to the FPGA chip identifier is mapped and loaded from all FPGA library files through batch files and script files.

4. The FPGA software simulation verification platform based on the model library according to claim 1 is characterized in that: The interface protocol intelligent analysis engine is specifically used for: Based on the basic information and the source file, acquiring an interface protocol; Create an XML file for storing information of each field in the interface protocol; Analyze each of the field information, match the first model library from the reusable model library, and determine the first normal scenario or the first abnormal scenario from the interface protocol scenario library, and generate a normal interface protocol test case or an abnormal interface protocol test case based on each of the field information, the first model library and the first normal scenario or the first abnormal scenario.

5. The FPGA software simulation verification platform based on the model library according to claim 1 is characterized in that: The functional test point analysis intelligent engine is specifically used for: Based on the basic information and the source file, obtaining functional test points; Based on the functional test point, a second model library is matched from the reusable model library, based on the functional test point, a second normal scenario or a second abnormal scenario is determined from the interface protocol scenario library, and based on the functional test point, the second model library and the second normal scenario or the second abnormal scenario, a normal functional test point test case or an abnormal functional test point test case is generated.

6. The FPGA software simulation verification platform based on the model library according to claim 1, characterized in that: The functional test point analysis intelligent engine is also used for: Add assertions for testing target timing relationships and collecting functional coverage data to the functional test point test cases; wherein the target timing relationships include the timing relationships between each target external interface and internal interface signal; and the coverage of the functional test points includes the target function in each requirement.

7. The FPGA software simulation verification platform based on the model library according to claim 1 is characterized in that: The test module is also used for: Based on the final code coverage, the source file is located by a simulation tool.

8. A FPGA software simulation verification method based on a model library, characterized in that: include: Obtaining basic information and source files of the FPGA software under test; wherein the basic information includes an FPGA chip identifier; Build a library of reusable models of various types; Matching a corresponding FPGA library file from all FPGA library files based on the FPGA chip identifier; Based on the basic information and the source file, an interface protocol is acquired, and a first model library is matched from the reusable model library based on the interface protocol, a first scenario type is determined from an interface protocol scenario library based on the interface protocol, and an interface protocol test case is generated based on the interface protocol, the first model library and the first scenario type; Based on the basic information and the source file, a functional test point is acquired, and a second model library is matched from the reusable model library based on the functional test point, a second scenario type is determined from an interface protocol scenario library based on the functional test point, and a functional test point test case is generated based on the functional test point, the second model library and the second scenario type; The interface protocol test case and the functional test point test case are executed based on the FPGA library file using a script file to obtain multiple code coverage rates, and the code coverage rates corresponding to all test cases are merged to obtain a final code coverage rate.

9. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the FPGA software simulation verification method based on the model library as described in claim 8 above.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the FPGA software simulation verification method based on the model library described in claim 8 above.

Citation Information

Cited By

  • Chip verification system based on code service layer

    CN119203893A

  • FPGA signal observation method, system, device and equipment and storage medium

    CN120670244A