Hi Team
In my UVM environment, test call a function to write 1 to register ABC[15] and requested value to register ABC[22:17] field of register ABC via backdoor.
I have written code like below…
function void change_linkwidth(int value,aux_value);
fork
begin
bit status;
path.ABC.ABC[15].set('1d);
path.ABC.ABC[22:17].set(value);
path.ABC.write(status, path.ABC.get);
end
join
endfunction
On the first call, the function executed successfully, and the test intention was achieved. However, on the second call, I encountered a UVM_WARNING
indicating that a race condition occurred. Could you kindly provide some guidance or suggest a possible workaround for this issue?
UVM_WARNING /server/cad/tools/synopsys/vcs/S-2021.09-SP2-1/etc/uvm-1.2/reg/uvm_reg_field.svh(1264) @ 363125.000ns: reporter [UVM/FLD/SET/BSY] Setting the value of field “ABC[15]” while containing register “ABC” is being accessed may result in loss of desired field value. A race condition between threads concurrently accessing the register model is the likely cause of the problem
I tried the same without fork join_none and also with task but both are not working.