mdabkow

3

Dec 5th, 2018
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.numeric_std.all;
  4.  
  5. entity TestGen is
  6. generic(N: integer range 0 to 32 := 8);
  7. port (
  8. clk : out std_logic;
  9. reset : out std_logic;
  10. div : out UNSIGNED(N-1 downto 0));
  11. end TestGen;
  12.  
  13.  
  14. architecture Stim of TestGen is
  15. begin
  16. reset <= '1' after 0 ps,
  17. '0' after 10 ps, '1' after 600 ps,
  18. '0' after 2.4 ns, '1' after 3 ns,
  19. '0' after 6 ns, '1' after 6.6 ns,
  20. '0' after 11.4 ns, '1' after 12 ns,
  21. '0' after 17.4 ns, '1' after 18 ns;
  22.  
  23.  
  24. div <= "00000000",
  25. "00000001" after 2.4 ns,
  26. "00000010" after 6 ns,
  27. "00000011" after 11.4 ns,
  28. "00000100" after 17.4 ns;
  29.  
  30.  
  31. Clock: process
  32. begin
  33. clk <= '0';
  34. wait for 300 ps;
  35. clk <= '1';
  36. wait for 300 ps;
  37. end process Clock;
  38.  
  39.  
  40. stopsim: process
  41. begin
  42. wait for 25 ns;
  43. assert false
  44. report "koniec"
  45. severity failure;
  46. end process stopsim;
  47. end Stim;
Add Comment
Please, Sign In to add comment