1.利用双输入端的nand 门,用Verilog 编写自己的双输入端的与门、或门和非门,把它们分别命名为 my_or,my_and 和 my_not,并通过激励模块验证这些门的功能
答:`timescale 1ns/1ns /**************************** ********** my_and *********** ****************************/ module my_and(in1,in2,out); input in1,in2; output out; wire out1; nand a1(out,out1,out1); nand a2(out1,in1,in2); endmodule /**************************** ********** my_or ************ ****************************/ module my_or(in1,in2,out); input in1,in2; output out; wire out1,out2; nand o1(out,out1,out2); nand o2(out1,in1,in1); nand o3(out2,in2,in2); endmodule /**************************** ********** my_not *********** ****************************/ module my_not(in,out); input in; output out; nand n1(out,in,in); endmodule /**************************** ********** test *********** ***********