Slide 20 of 65
We show here how wait statements can be used to synchronize the execution of the process, and also how to sensitize a process to signal changes in another.
In this example, the process does not execute until TheirSignal changes value. The we schedule a transaction to ‘1’ on OurSignal and wait for 10 ns. Note, however, that since there is no AFTER clause in the assignment for OurSignal, it will assume its new value in one delta cycle.
After waiting 10 ns, DoSomething assigns a value of '0' to OurSignal; Again, OurSignal will actually take on the new value after one delta cycle. Execution of DoSomething is then suspended until TheirSignal becomes '1'. When execution resumes, OurSignal is set to '1' and the process immediately repeats from the top.