There are two actions that are used to synchronize temporal activities within e and between the Design under test and specman simulator.
Wait Action
The wait action suspends the execution of the current TCM until a given temporal expression succeeds. A TCM can't continue during the same cycle in which it reaches a wait. Even if the temporal execution succeeds in the current simulator callback, the TCM won't proceed. The TCM has to wait at least until the next simulator callback. Therefore, the wait action always requires at least one cycle of TCM's sampling event before execution continues.
Sync Action
The sync action suspends the execution of the current TCM until a given temporal expression succeeds. With a sync action, execution can continue in the same simulator callback.
Difference Between Wait And Sync
- Wait action will not proceed in the same callback in which it is encountered.
- Sync action may proceed in the same callback(if the condition is currently valid).