A method, system, device and storage medium for generating an excitation assembly
By generating and managing the basic configuration files of the stimulus components in the UVM verification platform, and by utilizing the constraints and hierarchical relationships of the components, the problem of multiple uvm_sequence components sending stimulus data with the same constraints is solved, thereby achieving accurate control of stimulus data and improving verification efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
- Filing Date
- 2022-06-30
- Publication Date
- 2026-04-21
AI Technical Summary
In the UVM verification platform, the stimulus data sent by multiple uvm_sequence components have the same constraints, which makes it difficult to meet specific needs. Randomly generated redundant stimuli prolong the verification time, and the hierarchical nesting increases the complexity, affecting the verification progress and efficiency.
By obtaining a table of recorded attribute parameters, a basic configuration file is generated. This file is then modified using the constraints and hierarchical relationships of the components to generate the final configuration file, enabling accurate control and hierarchical management of the incentive data.
It enables accurate control of stimulus data for multiple uvm_sequence components, improves the readability and efficiency of the verification platform, reduces errors, and facilitates verification debugging and component reuse.
Smart Images

Figure CN115392167B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of UVM, and more specifically to a method, system, device, and storage medium for generating excitation components. Background Technology
[0002] In a typical UVM verification platform, the `uvm_sequence_item` component declares stimulus data and defines its constraints. When randomizing the stimulus data, its values must fall within these constraints. The `uvm_sequence` component implements the randomization of the stimulus data within these constraints. The randomized stimulus data is then driven to the DUT by `uvm_driver`. Depending on the specific test scenario, multiple `uvm_sequence` components are often required. Since the constraints are only defined in `uvm_sequence_item`, the stimulus data sent by different `uvm_sequence` components has the same constraints. This makes it difficult to meet specific verification scenarios that require sending specific stimulus data. Furthermore, randomly generated redundant stimuli can prolong the time required to achieve the verification goal, impacting the verification progress. If the verification platform uses multiple `uvm_sequence` components and implements hierarchical nesting through `virtualsequence`, the constraints on the stimulus data become more complex and harder to control. Summary of the Invention
[0003] In view of this, in order to overcome at least one aspect of the above problems, embodiments of the present invention propose an excitation component generation method, comprising the following steps:
[0004] Retrieve a table of recorded attribute parameters, including the name of the first component, the name of the second component, the constraints of each first and second component, and the hierarchical relationship between all components;
[0005] Generate the base configuration file for the first component and the base configuration file for the second component based on the first component name and the second component name in the table;
[0006] The basic configuration file of the first component is modified using the constraints of each first component and the hierarchical relationship to obtain the final configuration file of the first component; and the basic configuration file of the second component is modified using the constraints of each second component and the hierarchical relationship to obtain the final configuration file of the second component.
[0007] The first component and the second component are generated based on the final configuration file of the first component and the final configuration file of the second component.
[0008] In some embodiments, modifying the basic configuration file of the first component using the constraints of each first component and the hierarchical relationship to obtain the final configuration file of the first component, and modifying the basic configuration file of the second component using the constraints of each second component and the hierarchical relationship to obtain the final configuration file of the second component, further includes:
[0009] The constraint attributes of the excitation data in each first component are determined based on the constraints of each first component, the constraints of each second component, and the hierarchical relationship.
[0010] The constraint attributes of the excitation data in each second component are determined based on the constraints of each second component and the hierarchical relationship.
[0011] In some embodiments, modifying the basic configuration file of the first component using the constraints of each first component and the hierarchical relationship to obtain the final configuration file of the first component, and modifying the basic configuration file of the second component using the constraints of each second component and the hierarchical relationship to obtain the final configuration file of the second component, further includes:
[0012] Get the name of the incentive data to be generated;
[0013] Declare member variables with the same names as the incentive data and corresponding constraint attributes in each level according to the hierarchical relationship.
[0014] In some embodiments, it also includes:
[0015] Define macro functions in the configuration file of the second component at the higher level to assign member variables to member variables with the same name in the second component at the lower level.
[0016] The macro function is defined in the configuration file of the second component at the lowest level to assign the member variable with the same name to the stimulus data.
[0017] Based on the same inventive concept, according to another aspect of the present invention, embodiments of the present invention also provide an excitation component generation system, comprising:
[0018] The acquisition module is configured to acquire a table of record attribute parameters, where the attribute parameters include the name of the first component, the name of the second component, the constraints of each first and second component, and the hierarchical relationship between all components;
[0019] The first generation module is configured to generate a base configuration file for the first component and a base configuration file for the second component based on the first component name and the second component name in the table.
[0020] The modification module is configured to modify the basic configuration file of the first component using the constraints of each first component and the hierarchical relationship to obtain the final configuration file of the first component, and to modify the basic configuration file of the second component using the constraints of each second component and the hierarchical relationship to obtain the final configuration file of the second component.
[0021] The second generation module is configured to generate the first component and the second component based on the final configuration file of the first component and the final configuration file of the second component.
[0022] In some embodiments, the modification module is further configured as follows:
[0023] The constraint attributes of the excitation data in each first component are determined based on the constraints of each first component, the constraints of each second component, and the hierarchical relationship.
[0024] The constraint attributes of the excitation data in each second component are determined based on the constraints of each second component and the hierarchical relationship.
[0025] In some embodiments, the modification module is further configured as follows:
[0026] Get the name of the incentive data to be generated;
[0027] Declare member variables with the same names as the incentive data and corresponding constraint attributes in each level according to the hierarchical relationship.
[0028] In some embodiments, the modification module is further configured as follows:
[0029] Define macro functions in the configuration file of the second component at the higher level to assign member variables to member variables with the same name in the second component at the lower level.
[0030] The macro function is defined in the configuration file of the second component at the lowest level to assign the member variable with the same name to the stimulus data.
[0031] Based on the same inventive concept, according to another aspect of the present invention, embodiments of the present invention also provide a computer device, comprising:
[0032] At least one processor; and
[0033] A memory storing a computer program executable on the processor, characterized in that the processor executes the program by performing the steps of any of the excitation component generation methods described above.
[0034] Based on the same inventive concept, according to another aspect of the present invention, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of any of the excitation component generation methods described above.
[0035] The present invention has one of the following beneficial technical effects: The proposed solution achieves accurate control of stimulus data when multiple uvm_sequence components (second components) exist. Hierarchical stimulus data control also improves the readability of the verification platform, facilitates verification and debugging, and independent constraint control is conducive to the reuse of verification components, reduces errors, and improves verification efficiency. Attached Figure Description
[0036] 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 embodiments can be obtained based on these drawings without creative effort.
[0037] Figure 1 A flowchart illustrating the excitation component generation method provided in an embodiment of the present invention;
[0038] Figure 2 A schematic diagram of the table structure provided for an embodiment of the present invention;
[0039] Figure 3 A schematic diagram of the component generation platform provided in an embodiment of the present invention;
[0040] Figure 4 A schematic diagram of the structure of the excitation component generation system provided in the embodiments of the present invention;
[0041] Figure 5 A schematic diagram of the structure of a computer device provided for an embodiment of the present invention;
[0042] Figure 6 A schematic diagram of the structure of a computer-readable storage medium provided for an embodiment of the present invention. Detailed Implementation
[0043] 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.
[0044] It should be noted that all uses of "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two entities or parameters with the same name but different names. It is clear that "first" and "second" are only for the convenience of expression and should not be construed as limiting the embodiments of the present invention. Subsequent embodiments will not explain this in detail.
[0045] In embodiments of the present invention, UVM stands for Universal Verification Methodology.
[0046] uvm_sequence_item, a UVM component, provides the specific data and constraints required to implement the stimulus.
[0047] uvm_sequence, a UVM component, implements stimulus generation and scene control.
[0048] DUT, Design Under Test
[0049] According to one aspect of the present invention, embodiments of the present invention provide a method for generating excitation components, such as... Figure 1 As shown, it may include the following steps:
[0050] S1, obtain a table of recorded attribute parameters, where the attribute parameters include the name of the first component, the name of the second component, the constraints of each first and second component, and the hierarchical relationship between all components;
[0051] S2, Generate the base configuration file of the first component and the base configuration file of the second component based on the first component name and the second component name in the table;
[0052] S3, modify the basic configuration file of the first component using the constraints of each first component and the hierarchical relationship to obtain the final configuration file of the first component, and modify the basic configuration file of the second component using the constraints of each second component and the hierarchical relationship to obtain the final configuration file of the second component.
[0053] S4, Generate the first component and the second component based on the final configuration file of the first component and the final configuration file of the second component.
[0054] The proposed solution enables accurate control of stimulus data when multiple uvm_sequence components (second components) are present. Hierarchical stimulus data control also improves the readability of the verification platform, facilitates verification and debugging, and independent constraint control promotes component reuse, reduces errors, and improves verification efficiency.
[0055] In some embodiments, to improve verification efficiency, the method proposed in this invention is implemented through a hierarchical sequence generation platform, which mainly consists of three parts: a constraint processing module, a template generation module, and a component generation module. By inputting the stimulus data name, sequence_item name, sequence name, constraint conditions, and sequence hierarchy into the platform, uvm_sequence_item (the first component) and uvm_sequence components that can hierarchically control the stimulus data are obtained. The generated components conform to the UVM specification and can be directly integrated into the UVM verification platform.
[0056] In some embodiments, in S1, a table of recorded attribute parameters is obtained, wherein the attribute parameters include the name of the first component, the name of the second component, the constraints of each first and second component, and the hierarchical relationship between all components. Specifically, all input information is filled into the table, including the stimulus data name (Name), sequence_item name (Seq_item_name), sequence name (Seq_name), constraint (Constraint), and sequence hierarchy (Seq_hierarchy). The input information format is as follows: Figure 2 As shown, taking the stimulus data as an example, the constraint in sequence_item is [0:10], and the constraints in seq1 and seq2 are [0:20] and [10:20] respectively. Furthermore, seq2 calls seq1, meaning that seq2 is one level higher than seq1.
[0057] In some embodiments, modifying the basic configuration file of the first component using the constraints of each first component and the hierarchical relationship to obtain the final configuration file of the first component, and modifying the basic configuration file of the second component using the constraints of each second component and the hierarchical relationship to obtain the final configuration file of the second component, further includes:
[0058] The constraint attributes of the excitation data in each first component are determined based on the constraints of each first component, the constraints of each second component, and the hierarchical relationship.
[0059] The constraint attributes of the excitation data in each second component are determined based on the constraints of each second component and the hierarchical relationship.
[0060] Specifically, such as Figure 3As shown, the constraint processing module determines the constraint attributes (soft or hard constraints, with soft constraints implemented using the keyword "soft") and the hierarchical relationships of all sequences for each data point based on the constraints and hierarchical relationships of each excitation data point, and outputs this information to the component generation module. Figure 2 Taking the data as an example, in seq1, the constraint range of data is [0:20], which exceeds the constraint range of data_trans. Therefore, the constraint attribute of data in data_trans is a soft constraint. In seq2, the constraint of data is within the constraint range of seq1. Therefore, the constraint attribute of data in seq1 is a hard constraint.
[0061] The template generation module and the constraint processing module work simultaneously. The template generation module generates template files for uvm_sequence and uvm_sequence_item classes with corresponding names based on Seq_item_name and Seq_name, and outputs them to the component generation module.
[0062] In some embodiments, modifying the basic configuration file of the first component using the constraints of each first component and the hierarchical relationship to obtain the final configuration file of the first component, and modifying the basic configuration file of the second component using the constraints of each second component and the hierarchical relationship to obtain the final configuration file of the second component, further includes:
[0063] Get the name of the incentive data to be generated;
[0064] Declare member variables with the same names as the incentive data and corresponding constraint attributes in each level according to the hierarchical relationship.
[0065] In some embodiments, it also includes:
[0066] Define macro functions in the configuration file of the second component at the higher level to assign member variables to member variables with the same name in the second component at the lower level.
[0067] The macro function is defined in the configuration file of the second component at the lowest level to assign the member variable with the same name to the stimulus data.
[0068] Specifically, the component generation module receives the output from the constraint processing module and the template generation module, modifies the template files of the `uvm_sequence` and `uvm_sequence_item` classes, and declares member variables with the same names as the stimulus data at each level. The constraint attributes of the member variables are given by the constraint processing module. Higher-level sequences use the macro function `uvm_do_with` to assign the same-named member variables to lower-level member variables. The lowest-level sequences use the macro function `uvm_do_with` to assign the same-named member variables to the stimulus data, thus implementing constraints on the stimulus data through layer-by-layer control. The modified `uvm_sequence_item` and `uvm_sequence` components are output for building the UVM verification platform.
[0069] The proposed solution enables accurate control of stimulus data when multiple uvm_sequence components (second components) are present. Hierarchical stimulus data control also improves the readability of the verification platform, facilitates verification and debugging, and independent constraint control promotes component reuse, reduces errors, and improves verification efficiency.
[0070] Based on the same inventive concept, according to another aspect of the present invention, embodiments of the present invention also provide an excitation component generation system 400, such as... Figure 4 As shown, it includes:
[0071] The acquisition module 401 is configured to acquire a table of record attribute parameters, wherein the attribute parameters include the name of the first component, the name of the second component, the constraints of each first component and second component, and the hierarchical relationship between all components;
[0072] The first generation module 402 is configured to generate a basic configuration file for the first component and a basic configuration file for the second component based on the first component name and the second component name in the table.
[0073] Modify module 403 to modify the basic configuration file of the first component using the constraints of each first component and the hierarchical relationship to obtain the final configuration file of the first component, and to modify the basic configuration file of the second component using the constraints of each second component and the hierarchical relationship to obtain the final configuration file of the second component.
[0074] The second generation module 404 is configured to generate the first component and the second component based on the final configuration file of the first component and the final configuration file of the second component.
[0075] In some embodiments, the modification module 403 is further configured as follows:
[0076] The constraint attributes of the excitation data in each first component are determined based on the constraints of each first component, the constraints of each second component, and the hierarchical relationship.
[0077] The constraint attributes of the excitation data in each second component are determined based on the constraints of each second component and the hierarchical relationship.
[0078] In some embodiments, the modification module 430 is further configured as follows:
[0079] Get the name of the incentive data to be generated;
[0080] Declare member variables with the same names as the incentive data and corresponding constraint attributes in each level according to the hierarchical relationship.
[0081] In some embodiments, the modification module 403 is further configured as follows:
[0082] Define macro functions in the configuration file of the second component at the higher level to assign member variables to member variables with the same name in the second component at the lower level.
[0083] The macro function is defined in the configuration file of the second component at the lowest level to assign the member variable with the same name to the stimulus data.
[0084] Based on the same inventive concept, according to another aspect of the present invention, such as Figure 5 As shown, embodiments of the present invention also provide a computer device 501, comprising:
[0085] At least one processor 520; and
[0086] The memory 510 stores a computer program 511 that can run on the processor. When the processor 520 executes the program, it performs the steps of any of the above-described methods for generating excitation components.
[0087] Based on the same inventive concept, according to another aspect of the present invention, such as Figure 6 As shown, embodiments of the present invention also provide a computer-readable storage medium 601, which stores a computer program 610. When the computer program 610 is executed by a processor, it performs the steps of any of the above-described excitation component generation methods.
[0088] Finally, it should be noted that those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods.
[0089] Furthermore, it should be understood that the computer-readable storage medium (e.g., memory) described herein may be volatile memory or non-volatile memory, or may include both volatile memory and non-volatile memory.
[0090] Those skilled in the art will also understand that the various exemplary logic blocks, modules, circuits, and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the functionality of various illustrative components, blocks, modules, circuits, and steps has been generally described. Whether this functionality is implemented as software or as hardware depends on the specific application and the design constraints imposed on the system as a whole. Those skilled in the art can implement the functionality in various ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the embodiments disclosed herein.
[0091] 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.
[0092] 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.
[0093] 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.
[0094] 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.
[0095] 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 different aspects of the invention 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 an excitation component, characterized in that, Includes the following steps: Retrieve a table of recorded attribute parameters, including the name of the first component, the name of the second component, the constraints of each first and second component, and the hierarchical relationship between all components; Generate the base configuration file for the first component and the base configuration file for the second component based on the first component name and the second component name in the table; The basic configuration file of the first component is modified using the constraints of each first component and the hierarchical relationship to obtain the final configuration file of the first component; and the basic configuration file of the second component is modified using the constraints of each second component and the hierarchical relationship to obtain the final configuration file of the second component. The first component and the second component are generated based on the final configuration file of the first component and the final configuration file of the second component; Modifying the basic configuration file of each first component using the constraints of each first component and the hierarchical relationship to obtain the final configuration file of the first component, and modifying the basic configuration file of each second component using the constraints of each second component and the hierarchical relationship to obtain the final configuration file of the second component, further includes: The constraint attributes of the excitation data in each first component are determined based on the constraints of each first component, the constraints of each second component, and the hierarchical relationship. The constraint attributes of the excitation data in each second component are determined based on the constraints of each second component and the hierarchical relationship. Get the name of the incentive data to be generated; Declare member variables with the same names as the incentive data and corresponding constraint attributes in each level according to the hierarchical relationship; Define macro functions in the configuration file of the second component at the higher level to assign member variables to member variables with the same name in the second component at the lower level. The macro function is defined in the configuration file of the second component at the lowest level to assign the member variable with the same name to the stimulus data.
2. An excitation component generation system, characterized in that, include: The acquisition module is configured to acquire a table of record attribute parameters, where the attribute parameters include the name of the first component, the name of the second component, the constraints of each first and second component, and the hierarchical relationship between all components; The first generation module is configured to generate a base configuration file for the first component and a base configuration file for the second component based on the first component name and the second component name in the table. The modification module is configured to modify the basic configuration file of the first component using the constraints of each first component and the hierarchical relationship to obtain the final configuration file of the first component, and to modify the basic configuration file of the second component using the constraints of each second component and the hierarchical relationship to obtain the final configuration file of the second component. The second generation module is configured to generate the first component and the second component based on the final configuration file of the first component and the final configuration file of the second component. The modified module is also configured as follows: The constraint attributes of the excitation data in each first component are determined based on the constraints of each first component, the constraints of each second component, and the hierarchical relationship. The constraint attributes of the excitation data in each second component are determined based on the constraints of each second component and the hierarchical relationship. Get the name of the incentive data to be generated; Declare member variables with the same names as the incentive data and corresponding constraint attributes in each level according to the hierarchical relationship; Define macro functions in the configuration file of the second component at the higher level to assign member variables to member variables with the same name in the second component at the lower level. The macro function is defined in the configuration file of the second component at the lowest level to assign the member variable with the same name to the stimulus data.
3. A computer device, comprising: At least one processor; as well as A memory storing a computer program executable on the processor, characterized in that the processor executes the steps of the method as described in claim 1 when executing the program.
4. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it performs the steps of the method as described in claim 1.
Citation Information
Patent Citations
Rapid interface configuration method and device for UVM verification platform, equipment and medium
CN113961186A
Configuration-based merging of coverage data results for functional verification of integrated circuits
US8560985B1