Attributes
Attributes provide information about certain items in VHDL
- E.g. types, subtypes, procedures, functions, signals, variables, constants, entities, architectures, configurations, packages, components
General form of attribute use :
VHDL has several predefined, e.g :
- X'EVENT -- TRUE when there is an event on signal X
- X'LAST_VALUE -- returns the previous value of signal X
- Y'HIGH -- returns the highest value in the range of Y
- X'STABLE(t) -- TRUE when no event has occurred on signal X in the past ‘t’ time
name'attribute_identifier -- read as “tick”
Notes:
Attributes may be used to communicate information about many different items in VHDL. Similarly, attributes can return various types of information. For example, an attribute can be used to determine the depth of an array, its range, its leftmost index, etc. Additionally, the user may define new attributes to cover specific situations. This capability allows user-defined constructs and data types to use attributes. An example of the use of attributes is in assigning information to a VHDL construct, such as board location, revision number, etc.
A few examples of predefined VHDL attributes are shown above. Note that, by convention, the apostrophe marking the use of an attribute is pronounced tick (e.g. 'EVENT is pronounced "tick EVENT").