From 52c7210d0c7476adeea422ba900265475565fa4f Mon Sep 17 00:00:00 2001 From: Erick Date: Fri, 4 Mar 2022 01:38:43 +0100 Subject: [PATCH] Create xor_tb.v --- testbench/xor_tb.v | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 testbench/xor_tb.v diff --git a/testbench/xor_tb.v b/testbench/xor_tb.v new file mode 100644 index 0000000..8e9b62a --- /dev/null +++ b/testbench/xor_tb.v @@ -0,0 +1,18 @@ +'include "predefined/xor_gate.v" + +module nor_tb(); + reg ta, tb; + wire ty; + + xor_gate dut(y, ta, tb); + + initial begin + ta=0, tb=0; + $monitor("IN: %b, %b ",ta, tb, "OUT: ",y); + ta=0, tb=1; + $monitor("IN: %b, %b ",ta, tb, "OUT: ",y); + ta=1, tb=0; + $monitor("IN: %b, %b ",ta, tb, "OUT: ",y); + ta=1, tb=1; + end +endmodule \ No newline at end of file