There are two kinds of concurrent statement which were not covered in previous chapters: concurrent assertions and concurrent procedure calls. A concurrent assertion statement is equivalent to a process containing only an assertion statement followed by a wait statement. The syntax is:
concurrent_assertion_statement ::= [ label : ] assertion_statement
The concurrent signal assertion:
L : assert condition report error_string severity severity_value;
is equivalent to the process:
L : process
begin
assert condition report
error_string severity severity_value;
wait [ sensitivity_clause ]
;
end process L;
The sensitivity clause includes all the signals which are referred to in the condition expression. If no signals are referenced, the process is activated once at simulation initialisation, checks the condition, and then suspends indefinitely.
The other concurrent statement, the concurrent procedure call, is equivalent to a process containing only a procedure call followed by a wait statement. The syntax is:
concurrent_procedure_call ::= [ label : ] procedure_call_statement
The procedure may not have any formal parameters of class variable, since it is not possible for a variable to be visible at any place where a concurrent statement may be used. The sensitivity list of the wait statement in the process includes all the signals which are actual parameters of mode in or inout in the procedure call. These are the only signals which can be read by the called procedure.
Concurrent procedure calls are useful for defining process behaviour that may be reused in several places or in different models. For example, suppose a package bit_vect_arith declares the procedure:
procedure add(signal a, b : in bit_vector; signal result : out bit_vector);
Then an example of a concurrent procedure call using this procedure is:
adder : bit_vect_arith.add (sample, old_accum, new_accum);
This would be equivalent to the process:
adder : process
begin
bit_vect_arith.add (sample, old_accum,
new_accum);
wait on sample, old_accum;
end process adder;