4.7 VHDL DATA TYPES
VHDL is a strongly typed language. This means that every object assumes the value of its nominated type. To put it very simply, the data type of the left-hand side (LHS) and right-hand side (RHS) of a VHDL statement must be the same. The VHDL 1076 specification describes four classes of data types.
- Scalar types represent a single numeric value or, in the case of enumerated types, an enumeration value. The standard types that fall into this class are integer, real (floating point), physical, and enumerated. All of these basic types can be thought of as numeric values.
- Composite types represent a collection of values. There are two classes of composite types: arrays containing elements of the same type, and records containing elements of different types.
- Access types provide references to objects in much the same way that pointer types are used to reference data in software programming languages.
- File types reference objects (typically disk files) that contain a sequence of values.
The most common data types are described below. The data types define the set of value(s) that an object may take. The name of the type of object must be declared before the object is used in any VHDL statement.
- Integer type. Integer numbers range from -2147483647 to 2147483647, as defined by the standard using a 32-bit representation. ...
Get Introduction to Digital Systems: Modeling, Synthesis, and Simulation Using VHDL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.