VHDL Programming

(C. Jardin) #1

Predefined Attributes 171


The ’REVERSE_RANGEattribute works similar to the ’RANGEattri-
bute,except that the range is returned in the reverse order. For a type
shown in the following, the ’RANGEattribute returns 0 TO 15, and the
’REVERSE_RANGEattribute returns 15 DOWNTO 0:

TYPE array16 IS ARRAY(0 TO 15) OF BIT;

VHDL attributes extend the language to provide some very useful func-
tionality. They make models much easier to read and maintain.

SUMMARY


In this chapter, we discussed the following:

The different kinds of attributes and how some just return values,
while others create new signals.

How ’LEFT,’RIGHT,’LENGTH,’HIGH, and ’LOWcan be used to get
the bounds of a type or array.

How ’POS,’VAL,’SUCC,’PRED,’LEFTOF, and ’RIGHTOFcan be used
to manipulate enumerated types.

How ’ACTIVE,’EVENT,’LAST_ACTIVE,’LAST_EVENT, and
’LAST_VALUEcan be used to return information about when events
occur.

How ’DELAYED,’STABLE,’QUIET, and ’TRANSACTIONcreate new
signals that return information about other signals.

How range attributes ’RANGEand ’REVERSE_RANGEcan be used to
control statements over the exact range of a type.

In the next chapter, we examine configurations, the method of binding
architectures to entities.
Free download pdf