Forum Discussion
Altera_Forum
Honored Contributor
14 years agoIe, consider Dave's suggestion
architecture arch of foo is function my_func(x : integer) return std_logic_vector is begin case x is when 0 => return b"0010"; when 1 => return b"0101"; when others => return b"0101"; end case; end my_func; signal val : std_logic_vector ( 3 downto 0 ); begin val <= my_func(gen_var); end arch;