Consider the following DUT code :
module DUT ( dut_intf intf );
logic [2:0] cntr ;
always @( posedge intf.clk , negedge intf.rst_n )
begin
if( ! intf.rst_n ) cntr <= 0 ;
else cntr <= cntr + 1 ;
end
assign intf.incr = cntr ; // Updated in Active Region via loopback from NBA to Active Region .
endmodule
Then within a Monitor Component :
@( posedge vif_intf.clk ); // Unblocks in Active Region
sampled_value = vif_intf.incr ; // Will updated value be sampled ?
My question is whether a race condition exists while sampling ?
The value of incr is updated in re-entrant Active Region whereas in the Monitor Component there is no re-entrant active region