module test_Nand_Latch_1;
reg preset,clear;
wire q,qbar;
Nand_Latch_1 K1(q,qbar,preset,clear);
initial
begin
$monitor($time,"preset=%b clear==%b q=%b qbar=%b",preset,clear,q,qbar);
end
initial
begin
#10 preset=0;clear=1;
#10 preset=1; $stop;
#10 clear=0;
#10 clear=1;
#10 preset=0;
end
initial
#60 $finish;
endmodule
module Nand_Latch_1(q,qbar,preset,clear);
output q,qbar;
input preset,clear;
nand_a G1(q,preset,qbar),
G2(qbar,clear,q);
endmodule
module nand_a(C,A,B);
input A,B;
output C;
nand (C,A,B);
specify
specparam
Tpd_0_1=5:5:5,
Tpd_1_0=5:5:5;
(A=>C)=(Tpd_0_1,Tpd_1_0);
(B=>C)=(Tpd_0_1,Tpd_1_0);
endspecify
endmodule
沒有留言:
張貼留言