Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 1.35 KB | None | 0 0
  1. --Exercise 6 tester--
  2. library ieee;
  3. use ieee.std_logic_1164.all;
  4. use ieee.numeric_std.all;
  5. use work.all;
  6.  
  7. entity Exercise6_tester is
  8. port(
  9.     SW : in std_logic_vector(17 downto 0);
  10.     KEY: in std_logic_vector(3 downto 0);
  11.     CLOCK_50: in std_logic;
  12.     HEX0,HEX1,HEX2,HEX3,HEX4,HEX5,LEDR : out std_logic_vector(6 downto 0)
  13. );
  14. end;
  15.  
  16. architecture test_1 of Exercise6_tester is
  17. signal s1: std_logic_vector(3 downto 0);
  18. begin
  19. --UUT binary to seven seg display
  20. UUT1: entity multi_counter port map
  21. (mode => SW(17 downto 16), clk=>KEY(0),reset=>KEY(3),count=>s1, cout=>LEDR(0) );
  22. UUT2: entity CaseBin2Sevenseg port map
  23. (bin=>s1, sseg=>HEX0);
  24. end;
  25.  
  26. architecture test_2 of Exercise6_tester is
  27. signal clk_signal: std_logic;
  28. signal s1: std_logic_vector(3 downto 0);
  29. begin
  30. --UUT clock_gen
  31. UUT1: entity clock_gen port map
  32. (speed=>KEY(0), clk=>CLOCK_50, reset=>KEY(3), clk_out=>clk_signal);
  33. --UUT Multi_counter
  34. UUT2: entity multi_counter port map
  35. (mode => SW(17 downto 16), clk=>clk_signal,reset=>KEY(3),count=>s1, cout=>LEDR(0) );
  36. --UUT bin to sevenseg display
  37. UUT3: entity CaseBin2Sevenseg port map
  38. (bin=>s1, sseg=>HEX0);
  39. end;
  40.  
  41. architecture test_3 of Exercise6_tester is
  42. begin
  43. --UUT watch
  44. UUT1: entity watch port map
  45. (speed=>KEY(0), clk=>CLOCK_50,reset=>KEY(3),sec_1=>HEX0,sec_10=>HEX1,min_1=>HEX2,min_10=>HEX3,hrs_1=>HEX4,hrs_10=>HEX5, tm=>open);
  46. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement