akshay.raoy Posted May 16, 2012 Report Posted May 16, 2012 Want to set attribute NO_REG_TESTS for few Status resigters, so that when reset sequence will disable reading the register. I have made uvm_resource_db#(bit)::set({"REG::",regmodel.debug_status.get_full_name(),".*"},"NO_REG_TESTS",1,this); uvm_resource_db#(bit)::set({"REG::",regmodel.debug_status.get_full_name(),".*"},"NO_REG_HW_RESET_TEST",1,this); 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 Quote
Roman Posted May 16, 2012 Report Posted May 16, 2012 (edited) 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)); `uvm_object_utils(uvm_reg_hw_reset_seq) function new(string name="uvm_reg_hw_reset_seq"); super.new(name); endfunction 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"); return; end 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 || uvm_resource_db#(bit)::get_by_name({"REG::",model.get_full_name()}, "NO_REG_HW_RESET_TEST", 0) != null ) return; Edited May 16, 2012 by Roman Quote
janick Posted May 16, 2012 Report Posted May 16, 2012 Remove the ".*" after the end of the register full name in the concatenation. The resource must target the register, not anything below it. Quote
Roman Posted May 16, 2012 Report Posted May 16, 2012 (edited) 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. uvm_resource_db#(bit)::set({"REG::",regmodel.blk.get_full_name(),".*"}, "NO_REG_TESTS", 1, this); Edited May 17, 2012 by Roman Quote
janick Posted May 17, 2012 Report Posted May 17, 2012 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. Quote
Roman Posted May 17, 2012 Report Posted May 17, 2012 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? Quote
janick Posted May 17, 2012 Report Posted May 17, 2012 The "regmodel" variable is a reference to a block. Thus debug_status is a register in the top-most block. Quote
lisakb1963 Posted May 18, 2012 Report Posted May 18, 2012 You can also add to your XML for the debug_status register, this: <vendorExtensions:name>NO_REG_HW_RESET_TEST</vendorExtensions:name> <vendorExtensions:name>NO_REG_TESTS</vendorExtensions:name> These commands can be for registers or blocks (register files). This may not be flexible if the generator doesn't know this vendorExtension. Quote
janick Posted May 21, 2012 Report Posted May 21, 2012 You can also add to your XML for the debug_status register. That is a vendor/generator specific feature. Quote
Recommended Posts
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.