A functional coverage code generation method, system, device and medium
Patent Information
- Application Number
- CN202310347649.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-03-30
AI Technical Summary
所以最终产物是含有覆盖率代码的验证环境的最大局限性是在开展收集覆盖率的工作之前要多次修改环境或者覆盖率代码,工具使用不够灵活,复用性不强
[0029]通过本发明提出的一种功能覆盖率代码生成方法,将原有的生成整体环境的方式修改为仅生成覆盖率代码文件和覆盖率配置文件,当覆盖组对应的测试方案改变时,仅通过修改覆盖率配置文件即可,再通过覆盖率配置文件重新生成覆盖率代码文件进行覆盖率测试。可有效提高芯片验证测试工作时的效率,无需每次修改都生成完整的验证环境,验证工程时无需在生成验证环境时等待。大大提高芯片验证效率。
Smart Images

Figure CN116893803B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of chip verification, specifically relating to a method, system, device, and readable storage medium for generating functional coverage code. Background Technology
[0002] Functional verification is one of the most crucial steps in chip design and development, making functional coverage, a key indicator of its completeness, increasingly important. Functional coverage is the program code written by verification engineers to verify the functionality of the Designed Under Test (DUT), based on a series of coverage groups and points extracted according to the DUT's functional requirements. These coverage groups and points sample specific signals at specific sampling times, and the completeness of the DUT's functional verification is measured by obtaining sampled values consistent with the expected values. If coverage code can be defined quickly and accurately during chip verification, it not only ensures the quality of chip verification work but also accelerates the verification process, thereby speeding up tape-out and enabling chip products to enter mass production and market as early as possible, thus gaining a market advantage.
[0003] Currently, there are many tools that automatically generate coverage, all capable of automatically generating coverage code. However, these tools also have drawbacks. They generally rely on template input, requiring users to provide information such as the verification environment, sampling signals, and coverage configuration. This approach often requires a lot of information, such as the top-level description of the verification environment, interface information, and coverage group configuration, resulting in multiple input templates and cumbersome steps, making it difficult for beginners. Furthermore, these tools typically generate a complete verification environment containing coverage code. However, in actual chip verification, the verification environment is usually built first, followed by test case simulation. Coverage collection only begins after the environment and test cases have stabilized. Therefore, the chip architecture or DUT design inevitably requires numerous modifications before coverage collection. If the tool generates a complete verification environment, modifications to the verification environment and coverage code may be necessary before the environment and test cases stabilize. Therefore, the biggest limitation of the final product being a verification environment with coverage code is the need for multiple modifications to the environment or coverage code before coverage collection can begin, resulting in insufficient tool flexibility and reusability.
[0004] Therefore, a flexible and efficient solution is urgently needed to address the above problems. Summary of the Invention
[0005] To address the above problems, this invention proposes a method for generating functional coverage code, comprising:
[0006] Obtain coverage group information based on the verification environment;
[0007] Based on the coverage group information, generate a coverage code file that can be instantiated on the corresponding verification platform and / or save the coverage group information to the coverage configuration file and register the coverage code file in the verification platform environment.
[0008] In some embodiments of the present invention, obtaining coverage group information based on the verification environment includes:
[0009] The sampling signal of the verification environment is extracted based on the basic file of the verification environment provided by the user, and the coverage group information is generated according to the sampling signal in a predetermined manner.
[0010] In some embodiments of the present invention, generating coverage group information according to the sampling signal in a predetermined manner includes:
[0011] The sampled signals are displayed to the user through a graphical interface, and coverage groups are generated based on the user's grouping operations on the sampled signals in the graphical interface; or
[0012] Based on the functions of each module in the verification environment, the sampling information corresponding to the modules that meet the interconnection requirements is randomly assigned to generate corresponding coverage groups.
[0013] In some embodiments of the present invention, obtaining coverage group information based on the verification environment includes: obtaining coverage group information from the coverage configuration file;
[0014] In some embodiments of the present invention, the method further includes:
[0015] In response to a user's need to modify the coverage group information, the coverage group information in the coverage configuration file and / or the sampling signal converted based on the coverage group information are loaded into the graphical interface, and the coverage configuration file is regenerated based on the user's modifications to the coverage group information in the graphical interface.
[0016] The coverage code file is regenerated based on the regenerated coverage configuration file, and the regenerated coverage code file is registered in the verification platform environment.
[0017] In some embodiments of the present invention, generating a coverage code file that can be instantiated on a corresponding verification platform based on the coverage group information includes:
[0018] The coverage group information is used to generate corresponding code classes based on the programming language of the verification platform; and
[0019] In response to the existence of a reference-passed coverage group in the coverage group information, the coverage group information is generated as a code block and declared in a predetermined area of the coverage code file.
[0020] In some embodiments of the present invention, registering the coverage code file to the verification platform environment includes:
[0021] The contents of the coverage code file are declared in a specified area of the verification platform environment file, and the path of the coverage code file is added to the corresponding extended configuration file.
[0022] Another aspect of the present invention provides a functional coverage code generation system, comprising:
[0023] A data parsing module, configured to obtain coverage group information based on the verification environment;
[0024] The code generation module is configured to generate a coverage code file that can be instantiated on the corresponding verification platform based on the coverage group information and / or save the coverage group information to the coverage configuration file and register the coverage code file in the verification platform environment.
[0025] Another aspect of the present invention provides a computer device comprising:
[0026] At least one processor; and
[0027] A memory storing computer instructions executable on the processor, which, when executed by the processor, implement the steps of any of the methods described in the above embodiments.
[0028] Another aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the methods described in the above embodiments.
[0029] This invention proposes a method for generating functional coverage code, modifying the original method of generating the entire environment to generate only coverage code files and coverage configuration files. When the test plan corresponding to the coverage group changes, only the coverage configuration file needs to be modified, and then the coverage code file is regenerated using the coverage configuration file for coverage testing. This effectively improves the efficiency of chip verification testing, eliminating the need to generate a complete verification environment for each modification and eliminating the need to wait during verification environment generation. This significantly improves chip verification efficiency. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 A flowchart illustrating a functional coverage code generation method provided in an embodiment of the present invention;
[0032] Figure 2 A schematic diagram of the structure of a functional coverage code generation system provided in an embodiment of the present invention;
[0033] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention;
[0034] Figure 4 This is a schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of the present invention;
[0035] Figure 5 A flowchart illustrating the chip verification process;
[0036] Figure 6 This is a schematic diagram illustrating part of the working principle of an embodiment of the present invention;
[0037] Figure 7 This is a schematic diagram illustrating part of the working principle of an embodiment of the present invention;
[0038] Figure 8 This is a schematic diagram illustrating part of the working principle of an embodiment of the present invention. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings.
[0040] This invention aims to solve the problems in existing chip verification and testing processes, such as... Figure 5 As shown, the coverage code for the corresponding test is generated along with the entire test environment. This means that whenever the test direction or test content needs to be modified, a new overall test environment needs to be generated. To determine just one test, at least multiple test environments need to be generated, which is not flexible enough and has poor reusability.
[0041] like Figure 1 As shown, to solve the above problems, this invention proposes a functional coverage code generation method, including:
[0042] Step S1: Obtain coverage group information based on the verification environment;
[0043] Step S2: Generate a coverage code file that can be instantiated on the corresponding verification platform based on the coverage group information and / or save the coverage group information to the coverage configuration file, and register the coverage code file in the verification platform environment.
[0044] In embodiments of the present invention, the coverage group information of the verification environment refers to the specific coverage group of the functional module corresponding to the chip currently to be verified, and the coverage code file refers to the independent test code proposed in this invention that can be used on the verification platform. The coverage configuration file refers to the configuration file proposed in this invention that matches the generated coverage code, and the content of the configuration file is equivalent to the test plan corresponding to the coverage code file. The corresponding coverage code can be regenerated through the coverage code file.
[0045] Furthermore, in step S1, in some embodiments of the present invention, coverage group information can be generated by verifying environment information files, such as interface files, register models, or register information files, in a predetermined manner. In some embodiments of the present invention, the interface files, register models, or register information files can also be parsed, and the parsing results can be displayed to the user in a graphical interface, allowing the user to perform coverage group selection operations to form the corresponding coverage group.
[0046] In some embodiments of the present invention, users can modify the relevant coverage group content in the coverage configuration file and then reload it as coverage group information.
[0047] In step S2, a corresponding independent coverage code file is generated based on the obtained coverage group information. Simultaneously, a coverage configuration file matching this coverage code file is generated, and the coverage code file is registered in the verification platform environment. This ensures that the verification platform can find and load the coverage code file for testing when it begins testing. The coverage configuration file contains configuration information for all coverage groups that generated this coverage code, as well as interface signals and register model signals used as sampling signals.
[0048] In some embodiments of the present invention, obtaining coverage group information based on the verification environment includes:
[0049] The sampling signal of the verification environment is extracted based on the basic file of the verification environment provided by the user, and the coverage group information is generated according to the sampling signal in a predetermined manner.
[0050] In some embodiments of the present invention, generating coverage group information according to the sampling signal in a predetermined manner includes:
[0051] The sampled signals are displayed to the user through a graphical interface, and coverage groups are generated based on the user's grouping operations on the sampled signals in the graphical interface; or
[0052] Based on the functions of each module in the verification environment, the sampling information corresponding to the modules that meet the interconnection requirements is randomly assigned to generate corresponding coverage groups.
[0053] In this embodiment, the sampling signal refers to the relevant signals in the module under test that need to be collected during test case testing. These mainly include interface signals, i.e., the results output by the interface corresponding to the module under test during testing, and register signals. As mentioned earlier, there are two types of coverage group generation methods in this invention. One type is generated based on basic files related to the verification environment. These basic files include: the interface file of the module under test, and the register model or register information file.
[0054] Furthermore, there are two ways to generate coverage group information based on the base file. The first is that the user first assembles the corresponding interfaces and registers into corresponding coverage groups according to business requirements. The second is based on the functions of each module of the chip verified in the verification environment. If the modules can be interconnected, the corresponding registers and interfaces of the interconnectable modules are randomly generated to form corresponding coverage groups. No user configuration is required.
[0055] In some embodiments of the present invention, obtaining coverage group information based on the verification environment includes: obtaining coverage group information from the coverage configuration file.
[0056] In this embodiment, the coverage configuration file proposed in this invention can be directly modified by the verification engineer, and the corresponding coverage group information in the modified coverage configuration file can then be used to generate the coverage code file.
[0057] In some embodiments of the present invention, the method further includes:
[0058] In response to a user's need to modify the coverage group information, the coverage group information in the coverage configuration file and / or the sampling signal converted based on the coverage group information are loaded into the graphical interface, and the coverage configuration file is regenerated based on the user's modifications to the coverage group information in the graphical interface.
[0059] The coverage code file is regenerated based on the regenerated coverage configuration file, and the regenerated coverage code file is registered in the verification platform environment.
[0060] Furthermore, in this embodiment, if the user (referring to the verification engineer) finds that the corresponding coverage group needs to be modified after generating the coverage code file, this can be achieved by modifying the coverage configuration file.
[0061] Specifically, the interface and register information corresponding to the coverage group can be directly loaded into the graphical interface as a coverage group from the coverage configuration file, allowing the user to modify it directly. Alternatively, all the interface and register information corresponding to the coverage configuration can be displayed, but not as a coverage group, allowing the user to manually select the corresponding interface signals and / or registers to form one or more new coverage groups.
[0062] In some embodiments of the present invention, generating a coverage code file that can be instantiated on a corresponding verification platform based on the coverage group information includes:
[0063] The coverage group information is used to generate corresponding code classes based on the programming language of the verification platform; and
[0064] In response to the existence of a reference-passed coverage group in the coverage group information, the coverage group information is generated as a code block and declared in a predetermined area of the coverage code file.
[0065] In this embodiment, coverage groups are generated as code classes. In this invention, if there are reference-passing coverage groups (where multiple coverage groups have identical content but slightly different names), the differences follow a certain pattern. For example, suppose we are testing interrupt channels in a chip. Assuming there are 128 interrupt channels with identical structures, the corresponding coverage groups should all have the same structure but different names. Generating coverage code for each of these coverage groups individually as code classes would reduce readability and introduce potential instability. Therefore, code blocks are used, recursively naming the changing parts of the coverage group in a loop. During testing, the code block automatically generates the corresponding number of coverage code classes in memory. This is because there are many sub-units with the same functionality in a chip. The code blocks for reference-passing coverage groups are declared in the designated `build_phase` area.
[0066] In some embodiments of the present invention, registering the coverage code file to the verification platform environment includes:
[0067] The contents of the coverage code file are declared in a specified area of the verification platform environment file, and the path of the coverage code file is added to the corresponding extended configuration file.
[0068] In this embodiment, the generated independent coverage code file needs to be integrated into the verification platform environment. Therefore, the coverage code file needs to be declared. Specifically, firstly, the verification environment (env) is opened according to the environment path in the verification environment information and read line by line. The coverage declaration code is written into the appropriate position based on keyword identification. Then, the class that creates the coverage is instantiated in the `build_phase`. At the same time, the path of the coverage code is written into the component pkg file in the same way, thus completing the coverage code integration task.
[0069] Example:
[0070] The first step in implementing this invention is selecting the operating mode and inputting verification environment information. After running this invention, you can select the operating mode according to the prompts, such as... Figure 6 As shown, there are two operating modes: modifying the existing coverage code mode and generating a new coverage code mode. If you choose to modify the existing coverage code mode, you need to enter the path to the coverage configuration file in the corresponding location in the GUI interface. After entering the path, running this invention will generate new coverage code. If you choose to generate a new coverage code mode, you need to enter the paths to the existing verification environment's interface file, register model file, component pkg file, and verification environment env file (the generated coverage code must be declared and instantiated in the verification environment env file). After receiving these file paths, this invention will open the files according to the input paths using the built-in keyword matching search function and perform a line-by-line search. The matching information will be categorized into interface signals, register signals, and verification environment information, and stored in the corresponding lists or tuples for later use. Simultaneously, the interface signals and register signals will be sorted, either alphabetically by their first letter in the ASCII table or using other sorting methods. After sorting is completed, the present invention outputs the interface signals and register model signals to the GUI interface in the form of checkboxes for the user to select the signal for the next coverage group configuration. The selected signal is the sampling signal of the corresponding coverage group.
[0071] The second step is to input the overwrite group configuration information, such as... Figure 8As shown, in the previous step, this tool first categorizes and sorts the interface and register model signal information, then displays it as checkboxes on the GUI interface. Simultaneously, a sub-interface for coverage group configuration is displayed on the GUI interface. Users can then follow the prompts on the GUI interface to complete the coverage group configuration step by step. The first step is to configure the number of coverage groups and their definition format (normal form and pass-by-reference form). In the pass-by-reference form, the number of times the signal is repeatedly defined must be specified, and the specified sampling signal can also be split bit by bit. Then, users can select the interface or register model signals they want to use as sampling signals in the register configuration sub-interface by checking checkboxes on the GUI interface. This completes the selection of coverage sampling signals. After selecting the sampling signals, users can continue to add sampling conditions according to the prompts on the coverage group configuration sub-interface. Finally, users need to complete the input of the sampling point bins according to the prompts on the coverage group configuration sub-interface. This completes the coverage group configuration.
[0072] After the above two steps, the user's operation is complete. All remaining tasks are automatically completed by this invention. Figure 7As shown. The next steps involve three tasks: integrating coverage code, generating coverage code, and generating coverage group configuration files. Having obtained all the input information through the previous steps, this invention will now process this input information to ultimately produce coverage code and coverage configuration files. First, this invention will open the verification environment's `env` file based on the environment path provided in the verification environment information and read it line by line. Based on keyword identification, it will match and write the coverage declaration code to the appropriate location. Then, it will instantiate the class that creates the coverage within the `build_phase`. Simultaneously, this invention will write the path of the coverage code into the component's `pkg` file using the same method, thus completing the coverage code integration task. The coverage code generation task mainly involves this tool identifying and extracting relevant useful information from the interface file based on the interface path provided in the verification environment information, and first declaring the virtual interface in the coverage code. This is done to ensure the smooth operation of the sampling signal. After these steps are completed, the tool will begin generating coverage code. First, it checks if any coverage groups requiring pass-by-reference definition are present in the input coverage group configuration information. If so, these coverage groups will be generated first, as this invention aims to generate their code outside the class. The tool also determines the instantiation location of these coverage groups. Pass-by-reference coverage groups need to be instantiated in the `build_phase` and created with the same number of repetitions. Regular coverage groups can be generated normally according to System Verilog syntax. After generating the coverage code, a coverage configuration file is generated. This file primarily lists all required coverage group configuration information and the interface and register model signals used as sampling signals, all in a specific format. For repeatedly defined pass-by-reference coverage groups, only one set needs to be displayed, but the number of repetitions must be listed. The coverage group's information includes the sampling signal, sampling time, and the value of the sampling point. Finally, all generated products are output to the user-specified path.
[0073] This invention breaks away from the template input mode of conventional coverage code auto-generation tools. Instead, it automatically generates coverage code by inputting the verification environment file path and interactively inputting coverage group configuration information through a GUI interface. This method reduces the user's coding workload and provides a clear view of the coverage group configuration process, reducing errors. Users can then dedicate more time to considering the rationality of the coverage group definition, thereby indirectly improving coverage quality. Furthermore, the final output of this invention differs from other coverage generation tools. The main output is coverage code independent of the verification environment, rather than a complete verification environment. This offers greater flexibility, allowing the coverage code to be integrated into any existing verification environment, or into different verification environments at different verification stages. It can be integrated into module-level verification environments, subsystem-level verification, and SOC-level verification environments. This enables multiple reuses of the coverage code. The coverage configuration file generated along with the coverage code allows users to modify the coverage code directly by modifying the relevant information in the configuration file, achieving rapid modification of the generated coverage code. In summary, this invention can accelerate the verification process during the functional verification coverage stage, speed up chip tape-out, and enable chip companies to seize market share and gain economic benefits.
[0074] like Figure 2 As shown, another aspect of the present invention proposes a functional coverage code generation system, comprising:
[0075] Data parsing module 1, configured to obtain coverage group information based on the verification environment;
[0076] Code generation module 2 is configured to generate a coverage code file that can be instantiated on the corresponding verification platform based on the coverage group information and / or save the coverage group information to the coverage configuration file and register the coverage code file in the verification platform environment.
[0077] like Figure 3 As shown, another aspect of the present invention also provides a computer device comprising:
[0078] At least one processor 21; and
[0079] Memory 22 stores computer instructions 23 executable on processor 21, which, when executed by processor 21, implement a function coverage code generation method, including:
[0080] Obtain coverage group information based on the verification environment;
[0081] Based on the coverage group information, generate a coverage code file that can be instantiated on the corresponding verification platform and / or save the coverage group information to the coverage configuration file and register the coverage code file in the verification platform environment.
[0082] In some embodiments of the present invention, obtaining coverage group information based on the verification environment includes:
[0083] The sampling signal of the verification environment is extracted based on the basic file of the verification environment provided by the user, and the coverage group information is generated according to the sampling signal in a predetermined manner.
[0084] In some embodiments of the present invention, generating coverage group information according to the sampling signal in a predetermined manner includes:
[0085] The sampled signals are displayed to the user through a graphical interface, and coverage groups are generated based on the user's grouping operations on the sampled signals in the graphical interface; or
[0086] Based on the functions of each module in the verification environment, the sampling information corresponding to the modules that meet the interconnection requirements is randomly assigned to generate corresponding coverage groups.
[0087] In some embodiments of the present invention, obtaining coverage group information based on the verification environment includes: obtaining coverage group information from the coverage configuration file;
[0088] In some embodiments of the present invention, the method further includes:
[0089] In response to a user's need to modify the coverage group information, the coverage group information in the coverage configuration file and / or the sampling signal converted based on the coverage group information are loaded into the graphical interface, and the coverage configuration file is regenerated based on the user's modifications to the coverage group information in the graphical interface.
[0090] The coverage code file is regenerated based on the regenerated coverage configuration file, and the regenerated coverage code file is registered in the verification platform environment.
[0091] In some embodiments of the present invention, generating a coverage code file that can be instantiated on a corresponding verification platform based on the coverage group information includes:
[0092] The coverage group information is used to generate corresponding code classes based on the programming language of the verification platform; and
[0093] In response to the existence of a reference-passed coverage group in the coverage group information, the coverage group information is generated as a code block and declared in a predetermined area of the coverage code file.
[0094] In some embodiments of the present invention, registering the coverage code file to the verification platform environment includes:
[0095] The contents of the coverage code file are declared in a specified area of the verification platform environment file, and the path of the coverage code file is added to the corresponding extended configuration file.
[0096] like Figure 4 As shown, another aspect of the present invention provides a computer-readable storage medium 401, which stores a computer program 402. When executed by a processor, the computer program 402 implements a function coverage code generation method, comprising:
[0097] Obtain coverage group information based on the verification environment;
[0098] Based on the coverage group information, generate a coverage code file that can be instantiated on the corresponding verification platform and / or save the coverage group information to the coverage configuration file and register the coverage code file in the verification platform environment.
[0099] In some embodiments of the present invention, obtaining coverage group information based on the verification environment includes:
[0100] The sampling signal of the verification environment is extracted based on the basic file of the verification environment provided by the user, and the coverage group information is generated according to the sampling signal in a predetermined manner.
[0101] In some embodiments of the present invention, generating coverage group information according to the sampling signal in a predetermined manner includes:
[0102] The sampled signals are displayed to the user through a graphical interface, and coverage groups are generated based on the user's grouping operations on the sampled signals in the graphical interface; or
[0103] Based on the functions of each module in the verification environment, the sampling information corresponding to the modules that meet the interconnection requirements is randomly assigned to generate corresponding coverage groups.
[0104] In some embodiments of the present invention, obtaining coverage group information based on the verification environment includes: obtaining coverage group information from the coverage configuration file;
[0105] In some embodiments of the present invention, the method further includes:
[0106] In response to a user's need to modify the coverage group information, the coverage group information in the coverage configuration file and / or the sampling signal converted based on the coverage group information are loaded into the graphical interface, and the coverage configuration file is regenerated based on the user's modifications to the coverage group information in the graphical interface.
[0107] The coverage code file is regenerated based on the regenerated coverage configuration file, and the regenerated coverage code file is registered in the verification platform environment.
[0108] In some embodiments of the present invention, generating a coverage code file that can be instantiated on a corresponding verification platform based on the coverage group information includes:
[0109] The coverage group information is used to generate corresponding code classes based on the programming language of the verification platform; and
[0110] In response to the existence of a reference-passed coverage group in the coverage group information, the coverage group information is generated as a code block and declared in a predetermined area of the coverage code file.
[0111] In some embodiments of the present invention, registering the coverage code file to the verification platform environment includes:
[0112] The contents of the coverage code file are declared in a specified area of the verification platform environment file, and the path of the coverage code file is added to the corresponding extended configuration file.
[0113] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.
[0114] It should be understood that, as used herein, the singular form “a” is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, “and / or” refers to any and all possible combinations of one or more of the associated listed items.
[0115] The embodiment numbers disclosed in the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0116] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0117] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of the different aspects of the invention as described above exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.
Claims
1. A method for generating functional coverage code, characterized in that, include: Obtaining coverage group information based on the verification environment includes extracting the sampling signals of the verification environment according to the basic files of the verification environment provided by the user, displaying the sampling signals to the user through a graphical interface, and generating coverage groups based on the user's grouping operations on the sampling signals in the graphical interface; or randomly assigning the sampling information corresponding to the modules that meet the interconnection requirements according to the functions of each module of the verification environment to generate corresponding coverage groups. Based on the coverage group information, generate a coverage code file that can be instantiated on the corresponding verification platform and / or save the coverage group information to the coverage configuration file, and register the coverage code file in the verification platform environment; In response to a user's need to modify the coverage group information, the coverage group information in the coverage configuration file and / or the sampling signal converted based on the coverage group information are loaded into the graphical interface, and the coverage configuration file is regenerated based on the user's modifications to the coverage group information in the graphical interface. The coverage code file is regenerated based on the regenerated coverage configuration file, and the regenerated coverage code file is registered in the verification platform environment.
2. The method according to claim 1, characterized in that, The process of obtaining coverage group information based on the verification environment includes: obtaining coverage group information from the coverage configuration file.
3. The method according to claim 1, characterized in that, The process of generating a coverage code file that can be instantiated on the corresponding verification platform based on the coverage group information includes: The coverage group information is used to generate corresponding code classes based on the programming language of the verification platform; and In response to the existence of a reference-passed coverage group in the coverage group information, the coverage group information is generated as a code block and declared in a predetermined area of the coverage code file.
4. The method according to claim 1, characterized in that, Registering the coverage code file to the verification platform environment includes: The contents of the coverage code file are declared in a specified area of the verification platform environment file, and the path of the coverage code file is added to the corresponding extended configuration file.
5. A functional coverage code generation system, characterized in that, include: A data parsing module, configured to obtain coverage group information based on the verification environment; The code generation module is configured to generate a coverage code file that can be instantiated on the corresponding verification platform based on the coverage group information and / or save the coverage group information to the coverage configuration file, and register the coverage code file in the verification platform environment.
6. A computer device, characterized in that, include: At least one processor; as well as A memory storing computer instructions executable on the processor, which, when executed by the processor, implement the steps of the method according to any one of claims 1-5.
7. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1-5.
Citation Information
Patent Citations
Method and device for generating coverage group
CN113705150A