Advertisement
Guest User

Untitled

a guest
Jun 18th, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. LIBRARY ieee;
  2. USE ieee.std_logic_1164.all;
  3. Entity SegDecoder is
  4. Port ( D : in std_logic_vector( 3 downto 0 );
  5. Y : out std_logic_vector( 6 downto 0 ) );
  6. end SegDecoder;
  7. Architecture Behavioral of SegDecoder is
  8.  
  9. begin
  10. process(D)
  11. begin
  12. case D is
  13. when "0000" => Y <= "1000000";
  14. when "0001" => Y <= "1111001";
  15. when "0010" => Y <= "0100100";
  16. when "0011" => Y <= "0110000";
  17. when "0100" => Y <= "0011001";
  18. when "0101" => Y <= "0010010";
  19. when "0110" => Y <= "0000010";
  20. when "0111" => Y <= "1111000";
  21. when "1000" => Y <= "0000000";
  22. when "1001" => Y <= "0011000";
  23. when "1010" => Y <= "0001000";
  24. when "1011" => Y <= "0000011";
  25. when "1100" => Y <= "0100111";
  26. when "1101" => Y <= "0100001";
  27. when "1110" => Y <= "0000110";
  28. when "1111" => Y <= "0001110";
  29.  
  30. end case;
  31. end process;
  32. end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement