3 .model nmos nmos level=3 vto=0.7
4 .model pmos pmos level=3 vto=-0.7
6 .SUBCKT nand2 2 3 1 4 11
7 Mp1 4 2 1 1 PMOS W=8e-6 L=600e-9
8 Mp2 4 3 1 1 PMOS W=8e-6 L=600e-9
9 Mn1 4 2 11 0 NMOS W=8e-6 L=600e-9
10 Mn2 11 3 0 0 NMOS W=8e-6 L=600e-9
18 vin 2 0 PWL (0 0, 1n 0, 3n 5, 10n 5, 12n 0, 20n 0)
20 .print op v(nodes) z(5) iter(0)
23 .print op Cgs(XI10.Mp1) Cgd(XI10.Mp1) Cgb(XI10.Mp1)
25 .print op Cgs(XI10.Mp2) Cgd(XI10.Mp2) Cgb(XI10.Mp2)
27 .print op Cgs(XI10.Mn1) Cgd(XI10.Mn1) Cgb(XI10.Mn1)
29 .print op Cgs(XI10.Mn2) Cgd(XI10.Mn2) Cgb(XI10.Mn2)
32 .print tran v(2) v(4) v(5) iter(0)
33 .tran 0.1n 10n trace all