Advertisement
Guest User

det101_tb

a guest
Dec 16th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3.  
  4. entity det101_tb is
  5.  
  6. end det101_tb;
  7.  
  8. architecture sim of det101_tb is
  9. signal x,reset : bit:='0';
  10. signal clk : bit:='1';
  11. signal q : bit;
  12. begin
  13. UUT: entity work.det101 port map (clk=>clk, reset=>reset, x=>x, q=>q);
  14.  
  15. process begin
  16. clk <= not clk;
  17. wait for 5ns;
  18. end process;
  19.  
  20. process begin
  21. wait for 22 ns;
  22. x<='1';
  23. wait for 10 ns;
  24. x<='0';
  25. wait for 10 ns;
  26. x<='1';
  27. wait for 15ns;
  28. x<='0';
  29. wait for 30 ns;
  30. x<='1';
  31. wait for 70 ns;
  32. x<='0';
  33. wait for 20 ns;
  34. x<='1';
  35. wait for 10 ns;
  36. x<='0';
  37. wait for 10 ns;
  38. x<='1';
  39. wait for 10ns;
  40. x<='1';
  41. wait for 10 ns;
  42. x<='0';
  43. wait for 10 ns;
  44. x<='1';
  45. wait for 10ns;
  46. x<='0';
  47. wait for 10 ns;
  48. x<='1';
  49. wait for 10 ns;
  50. x<='0';
  51. wait for 10 ns;
  52. x<='1';
  53. end process;
  54.  
  55. process begin
  56. reset<='0';
  57. wait for 160 ns;
  58. reset<='1';
  59. wait for 45 ns;
  60. end process;
  61.  
  62.  
  63. end sim;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement