Keyword: ATTRIBUTE
An attribute specification describes a characteristic of a given object. An attribute is most often used to get additional information about an object. For example, an attribute may be used to find the width of an array or to determine if a signal is in transition (i.e., has an event occurring on it).
Examples
if Clk’event then...
...
W = Data’width;
An attribute can be a constant, function, range, signal, type, or value. User-defined attributes are always constants, no matter what type. The other five possibilities—function, range, signal, type, and value—are pre-defined attributes.
An attribute declaration is used to declare an attribute name and its type. It includes—in this order—the reserved word "attribute", the name of the attribute, and the attribute’s type.
Example
attribute enum_encoding: string;
An attribute specification assigns a value to the attribute. It includes—in this order—the reserved word "attribute", the attribute’s name, the reserved word "of", an item name (which can be an architecture, component, configuration, constant, entity, function, label, package, procedure, signal, subtype, type, or variable), the name class of the item (e.g., architecture, component, configuration, etc.), the reserved word "is", and an expression.
Example
attribute enum_encoding of StateReg is
"0001 0011 0010 0110 0100 1100 1000";
An attribute name must be declared in an attribute declaration before it can be used in an attribute specification.
LRM
4.4, 5.1, 6.6
See also