yzzrlzc
Newbie level 4
Xand 1 2 3 NAND2
V1 1 0 DC 5
V2 2 0 PULSE(0 5 0 0 0 5n 20n)
.tran 1ns 300ns
*NAND subcircuit
***********************************
.subckt NAND2 A B out
M1000 out A VDD VDD pfet w=10u l=1u
+ ad=30p pd=22u as=30p ps=32u
M1001 VDD B out VDD pfet w=10u l=1u
+ ad=0p pd=0u as=0p ps=0u
M1002 a_n52_6# A Gnd Gnd nfet w=10u l=1u
+ ad=30p pd=22u as=15p ps=16u
M1003 out B a_n52_6# Gnd nfet w=10u l=1u
+ ad=15p pd=16u as=0p ps=0u
C0 B gnd 3.4fF
C1 VDD gnd 49.4fF
******rail voltage***************
VDD VDD 0 DC 5V
Vgnd Gnd 0 DC 0
.ends NAND2
**********************************
.MODEL nfet NMOS ( .....)
.MODEL pfet NMOS ( .....)
.end
I cant get a correct output for node3(out in subcircuit)
can someone tell me what is wrong with it ?
do i need to make VDD and VGnd global?
V1 1 0 DC 5
V2 2 0 PULSE(0 5 0 0 0 5n 20n)
.tran 1ns 300ns
*NAND subcircuit
***********************************
.subckt NAND2 A B out
M1000 out A VDD VDD pfet w=10u l=1u
+ ad=30p pd=22u as=30p ps=32u
M1001 VDD B out VDD pfet w=10u l=1u
+ ad=0p pd=0u as=0p ps=0u
M1002 a_n52_6# A Gnd Gnd nfet w=10u l=1u
+ ad=30p pd=22u as=15p ps=16u
M1003 out B a_n52_6# Gnd nfet w=10u l=1u
+ ad=15p pd=16u as=0p ps=0u
C0 B gnd 3.4fF
C1 VDD gnd 49.4fF
******rail voltage***************
VDD VDD 0 DC 5V
Vgnd Gnd 0 DC 0
.ends NAND2
**********************************
.MODEL nfet NMOS ( .....)
.MODEL pfet NMOS ( .....)
.end
I cant get a correct output for node3(out in subcircuit)
can someone tell me what is wrong with it ?
do i need to make VDD and VGnd global?