Advertisement
itsme_rudj

FF Enable Testbench

Jan 7th, 2024 (edited)
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VeriLog 0.29 KB | Source Code | 0 0
  1. module reg_en_tst();
  2.     reg D, clk, clr_, En;
  3.     wire Q;
  4.     reg_en uut (D,clk,clr_,En,Q);
  5.  
  6.     initial begin
  7.      clk = 0;
  8.      D = 0;
  9.      En = 0;
  10.      clr_ = 0;
  11.     end
  12.     always #10 D = D+1;
  13.     initial #20 clr_ = 1;
  14.     always #5 clk = ~clk;
  15.     always #10 En = En+1;
  16.     initial #100 $finish;      
  17. endmodule
  18.  
Tags: FF Tb enable
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement