Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3.  
  4. entity sevenSegmentDecoder is
  5. port(
  6. c: in bit_vector (3 downto 0);
  7. d: out bit_vector (6 downto 0));
  8. end sevenSegmentDecoder;
  9.  
  10. architecture sevenSegmentDecoder_arch of sevenSegmentDecoder is
  11. begin
  12. with c select
  13. d <= "1000000" when "0000",
  14. "1111001" when "0001",
  15. "0100100" when "0010",
  16. "0110000" when "0011",
  17. "0011001" when "0100",
  18. "0010010" when "0101",
  19. "0000010" when "0110",
  20. "1111000" when "0111",
  21. "0000000" when "1000",
  22. "0010000" when "1001",
  23. "0001000" when "1010",
  24. "0000011" when "1011",
  25. "1000110" when "1100",
  26. "0100001" when "1101",
  27. "0000110" when "1110",
  28. "0001110" when "1111";
  29. end sevenSegmentDecoder_arch;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement