Jump to content

Want to Set NO_REG_TESTS in Environment for some registers

Recommended Posts

Want to set attribute NO_REG_TESTS for few Status resigters, so that when reset sequence will disable reading the register.

I have made



in environment but still i could see debug_status register being tested.

Can anyone give me the solution how to set this attributes.

-Akshay Rao

Link to comment
Share on other sites

Do you make the two uvm_resource_db#(bit)::set in the test_base::build_phase(uvn_phase phase) when creating the regmodel?

They should work well. Following code snippet is uvm_reg_hw_reset_seq source code. see the bold parts~

class uvm_reg_hw_reset_seq extends uvm_reg_sequence #(uvm_sequence #(uvm_reg_item));


function new(string name="uvm_reg_hw_reset_seq");



virtual task body();

uvm_reg regs[$];

uvm_reg_map maps[$];

if (model == null) begin

`uvm_error("uvm_reg_hw_reset_seq", "Not block or system specified to run sequence on");



uvm_report_info("STARTING_SEQ",{"\n\nStarting ",get_name()," sequence...\n"},UVM_LOW);

if (uvm_resource_db#(bit)::get_by_name({"REG::",model.get_full_name()},

"NO_REG_TESTS", 0) != null ||


"NO_REG_HW_RESET_TEST", 0) != null )


Edited by Roman
Link to comment
Share on other sites

Remove the ".*" after the end of the register full name in the concatenation. The resource must target the register, not anything below it.

Hi Janick,

At page 656 of the UVM1.1 class reference spec, 25.2 uvm_reg_hw_reset_seq , it mentioned it should use the following ".*" after the end of the register full name in the concatenation

If bit-type resource named “NO_REG_TESTS” or “NO_REG_HW_RESET_TEST” in the

“REG::” namespace matches the full name of the block or register, the block or register

is not tested.


"NO_REG_TESTS", 1, this);

Edited by Roman
Link to comment
Share on other sites

The example uses BLOCKNAME.get_full_name() and the ".*" will thus match the registers in contains.

The user uses REGNAME.get_full_name() and the ".*" would match the fields it contains -- which is not the scope where the resource is looked up.

Link to comment
Share on other sites

Ok , thanks . I miss this trick in this case.

regmodel.debug _status seems to be not good style. I think we should make all registers and memory into the block, and then build the block in the regmodel. Not build register directly in the regmodel, right?

Link to comment
Share on other sites

You can also add to your XML for the debug_status register, this:



These commands can be for registers or blocks (register files). This may not be flexible if the generator doesn't know this vendorExtension.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...