8.1 Wait

...
ENTITY e IS
    ...
BEGIN
    ...
END e ;

...
ARCHITECTURE a OF e IS
    ...
BEGIN
    ...
END a ;

...
CONFIGURATION c
        OF e IS
    ...
    ...
    ...
END


...
PACKAGE pkg IS
    ...
    ...
    ...
END pkg ;


wait_statement ::=

    
[ label : ] wait [ sensitivity_clause ]
    [ condition_clause ]
    [ timeout_clause ] ;

..
PACKAGE BODY pck
        IS
    ...
    ...
    ...
END pck ;

...
b: BLOCK IS
    ...
BEGIN
    ...
END BLOCK b ;

FUNCTION f (...)
    RETURN r IS
    ...
BEGIN
    ...
END f ;

PROCEDURE p (...) IS
    ...
BEGIN
    ...
END p ;

p : PROCESS
    ...
BEGIN
    ...
END PROCESS p ;

8.1.1 Further definitions

label ::= identifier

sensitivity_clause ::=
    on sensitivity_list

condition_clause ::=
    until condition

timeout_clause ::=
    for time_ expression

8.1.2 Comments

The WAIT-statement must not be used within a function or procedure which itself is called within a function.

The WAIT-statement must not be called by a process which possesses a sensitivity list.

In general the WAIT-statement is ,sensitive" to all signals used within the statement, except a
sensitivity list is used (like in a WAIT ON-statement like in the last example).

In a postponed process the condition in a WAIT statement may already be false at the actual time (last delta cycle) when the process execution is resumed.

8.1.3 Examples

WAIT ;

The process is permanently interrupted.

WAIT FOR 5 ns ;

The process is interrupted for 5 ns.

WAIT ON sig_1, sig_2 ;

The process is interrupted until the value of one of the
two signals changes.

WAIT UNTIL clock = '1' ;

The process is interrupted until the value of clock is 1.


WAIT
UNTIL data = good FOR 25 ns ;

The process is interrupted until the value of
data = good or 25 ns have passed.


WAIT
ON sig_1, sig_2, sig_3
      UNTIL clock = '1' FOR 25 ns ;

Initially one waits for the signals sig_1, sig_2 and sig_3
to change; if clock is 1 the process is resumed otherwise
not; the process is suspended for at most 25ns.