Mix and Match-- Notes Page -- |
We show here how wait statements can be used to synchronize the
execution of processes, and also how to sensitize a process to
signal changes in another process.
In this example, the DoSomething process does not execute until
AnotherSignal changes value. Then we generate a transaction for
ThisSignal by assigning it a value of '1 and wait for 10 ns.
Since the delay time for ThisSignal <= '1' is only one delta
cycle, ThisSignal is updated to have the value '1' on the next
delta cycle.
After waiting 10 ns, DoSomething assigns a value of '0' to
ThisSignal; ThisSignal will actually take on the new
value after one delta cycle. Execution of DoSomething is then
suspended until AnotherSignal becomes '1'. When execution
resumes, ThisSignal is set to '1' and the process immediately
repeats from the top.