CN115081368A - Register coverage statistics collection method and storage medium - Google Patents
Register coverage statistics collection method and storage medium Download PDFInfo
- Publication number
- CN115081368A CN115081368A CN202210659779.2A CN202210659779A CN115081368A CN 115081368 A CN115081368 A CN 115081368A CN 202210659779 A CN202210659779 A CN 202210659779A CN 115081368 A CN115081368 A CN 115081368A
- Authority
- CN
- China
- Prior art keywords
- register
- coverage
- group
- coverage rate
- bus
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 57
- 238000005070 sampling Methods 0.000 claims abstract description 11
- 238000004806 packaging method and process Methods 0.000 claims abstract description 3
- 238000012795 verification Methods 0.000 description 13
- 238000013461 design Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000013507 mapping Methods 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- ACWBQPMHZXGDFX-QFIPXVFZSA-N valsartan Chemical compound C1=CC(CN(C(=O)CCCC)[C@@H](C(C)C)C(O)=O)=CC=C1C1=CC=CC=C1C1=NN=NN1 ACWBQPMHZXGDFX-QFIPXVFZSA-N 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/30—Circuit design
- G06F30/32—Circuit design at the digital level
- G06F30/33—Design verification, e.g. functional simulation or model checking
- G06F30/3308—Design verification, e.g. functional simulation or model checking using simulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/30—Circuit design
- G06F30/32—Circuit design at the digital level
- G06F30/327—Logic synthesis; Behaviour synthesis, e.g. mapping logic, HDL to netlist, high-level language to RTL or netlist
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a statistical collection method of register coverage rate, which comprises the following steps: creating a covering group of a register model, and packaging a covering group object in the covering group for carrying out statistical collection on the offset address, the read-write operation and the crossed coverage rate of the accessed register; creating an overlay group subscriber; declaring an instantiated coverage group object in a coverage group subscriber for acquiring relevant numerical values or address information of a register; the covering group subscriber subscribes and receives the transaction data of the register bus, which is sent by the monitor of the register bus and broadcasted; and taking the transaction data as input information of coverage rate sampling, and calling a coverage rate sampling method of the coverage group object after declaration instantiation to complete statistical collection of the coverage rate of the register. The invention does not use the register coverage rate related interface method provided by UVM, thus avoiding the more complicated use parameter setting and the limitation of coding flexibility.
Description
Technical Field
The invention relates to the technical field of chip verification, in particular to a register coverage rate statistic collection method and a storage medium.
Background
Usually, registers are used inside an RTL (Register transfer level) design to participate in operations of some logic functions, so that when the RTL design is verified, modeling needs to be performed on the registers inside the RTL design to simulate the functional logic inside the RTL as much as possible, thereby achieving the purpose of helping verification developers to judge the correctness of the RTL design function.
A typical verification platform structure based on UVM verification methodology and including statistical collection of register coverage is shown in fig. 1, and registers and storage inside a DUT (Design under test, i.e., the above-mentioned RTL Design) can be conveniently modeled by using a UVM register model (register _ model in fig. 1). After the register model is created, the handle of the register model may be obtained in the sequence (sequence) and the component (component) to call the interface method in the register model to complete the read/write access to the register, for example, in the sequence on the left in the figure, the read/write access to the register is realized by calling the interface method in the register model. The sequence of the register bus can also be directly started as in the lower right corner, namely, the read-write access to the register is realized by operating the bus.
Since there are a variety of different register buses and UVM is a general validation methodology, there is a need to be able to handle various types of transaction request sequence _ items. Just these sequence _ items to be processed are very similar, and after combining their features, UVM pre-defines a sequence _ item, called UVM _ reg _ item. And then uvm _ reg _ item is converted into bus _ item of the target bus protocol through the bus2reg () and reg2bus () methods of the adapter (namely, the register read-write operation needs to be converted into sequence _ item conforming to the target bus protocol according to the bus communication protocol). And finally, driving the DUT by the sequence and the driver so as to finally finish the reading and writing of the target register. And in the process of reading and writing the register, synchronizing the register model and the register value in the actual DUT and collecting the coverage rate statistics.
We say that an important index for measuring the chip verification progress is to track the verification coverage rate of the chip, the coverage rate naturally comprises a part of a register, and the verification platform built based on the UVM simultaneously provides support for the register coverage rate collection function. It can be seen that an overlay package object (reg _ coverage) is included in the register model, and then, each time the access interface method of the register model is called, in addition to synchronously updating the numerical states of the register model and the DUT registers, information accessed this time is monitored, so as to perform coverage statistics collection on the access of the target register.
The following can be seen as a specific example:
in a first step, coverage statistics to be supported are declared in test cases.
As shown in fig. 2, here, it is set that the register model on the entire verification platform supports all coverage types, and in fact, the functional coverage configuration parameter provided by the UVM is an enumerated type value with a data type of UVM _ coverage _ model _ e, and specifically includes:
UVM _ NO _ COVERAGE: no coverage statistics are performed.
UVM _ CVR _ REG _ BITS: and counting the read-write coverage rate of each bit of the register.
UVM _ CVR _ ADDR _ MAP: and counting the read-write coverage rate of all the addresses in the register address mapping table.
UVM _ CVR _ FIELD _ VALS: coverage statistics are performed for values in the register field.
UVM _ CVR _ ALL: statistics are all performed including UVM _ CVR _ REG _ BITS, UVM _ CVR _ ADDR _ MAP, and UVM _ CVR _ FIELD _ VALS.
The parameters supported by the coverage statistics are only used for facilitating corresponding configuration in a verification platform, are equivalent to some switch parameters, and do not have special meanings, but need to be configured and used by a verification developer according to the needs of actual engineering projects.
As shown in FIG. 3, in the second step, an overlay set of register models is created, here packaged as an object, where statistics are collected for the accessed register offset addresses and read and write operations, as well as the cross-coverage of both.
In the third step, as shown in fig. 4, the following five events are mainly completed in the register model:
(1) declaring the overlay group encapsulation object instantiating the previous step.
(2) Invoking the set _ coverage () method allows sampling of this coverage type.
(3) Invoking the add _ coverage () method increases the sample support for the coverage type.
(4) And starting the corresponding sampling of the coverage rate information according to different maps by a get _ name () method of the address mapping table map.
(5) The sample () method in reg _ coverage and the sample _ value () method are called to complete the coverage sampling of the final register model.
As shown in fig. 5, it is also possible to directly write the overlay group in the register and then write the method for implementing sample _ values to implement the collection of the overlay statistics for a certain target register.
The above solution is adopted in general engineering applications, but has the following two main disadvantages:
(1) the method is complex to write, has more parameters needing to be configured, is easy to make mistakes in practical engineering application, and is not friendly to new people in engineering projects.
(2) The use is not flexible enough, because the statistical collection of the target register coverage rate must be completed according to the syntax rules provided by the UVM, which may lose a part of the flexibility of encoding and cannot directly monitor all behavior functions on the register bus. There is a need for a simpler and more flexible method for statistical collection of register coverage.
Disclosure of Invention
According to an embodiment of the present invention, a method for collecting statistics of a register coverage is provided, which includes the following steps:
creating a covering group of a register model, and packaging a covering group object in the covering group for carrying out statistical collection on the offset address, the read-write operation and the crossed coverage rate of the accessed register;
creating an overlay group subscriber;
declaring an instantiated coverage group object in a coverage group subscriber for acquiring relevant numerical values or address information of a register;
the coverage group subscriber subscribes to receive the transaction data of the register bus sent by the monitor of the register bus;
and taking the transaction data as input information of coverage rate sampling, and calling a coverage rate sampling method of the coverage group object after declaration instantiation to complete statistical collection of the coverage rate of the register.
Furthermore, statistics are collected on the corresponding coverage rate of the register, and the statistics can be collected by calling a related interface method through a handle of the register model to directly access the register.
Further, the register model is transmitted to the coverage group object after declaration and instantiation, so that the coverage group object can use an interface method of the register model to obtain the relevant numerical value or address information of the register.
Further, a write method is programmed in the overlay set subscriber for subscribing to receive register bus transaction data broadcast from the register bus snoopers.
According to yet another embodiment of the present invention, a storage medium having non-volatile program code executable by a processor, the program code causing the processor to execute a register coverage statistics collection method is provided.
According to the register coverage rate statistic collection method provided by the embodiment of the invention, a register coverage rate related interface method provided by UVM is not used, so that the more complicated limitation of use parameter setting and coding flexibility is avoided. The monitored relevant data of the register is subjected to coverage rate statistical collection through a direct monitoring register bus interface, so that the flexibility of coding is increased, the complex register coverage rate statistical collection is more convenient, and the realization is easier.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and are intended to provide further explanation of the claimed technology.
Drawings
FIG. 1 is a block diagram of a verification platform including register coverage statistics collection based on UVM verification methodology.
Fig. 2 is a first code diagram of the conventional scheme.
Fig. 3 is a diagram of a second code of the prior art scheme.
Fig. 4 is a diagram of a third code of the prior art scheme.
Fig. 5 is a fourth code diagram of the prior art scheme.
FIG. 6 is a flowchart of a register coverage statistics collection method according to an embodiment of the invention.
FIG. 7 is a block diagram of a register coverage statistics collection method according to an embodiment of the present invention.
Detailed Description
The present invention will be further explained by the following detailed description of preferred embodiments thereof, which is to be read in connection with the accompanying drawings.
First, a register coverage statistics collection method according to an embodiment of the present invention will be described with reference to fig. 6 to 7, which is used for verification of a chip and has a wide application range.
As shown in fig. 6 to 7, the register coverage statistics collecting method according to the embodiment of the present invention includes the following steps:
in S1, as shown in fig. 6, an overlay group of the register model is created, and an overlay group object reg _ coverage is encapsulated in the overlay group, which is used to perform statistics collection on the offset address, the read-write operation, and the cross coverage of the two of the accessed register.
In S2, as shown in fig. 6, an overlay group subscriber coverage _ subscriber is created.
At S3, as shown in fig. 6, an instantiated overlay group object reg _ coverage is declared within the overlay group subscriber coverage _ descriptor for obtaining the relevant value or address information of the register. In this embodiment, further, the register model is transferred to the coverage group object after declaration and instantiation, so that the coverage group object can use an interface method of the register model to obtain the relevant numerical value or address information of the register, so as to facilitate statistical collection of corresponding coverage rate data.
At S4, as shown in fig. 6, the overlay subscriber subscribe subscribes to receive the transaction data bus _ item of the register bus broadcasted by the monitor from the register bus. In this embodiment, further, a write method is programmed in the overlay group subscriber for subscribing to receive the register bus transaction data bus _ item broadcast from the monitor of the register bus.
In S5, as shown in fig. 6, the transaction data bus _ item is used as input information of coverage rate sampling, and a coverage rate sampling method of the coverage group object reg _ coverage after declaration instantiation is called to complete statistical collection of the coverage rate of the register.
It can be seen from the above steps that, at this time, we no longer need to set UVM as the parameter supported by the coverage statistics set by us, and also do not need to use too many control methods of register coverage, so that the whole process of collecting the register coverage statistics becomes simpler and more flexible.
In the above, with reference to fig. 6 to 7, the register coverage statistics collecting method according to the embodiment of the present invention is described, and a register coverage related interface method provided by UVM is not used, so that the limitation of more complicated use parameter setting and encoding flexibility is avoided. The monitored relevant data of the register is subjected to coverage rate statistical collection through a direct monitoring register bus interface, so that the flexibility of coding is increased, the complex register coverage rate statistical collection is more convenient, and the realization is easier.
According to yet another embodiment of the present invention, a storage medium having non-volatile program code executable by a processor, the program code causing the processor to execute a register coverage statistics collection method is provided.
It should be noted that, in the present specification, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
While the present invention has been described in detail with reference to the preferred embodiments, it should be understood that the above description should not be taken as limiting the invention. Various modifications and alterations to this invention will become apparent to those skilled in the art upon reading the foregoing description. Accordingly, the scope of the invention should be determined from the following claims.
Claims (5)
1. A statistical collection method of register coverage rate is characterized by comprising the following steps:
creating a coverage group of a register model, and packaging a coverage group object in the coverage group for counting and collecting the offset address, the read-write operation and the crossed coverage rate of the accessed register;
creating an overlay group subscriber;
declaring the coverage group object in the coverage group subscriber for obtaining the relevant numerical value or address information of the register;
the coverage group subscriber subscribes and receives the transaction data of the register bus, which is sent by the monitor of the register bus and broadcasted;
and taking the transaction data as input information of coverage rate sampling, and calling a coverage rate sampling method of the coverage group object after declaration and instantiation to finish the statistical collection of the coverage rate of the register.
2. The register coverage statistics collection method of claim 1, wherein the statistics collection is performed by collecting the corresponding coverage statistics of the register and directly accessing the register by calling an associated interface method through a handle of the register model.
3. The register coverage statistics collection method of claim 1, wherein a register model is passed to the coverage group object after declaration instantiation, so that the coverage group object can use an interface method of a register model to obtain the relevant value or address information of the register.
4. The register coverage statistics collection method of claim 1, wherein a write method is programmed in the coverage group subscriber for subscribing to receive register bus transaction data broadcast from a register bus listener.
5. A storage medium having non-volatile program code executable by a processor, wherein the program code causes the processor to execute the register coverage statistics collection method of any of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210659779.2A CN115081368A (en) | 2022-06-13 | 2022-06-13 | Register coverage statistics collection method and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210659779.2A CN115081368A (en) | 2022-06-13 | 2022-06-13 | Register coverage statistics collection method and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115081368A true CN115081368A (en) | 2022-09-20 |
Family
ID=83250982
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210659779.2A Pending CN115081368A (en) | 2022-06-13 | 2022-06-13 | Register coverage statistics collection method and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115081368A (en) |
-
2022
- 2022-06-13 CN CN202210659779.2A patent/CN115081368A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110554958B (en) | Graph database testing method, system, device and storage medium | |
CN112131829A (en) | Verification method, system and related device of chip register | |
US20040243334A1 (en) | Test component and method of operation thereof | |
US20040162805A1 (en) | Method and system for automatically generating a global simulation model of an architecture | |
EP1447759A1 (en) | Generation of a testbench for a representation of a device | |
CN1987820A (en) | Method and system for tracing program execution in field programmable gate arrays | |
CN108132876B (en) | Embedded software object code unit testing method based on injection mode | |
US11237832B2 (en) | Module with a serialization unit and improved compatibility with deserialization units of different series | |
CN114707453A (en) | Chip function verification method and device, electronic equipment and storage medium | |
CN112541313A (en) | Method and device for configuring trigger expression for logic analysis state | |
CN114915643A (en) | Configuration method, device, equipment and medium of railway signal centralized monitoring system | |
CN115081368A (en) | Register coverage statistics collection method and storage medium | |
CN112631920A (en) | Test method, test device, electronic equipment and readable storage medium | |
CN111624475A (en) | Method and system for testing large-scale integrated circuit | |
CN110032781B (en) | Editing time sequence constraint method and device, computer equipment and storage medium | |
CN114840254A (en) | Read-write access method for register in UVM environment by using C language | |
CN113742156B (en) | Joint debugging method, joint debugging device, electronic equipment and storage medium | |
CN108334313A (en) | Continuous integrating method, apparatus and code management system for large-scale SOC research and development | |
CN108228314A (en) | A kind of Virtual prototype error-detecting method based on equipment stipulations | |
CN114443375A (en) | Test method and device, electronic device and computer readable storage medium | |
US20030046641A1 (en) | Representing a simulation model using a hardware configuration database | |
CN117312176B (en) | Chip verification test method and system based on UVM and electronic equipment | |
CN103678054A (en) | Test method and device for BACnet equipment | |
CN109358855A (en) | A kind of front end analogue data agile development method and electronic equipment for programming | |
JP2001156176A (en) | Method and system for generating lsi test program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Country or region after: China Address after: 3 / F, 665 Zhangjiang Road, China (Shanghai) pilot Free Trade Zone, Pudong New Area, Shanghai Applicant after: Yunhe Zhiwang (Shanghai) Technology Co.,Ltd. Address before: 311203 floor 12, building 2, Purple Orange International Center, No. 39, Jincheng Road, Xiaoshan District, Hangzhou, Zhejiang Province Applicant before: Hangzhou yunhezhi Network Technology Co.,Ltd. Country or region before: China |
|
CB02 | Change of applicant information |