`timescale 1ns/1ns module top_module ( input a, input b, input c, input d, output e, output f ); wire ab,cd,oo,pp; and m1(ab,a,b); xor m2(cd,c,d), m3(oo,ab,cd), m6(pp,ab,cd); nor m5(e,oo); or m4(f,pp,d); endmodule //nor门可以缺省一个输入来代替非门 //门级电路只是一个声明,可以在其后多个叠加 //门级电路的名称也是字母或下划线开头