I was reading about event driven simulation. Such simulations proceed after we have an 'event' which is the change in any signal value at the input of any design being simulated. The list of all the changed signals is added to what is called an 'event queue'. An 'event driver' then figures out what gates have these signals (inside the event queue) as input which in turn is passed to a 'gate driver'which calculates the output of the gates and stores the output in the new event queue. This constitutes one time step at the end of which signals in the event queue are assigned to the respective nets.
(For further details:http://cs.baylor.edu/~maurer/aida/desauto/chapter3.pdf)
Thus, I inferred that the signal assignments to the nets are always done at the end of each time step.
always @ (a or b or c)
begin
x = a | b;
y = a ^ b ^ c;
z = b & ~c;
end
Since in blocking assignments evaluation and assignments are immediate. Does this mean that say if a
changes then each assignment will take place in one time step and hence the whole series of assignments, of x
, y
and z
, takes three time steps?
Further, since it is an event driven simulation. If only c
changes, the assignment of x
will not take place, since there is no c
in the inputs, and the assignments will take two time steps?
EDIT
Based on the answer below I agree that the assignments will be happening in a single time step. But consider the circuit below:
In the document I mentioned it is said that the assignments at C and Q will take place in two time steps. But suppose I code the circuit as follows:
always @ (A or B)
begin
C=~B;
Q=A&C;
end
Shouldn't the assignments at C and Q take place in a single time step?