diff --git a/gates/nand16.v b/gates/nand16.v index ea21e6d..1f503ca 100644 --- a/gates/nand16.v +++ b/gates/nand16.v @@ -1,6 +1,6 @@ module nand16(y16, a16, b16); input [15:0]a16; - input[15:0]b16; + input [15:0]b16; output [15:0]y16; nand(y16[0], a16[0], b16[0]); diff --git a/gates/nand3way16.v b/gates/nand3way16.v new file mode 100644 index 0000000..f4e00be --- /dev/null +++ b/gates/nand3way16.v @@ -0,0 +1,15 @@ +'include "gates/nand16.v" + +module nand3way16(y16, a16, b16, c16); + input [15:0]a16; + input [15:0]b16; + input [15:0]c16; + output [15:0]y16; + + wire tmp0[15:0], tmp1[15:0] + + nand16(tmp0, a16, b16); + nand16(tmp1, tmp0, tmp0); + nand16(y16, tmp1, c16); + +endmodule \ No newline at end of file