eruisi
Member level 4
In IEEE standard 1364, it says the following code
could either display p as a "1" or "0". I can't understand why.
#1 q = 0 is a blocking assignment, the display should be executed after #1 q=0 is finished at time 1, right? I run the simulation in vcs and got 0 but in ncverilog got 1.
Could you tell me how this happens.
Thanks a lot!
Code:
module test;
wire p;
reg q;
assign p = q;
initial begin
q = 1;
#1 q = 0;
$display("At time: %t, the value is %f\n", $realtime, p);
end
endmodule
could either display p as a "1" or "0". I can't understand why.
#1 q = 0 is a blocking assignment, the display should be executed after #1 q=0 is finished at time 1, right? I run the simulation in vcs and got 0 but in ncverilog got 1.
Could you tell me how this happens.
Thanks a lot!