Time is only advanced when no more processes can be awakened by any event. If process "P" is awakened by its sensitivity list, it will execute in zero time and schedule signal assignments, and these assignments may awaken other processes. If at the next delta (which does not advance time) any process (including itself) affects P's sensitivity list, then P will be re-awakened. This happens as many times as necessary (or until the simulator gives up or the set maximum number of deltas have occurred).
In the particular example of your question with ABC = 101
, if you had:
process(A,B) begin
B <= not A;
C <= A xor B;
end process;
process(C) begin
end process;
When A
changes to 0
, BC
are scheduled with assignments of 10
. A delta passes, B
becomes 1
and re-awakens the process, which schedules C
back to 1
. At the end of this second delta the values are 011
, and there are no more events that could awaken the process, and when no other process can be awakened, time advances.
Consequently, process(A,B)
is awakened once when A
changes, and a second time when B
is changed. As a result, the "process awakening counter" counts twice.
In the case of process(C)
, it will also be awakened twice, because C
will "delta glitch" due to process(A,B)
.
However, if B
was implicit:
process(A) begin
C <= A xor (not A);
end process;
process(C) begin
end process;
Or if B
was a local variable:
process(A)
variable B : std_logic_vector;
begin
B := not A;
C <= A xor (not B);
end process;
process(C) begin
end process;
Then process(A) would only be awakened once, but process(C) would remain suspended.
Best Answer
The two processes as you have written them are almost equivalent. If you move the
wait
statement to the end of the second process, then they are exactly equivalent. The difference is whether or not the body of the process gets executed before the first change on any of the listed signals.IEEE Std 1076-2008 11.3 para 4 (in part):