Hi,
I’m trying to read (RAL) via BACKDOOR this RW register (40 bits width), after performing a FRONTDOOR write (the FRONTDOOR read works properly):
uvm_reg urm_reg[$];
uvm_reg_field urm_reg_field[$];
uvm_status_e dbg_status;
uvm_reg_data_t dbg_data;
urm_reg[0] = tb.bus_regmap.get_reg_by_name("urmf_cnt_init_inst");
urm_reg_field[0] = urm_reg[0].get_field_by_name("urmf_cnt_init");
urm_reg_field[0].write(dbg_status, 40'hFFFFFFFFFF);
urm_reg_field[0].read(dbg_status, dbg_data, UVM_BACKDOOR);
urm_reg_field[0].read(dbg_status, dbg_data, UVM_FRONTDOOR);
(I know that the register will be used instead of field for the backdoor access)
string urmr_cnt_init_path ="if_uc.int_cnt_init";
class urmr_cnt_init extends uvm_reg;
`uvm_object_utils(urmr_cnt_init )
rand uvm_reg_field urmf_cnt_init;
function new(string name = "urmr_cnt_init ");
super.new(name, 40, UVM_NO_COVERAGE);
endfunction
virtual function void build();
urmf_cnt_init= uvm_reg_field::type_id::create("urmf_cnt_init");
urmf_cnt_init.configure(this, 40, 0, "RW", 0, 'h0, 1, 1, 1);
add_hdl_path_slice(.name(urmr_cnt_init_path), .offset(0), .size(40));
endfunction
endclass
the regmap is created and the root path added with this line of code:
bus_reg_map = create_map("bus_reg_map", 'h00, 4, UVM_LITTLE_ENDIAN);
bus_reg_map .configure(.hdl_path("top.dut"));
so the access is 4-byte type.
the VHDL signal is defined in such a way:
signal int_cnt_init : std_logic_vector(39 downto 0) := (others => '0');
The value read is 40’hFFFF000000 (40’hFFFFFFFFFF was expected).
This is very tricky for me, any suggestion?