mdabkow

2

Dec 5th, 2018
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.numeric_std.all;
  4.  
  5. entity TestBench is
  6. end TestBench;
  7.  
  8. architecture Struct of TestBench is
  9.  
  10. component divfreq is
  11. generic(N: integer range 0 to 32 := 8);
  12. port (
  13. clk : in std_logic;
  14. reset : in std_logic;
  15. div : in UNSIGNED(N-1 downto 0);
  16. w : out std_logic);
  17. end component;
  18.  
  19. component TestGen is
  20. generic(N: integer range 0 to 32 := 8);
  21. port (
  22. clk : out std_logic;
  23. reset : out std_logic;
  24. div : out UNSIGNED(N-1 downto 0));
  25. end component;
  26.  
  27. signal treset, tclk, tw: std_logic;
  28. signal tdiv: UNSIGNED (7 downto 0);
  29.  
  30.  
  31. begin
  32. DF: divfreq
  33. port map (reset=>treset, clk=>tclk, div=>tdiv, w=>tw);
  34.  
  35. TG: TestGen
  36. port map (reset=>treset, clk=>tclk, div=>tdiv);
  37.  
  38. end Struct;
Add Comment
Please, Sign In to add comment