Type attribute color'left will give "R". And color'low will also give "R". In such a case will 'left and 'low ever produce different result? If no, then what's the use of these two different attributes for enum type?
But it says that the numeric values associated are always in ascending range - 0 to N. So, 'Left and 'Low will still result in the same value. Maybe I am missing something.
Yes they do. You are missing nothing. The attributes are not specifically made for enums, they exist as general feature for vectors and other aggregates. It's your choice if you consider positional or numerical order for enums more intuitive.
The reason for getting the reported attribute values can be understood by reviewing the VHDL LRM, specifically
5.2.2 Enumeration types
5.2.2.1 General
You see that enumerations have an implicite order.
If no, then what's the use of these two different attributes for enum type?
Thanks much for the pointer to LRM. There is only one paragraph in LRM that talks about encoded values of the enumeration literals. But it says that the numeric values associated are always in ascending range - 0 to N. So, 'Left and 'Low will still result in the same value. Maybe I am missing something. Thanks in advance.
LRM:
Each enumeration literal yields a different enumeration value. The predefined order relations between
enumeration values follow the order of corresponding position numbers. The position number of the value
of the first listed enumeration literal is zero; the position number for each additional enumeration literal is
one more than that of its predecessor in the list.
But it says that the numeric values associated are always in ascending range - 0 to N. So, 'Left and 'Low will still result in the same value. Maybe I am missing something.
Yes they do. You are missing nothing. The attributes are not specifically made for enums, they exist as general feature for vectors and other aggregates. It's your choice if you consider positional or numerical order for enums more intuitive.