Advertisement
leonardo_aly7

7segment

Mar 11th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.74 KB | None | 0 0
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3. use IEEE.STD_LOGIC_ARITH.ALL;
  4. use IEEE.STD_LOGIC_UNSIGNED.ALL;
  5.  
  6. entity Segment7 is
  7.     port (
  8.     input : in STD_LOGIC_VECTOR ( 3 downto 0);
  9.     output : out STD_LOGIC_VECTOR (6 downto 0));
  10.     end Segment7;
  11.  
  12. architecture Behavioral of Segment7 is
  13.  
  14. begin
  15. with input select
  16. output <= "0000001" when "0000",
  17. "1001111" when "0001",
  18. "0010010" when "0010",
  19. "0000110" when "0011",
  20. "1001100" when "0100",
  21. "0100100" when "0101",
  22. "0100000" when "0110",
  23. "0001111" when "0111",
  24. "0000000" when "1000",
  25. "0000100" when "1001",
  26. "0000010" when "1010",
  27. "1100000" when "1011",
  28. "0110001" when "1100",
  29. "1000010" when "1101",
  30. "0010000" when "1110",
  31. "0111000" when "1111",
  32. "1111111" when others;
  33. end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement