-- EE 552 (A1) -- Digital Self-regulating Humidifier -- lut2.vhd - lookup table -- -- Adrian Chan & Dan Kotylak -- 97/10/31 library ieee; use ieee.std_logic_1164.all; -- entity declaration entity lut2 is port( input : in std_logic_vector(6 downto 0); result : out std_logic_vector(6 downto 0) ); end lut2; architecture struct of lut2 is begin comb : process(input) begin case input is when "0111011" => -- 10 result <= "0001010"; when "0111101" => -- 20 result <= "0010100"; when "0111110" => -- 30 result <= "0011110"; when "1011011" => -- 40 result <= "0101000"; when "1011101" => -- 50 result <= "0110010"; when "1011110" => -- 60 result <= "0111100"; when "1101011" => -- 70 result <= "1000110"; when "1101101" => -- 80 result <= "1010000"; when "1101110" => -- 90 result <= "1011010"; when "1110101" => -- 0 result <= "0000000"; when others => result <= "1111111"; end case; end process comb; end struct;