Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module cau4_1_tb();
  2. reg clk;
  3. reg reset_n;
  4. wire[6:0] h7 ;
  5. wire[6:0] h6 ;
  6. wire[6:0] h5 ;
  7. wire[6:0] h4 ;
  8. wire[6:0] h3 ;
  9. wire[6:0] h2 ;
  10. wire[6:0] h1 ;
  11. wire[6:0] h0 ;
  12.  
  13. cau4_1 inst(
  14. .clk(clk),
  15. .reset_n(reset_n),
  16. .h7 (h7),
  17. .h6 (h6),
  18. .h5 (h5),
  19. .h4 (h4),
  20. .h3 (h3),
  21. .h2 (h2),
  22. .h1 (h1),
  23. .h0 (h0)
  24. );
  25.  
  26. //init
  27. initial begin
  28.   $display("\ttime\tclk\trst\thex7\thex6\thex5\thex4\thex3\thex2\thex1\thex0");
  29.   $monitor("%d\t%d\t%d\t%b\t%b\t%b\t%b\t%b\t%b\t%b\t%b", $time,clk,reset_n,h7,h6,h5,h4,h3,h2,h1,h0);
  30.     clk = 1;
  31.     reset_n = 1;
  32.     #2 reset_n = 0;
  33.     #2 reset_n = 1;
  34.     #50 reset_n = 0;
  35. end
  36. //generate clk
  37. always begin
  38.  #1 clk = ~clk;
  39. end
  40. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement