IEEE
LANGUAGE REFERENCE MANUAL
Std
P
1076a
199
9
2000/D3
Clause 7
99
Copyright © 2000, IEEE.
All rights reserved.
This is an unapproved IEEE Standards Draft, subject to change.
Clause 7
Expressions
The rules applicable to the different forms of expression, and to their evaluation, are given in this section
clause
1
.
7.1
Expressions
An expression is a formula that defines the computation of a value.
expression ::=
relation {
and
relation }
 relation {
or
relation }
 relation {
xor
relation }
 relation [
nand
relation ]
 relation [
nor
relation ]
 relation {
xnor
relation }
relation ::=
shift_expression [ relational_operator shift_expression ]
shift_expression ::=
simple_expression [ shift_operator simple_expression ]
simple_expression ::=
[ sign ] term { adding_operator term }
term ::=
factor { multiplying_operator factor }
factor ::=
primary [ ** primary ]

abs
primary

not
primary
primary ::=
name
 literal
 aggregate
 function_call
 qualified_expression
 type_conversion
 allocator
 ( expression )
1.
To conform to IEEE rules.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
IEEE
Std
P
1076a
1999
2000/D3
IEEE STANDARD VHDL
100
Clause 7
Copyright © 2000, IEEE.
All rights reserved.
This is an unapproved IEEE Standards Draft, subject to change.
Each primary has a value and a type.
The only names allowed as primaries are attributes that yield values and
names denoting objects or values.
In the case of names denoting objects other than objects of file types or pro
tected types
2
, the value of the primary is the value of the object.
In the case of names denoting either file objects
or objects of protected types, the value of the primary is the entity denoted by the name.
3
The type of an expression depends only upon the types of its operands and on the operators applied; for an over
loaded operand or operator, the determination of the operand type, or the identification of the overloaded operator,
depends on the context (see 10.5).
For each predefined operator, the operand and result types are given in the
following clause.
NOTE
—
The syntax for an expression involving logical operators allows a sequence of
and
,
or
,
xor
, or
xnor
operators (whether
predefined or userdefined), since the corresponding predefined operations are associative.
For the operators
nand
and
nor
(whether predefined or userdefined), however, such a sequence is not allowed, since the corresponding predefined opera
tions are not associative.
7.2
Operators
The operators that may be used in expressions are defined below.
Each operator belongs to a class of operators,
all of which have the same precedence level; the classes of operators are listed in order of increasing precedence.
logical_operator
::=
and

or

nand

nor

xor

xnor
relational_operator
::=
=

/=

<

<=

>

>=
shift_operator
::=
sll

srl

sla

sra

rol

ror
adding_operator
::=
+

–

&
sign
::=
+

–
multiplying_operator
::=
*

/

mod

rem
miscellaneous_operator
::=
**

abs

not
Operators of higher precedence are associated with their operands before operators of lower precedence.
Where
the language allows a sequence of operators, operators with the same precedence level are associated with their
operands in textual order, from left to right.
The precedence of an operator is fixed and may not
cannot
4
be
changed by the user, but parentheses can be used to control the association of operators and operands.
This is the end of the preview.
Sign up
to
access the rest of the document.
 Fall '01
 Saab
 IEEE Standards Draft, IEEE Std P1076a1999 2000/D3

Click to edit the document details