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 tach_so_tb();
  2. //Khai bao input
  3. reg[5:0] in;
  4. //Khai bao output
  5. wire[3:0] hangchuc, hangdvi;
  6. //Start
  7. tach_so ins(
  8. .in      (in),
  9. .hangchuc(hangchuc),
  10. .hangdvi (hangdvi)
  11. );
  12. initial begin
  13. $display("\ttime\tin\thangchuc\thangdonvi");
  14. $monitor("%d\t%d\t%d\t%d", $time,in,hangchuc,hangdvi);
  15. in = 0;
  16. #1 in = 2;
  17. #2 in = 11;
  18. #4 in = 20;
  19. #2 in = 21;
  20. #2 in = 35;
  21. #2 in = 46;
  22. #5 in = 50;
  23. end
  24. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement