-- EE 552 - Project -- Dustin Demontigny -- February 11, 2003 -- bcd_decoder.vhd -- converts binary to 7 segment display library ieee; use ieee.std_logic_1164.all; -- digit values are assigned in package file use work.smart_eq_pack.all; entity bcd_decoder is port( binary_input : in std_logic_vector(bits-1 downto 0); segment_output : out std_logic_vector(led_segments-1 downto 0)); end bcd_decoder; architecture struct of bcd_decoder is begin -- select the digit that corresponds to the binary input with binary_input select segment_output <= digit_1 when "0000", digit_2 when "0001", digit_3 when "0010", digit_4 when "0011", digit_5 when "0100", digit_6 when "0101", digit_7 when "0110", digit_8 when "0111", digit_9 when "1000", digit_0 when "1001", digit_A when "1010", digit_b when "1011", digit_C when "1100", digit_d when "1101", digit_E when "1110", digit_F when "1111", digit_e when others; -- displays "e" for error end struct;