Compiler throws the following error when it encounters an enum value outside of a switch statement
enum.vhd:18: error: Signal/variable one not found in this context.
enum.vhd:18: error: Signal/variable one not found in this context.
library ieee; use ieee.std_logic_1164.all; entity e is port ( clk : in std_logic; rst : in std_logic; q : out std_logic); end e; architecture a of e is type t is (one, zero); signal r : t; begin q <= '1' when r = one else '0'; process(clk) begin if rising_edge(clk) then if rst = '1' then r <= zero; else case r is when zero => r <= one; when others => r <= zero; end case; end if; end if; end process; end a;
The underlying cause here is that the function ExpName::probe_type does not search for enumeration names. I think the correct place to fix this would be in the function ScopeBase::find_constant, but I'm not sufficiently familiar with VHDL (in particular, name resolution precedence) to do this myself.
This appears to be fixed now in the master branch
A test for this problem has been added to the test suite.