Event |
LRM §9.7. |
Event can be used for synchronizing concurrent activities within a module.
event event_name, ...; // event declaration -> event_name; // trigger the event
Events can be used to describe communication and synchronization in behavioural models. Events have no value or delay; they are simply triggered by event trigger statements, and tested in edge sensitive timing controls.
The power of the event is that it can represent any general happening. For example, it can represent a positive edge of a clock signal, or it can represent a microprocessor transferring data down a serial communications channel.
A declared event is made to occur by the activation of an event triggering statement.
event EventName; // event declaration initial begin #50; -> EventName; // example of event triggering end always @EventName // example of waiting for an event Q <= 0;