Each type info class for a VHDL enumeration type is derived from
enum_info_base
. The different enumeration values are
represented by integers. The values assigned to the different elements
of an enumeration type are assigned as follows:
Example:
For a enumeration type myenum
defined as follows
TYPE myenum is (blue, red, green, yellow);
blue
is assigned 0, red
is assigned 1, green
is
assigned 2 and yellow
is assigned 3. If a enumeration subtype
is derived from myenum
SUBTYPE derived_myenum is red TO green;then
red
is assigned 1 and green
is assigned 2 for type
derived_myenum
.