1、多输入门只允许有一个输出,但可以有多个输入。调用名.inlin2outandAl(out,inl.in2,in3);in3and真值表nand真值表输入1输入1andnand0XZ201XZ0000100111输输101101XX1X入入01XXXXXXX220zX1XXXZXXZ.高阻态X-不确定状态7
1、多输入门 只允许有一个输出,但可以有多个输入。 and A1(out,in1,in2,in3); 输 入 2 z 1 x x x x 1 x x x 1 1 0 x x 0 1 1 1 1 0 1 x z 输入1 nand nand真值表 X- 不确定状态 Z- 高阻态 and真值表 z 0 x x 0 x 1 0 1 x 0 0 0 0 0 0 1 X z 输入1 and 输 入 2 x x x x x 调用名
xor真值表or真值表输入1输入1xoror1X1XZ0Z001X0X0XX01输输X11111101X入入2X2XXXXX1XXXZXZXXX1XXXA人
Z X 1 X X X X 1 X X 1 1 1 1 1 0 0 1 X X 0 1 X Z 输入1 or 输 入 2 or真值表 输 入 2 Z X X X X X X X X X 1 1 0 X X 0 0 1 X X 0 1 X Z 输入1 xor xor真值表
2、多输出门允许有多个输出,但只有一个输入,not N1(outl, out2,...,in); buf B1 (outl,out2,...,in)outloutdutout2主P2-outNoutNnot真值表buf真值表输入输入notbuf001X7Z0一01输出输出XXE
2、多输出门 允许有多个输出,但只有一个输入。 not N1(out1,out2,.,in); 0 1 x x 0 1 x z 输 入 buf 输 出 buf真值表 输 出 1 0 x x 0 1 x z 输 入 not not真值表 buf B1(out1,out2,.,in); out1 in out2 outN . out 1 in out 2 out N
3、三态门有一个输出、、一个数据输入和一个输入控制如果输入控制信号无效,则三态门的输出为高阻态zininoutoutOctrlctrl(a)(b)图4.6.3三态门元件模型(b)notifl(a)bufiflbufif真值表notifi真值表控制输入控制输入notifibufif100117XZ0000/z0/z1/zZ11/zZ数据输入数据输1/z1/z00/z0/zZZZXXXXZXXXX入ZZXXXZZXXX
bufif1真值表 z z x x x x z x x x 1 z 1 1/z 1/z 0 z 0 0/z 0/z 0 1 x z bufif1 控制输入 数 据 输 入 z z x x x x z x x x 1 z 0 0/z 0/z 0 z 1 1/z 1/z 0 1 x z notif1 控制输入 数 据 输 入 notif1真值表 3、三态门 有一个输出、一个数据输入和一个输入控制。 如果输入控制信号无效,则三态门的输出为高阻态z。 图 4.6.3 三态门元件模型 (a)bufif1 (b)notif1 (a) (b) in out ctrl in out ctrl
//Gate-level description of a 2-4、设计举例to-4-line decodermodule2to4decoder试用Verilog语言的门级(A,Ao,E,Y);元件描述2线-4线译码器input A,B,E;说明output [3:0]Y;部分wire Alnot,AOnot,Enot;91¬Ynl (Alnot,A1).&bn2 (A0not,A0),Yn3 (Enot,E);1 kAAo功能nand儿&bY2描述n4 (Yj0l,A1not,A0not,Enot)0n5 (Y[1],A1not,A0,Enot),&Y3n6 (Y[2],A1,A0not,Enot),n7 (Y[3],A1,A0,Enot);endmoduleA众
4、设计举例 //Gate-level description of a 2- to-4-line decoder module _2to4decoder (A1,A0 ,E,Y); input A,B,E; output [3:0]Y; wire A1not,A0not,Enot; not n1 (A1not,A1), n2 (A0not,A0), n3 (Enot,E); nand n4 (Y[0],A1not,A0not,Enot), n5 (Y[1],A1not,A0,Enot), n6 (Y[2],A1,A0not,Enot), n7 (Y[3],A1,A0,Enot); endmodule 1 A1 1 1 A0 & & & & E Y0 Y1 Y2 Y 3 试用Verilog语言的门级 元件描述2线-4线译码器. 说明 部分 功能 描述