Enumeration Type |
LRM §3.1.1. |
The enumeration type is a type whose values are defined by listing all possible values explicitly. Each value is either a name or a character.
type new_name is ( type_element, type_element, ... );
The enumeration type is a type with an ordered set of values, called enumeration literals, and consisting of identifiers and character literals. The same value cannot appear twice in the same type, but may appear in two (or more) different enumeration types. This is called overloading.
All enumerated values are ordered and each of them has a numeric (integer) value assigned to it. This number indicates the position of the value in the list. The first value in the definition has position number zero and each subsequent has the number increased by one from its predecessor.
type FSM_States is (idle, start, stop, clear); type std_ulogic is ('U', 'X', '0', '1', 'Z', 'W', 'L', 'H', '-');