VHDL: Does VHDL allow enum to be passed to generic?
Yes, yes, yes and yes :).

See for example our PoC.io.uart.fifo module:

entity uart_fifo is
  generic (
    -- Communication Parameters
    CLOCK_FREQ              : FREQ;
    BAUDRATE                : BAUD;
    ADD_INPUT_SYNCHRONIZERS : BOOLEAN    := TRUE;

    -- Buffer Dimensioning
    TX_MIN_DEPTH            : positive   := 16;
    TX_ESTATE_BITS          : natural    :=  0;
    RX_MIN_DEPTH            : positive   := 16;
    RX_FSTATE_BITS          : natural    :=  0;

    -- Flow Control
    FLOWCONTROL             : T_IO_UART_FLOWCONTROL_KIND   := UART_FLOWCONTROL_NONE;
    SWFC_XON_CHAR           : std_logic_vector(7 downto 0) := x"11";    -- ^Q
    SWFC_XON_TRIGGER        : real                         := 0.0625;
    SWFC_XOFF_CHAR          : std_logic_vector(7 downto 0) := x"13";    -- ^S
    SWFC_XOFF_TRIGGER       : real                         := 0.75
  );
  port (
    -- ...
  );


This module wraps a transmitter and receiver plus bit-clock generator in a single module and attaches two FIFOs. The module makes extensive use of generics in form of:


standard types (BOOLEAN, POSITIVE, ...),
physical types (FREQ, BAUD) and an
enum (T_IO_UART_FLOWCONTROL_KIND).


The latter one is defined in the package PoC.uart, which is referenced by a use clause. The top-level module, that instantiates uart_fifo, needs also to reference this package.

package uart is
  type T_IO_UART_FLOWCONTROL_KIND is (
    UART_FLOWCONTROL_NONE,
    UART_FLOWCONTROL_XON_XOFF,
    UART_FLOWCONTROL_RTS_CTS,
    UART_FLOWCONTROL_RTR_CTS
  );

  constant C_IO_UART_TYPICAL_BAUDRATES : T_BAUDVEC := (
     0 =&gt;    300 Bd,  1 =&gt;    600 Bd,  2 =&gt;   1200 Bd,  3 =&gt;   1800 Bd,  4 =&gt;   2400 Bd,
     5 =&gt;   4000 Bd,  6 =&gt;   4800 Bd,  7 =&gt;   7200 Bd,  8 =&gt;   9600 Bd,  9 =&gt;  14400 Bd,
    10 =&gt;  16000 Bd, 11 =&gt;  19200 Bd, 12 =&gt;  28800 Bd, 13 =&gt;  38400 BD, 14 =&gt;  51200 Bd,
    15 =&gt;  56000 Bd, 16 =&gt;  57600 Bd, 17 =&gt;  64000 Bd, 18 =&gt;  76800 Bd, 19 =&gt; 115200 Bd,
    20 =&gt; 128000 Bd, 21 =&gt; 153600 Bd, 22 =&gt; 230400 Bd, 23 =&gt; 250000 Bd, 24 =&gt; 256000 Bd,
    25 =&gt; 460800 Bd, 26 =&gt; 500000 Bd, 27 =&gt; 576000 Bd, 28 =&gt; 921600 Bd
  );

  function io_UART_IsTypicalBaudRate(br : BAUD) return BOOLEAN;
  -- ...
end package;