I setup a RAL in my testbench and I created a sequence to try the backdoor access.
The sequence goes like this,
virtual task body();
super.body();
if(!tb_reg_block.reg_0.randomize()) begin
`uvm_fatal("RAND_FAILED", "Failed randomization of reg_0")
end
tb_reg_block.reg_0.update(status, .path(UVM_BACKDOOR), .parent(this));
data = tb_reg_block.reg_0.get();
$display("@%0t data = %0h", $time, data);
endtask : body
I noticed that the result of $display is giving a random value but when I check the content of the register in the DUT using a waveform viewer, its value is only stuck at 0.
Can you advise what’s wrong with what I’m doing? I’m trying to write a random 8-bit data to a register using backdoor access.
Regards,
Reuben