Register Layer Modelling (R.A.L.) Read Data

hello Everyone…

I build a register Model, But having some warnings and errors.

Warning: uvm_reg.svh (1632) @ 31: reporter [RegModel] Register ‘block_obj.reg2’ is not contained within map ‘uvm_test_top.env_obj.agt_obj.seqr_obj.my_r_seq’ (called from read())

Error: uvm_reg.svh(2624) @ 31: reporter [my_register] No transactor available to physically access register on map ‘uvm_test_top.env_obj.agt_obj.seqr_obj.my_r_seq’

block_obj → My Register Model.
reg2 → My register.
my_r_seq → handle for my REG_Sequence.
seqr_obj → My Sequencer object handle.
agt_obj → My Agent object handle.
env_obj → My Environment object handle.
my_reg_map → My Reg Map extended from uvm_reg_map.
adpt_obj → My Reg Adapter object handle

I successfully wrote the data on reg2, using “block_obj.reg2.write(status,'h05);”
But getting warning and error when using READ method on reg2, using “block_obj.reg2.read(status, data, UVM_FRONTDOOR, this);”

In my Environment Connect Phase, i have made connection for sequencer as follows.
“block_obj.my_reg_map.set_sequencer(agt_obj.seqr_obj,agt_obj.adpt_obj);”

Any Suggestions or explanation for above error and warning ??

You need an adapter to translate the register model sequence_items to sequence_items your driver understands.

The code above will work fine with your driver if it understands the register model sequence_item.
However when you do a read you need the driver to populate the response sequence_item with the data that has been read. Here an adaptor would accept the reponse data and return it to the register model to update its own copy.

Have a look in the cookbook under adaptors.