Procedural Timing Control

LRM §9.7.

Procedural timing controls are used to schedule or delay procedural statements.

Syntax:

#delay | event_control | wait ( expression );

event_control = @name | @( [ edge ] expression [ or [ edge ] expression )
edge = posedge | negedge

Description:

Procedural timing controls can be used to delay or schedule a procedural statement. The delay and event control can be specified before the statement, or between the assignment notation (= or <=) and expression (see Procedural assignment).

The delay delays the execution of the statement for a specific amount of time. It may be a number, variable or expression.

The event delays the execution of the statement until there is a logical transition on one of the signals, or a declared event occurs (see Event). The edge of the logical transition can be specified with posedge or negedge.

The wait delays the execution of the statement until the expression becomes True. If the expression is False when the wait is reached, the following statement is executed when the expression becomes True. The following statement is not delayed, if the expression is True when the wait is reached.

Example:

#10 a = b;
@(negedge Reset or Enable) a = b;
wait (!Reset) #10 a = b;

See also:

Event, Procedural assignment, Sensitivity list