VHDL Programming

(C. Jardin) #1
Statements enclosed in curly braces { }, as in lines 4 and 5, are
optional and repeatable constructs. An optional and repeatable construct
can either be left out or have one or more of the construct exist. The
ELSIFclause is an example of an optional and repeatable construct. The IF
statement can be constructed without an ELSIFclause, or have one or
more ELSIFclauses, depending on the desired behavior.
The last line of the IF_STATEMENTdescription contains the END IF
clause. This is a required clause because it is not optional [ ]and is not
optional and repeatable { }.
The IF statement contains two other constructs that need more
description: the SEQUENCE_OF_STATEMENTS and the CONDITION. The
SEQUENCE_OF_STATEMENTSconstruct is described by the BNF shown here:

sequence_of_statements ::=
{sequential_statement}

The SEQUENCE_OF_STATEMENTSconstruct is described by one or more
sequential statements, where a sequential statement is described in the
following:

sequential_statement ::=
wait_statement
| assertion_statement
| signal_assignment_statement
| variable_assignment_statement
| procedure_call_statement
| if_statement
| case_statement
| loop_statement
| next_statement
| exit_statement
| return_statement
| null_statement

The |character means OR, such that a sequential statement can be a
WAITstatement, or an ASSERTstatement, or a SIGNAL ASSIGNMENTstate-
ment, and so on. From this description, we can see that the statement part
of the IFstatement can contain one or more sequential statements, such
as WAITstatements,ASSERTstatements, and so on.
The CONDITIONconstruct is specified with the BNF description shown
here:

condition ::= boolean_expression

Notice that the keyword booleanis italic. The italic indicates the type
of the expression required for the CONDITION. If a designer looks for a

446 Appendix C: Reading VHDL BNF

Free download pdf