graphene
Full Member level 2
This is a very basic question in VHDL. I am askign this after unable to find a clear answer in various internet pages.
In VHDL, we use the ENUMERATION type. Normally a type is defined even for a signal, however, here for enumerated type it just goes like
so the object type like std_logic, or bit or similar thing is not specified to this enemurated type COLOR. Can I use one of its component lets say Blue for a bit, green for a signed bit vector, etc?
Can somone explain the logic behing this?
Thanks in advance.
In VHDL, we use the ENUMERATION type. Normally a type is defined even for a signal, however, here for enumerated type it just goes like
HTML:
type COLOR is (BLUE, GREEN, YELLOW, RED);
variable HUE: COLOR;
type my_type is (ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8);
signal pres, nex: my_type;
so the object type like std_logic, or bit or similar thing is not specified to this enemurated type COLOR. Can I use one of its component lets say Blue for a bit, green for a signed bit vector, etc?
Can somone explain the logic behing this?
Thanks in advance.