Apart from physical observation, is there a way to know if my code will undergo a race condition?
For example, the following code has a race condition because both initial
blocks will start at 0 simulation time in the active region, which is non-deterministic in nature:
module tb;
reg a,b;
initial $display("a=%0d | b=%0d", a, b);
initial begin
a = 1;
b = 0;
a <= b;
b <= a;
end
endmodule
But upon executing the code, I get an output - a=x | b=x
, which doesn't indicate if it was a race condition.