62 Chapter Three
WAIT ON Signal
We have already seen an example of the first type in the previous process
example. The WAIT ONsignal clause specifies a list of one or more signals
that the WAITstatement will wait for events upon. If any signal in the
signal list has an event occur on it, execution continues with the statement
following the WAITstatement. Here is an example:
WAIT ON a, b;
When an event occurs on either aor b, the process resumes with the
statement following the WAITstatement.
WAIT UNTIL Expression
The WAIT UNTIL boolean_expressionclause suspends execution of the
process until the expression returns a value of true. This statement effec-
tively creates an implicit sensitivity list of the signals used in the expres-
sion. When any of the signals in the expression have events occur upon
them, the expression is evaluated. The expression must return a boolean
type or the compiler complains. When the expression returns a true
value, execution continues with the statement following the WAITstate-
ment. Otherwise, the process continues to be suspended. For example:
WAIT UNTIL (( x * 10 ) < 100 );
In this example, as long as the value of signal xis greater than or equal
to 10, the WAITstatement suspends the process or subprogram. When the
value of xis less than 10, execution continues with the statement following
the WAITstatement.
WAIT FOR time_expression
The WAIT FOR time_expression clause suspends execution of the
process for the time specified by the time expression. After the time
specified in the time expression has elapsed, execution continues on the