A procedural statement following the delay control shall be delayed in its execution with respect to the procedural statement preceding the delay control by the specified delay. If the delay expression evaluates to an unknown or high-impedance value, it shall be interpreted as zero delay. If the delay expression evaluates to a negative value, it shall be interpreted as a 2 s complement unsigned integer of the same size as a time variable.
Specify parameters are permitted in the delay expression. They may be overridden by SDF annotation, in which case the expression is reevaluated.
EXAMPLE #10 rega = regb;
#d rega = regb; // d is defined as a parameter
#((d+e)/2) rega = regb;// delay is average of d and e
#regr regr = regr + 1; // delay is the value in regr
The execution of a procedural statement can be synchronized with a value change on a net or variable or the occurrence of a declared event. The value changes on nets and variable can be used as events to trigger the execution of a statement. This is known as detecting an implicit event. The event can also be based on the direction of the change that is, towards the value 1 ( posedge) or towards the value 0 (negedge).
-- A negedge shall be detected on the transition from 1 to x, z, or 0, and from x or z to 0
-- A posedge shall be detected on the transition from 0 to x, z, or 1, and from x or z to 1
EXAMPLE: @r rega = regb; // controlled by any value change in the reg r
@(posedge clock) rega = regb; // controlled by posedge on clock
forever @(negedge clock) rega = regb; // controlled by negative edge
A new data type, in addition to nets and variables, called event can be declared. An identifier declared as an event data type is called a named event. A named event can be triggered explicitly. It can be used in an event expression to control the execution of procedural statements in the same manner as event control . Named events can be made to occur from a procedure. This allows control over the enabling of multiple actions in other procedures. An event name shall be declared explicitly before it is used.