VHDL User said:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Is this a simulator dependent phenomenon or is it specified in the VHDL
language reference ?? While what you say is consistent with Verilog always
construct, it doesnt somehow fit in with the functioning of wait
statement.
When in the execution of a process, simulator encounters a wait, it
waits until the wait condition is satisfied. The release from wait
generates a event causing scheduling of the process to be executed at the
next free delta cycle.So,after completing the process, the scheduled event
is executed,i.e, the process is executed again. This is what happens in
your example of Clock generation.
However,if there is no wait statement, then WHY should there be a
process (re)execution event scheduled for the future ?
Thanks a lot for your reply.
Bye.
<snip>
In VHDL processes always execute in a loop continuously, unless there
is a means of suspending them. Your idea that the resumption of the
process after a wait generates an event is not correct. All processes
"want" to execute all the time unless they are suspended.
Your statement "at the next free delta cycle" is also not quite right.
The basic operation of the scheduler is
1. processes run until they suspend (the evaluate phase)
During evaluation, assignments to signals are made.
2. when *all* processes have suspended in the design, the
simulator updates any signals that may have been assigned
(the update phase)
3. Updating the signals may cause events that trigger processes
to run again without time advancing - if so go back to step 1
4. advance time
5. advancing time may result in timeouts occuring (e.g. wait for 10
ns
resumes)
or signals changing value (e.g. s <= '0', '1' after 10 ns
If so
mark those processes as "need to run" and go back to step 1
6. if no events are scheduled and no timeouts are pending,
simulation ends
The loop from 1 to 3 is the delta cycle.
This a simplified description of the scheduler - see the LRM for the
full
details.
The basic point (compared to your original post) is that all processes
must
suspend before time can advance (either "real" time or a delta cycle
step).
So if a process has no wait statements and no sensitivity list, the
simulator
cannot advance and will get stuck in a loop.
This behaviour is described in the LRM.
regards
Alan
--
Alan Fitch
Consultant
DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * Perl * Tcl/Tk * Verification * Project
Services
Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24
1AW, UK
Tel: +44 (0)1425 471223 mail:
(e-mail address removed)
Fax: +44 (0)1425 471573 Web:
http://www.doulos.com
The contents of this message may contain personal views which are not
the
views of Doulos Ltd., unless specifically stated.