Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LIBRARY ieee;
- USE ieee.std_logic_1164.all;
- Entity SegDecoder is
- Port ( D : in std_logic_vector( 3 downto 0 );
- Y : out std_logic_vector( 6 downto 0 ) );
- end SegDecoder;
- Architecture Behavioral of SegDecoder is
- begin
- process(D)
- begin
- case D is
- when "0000" => Y <= "1000000";
- when "0001" => Y <= "1111001";
- when "0010" => Y <= "0100100";
- when "0011" => Y <= "0110000";
- when "0100" => Y <= "0011001";
- when "0101" => Y <= "0010010";
- when "0110" => Y <= "0000010";
- when "0111" => Y <= "1111000";
- when "1000" => Y <= "0000000";
- when "1001" => Y <= "0011000";
- when "1010" => Y <= "0001000";
- when "1011" => Y <= "0000011";
- when "1100" => Y <= "0100111";
- when "1101" => Y <= "0100001";
- when "1110" => Y <= "0000110";
- when "1111" => Y <= "0001110";
- end case;
- end process;
- end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement