Perform backdoor assign without disrupting current hdl paths

Hi all,

I have a scenario where I’m performing a backdoor write on some flops on the dut. I have a register with certain bits being used, linked to corresponding flops on the rtl.

For example : say you have a 32 bit uvm_reg a_test [31:0] and a_test[1] is linked to flop top.dut.a, a_test[3] is linked to top.dut.b and you want to perform the following operations on them.

assign a_test[4] = top.dut.b —step 1

backdoor write deposit top.dut.b = a_test[3] — step 2

How can that be done using uvm backdoor access support routines? (For a_test[3] I can add_hdl_path_slice to top.dut.b, but how can I perform the first step without directly using the hdl path? )
I am stressing on using uvm support routines because the code has to run on an emulator.

In reply to Vaishnavi Balasubramanian:

You could use the post write callback on the register. Basically anytime you invoke the write on a specific register, having set the cb, then you can say if your a_test[3] is written to 1 then predict 1 on the fourth and so on.

The callback will be added to the reg and linked using uvm_callbacks#(uvm_reg_field, your_cbs)::add(your_field_path, cbs);

Just remember your cbs will extend uvm_reg_cbs which is an object of course.

Regards