Hi, Dear All,
Recently I ran into a problem when I used uvm_reg_predictor, the issue is that first we connect our JTAG monitor with a JTAG register predictor as following :
reg2jtag_predictor.map = regmodel.default_map;
reg2jtag_predictor.adapter = reg2jtag;
reg_env.jtag.monitor.item_collected.connect(reg2jtag_predictor.bus_in);
To catch the register change in time, we connect the jtag.monitor.item_collected.connect() to another component as well, which was intentionly used to monitor the register updates simultaneously.
reg_env.jtag.monitor.item_collected.connect(reg_state.jtag_reg_imp);
......
function void write_jtag_reg(register_op op);
uvm_reg reg;
bit [1:0] config;
`get_reg_by_addr(reg, op.addr);
config = reg.get_mirrored_value();
endfunction
We monitored the config variable to determine if our checker should be enabled in time, however we found that there is probably race condition happening. uvm_reg_predictor didn’t update the mirrored value before we want to use it, it always return old value from previous register operation.
Can some one tell me why this happened ? What determined the execution order when we connect one port to multiple implementations (exports) ? Any suggestions to solve this issue ?
Thanks,
WangYang