UVM Register Model Address Randomization Method and Device

By constructing random address registers in the UVM register model and replacing fixed addresses, the problem that the UVM register model cannot randomize addresses is solved, and the extension function of the UVM register model is realized, simplifying the verification process and providing convenience.

CN119883374BActive Publication Date: 2025-07-29EHIWAY MICROELECTRONIC SCI & TECH (SUZHOU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510361352.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-07-29
Estimated Expiration
2045-03-26

AI Technical Summary

Technical Problem

The existing UVM register model cannot randomize addresses, which limits its application in special verification scenarios, especially when verifying flash, it cannot construct virtual random register addresses.

Method used

The random address register random_addr_reg is constructed in the register model reg_model, and passed it to the converter adapter by configuring the database config_db. When constructing the register to the bus reg2bus function in the adapter, the fixed address 32'h10086007 is replaced as the random address random_addr, and finally passed to the design DUT to be tested.

Benefits of technology

It realizes the randomization of UVM register model addresses, expands the functions of UVM register model, provides convenience for verification personnel, simplifies the verification process, and reduces workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883374B_ABST
    Figure CN119883374B_ABST
Patent Text Reader

Abstract

UVM register model address randomization method and device, which can achieve the randomization of the UVM register model address, expand the functions of the UVM register model, and provide convenience for verification personnel. The method includes: (1) constructing random_addr_reg in reg_model; (2) defining random_addr in the global config and passing random_addr to the adapter; (3) constructing the reg2bus function in the adapter. When the write function is called in the sequence for a write operation, when the fixed address 32’h10086007 is passed to the reg2bus function constructed in the adapter, it is replaced by the random_addr passed in from the global, and finally the randomized random address is passed to the dut, thus achieving the randomization of the UVM register model address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of integrated circuits, and in particular to a method for randomizing addresses of a UVM register model and a device for randomizing addresses of a UVM register model. Background Art

[0002] In modern society, information technology has developed rapidly, semiconductor process technology has been continuously improved, and integrated circuit (IC) design has also been continuously progressing. As a result, the functions of digital ICs are becoming more and more complex. This has made the previous simple verification work become complex, and traditional verification methods are no longer applicable to the current IC verification work. Logical errors in chip design are the main reasons for chip tape out failure. Therefore, sufficient functional verification is a key step in successful chip design.

[0003] The purpose of verification is to simulate and test the functions of the designed chip to discover defects or errors (bugs) in the chip design, so that IC design engineers can correct them as much as possible before chip tape out, and make the verified module and chip system achieve the expected functions as much as possible by 100%. Currently, the Universal Verification Methodology (UVM) has become the mainstream verification method due to its strong reusability and good usability. The UVM verification register mainly uses the register model to read and write the registers in the RTL through front door access (FRONTDOOR) or back door access in any time-consuming phase. Its essence is to redefine the interface between the verification platform and the registers of the design under test (DUT), enabling verification personnel to better organize and configure the registers, simplify the process, and reduce the workload. However, using the Register Model to verify registers can only randomly configure the values of the registers in the DUT by randomly selecting the fields of the Register Model, and cannot randomly configure the addresses of the registers in the DUT by randomly selecting the addresses of the Register Model. In some special verification scenarios, such as when verifying flash, a virtual register needs to be constructed to randomly verify the address of the flash. However, the traditional register model cannot randomize the address, which limits the application scenarios of the register model. Summary of the Invention

[0004] To overcome the deficiencies of the prior art, the technical problem to be solved by the present invention is to provide a method for randomizing the addresses of a UVM register model, which can achieve the randomization of the addresses of the UVM register model, expand the functions of the UVM register model, and provide convenience for a large number of verification personnel.

[0005] The technical solution of the present invention is as follows: This method for randomizing the addresses of a UVM register model includes the following steps:

[0006] (1) Construct a random address register random_addr_reg in the register model reg_model;

[0007] (2) Define a random address random_addr in the global configuration config, and then pass the randomized random_addr to the converter adapter through the configuration database config_db;

[0008] (3) Construct a register-to-bus reg2bus function in the adapter. When the write function is called with the random_addr_reg register in the sequence sequence for a write operation, when its fixed address 32'h10086007 is passed to the reg2bus function constructed in the adapter, it is replaced by the random_addr passed in from the global, and finally the randomized random address is passed to the device under test dut.

[0009] The present invention provides a method capable of randomizing the addresses of a UVM register model, expanding the functions of the UVM register model, and providing convenience for a large number of verification personnel.

[0010] There is also provided a device for randomizing the addresses of a UVM register model, which includes:

[0011] A register construction module configured to construct a random address register random_addr_reg in the register model reg_model;

[0012] A definition transfer module configured to define a random address random_addr in the global configuration config, and then pass the randomized random_addr to the converter adapter through the configuration database config_db;

[0013] A replacement module, which is configured to construct a register-to-bus reg2bus function in the adapter. When the write function is called with the random_addr_reg register in the sequence, and its fixed address 32’h10086007 is passed to the reg2bus function constructed in the adapter, it is replaced by the globally passed random_addr, and finally the randomized random address is passed to the design under test (DUT). Description of the Drawings

[0014] Figure 1 Shows the program code of step (1) of the UVM register model address randomization method according to the present invention.

[0015] Figure 2 Shows the program code of step (2) of the UVM register model address randomization method according to the present invention.

[0016] Figure 3 Shows the overall verification environment architecture diagram of step (3) of the UVM register model address randomization method according to the present invention.

[0017] Figure 4 Shows the flow chart of the UVM register model address randomization method according to the present invention. Detailed Description of the Invention

[0018] The register model of UVM redefines the interface between the verification platform and the registers of the design under test (DUT), enabling verification personnel to better organize and configure the registers, simplifying the process and reducing the workload. However, it can only randomize the data of the registers, thus limiting its verification function. In some special verification scenarios, it is required that the register model can randomize its address. The present invention provides a method for randomizing the address of the UVM register model, which expands the function of the UVM register model and provides convenience for a large number of verification personnel.

[0019] Specifically, as Figure 4 shown, this UVM register model address randomization method includes the following steps:

[0020] (1) Construct a random address register random_addr_reg in the register model reg_model;

[0021] (2) Define a random address random_addr in the global configuration config, and then pass the randomized random_addr to the adapter through the configuration database config_db;

[0022] (3) Construct the register-to-bus reg2bus function in the adapter. When the write function is called with the random_addr_reg register in the sequence, when its fixed address 32’h10086007 is passed to the reg2bus function constructed in the adapter, it is replaced by the randomly generated random_addr passed in globally, and finally the randomly generated random address is passed to the device under test (DUT).

[0023] Preferably, in step (1), a random_addr_reg class is derived from the UVM register uvm_reg, and then a domain of random_addr is declared; in the new function new, the width 32 of the random_addr_reg register is passed as a parameter to the super.new function, and another parameter in super.new is selected as NO_COVERAGE; in the created build(), the new function new is created and assigned values.

[0024] Preferably, in step (1), after the random_addr_reg register is defined, the random_addr_reg register is instantiated in a class reg_model derived from the UVM register block uvm_reg_block.

[0025] Preferably, in step (1), in the defined build(), the fixed address 32’h10086007 is added as the second parameter of the add_reg function for the previously instantiated register random_addr.

[0026] Preferably, in step (2), the construction of the reg2bus function of the adapter in the UVM verification platform is as follows: in the assignment process of addr, an if_else statement is used. If the address of the register calling this function is 32’h10086007, then addr_random is assigned to the transaction to be driven by the driver; if the address of the register calling this function is not 32’h10086007, then the actual address of the register is assigned to the corresponding transaction.

[0027] Preferably, in step (3), the passing-in of the random address random_addr in the UVM verification platform is as follows: first, the random address random_addr is defined in the global config of the verification platform, and then the randomly generated address random_addr is passed to the reg2bus function in the adapter through the config_db method.

[0028] Those of ordinary skill in the art can understand that all or part of the steps in implementing the methods of the above embodiments can be completed by instructing relevant hardware through a program. The said program can be stored in a computer-readable storage medium. When the program is executed, it includes the steps of the methods of the above embodiments, and the said storage medium can be: ROM / RAM, magnetic disk, optical disk, memory card, etc. Therefore, corresponding to the method of the present invention, the present invention also simultaneously includes a UVM register model address randomization device, which is usually represented in the form of functional modules corresponding to the steps of the method. The device includes:

[0029] A register construction module configured to construct a random_addr_reg register in the reg_model;

[0030] A definition transfer module configured to define a random address random_addr in the global config, and then transfer the randomized address random_addr to the adapter through the config_db;

[0031] A replacement module configured to construct a reg2bus function in the adapter. When the write function is called with the random_addr_reg register in the sequence, when its fixed address 32'h10086007 is passed to the reg2bus function constructed in the adapter, it is replaced by the random address random_addr passed in from the global, and finally the randomized random address is passed to the dut.

[0032] Preferably, in the register construction module, a random_addr_reg class is derived from the UVM register uvm_reg, and then a domain of random_addr is declared; in the new function new, the width 32 of the random_addr_reg register is passed as a parameter to the super.new function, and another parameter in super.new selects NO_COVERAGE; in the created build(), the new function new is created and assigned values; after defining the random_addr_reg register, the random_addr_reg register is instantiated in a class reg_model derived from the UVM register block uvm_reg_block; after defining in the build(), the previously instantiated register random_addr is added with the fixed address 32'h10086007 as the second parameter in the addr_reg function.

[0033] Preferably, in the defined transfer module, the construction of the reg2bus function of the adapter in the UVM verification platform is as follows: in the process of assigning the addr, an if-else statement is used. If the address of the register that calls this function is 32'h10086007, then assign addr_random to the transaction that the driver needs to drive; if the address of the register that calls this function is not 32'h10086007, then assign the actual address of this register to the corresponding transaction.

[0034] Preferably, in the replacement module, the passing-in of the random address random_addr in the UVM verification platform is as follows: first, define the random address random_addr in the global config of the verification platform, and then pass the randomized address random_addr to the reg2bus function in the adapter through the config_db method.

[0035] The content of the present invention will be described more specifically below.

[0036] The construction of the register with a random address in the UVM verification platform is as Figure 1 , first, derive a random_addr_reg class from uvm_reg, and then declare a domain of random_addr. In the new function, the width 32 of the random_addr_reg register should be passed as a parameter to the super.new function. Another parameter in super.new can choose not to support code coverage, that is, NO_COVERAGE. Finally, create and assign values to it in build. After defining the random_addr_reg register, it needs to be instantiated in a class reg_model derived from uvm_reg_block. The key point later is to add the previously instantiated register random_addr with its fixed address 32'h10086007 as the second parameter in the add_reg function in build().

[0037] The construction of the reg2bus function of the adapter in the UVM verification platform is as Figure 2 , in the process of assigning the addr, an if-else statement is used. If the address of the register that calls this function is 32'h10086007, then assign addr_random to the transaction tr that the driver needs to drive; if the address of the register that calls this function is not 32'h10086007, then assign the actual address of this register to the corresponding tr.

[0038] The input of the random address random_addr in the UVM verification platform is as follows Figure 3 As shown, first define the random address random_addr in the global config of the verification platform, and then transfer the randomized address random_addr to the reg2bus function in the adapter through the config_db method.

[0039] The above are only the preferred embodiments of the present invention, and do not impose any form of limitation on the present invention. Any simple modifications, equivalent changes and decorations made to the above embodiments based on the technical essence of the present invention still fall within the protection scope of the technical solution of the present invention.

Claims

1. A method for randomizing the address of the UVM register model, characterized in that: It includes the following steps: (1) Construct a random address register random_addr_reg in the register model reg_model; (2) Define a random address random_addr in the global configuration config, and then transfer the randomized random_addr to the adapter through the config_db; (3) Construct a register-to-bus reg2bus function in the adapter. When the write function is called with the random_addr_reg register in the sequence, when the fixed address 32’h10086007 is passed to the reg2bus function constructed in the adapter, it is replaced by the random_addr passed in from the global scope, and finally the randomized random address is passed to the design under test dut; In step (1), derive a random_addr_reg class from the UVM register uvm_reg, and then declare a domain of random_addr; in the new function new, pass the width 32 of the random_addr_reg register as a parameter to the super.new function, and select NO_COVERAGE as another parameter in super.new; create and assign values in the build() function created by the new function; After defining the random_addr_reg register, instantiate the random_addr_reg register in a class reg_model derived from the UVM register block uvm_reg_block; add the fixed address 32’h10086007 as the second parameter of the addr_reg function to the previously instantiated register random_addr in the build(); 2. The UVM register model address randomization method according to claim 1, wherein: In step (2), the reg2bus function of the adapter in the UVM verification platform is constructed as follows: use an if-else statement during the assignment of addr. If the address of the register calling this function is 32’h10086007, assign addr_random to the transaction to be driven by the driver; if the address of the register calling this function is not 32’h10086007, assign the actual address of the register to the corresponding transaction.

3. The UVM register model address randomization method according to claim 2, characterized in that: In step (3), the passing of the random address random_addr in the UVM verification platform is as follows: first, define the random address random_addr in the global config of the verification platform, and then transfer the randomized address random_addr to the reg2bus function in the adapter through the config_db; 4. UVM register model address randomization device, characterized in that: It includes: A register construction module, configured to construct a random address register random_addr_reg in the register model reg_model; A definition transfer module, configured to define a random address random_addr in the global configuration config, and then transfer the randomized random_addr to the adapter through the config_db of the configuration database; A replacement module, configured to construct a register-to-bus reg2bus function in the adapter. When the write function is called with the random_addr_reg register in the sequence sequence, when the fixed address 32’h10086007 is passed to the adapter to construct the reg2bus function, it is replaced by the random_addr passed in from the global scope, and finally the randomized random address is passed to the design under test dut; In the register construction module, a random_addr_reg class is derived from the UVM register uvm_reg, and then a domain of random_addr is declared; in the new function new, the width 32 of the random_addr_reg register is passed as a parameter to the super.new function, and another parameter in super.new selects NO_COVERAGE; in the build() function, the new function new is created and assigned values; after the random_addr_reg register is defined, the random_addr_reg register is instantiated in a class reg_model derived from the UVM register block uvm_reg_block; after the build() function is defined, the previously instantiated register random_addr is added with the fixed address 32’h10086007 as the second parameter in the addr_reg function.

5. The UVM register model address randomization device according to claim 4, wherein: In the definition transfer module, the construction of the reg2bus function of the adapter in the UVM verification platform is as follows: an if-else statement is used in the assignment process of addr. If the address of the register calling this function is 32’h10086007, then addr_random is assigned to the transaction that the driver needs to drive; if the address of the register calling this function is not 32’h10086007, then the actual address of this register is assigned to the corresponding transaction.

6. The UVM register model address randomization device according to claim 5, characterized in that: In the replacement module, the input of the random address random_addr in the UVM verification platform is as follows: first, the random address random_addr is defined in the global config of the verification platform, and then the randomized address random_addr is transferred to the reg2bus function in the adapter through the config_db.

Citation Information

Patent Citations

  • Method and device for dynamically mapping register address, equipment and medium

    CN114996174A

  • Verification method of storage circuit and computing equipment

    CN118571297A