Contents Up << >>
Attributes
Attributes represent attributes of objects. The syntax for using an attribute
is
The following is a description of the predefined attributes:
- base
- The base attribute designates the base type of its prefix. The
prefix must be a type or subtype name. This attribute is only allowed as
the prefix of another attribute. For example, natural'base'low.
- left
- The left attribute designates the left-most bound of its
prefix. The prefix may be any scalar type or subtype.
- right
- The right attribute designates the right-most bound of its
prefix. The prefix may be any scalar type or subtype.
- high
- The high attribute designates the upper bound of its
prefix. The prefix may be any scalar type or subtype.
- low
- The low attribute designates the lower bound of its
prefix. The prefix may be any scalar type or subtype.
- ascending
- The ascending attribute designates the direction of its
prefix. The prefix must be a scalar type or subtype.
- image(X)
- The image attribute designates a string representation of
the parameter X. The prefix must be the scalar type or subtype of X.
- value(X)
- The value attribute designates the corresponding value of
the represented by the string parameter X. The prefix must be the scalar
type or subtype of the value represented by X.
- pos(X)
- This attribute returns the position number of its parameter
X. Its prefix must be a discrete or physical type or subtype.
- val(X)
- This attribute returns the value at the position, in the type,
given by its parameter X. Its prefix must be a discrete or physical type or
subtype.
- succ(X)
- This returns the value whose position number is one more than
its parameter X. Its prefix must be a discrete or physical type or subtype.
- pred(X)
- This returns the value whose position number is one less than
its parameter X. Its prefix must be a discrete or physical type or subtype.
- leftof(X)
- This returns the value that is left of its parameter X in the
type given by the prefix. Its prefix must be a discrete or physical type or
subtype.
- rightof(X)
- This returns the value that is right of its parameter X in the
type given by the prefix. Its prefix must be a discrete or physical type or
subtype.
- left [(X)]
- The left attribute returns the left bound of
the Nth dimension of its prefix. If the option argument is given, then N is
X; otherwise, N is 1. The prefix must be an array object or constrained array
type.
- right [(X)]
- The right attribute returns the right bound of
the Nth dimension of its prefix. If the option argument is given, then N is
X; otherwise, N is 1. The prefix must be an array object or constrained array
type.
- high [(X)]
- The high attribute returns the upper bound of
the Nth dimension of its prefix. If the option argument is given, then N is
X; otherwise, N is 1. The prefix must be an array object or constrained array
type.
- low [(X)]
- The low attribute returns the lower bound of
the Nth dimension of its prefix. If the option argument is given, then N is
X; otherwise, N is 1. The prefix must be an array object or constrained array
type.
- range [(X)]
- This attribute designates the range of
the Nth dimension of its prefix. If the option argument is given, then N is
X; otherwise, N is 1. The prefix must be an array object or constrained array
type.
- reverse_range [(X)]
- This attribute designates the reverse of the
range of
the Nth dimension of its prefix. If the optional argument is given, then N is
X; otherwise, N is 1. The prefix must be an array object or constrained array
type.
- length [(X)]
- This attribute returns the length of
the Nth dimension of its prefix. If the optional argument is given, then N is
X; otherwise, N is 1. The prefix must be an array object or constrained array
type.
- ascending [(X)]
- The ascending attribute designates the direction of
the Nth dimension of its prefix. If the optional argument is given, then N is
X; otherwise, N is 1. The prefix must be an array object or constrained array
type.
- delayed [(T)]
- The delayed attribute creates a signal whose value
is the value of its prefix delayed by T time units. The prefix must be
a signal. If the optional value for T does not appear, then T is
0 fs.
- stable [(T)]
- The stable attribute creates a signal whose value is
true when an event has not occurred on the prefix signal in T units of time.
The prefix must be a signal. If the optional value for T does not appear,
then T is 0 fs.
- quiet [(T)]
- The quiet attribute creates a signal whose value is
true when the signal prefix has been quiet for T units of time.
The prefix must be a signal. If the optional value for T does not appear, then
T is 0 fs.
- transaction
- This attribute creates a boolean signal whose value
toggles every time there is a transaction on its signal prefix.
The prefix must be a signal.
- event
- The event attribute returns true if an event has occurred on
its signal prefix during the current simulation cycle. The prefix must
denote a signal.
- active
- The event attribute returns true if a transaction has occurred on
its signal prefix during the current simulation cycle. The prefix must
denote a signal.
- last_event
- This attribute returns the time that has elapsed since the
last event occurred on its signal prefix. The prefix must denote a signal.
- last_active
- This attribute returns the time that has elapsed since the
last transaction occurred on its signal prefix. The prefix must denote a
signal.
- last_value
- This attribute returns the value its signal prefix had
prior to the last event. The prefix must denote a signal.
- driving
- The driving attribute returns TRUE, if the driver of the
signal designated by its prefix is not NULL. This attribute may only be
used in a process and its prefix must denote a resolved signal. The attribute
returns the status of the driver of the enclosing process.
- driving_value
- This attribute returns the value of the driver of the
signal designated by its prefix. This attribute may only be
used in a process and its prefix must denote a resolved signal. The attribute
returns the status of the driver of the enclosing process.
- simple_name
- This attribute returns a string of the simple name denoted
by its prefix. The prefix can be any named object.
- behavior
- Designates true if the prefix does not contain a component
instantiation statement. The prefix must be an architecture or block name.
- structure
- Designates true if the prefix contains only component
instantiation statements. The prefix must be an architecture or block name.
The users may also declare attributes with the attribute declaration
and specification. They follow the rules:
The attribute declaration creates the attribute with the specified name.
Attribute specifications indicate the values that the attribute has
for various prefixes. Each specification indicates the value of
that attribute for the prefixes listed in the entity specification.
The value is given by the expression part. If the entity specification
contains a name list, then the named entities will have the
specified attribute with the specified value. The list of names must denote
objects of the entity class specified.
If the entity specification
contains the reserved word OTHERS, then all the entities of the specified
class that do not appear in another attribute specification will have
the specified attribute with the specified value. If the entity specification
contains the reserved word ALL, then all the entities of the specified
class will have the specified attribute with the specified value.