O'Reilly logo

Introduction to Digital Systems: Modeling, Synthesis, and Simulation Using VHDL by Mohammed Ferdjallah

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

images

Figure 4.8 VHDL Code for the 2: 1 Multiplexer in Figure 4.7

  1. 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.
  2. 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.
  3. Access types provide references to objects in much the same way that pointer types are used to reference data in software programming languages.
  4. 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.

  1. Integer type. Integer numbers range from -2147483647 to 2147483647, as defined by the standard using a 32-bit representation. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required