I really want to understand how it works...
So - what is the process equivalent of:
Code:
y <= x , '1' after 100 us ;
?
The process of equivalent of...
Code:
y <= x, '1' after 100 us;
is this...
Code:
process(x)
begin
y <= x, '1' after 100 us;
end process;
The line of code 'y <= x, '1' after 100 us;' will be executed each time there is an event on x, whatever that event might be. At that time, the simulator will do three things:
- Remove any events that that might currently be scheduled for 'y'
- Schedule 'y' to be updated at the next simulation delta to the current value of 'x'
- Schedule 'y' to be updated 100 us in the future to the value of '1'
If there is a subsequent event on 'x' somewhere before the 100 us comes up, the code simply gets executed again.
The original code that TrickyDicky posted that contained the wait statement is not equivalent because it would miss any event on 'x' that occurs within 100 us of the previous event on x. The subsequent post that he had (same as mine) is equivalent. Both of those processes and the single concurrent statement complete in one simulation delta of time.
In post #4 in this thread from TrickyDicky the portion of the statement "unless there is a time statement" is not correct ("single line assignments are always an implied process, with a sensitivity list made up from the signals on the RHS,
unless there is a time statement".
Kevin Jennings