The problem was basically due to wrong hdl_path being used in the register level(reg.add_hdl_path). I assumed that the compiler will give a error if hdl path does not exist. Seems like it gives error only when there is a error in hdl slices(because I used to get "hdl path not found " errors). Thank you very much for your suggestions.
Sorry for appending my question to this thread, since it is related to above discussions.
I am pretty new in UVM and now I am exploring RAL.
I have few things needed to be clarified/confirmed. Thank you in advance for your kind answers…
add_hdl_path is the path to the register block in my DUT?
So if I have this DUT hierarchy : DUT->CORE->SUBBLOCK->REGBLOCK
Then my add_hdl_path usage should be below?
add_hdl_path_slice points to the actual declared register inside the REGBLOCK?
reg0.add_hdl_path_slice(“REG0”, 0, 8);
I have an auto-generated REGBLOCK, and there is no actual REG0 signal declared.
The register fields signals are the ones declared directly. How do I add
add_hdl_path_slice in this case?
P.S. I am trying the built-in sequence like uvm_reg_hw_reset_seq, and getting below:
RegModel : Register “reg_block.REG1*” value read from DUT (0x0000000000000000) does not match mirrored value (0x0000000000010103
This mismatch occur because my add_hdl_path_slice is not set correctly, right?