Register model structure generation method, electronic equipment and storage medium

By combining data objects and UVM standard library policies to obtain and filter register information, the redundancy and integrity problems in traditional methods are solved, and efficient register model generation is realized, ensuring the structural integrity and information effectiveness of the register model.

CN119067064APending Publication Date: 2024-12-03SHANGHAI UNIVISTA IND SOFTWARE GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411079919.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

Traditional methods are prone to redundant information or loss of structural integrity when generating register models, and cannot effectively distinguish between invalid and valid register information.

Method used

By combining two strategies based on data objects and UVM standard library to obtain register information, traverse the hierarchy structure for matching and filtering, and eliminate redundant information to ensure the integrity and effectiveness of the hierarchy structure.

Benefits of technology

It realizes the generation of register models without redundant information, while ensuring the integrity of the structure and the effectiveness of the information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119067064A_ABST
    Figure CN119067064A_ABST
Patent Text Reader

Abstract

The invention relates to the field of EDA verification, in particular to a register model structure generation method, electronic equipment and a storage medium, and the method comprises the steps: obtaining a top register management module based on a UVM standard library; obtaining all first seed objects with hierarchical structure information through a first strategy, and obtaining second seed objects with configured effective register information through a second strategy; traversing all the first seed objects in each hierarchy of the hierarchical structure, traversing all the second seed objects according to each first seed object, removing the first seed objects which are not effective register information in the hierarchical structure in a matching manner, traversing all the first seed objects in all the hierarchical structures, and removing all the second seed objects in all the hierarchical structures; all the target sub-objects in the hierarchical structure are obtained, and the register information structure model is generated according to all the target sub-objects in the hierarchical structure. By means of the method, it can be guaranteed that the hierarchical structure is not damaged enough, and redundant information is eliminated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of EDA verification, and in particular to a register model structure generation method, electronic equipment and storage medium. Background Art

[0002] In the field of chip verification, there are two main ways to build a traditional register structure model: the first way is to generate register information based on data objects. The second way is to generate register information based on the UVM (Universal Verification Methodology) standard library. The first way is to automatically create or configure registers based on a predefined data structure or data model (i.e., data object). This method can ensure the integrity of the entire register hierarchy model. However, for invalid register information that is not configured, this method will not be identified, resulting in redundant register information in the generated register hierarchy model. The second way is to query register information through the fields provided by the UVM standard library. This part of register information can be guaranteed to be valid information that has been configured. However, this method will lose the hierarchical structure that the register model should have. If register file information or register information array appears, the built model will lose structural integrity.

[0003] Therefore, a method is urgently needed that can generate register information without redundancy while ensuring structural integrity. Summary of the invention

[0004] In view of the above technical problems, the technical solution adopted by the present invention is: a method for generating a register model structure, the method comprising the following steps:

[0005] S100, obtaining a top-level register management module based on a UVM standard library; wherein the top-level register management module includes N sub-objects subobj having a hierarchical structure.

[0006] S200, respectively obtaining all sub-objects through a first strategy of generating register information based on a data object and a second strategy of generating register information based on a UVM standard library, including:

[0007] S210, based on the first strategy, all sub-objects with register information in the top-level register management module are obtained to obtain R-layer first seed objects with a hierarchical structure; wherein the r-th layer includes T first seed objects subobj1 with complete register information r , where T≥1, 1≤r≤R.

[0008] S220: Acquire all second seed objects subobj2 configured as valid register information in the top-level register management module based on the second strategy.

[0009] S300, traversing all first seed objects in each level of the hierarchical structure, filtering the register information in each level again according to subobj2, and obtaining all target subobjects in each level; wherein, when the t-th first seed object subobj1 in the traversed r-th level r,t When the register information of subobj1 cannot be matched with all the register information of subobj2, r,t From subobj1 r , where 1≤t≤T.

[0010] S400, if the register information of all target sub-objects of the current level is register attribute information, end the traversal of the current level; otherwise, traverse the next level in the hierarchical structure.

[0011] S500: traverse all first seed objects in all hierarchical structures, obtain all target sub-objects in the hierarchical structures, and generate a register information structure model according to all target sub-objects in the hierarchical structures.

[0012] In addition, the present invention also provides a non-transitory computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the above method.

[0013] In addition, the present invention also provides an electronic device, including a processor and the above-mentioned non-transitory computer-readable storage medium.

[0014] The present invention has at least the following beneficial effects:

[0015] The present invention provides a register model structure generation method, electronic device and storage medium, which obtains all first seed objects with hierarchical structure information through a first strategy, obtains second seed objects with configured valid register information through a second strategy, traverses all second seed objects according to each first seed object, and removes first seed objects that are not valid register information in the hierarchical structure by matching. This method can ensure that the hierarchical structure is not damaged enough, and further remove redundant information. The purpose of ensuring both the integrity of the register model structure and the validity of the relevant information is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 A flow chart of a register model structure generation method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0019] See also Figure 1 , which shows a method for generating a register model structure, the method comprising the following steps:

[0020] S100, obtaining a top-level register management module based on a UVM standard library; wherein the top-level register management module includes N sub-objects subobj having a hierarchical structure.

[0021] Among them, the UVM standard library is a standard methodology for verifying integrated circuit designs. The UVM standard library is based on the SystemVerilog language and provides a set of classes and methods for writing reusable verification environments. It includes a series of base classes and methods for building test environments, generating and managing test cases, and performing functional coverage analysis.

[0022] Wherein, the top-level register management module (Root Register Block) represents the top-level register set in the chip design in the UVM register model, including multiple sub-objects that meet the standard classes preset in the UVM standard library, such as registers (uvm_reg), register files (uvm_reg_file), memory (uvm_mem), sub-register blocks (sub-uvm_reg_block), and also includes sub-objects that meet the self-defined register types or auxiliary classes related to registers, such as registers, register files, memory and sub-register blocks, forming a hierarchical structure to map the actual register layout in the design. The top-level register management module is the entry point of the entire register hierarchy, through which any register or memory in the chip design can be accessed and operated.

[0023] Among them, the customized sub-object is implemented by inheriting the corresponding class in the UVM standard library and adding the corresponding logic. For example, the customized special function register is implemented by inheriting uvm_reg and adding the corresponding logic. For another example, the customized register file is implemented by inheriting uvm_reg_file and adding the corresponding logic.

[0024] Optionally, the class of each sub-object is any one of register, register file, memory and sub-register block. It can be a sub-object that meets the standard class preset in the UVM standard library, or it can be a sub-object that meets the auxiliary class related to a user-defined register type or register.

[0025] S200, respectively obtains all sub-objects by a first strategy based on data object to generate register information and a second strategy based on UVM standard library to generate register information. Respectively process the top register management module by two different strategies, and then optimize the final result in combination with the two strategies.

[0026] S200 further includes:

[0027] S210, based on the first strategy, all sub-objects with register information in the top-level register management module are obtained to obtain R-layer first seed objects with a hierarchical structure; wherein the r-th layer includes T first seed objects subobj1 with complete register information r , where T≥1, 1≤r≤R.

[0028] The register information is an object directly related to the attributes or functions of the register model, such as the address, width, field details, register mapping and other basic information of the register.

[0029] The complete register information is all the information configured in the chip design. Since it is static information, the complete register information can be directly obtained.

[0030] It should be noted that the sub-object obtained by the first strategy includes the sub-object that meets the standard class preset in the UVM standard library and the sub-object that meets the auxiliary class that is relevant to the user-defined register type or register. The R layer first seed object obtained by the first strategy completely retains the corresponding hierarchical structure, such as the hierarchical structure and register array information with register files, but due to various reasons such as design reservation or improper configuration management, a large amount of redundant information may exist.

[0031] S220: Acquire all second seed objects subobj2 configured as valid register information in the top-level register management module based on the second strategy, that is, all second seed objects in subobj2 are subobjects configured as valid register information.

[0032] Wherein, the second seed object is a sub-object that meets the standard class preset in the UVM standard library, or is a sub-object that meets the self-defined register type or the auxiliary class related to the register that has been registered in the preset standard class. It should be noted that by registering the sub-object that meets the self-defined register type or the auxiliary class related to the register to the preset standard class, the purpose of making its register information become effective register information is achieved.

[0033] It should be noted that subobj2 obtained by the second strategy has lost the hierarchical structure information, for example, the hierarchical structure of the register file and the index information of the register array.

[0034] S300, traversing all first seed objects in each level of the hierarchical structure, filtering the register information in each level again according to subobj2, and obtaining all target subobjects in each level; wherein, when the t-th first seed object subobj1 in the traversed r-th level r,t When the register information of subobj1 cannot be matched with all the register information of subobj2, r,t From subobj1 r , where 1≤t≤T.

[0035] Among them, the register information of the second seed object is used as the valid register information, and the first seed object in the hierarchical structure obtained by the first strategy is filtered by matching, and the first seed object that is not valid register information in the hierarchical structure is eliminated. This method can not only ensure that the hierarchical structure is not damaged enough, but also further eliminate redundant information. The purpose of ensuring both the integrity of the register model structure and the validity of the relevant information is achieved.

[0036] S400, if the register information of all target sub-objects of the current level is register attribute information, end the traversal of the current level; otherwise, traverse the next level in the hierarchical structure.

[0037] It should be noted that the register attribute information is a leaf node of the entire hierarchical structure. When traversing to the register attribute, it means that the traversal has reached the leaf node.

[0038] S500: traverse all first seed objects in all hierarchical structures, obtain all target sub-objects in the hierarchical structures, and generate a register information structure model according to all target sub-objects in the hierarchical structures.

[0039] As a preferred embodiment, S210 further includes:

[0040] S211, acquiring all sub-objects subobj of register information in the top-level register management module; the sub-objects in subobj have hierarchical structure information.

[0041] S212, filter subobj and retain the first subobject with register information.

[0042] Among them, after the filtering of S211-S212, the complexity of the processing of S300 can be greatly reduced. Other filtering methods without register information also fall within the protection scope of the present invention.

[0043] As a preferred embodiment, before obtaining subobj, S211 further includes:

[0044] S2111, obtaining a data access interface based on a hardware description language code, wherein the data access interface encapsulates access logic to the top-level register management module in an object-oriented manner.

[0045] S2112: Acquire all sub-objects subobj in the top-level register management module through the data access interface.

[0046] Other methods of obtaining subobj also fall within the protection scope of the present invention.

[0047] Optionally, the hardware description language is SystemVerilog. Other hardware description languages ​​also fall within the protection scope of the present invention.

[0048] As a preferred embodiment, the debugger executes the first strategy, and the simulator specifies the second strategy, wherein the debugger is responsible for obtaining register information of a complete hierarchical structure using the first strategy, and the simulator is responsible for obtaining valid register information using the second strategy.

[0049] As a preferred embodiment, the debugger and the simulator exchange information via a VPI (Verilog Procedural Interface) interface. The simulator can be synchronized to the debugger in real time via the VPI interface. Methods for realizing information exchange between the debugger and the simulator via other interfaces also fall within the protection scope of the present invention.

[0050] Optionally, all target sub-objects in the hierarchical structure are aggregated into a debugger for unified integration to generate the register information structure model.

[0051] In summary, the present invention provides a register model structure generation method, electronic device and storage medium, which obtains all first seed objects with hierarchical structure information through a first strategy, obtains second seed objects with configured valid register information through a second strategy, traverses all second seed objects according to each first seed object, and removes first seed objects that are not valid register information in the hierarchical structure by matching. This method can not only ensure that the hierarchical structure is not damaged enough, but also further remove redundant information. The purpose of ensuring both the integrity of the register model structure and the validity of the relevant information is achieved.

[0052] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiment.

[0053] An embodiment of the present invention further provides an electronic device, comprising a processor and the aforementioned non-transitory computer-readable storage medium.

[0054] An embodiment of the present invention further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.

[0055] Although some specific embodiments of the present invention have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.

Claims

1. A register model structure generation method, characterized in that: The method comprises the following steps: S100, obtaining a top-level register management module based on a UVM standard library; wherein the top-level register management module includes N sub-objects subobj having a hierarchical structure; S200, respectively obtaining all sub-objects through a first strategy of generating register information based on a data object and a second strategy of generating register information based on a UVM standard library, including: S210, based on the first strategy, all sub-objects with register information in the top-level register management module are obtained to obtain R-layer first seed objects with a hierarchical structure; wherein the r-th layer includes T first seed objects subobj1 with complete register information r , where T ≥ 1, 1 ≤ r ≤ R; S220, acquiring all second seed objects subobj2 configured as valid register information in the top-level register management module based on the second strategy; S300, traversing all first seed objects in each level of the hierarchical structure, filtering the register information in each level again according to subobj2, and obtaining all target subobjects in each level; wherein, when the t-th first seed object subobj1 in the traversed r-th level r,t When the register information of subobj1 cannot be matched with all the register information of subobj2, r,t From subobj1 r Delete from , where 1≤t≤T; S400, if the register information of all target sub-objects of the current level is register attribute information, end the traversal of the current level; otherwise, traverse the next level in the hierarchical structure; S500: traverse all first seed objects in all hierarchical structures, obtain all target sub-objects in the hierarchical structures, and generate a register information structure model according to all target sub-objects in the hierarchical structures.

2. The method according to claim 1, characterized in that The S210 also includes: S211, acquiring all sub-objects subobj of register information in the top-level register management module; the sub-objects in subobj have hierarchical structure information; S212, filter subobj and retain the first subobject with register information.

3. The method according to claim 2, characterized in that S211 also includes the following before obtaining subobj: S2111, obtaining a data access interface based on a hardware description language code, wherein the data access interface encapsulates access logic to the top-level register management module in an object-oriented manner; S2112: Acquire all sub-objects subobj in the top-level register management module through the data access interface.

4. The method according to claim 1, characterized in that: The first strategy is executed by the debugger, and the second strategy is specified by the simulator.

5. The method according to claim 4, characterized in that The debugger and the simulator exchange information via a VPI interface.

6. The method according to claim 1, characterized in that The subobjects in subobj are subobjects that conform to the standard classes preset in the UVM standard library, or subobjects that conform to custom register types or register-related auxiliary classes.

7. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the method according to any one of claims 1 to 6.

8. An electronic device, characterized in that: The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 7.