Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3.  
  4. entity TestTimesTen is
  5. port(
  6. SW:in std_logic_vector(5 downto 0);
  7. HEX3,HEX2,HEX1,HEX0: out std_logic_vector(6 downto 0)
  8. );
  9. end entity TestTimesTen;
  10.  
  11. Architecture behaviour of TestTimesTen is
  12. signal set1,set2,set3,set4,set5: std_logic_vector(9 downto 0);
  13. signal X:std_logic_vector(5 downto 0);
  14. signal TenX: std_logic_vector(9 downto 0);
  15. component SegDecoder
  16. port(D:in std_logic_vector(3 downto 0);
  17. Y:out std_logic_vector(6 downto 0));
  18. end component;
  19. component TimesTen
  20. port(
  21. X:in std_logic_vector(5 downto 0);
  22. TenX:out std_logic_vector(9 downto 0));
  23. end component;
  24. begin
  25. X(5 downto 0) <= SW(5 downto 0);
  26. TT0:TimesTen port map(X=> X(5 downto 0), TenX=> set2(9 downto 0));
  27. SD1:SegDecoder port map(D => set2(9 downto 6), Y=> HEX3(6 downto 0));
  28. TT1:TimesTen port map(X=> set2(5 downto 0), TenX=> set3(9 downto 0));
  29. SD2:SegDecoder port map(D => set3(9 downto 6), Y=> HEX2(6 downto 0));
  30. TT2:TimesTen port map(X=> set3(5 downto 0), TenX=> set4(9 downto 0));
  31. SD3:SegDecoder port map(D => set4(9 downto 6), Y=> HEX1(6 downto 0));
  32. TT3:TimesTen port map(X=> set4(5 downto 0), TenX=> set5(9 downto 0));
  33. SD4:SegDecoder port map(D => set5(9 downto 6), Y=> HEX0(6 downto 0));
  34.  
  35. end architecture behaviour;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement