The System Designer's Guide to VHDL-AMS: Analog, Mixed-Signal, and Mixed-Technology Modeling

VHDL-AMS provides comprehensive facilities for expressing the behavior and structure of a design. VHDL-AMS also provides the attribute mechanism for annotating a model with additional information. In this chapter, we review the predefined attributes and show how to define new attributes. We also look at the group mechanism, which allows us to describe additional relationships between various items in a model.
Throughout this book we have seen predefined attributes that are used to retrieve information about types, objects and other items within a model. In this section we summarize the previously introduced attributes and fully describe the remaining predefined attributes.
The first group of predefined attributes gives information about the values in a scalar type. These were introduced in Chapter 2 and are summarized in Figure 22-1.
| Attribute | Type of T | Result type | Result |
|---|---|---|---|
| T'left | any scalar type or subtype | same as T | leftmost value in T |
| T'right | " | " | rightmost value in T |
| T'low | " | " | least value in T |
| T'high | " | " | greatest value in T |
| T'ascending | " | boolean | true if T is an ascending range, false otherwise |
| T'image(x) | " | string | a textual representation of the value x of type T |
| T'value(s) | " | base type of T | value in T represented by the string s |
| T'pos(s) | any discrete or physical type or subtype | universal integer | position number of x in T |
| T'val(x) | " | base type of T | value at position x in T |
| T'succ(x) | " | " | value at position one... |