in my test bench I have a task like this:
task my_task_vif;
int a;
forever begin
@(vif.cb);
a = vif.cb.A;
end
endtask
in above case, I can read the value A of last cycle, which is what I want. However, if I use UVM RAL back door read method like this:
task my_task_uvm;
int a;
forever begin
@(vif.cb);
a = reg_model.reg.field_A.peek();
end
endtask
I can only get the A value of current cycle, how can I get previous cycle value of A using the UVM back door method?