You are on page 1of 1

module D_tst();

reg d,clk=1'b0,rst;
wire q,qbar;
D D1(.d(d),.clk(clk),.rst(rst),.q(q),.qbar(qbar));
initial
begin
$monitor($time,"the value of d=%b,q=%b,qbar=%b,clk=%b,rst=%b",d,q,qbar,clk,rst);
#5 clk=~clk;
#10 d=1'b0;rst=1'b0;
#10 d=1'b1;rst=1'b0;
#10 d=1'b0;rst=1'b1;
#10 d=1'b1;rst=1'b1;
$stop;
end
endmodule

You might also like