-- EE 552 (A1) -- Digital Self-regulating Humidifier -- lut1.vhd - lookup table -- -- Adrian Chan & Dan Kotylak -- 97/10/31 library ieee; use ieee.std_logic_1164.all; -- entity declaration entity lut1 is port( input : in std_logic_vector(6 downto 0); result : out std_logic_vector(3 downto 0) ); end lut1; architecture struct of lut1 is begin comb : process(input) begin case input is when "0111011" => -- 1 result <= "0001"; when "0111101" => -- 2 result <= "0010"; when "0111110" => -- 3 result <= "0011"; when "1011011" => -- 4 result <= "0100"; when "1011101" => -- 5 result <= "0101"; when "1011110" => -- 6 result <= "0110"; when "1101011" => -- 7 result <= "0111"; when "1101101" => -- 8 result <= "1000"; when "1101110" => -- 9 result <= "1001"; when "1110101" => -- 0 result <= "0000"; when others => result <= "1111"; end case; end process comb; end struct;