Archived
1
0

adding testbenches

This commit is contained in:
Erick
2022-02-28 23:55:42 +01:00
parent 680094e4e8
commit 90287bca73
4 changed files with 82 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
include "nand_gate.v"
module nand_tb();
reg ta,tb;
wire ty;
nand_gate dut(y, ta, tb);
initial begin
ta = 0; tb = 0;
$monitor("IN: %b, %b ",ta, tb, "OUT: ",y);
#5 ta = 1; tb = 0;
$monitor("IN: %b, %b ",ta, tb, "OUT: ",y);
#5 ta = 0; tb = 1;
$monitor("IN: %b, %b ",ta, tb, "OUT: ",y);
#5 ta = 1; tb = 1;
$monitor("IN: %b, %b ",ta, tb, "OUT: ",y);
end
endmodule