VHDL Programming

(C. Jardin) #1

Predefined Attributes 151


For any block or architecture that does not contain any component
instantiation statements, attribute ’BEHAVIOR is true, and attribute
’STRUCTUREis false. For blocks or architectures that mix structure and
behavior, both attributes return false.

Function Kind Attributes


Function attributes return information to the designer about types,
arrays, and signals. When a function kind attribute is used in an expres-
sion, a function call occurs that uses the value of the input argument to
return a value. The value returned can be a position number of an enu-
merated value, an indication of whether a signal has changed this delta,
or one of the bounds of an array.
Function attributes can be subdivided into three general classifications:

Function type attributes, which return type values

Function array attributes, which return array bounds

Function signal attributes, which return signal history information

Function Type Attributes


Function type attributes return particular information about a type.
Given the position number of a value within a type, the value can be
returned. Also values to the left or right of an input value of a particular
type can be returned.
Function type attributes are one of the following:

’POS(value), which returns position number of value passed in

’VAL(value), which returns value from position number passed in

’SUCC(value), which returns next value in type after input value

’PRED(value), which returns previous value in type before input
value

’LEFTOF(value), which returns value immediately to the left of the
input value

’RIGHTOF(value), which returns value immediately to the right of
the input value
Free download pdf