Type

LRM §3, §4.1.

A set of values and a set of operations.

Syntax:

type type_name [ is data_type ]; 

Description:

All signals, variables, constants (i.e. objects) and expresssions have a type. The type defines the set of values that the object or expression can have. A type also determines the set of operations which can be performed on an object or expression.

There are four classes of types in VHDL:

Apart from predefined types (available through the packages Standard, Std_logic_1164 and Numeric_std), the user can define his own types. A user-defined type can be of any of the four classes mentioned above.

A value of one type cannot be assigned to an object of a different type. If a translation from one type to another is required, then type conversion must be applied.

Example:

type State is (TReset, TWait, THold, THalt);

Notes:

See also:

Numeric_Std, Package, Standard Package, Std_logic_1164, Subtype, Type conversion