K
katelman@gmail.com
Guest
I was reading the following post on deepchip and it got me wondering
about something...
http://www.deepchip.com/items/0428-09.html
suppose I have the following:
initial begin
a = 1;
b = 1;
end
always @(a or b) begin
x = a + b;
y = a + b;
end
and that somehow a = b = 0 when simulation starts. By the reasoning of
the deepchip post, once the a = 1 update event happens, the always
block can execute its body and stop in the middle, so x = 1 + 0 = 1
and y is unassigned, then b = 1 can execute and since the always
block hasn't made it back to the @, it doesn't sense b to re-evaluate.
Therefore, when it resumes y = 1 + 1 = 2, but x does not get re-
evaluated and the end result is x = 1. Therefore, this
nondeterministically allows for x = 1 or x = 2 when simulation
finishes? correct? Thanks.
-Mike
about something...
http://www.deepchip.com/items/0428-09.html
suppose I have the following:
initial begin
a = 1;
b = 1;
end
always @(a or b) begin
x = a + b;
y = a + b;
end
and that somehow a = b = 0 when simulation starts. By the reasoning of
the deepchip post, once the a = 1 update event happens, the always
block can execute its body and stop in the middle, so x = 1 + 0 = 1
and y is unassigned, then b = 1 can execute and since the always
block hasn't made it back to the @, it doesn't sense b to re-evaluate.
Therefore, when it resumes y = 1 + 1 = 2, but x does not get re-
evaluated and the end result is x = 1. Therefore, this
nondeterministically allows for x = 1 or x = 2 when simulation
finishes? correct? Thanks.
-Mike