Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. -- run for 10ms
  2.  
  3. library IEEE;
  4. use IEEE.Std_logic_1164.all;
  5. use IEEE.Numeric_Std.all;
  6.  
  7. entity clk_dividers_tb is
  8. end;
  9.  
  10. architecture bench of clk_dividers_tb is
  11.  
  12. component ClockDivider is
  13. Port (
  14. inclk : in STD_LOGIC;
  15. clk_480: out STD_LOGIC;
  16. clk_counter : out STD_LOGIC
  17. );
  18. end component;
  19.  
  20. signal inclk: STD_LOGIC;
  21. signal clk_480: STD_LOGIC;
  22. signal clk_counter: STD_LOGIC ;
  23.  
  24. constant clock_period: time := 10 ns;
  25. signal stop_the_clock: boolean;
  26.  
  27. begin
  28.  
  29. uut: ClockDivider port map ( inclk=> inclk,
  30. clk_480 => clk_480,
  31. clk_counter => clk_counter );
  32.  
  33. stimulus: process
  34. begin
  35.  
  36.  
  37. wait;
  38. end process;
  39.  
  40. clocking: process
  41. begin
  42. while not stop_the_clock loop
  43. inclk <= '0', '1' after clock_period / 2;
  44. wait for clock_period;
  45. end loop;
  46. wait;
  47. end process;
  48.  
  49. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement