Hi,
I want to exclude a register field from reg_bit_bash_test instead of excluding entire register.
I tried giving the following way. it doesn’t work. Is there a way to do it?
Hi Muthu,
I just tried on my test and your command works. Could you double check your test?
I’m using
“uvm_resource_db#(bit)::set({“REG::”,this.reg_env_instname.regmodel_instname.regblockname.regfieldname.get_full_name()}, “NO_REG_BIT_BASH_TEST”,1);”
Maybe you forgot to add the env inst name? I’m also new to UVM, not sure about that much. Hope this could help.
Can anyone please tell me what to do if null poit dereference error comes when I add
uvm_resource_db#(bit)::set({“REG::”, env.reg_model.REG_NAME.get_full_name()}, “NO_REG_BIT_BASH_TEST”,1,this);
Is there any need to call get method ,because we called set above
It is unclear to me what you want to do.
Bur a few remarks:
(1) Never use the uvm_resource_db. Use instead uvm_config_db.
(2) a register value is not of type bit.
(3) It looks like you want to access a single register. The RAL provides you several commands to write to a register. You should use these commands.
Have a look at the UVM source file src/regs/sequences/uvm_reg_bit_bash_seq.svh
It uses the uvm_reg_single_bit_bash_seq that only allows excluding registers, not fields. You would have to make a copy of this sequence and add code for a specific field, then override with the factory.
BTW: The UVM register sequences explicitly say to use uvm_resource_db, not uvm_config_db. The exclude-flag is a bit, not a register.