diff --git a/cace/templates/ota_tb_cmrr.sch b/cace/templates/ota_tb_cmrr.sch index df0f498..9b4e32b 100644 --- a/cace/templates/ota_tb_cmrr.sch +++ b/cace/templates/ota_tb_cmrr.sch @@ -5,10 +5,152 @@ K {} V {} S {} E {} +N -540 -60 -500 -60 { +lab=#net7} +N -720 -110 -720 50 { +lab=#net7} +N -720 -110 -540 -110 { +lab=#net7} +N -720 110 -720 130 { +lab=GND} +N -540 110 -540 130 { +lab=GND} +N -540 30 -460 30 { +lab=#net8} +N -540 30 -540 50 { +lab=#net8} +N -540 -20 -500 -20 { +lab=GND} +N -540 -20 -540 0 { +lab=GND} +N -620 -10 -620 30 { +lab=#net8} +N -460 -10 -460 30 { +lab=#net8} +N -540 -110 -540 -60 { +lab=#net7} +N -460 -150 -460 -70 { +lab=VINN} +N -620 -150 -620 -70 { +lab=VINP} +N -620 30 -540 30 { +lab=#net8} +N -580 -20 -540 -20 { +lab=GND} +N -580 -60 -540 -60 { +lab=#net7} +N 480 590 490 590 { +lab=VCC} +N 490 560 490 590 { +lab=VCC} +N 480 560 490 560 { +lab=VCC} +N 360 590 390 590 { +lab=Iin1} +N 390 590 440 590 { +lab=Iin1} +N 390 590 390 620 { +lab=Iin1} +N 390 620 480 620 { +lab=Iin1} +N 320 530 390 530 { +lab=VCC} +N 390 530 480 530 { +lab=VCC} +N 480 530 480 560 { +lab=VCC} +N 320 530 320 560 { +lab=VCC} +N 310 590 320 590 { +lab=VCC} +N 310 560 320 560 { +lab=VCC} +N 310 560 310 590 { +lab=VCC} +N 840 590 850 590 { +lab=VCC} +N 850 560 850 590 { +lab=VCC} +N 840 560 850 560 { +lab=VCC} +N 720 590 750 590 { +lab=Iin2} +N 750 590 800 590 { +lab=Iin2} +N 750 590 750 620 { +lab=Iin2} +N 750 620 840 620 { +lab=Iin2} +N 680 530 750 530 { +lab=VCC} +N 750 530 840 530 { +lab=VCC} +N 840 530 840 560 { +lab=VCC} +N 680 530 680 560 { +lab=VCC} +N 670 590 680 590 { +lab=VCC} +N 670 560 680 560 { +lab=VCC} +N 670 560 670 590 { +lab=VCC} +N -380 420 -380 450 { +lab=#net4} +N -380 510 -380 560 { +lab=#net5} +N -340 590 -310 590 { +lab=#net4} +N -310 420 -310 590 { +lab=#net4} +N -380 420 -310 420 { +lab=#net4} +N -210 420 -210 450 { +lab=#net6} +N -210 510 -210 560 { +lab=#net7} +N -170 590 -140 590 { +lab=#net6} +N -140 420 -140 590 { +lab=#net6} +N -210 420 -140 420 { +lab=#net6} +N 0 420 0 450 { +lab=Iin1} +N 0 510 0 560 { +lab=#net8} +N -340 480 -310 480 { +lab=#net4} +N -140 590 -40 590 { +lab=#net6} +N -380 390 -380 420 { +lab=#net4} +N -210 390 -210 420 { +lab=#net6} +N -310 480 -250 480 { +lab=#net4} +N -250 440 -250 480 { +lab=#net4} +N -250 440 -40 440 { +lab=#net4} +N -40 440 -40 480 { +lab=#net4} +N 140 420 140 450 { +lab=Iin2} +N 140 510 140 560 { +lab=#net9} +N 100 440 100 480 { +lab=#net4} +N -70 540 -70 590 { +lab=#net6} +N -70 540 100 540 { +lab=#net6} +N 100 540 100 590 { +lab=#net6} +N -40 440 100 440 { +lab=#net4} N 220 0 220 10 { lab=CM2} -N -220 70 -220 90 { -lab=#net1} N -320 0 -220 0 { lab=CM1} N -320 0 -320 120 { @@ -16,7 +158,7 @@ lab=CM1} N -320 120 -260 120 { lab=CM1} N 220 70 220 90 { -lab=#net2} +lab=#net1} N -310 40 -260 40 { lab=VINN} N -310 -110 -260 -110 { @@ -32,13 +174,13 @@ lab=VINP} N 260 -110 310 -110 { lab=VINP} N -220 80 -40 80 { -lab=#net1} +lab=#net2} N 40 -80 220 -80 { -lab=#net1} -N -220 -80 -40 -80 { lab=#net2} +N -220 -80 -40 -80 { +lab=#net1} N 40 80 220 80 { -lab=#net2} +lab=#net1} N 140 -200 220 -200 { lab=#net3} N -220 -200 -140 -200 { @@ -71,52 +213,8 @@ N 220 -320 220 -310 { lab=VCC} N 380 -320 380 -310 { lab=VCC} -N 380 -0 440 0 { +N 380 0 440 0 { lab=VOUT} -N -220 -110 -210 -110 { -lab=#net2} -N -210 -110 -210 -80 { -lab=#net2} -N 210 -110 220 -110 { -lab=#net1} -N 210 -110 210 -80 { -lab=#net1} -N -390 200 -380 200 { -lab=GND} -N -390 200 -390 230 { -lab=GND} -N -390 230 -380 230 { -lab=GND} -N -220 120 -210 120 { -lab=GND} -N -210 120 -210 150 { -lab=GND} -N -220 150 -210 150 { -lab=GND} -N -220 40 -210 40 { -lab=#net1} -N -210 40 -210 70 { -lab=#net1} -N -220 70 -210 70 { -lab=#net1} -N 210 120 220 120 { -lab=GND} -N 210 120 210 150 { -lab=GND} -N 210 150 220 150 { -lab=GND} -N 210 40 220 40 { -lab=#net2} -N 210 40 210 70 { -lab=#net2} -N 210 70 220 70 { -lab=#net2} -N 380 200 390 200 { -lab=GND} -N 390 200 390 230 { -lab=GND} -N 380 230 390 230 { -lab=GND} N 220 -280 230 -280 { lab=VCC} N 230 -310 230 -280 { @@ -152,7 +250,7 @@ lab=#net3} N 220 -200 320 -200 { lab=#net3} N -40 80 40 -80 { -lab=#net1} +lab=#net2} N 220 -250 220 -200 { lab=#net3} N 220 -200 220 -140 { @@ -160,294 +258,194 @@ lab=#net3} N 310 -110 310 40 { lab=VINP} N -40 -80 40 80 { -lab=#net2} +lab=#net1} N -310 -110 -310 40 { lab=VINN} N -220 -250 -220 -200 { lab=#net4} N -220 -200 -220 -140 { lab=#net4} -N -0 -280 -0 -200 { +N 0 -280 0 -200 { lab=#net5} -N -540 -60 -500 -60 { -lab=#net7} -N -720 -110 -720 50 { -lab=#net7} -N -720 -110 -540 -110 { -lab=#net7} -N -720 110 -720 130 { -lab=GND} -N -540 110 -540 130 { -lab=GND} -N -540 30 -460 30 { -lab=#net8} -N -540 30 -540 50 { -lab=#net8} -N -540 -20 -500 -20 { -lab=GND} -N -540 -20 -540 0 { -lab=GND} -N -620 -10 -620 30 { -lab=#net8} -N -460 -10 -460 30 { -lab=#net8} -N -540 -110 -540 -60 { -lab=#net7} -N -460 -150 -460 -70 { -lab=VINN} -N -620 -150 -620 -70 { -lab=VINP} -N -620 30 -540 30 { -lab=#net8} -N -580 -20 -540 -20 { -lab=GND} -N -580 -60 -540 -60 { -lab=#net7} -N 520 420 530 420 { -lab=VCC} -N 530 390 530 420 { -lab=VCC} -N 520 390 530 390 { -lab=VCC} -N 400 420 430 420 { -lab=Iin1} -N 430 420 480 420 { -lab=Iin1} -N 430 420 430 450 { -lab=Iin1} -N 430 450 520 450 { -lab=Iin1} -N 360 360 430 360 { -lab=VCC} -N 430 360 520 360 { -lab=VCC} -N 520 360 520 390 { -lab=VCC} -N 360 360 360 390 { -lab=VCC} -N 350 420 360 420 { -lab=VCC} -N 350 390 360 390 { -lab=VCC} -N 350 390 350 420 { -lab=VCC} -N 140 420 150 420 { -lab=VCC} -N 150 390 150 420 { -lab=VCC} -N 140 390 150 390 { -lab=VCC} -N 20 420 50 420 { -lab=Iin2} -N 50 420 100 420 { -lab=Iin2} -N 50 420 50 450 { -lab=Iin2} -N 50 450 140 450 { -lab=Iin2} -N -20 360 50 360 { -lab=VCC} -N 50 360 140 360 { -lab=VCC} -N 140 360 140 390 { -lab=VCC} -N -20 360 -20 390 { -lab=VCC} -N -30 420 -20 420 { -lab=VCC} -N -30 390 -20 390 { -lab=VCC} -N -30 390 -30 420 { -lab=VCC} -N -390 590 -390 620 { -lab=#net9} -N -390 680 -390 730 { -lab=#net10} -N -350 760 -320 760 { -lab=#net9} -N -320 590 -320 760 { -lab=#net9} -N -390 590 -320 590 { -lab=#net9} -N -220 590 -220 620 { -lab=GND} -N -220 680 -220 730 { -lab=#net11} -N -180 760 -150 760 { -lab=GND} -N -150 590 -150 760 { -lab=GND} -N -220 590 -150 590 { -lab=GND} -N -10 590 -10 620 { -lab=Iin1} -N -10 680 -10 730 { -lab=#net12} -N -350 650 -320 650 { -lab=#net9} -N -150 760 -50 760 { -lab=GND} -N -390 560 -390 590 { -lab=#net9} -N -220 560 -220 590 { -lab=GND} -N -320 650 -260 650 { -lab=#net9} -N -260 610 -260 650 { -lab=#net9} -N -260 610 -50 610 { -lab=#net9} -N -50 610 -50 650 { -lab=#net9} -N 130 590 130 620 { -lab=Iin2} -N 130 680 130 730 { -lab=#net13} -N 90 610 90 650 { -lab=#net9} -N -80 710 -80 760 { -lab=GND} -N -80 710 90 710 { -lab=GND} -N 90 710 90 760 { -lab=GND} -N -50 610 90 610 { -lab=#net9} -C {sky130_fd_pr/nfet_01v8.sym} 240 120 0 1 {name=M1B -W=2.75 -L=1.5 +N -220 70 -220 90 { +lab=#net2} +C {devices/lab_pin.sym} -620 -150 2 1 {name=p4 sig_type=std_logic lab=VINP +} +C {devices/lab_pin.sym} -460 -150 0 0 {name=p5 sig_type=std_logic lab=VINN} +C {devices/code_shown.sym} 540 -270 0 0 {name=SETUP +simulator=ngspice +only_toplevel=false +value=" +.lib CACE\{PDK_ROOT\}/CACE\{PDK\}/libs.tech/combined/sky130.lib.spice CACE\{corner\} + +.include CACE\{DUT_path\} + +.temp CACE\{temperature\} + +.option SEED=CACE[CACE\{seed=12345\} + CACE\{iterations=0\}] + +* Flag unsafe operating conditions (exceeds models' specified limits) +.option warn=1 +"} +C {devices/code_shown.sym} 540 -20 0 0 {name=CONTROL +simulator=ngspice +only_toplevel=false +value=" +.control + * run ac simulation + ac dec 20 1 1e12 + + * measure parameters + let cmrr_val = db(v(vout)) 180/pi*ph(v(vout)) + + wrdata CACE\{simpath\}/CACE\{filename\}_CACE\{N\}.data cmrr_val + +.endc +"} +C {devices/vcvs.sym} -620 -40 0 1 {name=E1 value=0.5} +C {devices/vcvs.sym} -460 -40 0 0 {name=E2 value=-0.5} +C {devices/vsource.sym} -720 80 0 0 {name=Vdm value="ac 1" savecurrent=false} +C {devices/vsource.sym} -540 80 0 0 {name=Vcm value=1.2 savecurrent=false} +C {devices/gnd.sym} -720 130 0 0 {name=l10 lab=GND} +C {devices/gnd.sym} -540 130 0 0 {name=l11 lab=GND} +C {devices/gnd.sym} -540 0 0 0 {name=l13 lab=GND} +C {devices/vsource.sym} -810 110 0 0 {name=vin value=CACE\{vcc\} savecurrent=false} +C {devices/gnd.sym} -810 140 0 0 {name=l14 lab=GND} +C {devices/vdd.sym} -810 80 0 0 {name=l15 lab=VCC} +C {devices/capa.sym} 410 30 0 0 {name=C1 +m=1 +value=CACE\{cl\} +footprint=1206 +device="ceramic capacitor"} +C {devices/gnd.sym} 410 60 0 0 {name=l12 lab=GND} +C {devices/vdd.sym} 320 530 0 0 {name=l3 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 340 590 0 1 {name=CM1 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 240 40 0 1 {name=M2B -W=4.0 -L=2.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} 460 590 0 0 {name=CM2 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {devices/gnd.sym} 220 150 0 0 {name=l1 lab=GND} -C {devices/lab_pin.sym} -310 -110 0 0 {name=p1 sig_type=std_logic lab=VINN} -C {sky130_fd_pr/nfet_01v8.sym} -240 120 0 0 {name=M1A -W=2.75 -L=1.5 +C {devices/lab_pin.sym} 320 620 3 0 {name=p9 sig_type=std_logic lab=CM1} +C {devices/vdd.sym} 680 530 0 0 {name=l7 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 700 590 0 1 {name=CM3 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} -240 40 0 0 {name=M2A -W=4.0 -L=2.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} 820 590 0 0 {name=CM4 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {devices/gnd.sym} -220 150 0 1 {name=l2 lab=GND} -C {devices/lab_pin.sym} 310 -110 0 1 {name=p6 sig_type=std_logic lab=VINP -} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 200 -280 0 0 {name=M3B -W=4.53 -L=1.0 -nf=1 -mult=2 +C {devices/lab_pin.sym} 680 620 3 0 {name=p11 sig_type=std_logic lab=CM2} +C {devices/isource.sym} -380 360 0 0 {name=I0 value=CACE\{IBIAS\}} +C {devices/isource.sym} -210 360 0 0 {name=I1 value=CACE\{IBIAS\}} +C {sky130_fd_pr/nfet3_01v8.sym} -360 480 0 1 {name=M17 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} -200 -280 0 1 {name=M3A -W=4.53 -L=1.0 +C {sky130_fd_pr/nfet3_01v8.sym} -360 590 0 1 {name=M18 +L=2 +W=1.4 +body=GND nf=1 -mult=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {devices/vdd.sym} 0 -320 0 0 {name=l6 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 360 -280 0 0 {name=M4B -W=4.53 -L=1.0 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -230 480 0 0 {name=M19 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} -360 -280 0 1 {name=M4A -W=4.53 -L=1.0 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -190 590 0 1 {name=M20 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} -380 230 0 1 {name=l8 lab=GND} -C {devices/gnd.sym} 380 230 0 1 {name=l9 lab=GND} -C {devices/lab_pin.sym} 440 0 2 0 {name=p2 sig_type=std_logic lab=VOUT} -C {devices/lab_pin.sym} -620 -150 2 1 {name=p4 sig_type=std_logic lab=VINP -} -C {devices/lab_pin.sym} -460 -150 0 0 {name=p5 sig_type=std_logic lab=VINN} -C {devices/capa.sym} 410 30 0 0 {name=C1 -m=1 -value=CACE\{cl\} -footprint=1206 -device="ceramic capacitor"} -C {devices/gnd.sym} 410 60 0 0 {name=l12 lab=GND} -C {sky130_fd_pr/nfet_01v8.sym} -360 200 0 1 {name=M5A -W=0.45 -L=3.45 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -20 480 0 0 {name=M21 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -457,11 +455,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 360 200 0 0 {name=M5B -W=0.45 -L=3.45 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -20 590 0 0 {name=M22 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -471,10 +470,16 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} -240 -110 0 0 {name=MinA -W=4.0 -L=2.0 -nf=1 +C {devices/gnd.sym} 0 620 0 0 {name=l16 lab=GND} +C {devices/gnd.sym} -210 620 0 0 {name=l17 lab=GND} +C {devices/gnd.sym} -380 620 0 0 {name=l18 lab=GND} +C {devices/lab_pin.sym} 0 420 0 0 {name=p41 sig_type=std_logic lab=Iin1} +C {devices/lab_pin.sym} 140 420 0 1 {name=p42 sig_type=std_logic lab=Iin2} +C {sky130_fd_pr/nfet3_01v8.sym} 120 480 0 0 {name=M23 +L=2 +W=4.15 +body=GND +nf=2 mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" @@ -485,10 +490,11 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 240 -110 0 1 {name=MinB -W=4.0 -L=2.0 -nf=1 +C {sky130_fd_pr/nfet3_01v8.sym} 120 590 0 0 {name=M24 +L=2 +W=4.15 +body=GND +nf=2 mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" @@ -499,58 +505,19 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/code_shown.sym} 540 -270 0 0 {name=SETUP -simulator=ngspice -only_toplevel=false -value=" -.lib CACE\{PDK_ROOT\}/CACE\{PDK\}/libs.tech/combined/sky130.lib.spice CACE\{corner\} - -.include CACE\{DUT_path\} - -.temp CACE\{temperature\} - -.option SEED=CACE[CACE\{seed=12345\} + CACE\{iterations=0\}] - -* Flag unsafe operating conditions (exceeds models' specified limits) -.option warn=1 -"} -C {devices/code_shown.sym} 540 -20 0 0 {name=CONTROL -simulator=ngspice -only_toplevel=false -value=" -.control - * run ac simulation - ac dec 20 1 1e12 - - * measure parameters - let cmrr_val = db(v(vout)) 180/pi*ph(v(vout)) - - wrdata CACE\{simpath\}/CACE\{filename\}_CACE\{N\}.data cmrr_val - -.endc -"} -C {sky130_tests/passgate_nlvt.sym} -100 -200 2 0 {name=x2 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} -C {sky130_tests/passgate_nlvt.sym} 120 -200 2 1 {name=x1 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} -C {devices/vdd.sym} -100 -230 0 0 {name=l20 lab=VCC} -C {devices/vdd.sym} 120 -230 0 0 {name=l21 lab=VCC} -C {devices/gnd.sym} -100 -170 0 1 {name=l22 lab=GND} -C {devices/gnd.sym} 120 -170 0 0 {name=l23 lab=GND} -C {devices/lab_pin.sym} -220 0 1 0 {name=p8 sig_type=std_logic lab=CM1} -C {devices/lab_pin.sym} 220 0 1 0 {name=p7 sig_type=std_logic lab=CM2} -C {devices/vcvs.sym} -620 -40 0 1 {name=E1 value=0.5} -C {devices/vcvs.sym} -460 -40 0 0 {name=E2 value=-0.5} -C {devices/vsource.sym} -720 80 0 0 {name=Vdm value="ac 1" savecurrent=false} -C {devices/vsource.sym} -540 80 0 0 {name=Vcm value=1.2 savecurrent=false} -C {devices/gnd.sym} -720 130 0 0 {name=l10 lab=GND} -C {devices/gnd.sym} -540 130 0 0 {name=l11 lab=GND} -C {devices/gnd.sym} -540 0 0 0 {name=l13 lab=GND} -C {devices/vsource.sym} -810 110 0 0 {name=vin value=CACE\{vcc\} savecurrent=false} -C {devices/gnd.sym} -810 140 0 0 {name=l14 lab=GND} -C {devices/vdd.sym} -810 80 0 0 {name=l15 lab=VCC} -C {devices/vdd.sym} 360 360 0 0 {name=l3 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 380 420 0 1 {name=CM1 -W=1.88 -L=3.0 +C {devices/gnd.sym} 140 620 0 0 {name=l19 lab=GND} +C {devices/lab_pin.sym} 480 620 3 0 {name=p3 sig_type=std_logic lab=Iin1} +C {devices/lab_pin.sym} 840 620 1 1 {name=p10 sig_type=std_logic lab=Iin2} +C {devices/vdd.sym} -380 330 0 0 {name=l4 lab=VCC} +C {devices/vdd.sym} -210 330 0 0 {name=l5 lab=VCC} +C {devices/gnd.sym} 220 150 0 0 {name=l1 lab=GND} +C {devices/lab_pin.sym} -310 -110 0 0 {name=p1 sig_type=std_logic lab=VINN} +C {devices/gnd.sym} -220 150 0 1 {name=l2 lab=GND} +C {devices/lab_pin.sym} 310 -110 0 1 {name=p6 sig_type=std_logic lab=VINP +} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 200 -280 0 0 {name=M3B +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -562,9 +529,9 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} 500 420 0 0 {name=CM2 -W=1.88 -L=3.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} -200 -280 0 1 {name=M3A +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -576,11 +543,10 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {devices/lab_pin.sym} 360 450 3 0 {name=p9 sig_type=std_logic lab=CM1} -C {devices/vdd.sym} -20 360 0 0 {name=l7 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 0 420 0 1 {name=CM3 -W=1.88 -L=3.0 +C {devices/vdd.sym} 0 -320 0 0 {name=l6 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 360 -280 0 0 {name=M4B +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -592,9 +558,9 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} 120 420 0 0 {name=CM4 -W=1.88 -L=3.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} -360 -280 0 1 {name=M4A +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -606,15 +572,23 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {devices/lab_pin.sym} -20 450 3 0 {name=p11 sig_type=std_logic lab=CM2} -C {devices/isource.sym} -390 530 0 0 {name=I0 value=CACE\{IBIAS\}} -C {devices/isource.sym} -220 530 0 0 {name=I1 value=CACE\{IBIAS\}} -C {sky130_fd_pr/nfet3_01v8.sym} -370 650 0 1 {name=M17 -L=2 -W=4.15 -body=GND -nf=2 +C {devices/gnd.sym} -380 230 0 1 {name=l8 lab=GND} +C {devices/gnd.sym} 380 230 0 1 {name=l9 lab=GND} +C {devices/lab_pin.sym} 440 0 2 0 {name=p2 sig_type=std_logic lab=VOUT} +C {sky130_tests/passgate_nlvt.sym} -100 -200 2 0 {name=x2 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} +C {sky130_tests/passgate_nlvt.sym} 120 -200 2 1 {name=x1 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} +C {devices/vdd.sym} -100 -230 0 0 {name=l20 lab=VCC} +C {devices/vdd.sym} 120 -230 0 0 {name=l21 lab=VCC} +C {devices/gnd.sym} -100 -170 0 1 {name=l22 lab=GND} +C {devices/gnd.sym} 120 -170 0 0 {name=l23 lab=GND} +C {devices/lab_pin.sym} -220 0 1 0 {name=p8 sig_type=std_logic lab=CM1} +C {devices/lab_pin.sym} 220 0 1 0 {name=p7 sig_type=std_logic lab=CM2} +C {sky130_fd_pr/nfet3_01v8.sym} -240 40 0 0 {name=M2A +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -624,12 +598,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -370 760 0 1 {name=M18 -L=2 -W=1.4 -body=GND +C {sky130_fd_pr/nfet3_01v8.sym} -240 120 0 0 {name=M1A +L=0.15 +W=1 nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -639,12 +613,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -240 650 0 0 {name=M19 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 40 0 1 {name=M2B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -654,12 +628,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -200 760 0 1 {name=M20 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 120 0 1 {name=M1B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -669,12 +643,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -30 650 0 0 {name=M21 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} -240 -110 0 0 {name=MinA +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -684,12 +658,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -30 760 0 0 {name=M22 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 -110 0 1 {name=MinB +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -699,17 +673,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} -10 790 0 0 {name=l16 lab=GND} -C {devices/gnd.sym} -220 790 0 0 {name=l17 lab=GND} -C {devices/gnd.sym} -390 790 0 0 {name=l18 lab=GND} -C {devices/lab_pin.sym} -10 590 0 0 {name=p41 sig_type=std_logic lab=Iin1} -C {devices/lab_pin.sym} 130 590 0 1 {name=p42 sig_type=std_logic lab=Iin2} -C {sky130_fd_pr/nfet3_01v8.sym} 110 650 0 0 {name=M23 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} -360 200 0 1 {name=M5A +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -719,12 +688,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} 110 760 0 0 {name=M24 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 360 200 0 0 {name=M5B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -734,8 +703,3 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} 130 790 0 0 {name=l19 lab=GND} -C {devices/lab_pin.sym} 520 450 3 0 {name=p3 sig_type=std_logic lab=Iin1} -C {devices/lab_pin.sym} 140 450 1 1 {name=p10 sig_type=std_logic lab=Iin2} -C {devices/vdd.sym} -390 500 0 0 {name=l4 lab=VCC} -C {devices/vdd.sym} -220 500 0 0 {name=l5 lab=VCC} diff --git a/cace/templates/ota_tb_dcparams.sch b/cace/templates/ota_tb_dcparams.sch index cce7c03..021862d 100644 --- a/cace/templates/ota_tb_dcparams.sch +++ b/cace/templates/ota_tb_dcparams.sch @@ -5,10 +5,152 @@ K {} V {} S {} E {} +N -540 -60 -500 -60 { +lab=#net7} +N -720 -110 -720 50 { +lab=#net7} +N -720 -110 -540 -110 { +lab=#net7} +N -720 110 -720 130 { +lab=GND} +N -540 110 -540 130 { +lab=GND} +N -540 30 -460 30 { +lab=#net8} +N -540 30 -540 50 { +lab=#net8} +N -540 -20 -500 -20 { +lab=GND} +N -540 -20 -540 0 { +lab=GND} +N -620 -10 -620 30 { +lab=#net8} +N -460 -10 -460 30 { +lab=#net8} +N -540 -110 -540 -60 { +lab=#net7} +N -460 -150 -460 -70 { +lab=VINN} +N -620 -150 -620 -70 { +lab=VINP} +N -620 30 -540 30 { +lab=#net8} +N -580 -20 -540 -20 { +lab=GND} +N -580 -60 -540 -60 { +lab=#net7} +N 480 590 490 590 { +lab=VCC} +N 490 560 490 590 { +lab=VCC} +N 480 560 490 560 { +lab=VCC} +N 360 590 390 590 { +lab=Iin1} +N 390 590 440 590 { +lab=Iin1} +N 390 590 390 620 { +lab=Iin1} +N 390 620 480 620 { +lab=Iin1} +N 320 530 390 530 { +lab=VCC} +N 390 530 480 530 { +lab=VCC} +N 480 530 480 560 { +lab=VCC} +N 320 530 320 560 { +lab=VCC} +N 310 590 320 590 { +lab=VCC} +N 310 560 320 560 { +lab=VCC} +N 310 560 310 590 { +lab=VCC} +N 840 590 850 590 { +lab=VCC} +N 850 560 850 590 { +lab=VCC} +N 840 560 850 560 { +lab=VCC} +N 720 590 750 590 { +lab=Iin2} +N 750 590 800 590 { +lab=Iin2} +N 750 590 750 620 { +lab=Iin2} +N 750 620 840 620 { +lab=Iin2} +N 680 530 750 530 { +lab=VCC} +N 750 530 840 530 { +lab=VCC} +N 840 530 840 560 { +lab=VCC} +N 680 530 680 560 { +lab=VCC} +N 670 590 680 590 { +lab=VCC} +N 670 560 680 560 { +lab=VCC} +N 670 560 670 590 { +lab=VCC} +N -380 420 -380 450 { +lab=#net4} +N -380 510 -380 560 { +lab=#net5} +N -340 590 -310 590 { +lab=#net4} +N -310 420 -310 590 { +lab=#net4} +N -380 420 -310 420 { +lab=#net4} +N -210 420 -210 450 { +lab=#net6} +N -210 510 -210 560 { +lab=#net7} +N -170 590 -140 590 { +lab=#net6} +N -140 420 -140 590 { +lab=#net6} +N -210 420 -140 420 { +lab=#net6} +N 0 420 0 450 { +lab=Iin1} +N 0 510 0 560 { +lab=#net8} +N -340 480 -310 480 { +lab=#net4} +N -140 590 -40 590 { +lab=#net6} +N -380 390 -380 420 { +lab=#net4} +N -210 390 -210 420 { +lab=#net6} +N -310 480 -250 480 { +lab=#net4} +N -250 440 -250 480 { +lab=#net4} +N -250 440 -40 440 { +lab=#net4} +N -40 440 -40 480 { +lab=#net4} +N 140 420 140 450 { +lab=Iin2} +N 140 510 140 560 { +lab=#net9} +N 100 440 100 480 { +lab=#net4} +N -70 540 -70 590 { +lab=#net6} +N -70 540 100 540 { +lab=#net6} +N 100 540 100 590 { +lab=#net6} +N -40 440 100 440 { +lab=#net4} N 220 0 220 10 { lab=CM2} -N -220 70 -220 90 { -lab=#net1} N -320 0 -220 0 { lab=CM1} N -320 0 -320 120 { @@ -16,7 +158,7 @@ lab=CM1} N -320 120 -260 120 { lab=CM1} N 220 70 220 90 { -lab=#net2} +lab=#net1} N -310 40 -260 40 { lab=VINN} N -310 -110 -260 -110 { @@ -32,13 +174,13 @@ lab=VINP} N 260 -110 310 -110 { lab=VINP} N -220 80 -40 80 { -lab=#net1} +lab=#net2} N 40 -80 220 -80 { -lab=#net1} -N -220 -80 -40 -80 { lab=#net2} +N -220 -80 -40 -80 { +lab=#net1} N 40 80 220 80 { -lab=#net2} +lab=#net1} N 140 -200 220 -200 { lab=#net3} N -220 -200 -140 -200 { @@ -71,58 +213,8 @@ N 220 -320 220 -310 { lab=VCC} N 380 -320 380 -310 { lab=VCC} -N 380 -0 440 0 { +N 380 0 440 0 { lab=VOUT} -N -220 -110 -210 -110 { -lab=#net2} -N -210 -110 -210 -80 { -lab=#net2} -N 210 -110 220 -110 { -lab=#net1} -N 210 -110 210 -80 { -lab=#net1} -N -390 200 -380 200 { -lab=GND} -N -390 200 -390 230 { -lab=GND} -N -390 230 -380 230 { -lab=GND} -N -220 120 -210 120 { -lab=GND} -N -210 120 -210 150 { -lab=GND} -N -220 150 -210 150 { -lab=GND} -N -220 40 -210 40 { -lab=#net1} -N -210 40 -210 70 { -lab=#net1} -N -220 70 -210 70 { -lab=#net1} -N 460 380 470 380 { -lab=VCC} -N 470 350 470 380 { -lab=VCC} -N 460 350 470 350 { -lab=VCC} -N 210 120 220 120 { -lab=GND} -N 210 120 210 150 { -lab=GND} -N 210 150 220 150 { -lab=GND} -N 210 40 220 40 { -lab=#net2} -N 210 40 210 70 { -lab=#net2} -N 210 70 220 70 { -lab=#net2} -N 380 200 390 200 { -lab=GND} -N 390 200 390 230 { -lab=GND} -N 380 230 390 230 { -lab=GND} N 220 -280 230 -280 { lab=VCC} N 230 -310 230 -280 { @@ -149,28 +241,6 @@ N -390 -310 -380 -310 { lab=VCC} N -220 0 -220 10 { lab=CM1} -N 340 380 370 380 { -lab=Iin1} -N 370 380 420 380 { -lab=Iin1} -N 370 380 370 410 { -lab=Iin1} -N 370 410 460 410 { -lab=Iin1} -N 300 320 370 320 { -lab=VCC} -N 370 320 460 320 { -lab=VCC} -N 460 320 460 350 { -lab=VCC} -N 300 320 300 350 { -lab=VCC} -N 290 380 300 380 { -lab=VCC} -N 290 350 300 350 { -lab=VCC} -N 290 350 290 380 { -lab=VCC} N -320 -280 -320 -200 { lab=#net4} N -320 -200 -220 -200 { @@ -180,7 +250,7 @@ lab=#net3} N 220 -200 320 -200 { lab=#net3} N -40 80 40 -80 { -lab=#net1} +lab=#net2} N 220 -250 220 -200 { lab=#net3} N 220 -200 220 -140 { @@ -188,295 +258,233 @@ lab=#net3} N 310 -110 310 40 { lab=VINP} N -40 -80 40 80 { -lab=#net2} +lab=#net1} N -310 -110 -310 40 { lab=VINN} N -220 -250 -220 -200 { lab=#net4} N -220 -200 -220 -140 { lab=#net4} -N 80 380 90 380 { -lab=VCC} -N 90 350 90 380 { -lab=VCC} -N 80 350 90 350 { -lab=VCC} -N -40 380 -10 380 { -lab=Iin2} -N -10 380 40 380 { -lab=Iin2} -N -10 380 -10 410 { -lab=Iin2} -N -10 410 80 410 { -lab=Iin2} -N -80 320 -10 320 { -lab=VCC} -N -10 320 80 320 { -lab=VCC} -N 80 320 80 350 { -lab=VCC} -N -80 320 -80 350 { -lab=VCC} -N -90 380 -80 380 { -lab=VCC} -N -90 350 -80 350 { -lab=VCC} -N -90 350 -90 380 { -lab=VCC} -N -0 -280 -0 -200 { +N 0 -280 0 -200 { lab=#net5} -N -540 -60 -500 -60 { -lab=#net7} -N -720 -110 -720 50 { -lab=#net7} -N -720 -110 -540 -110 { -lab=#net7} -N -720 110 -720 130 { -lab=GND} -N -540 110 -540 130 { -lab=GND} -N -540 30 -460 30 { -lab=#net8} -N -540 30 -540 50 { -lab=#net8} -N -540 -20 -500 -20 { -lab=GND} -N -540 -20 -540 0 { -lab=GND} -N -620 -10 -620 30 { -lab=#net8} -N -460 -10 -460 30 { -lab=#net8} -N -540 -110 -540 -60 { -lab=#net7} -N -460 -150 -460 -70 { -lab=VINN} -N -620 -150 -620 -70 { -lab=VINP} -N -620 30 -540 30 { -lab=#net8} -N -580 -20 -540 -20 { -lab=GND} -N -580 -60 -540 -60 { -lab=#net7} -N -450 550 -450 580 { -lab=#net9} -N -450 640 -450 690 { -lab=#net10} -N -410 720 -380 720 { -lab=#net9} -N -380 550 -380 720 { -lab=#net9} -N -450 550 -380 550 { -lab=#net9} -N -280 550 -280 580 { -lab=GND} -N -280 640 -280 690 { -lab=#net11} -N -240 720 -210 720 { -lab=GND} -N -210 550 -210 720 { -lab=GND} -N -280 550 -210 550 { -lab=GND} -N -70 550 -70 580 { -lab=Iin1} -N -70 640 -70 690 { -lab=#net12} -N -410 610 -380 610 { -lab=#net9} -N -210 720 -110 720 { -lab=GND} -N -450 520 -450 550 { -lab=#net9} -N -280 520 -280 550 { -lab=GND} -N -380 610 -320 610 { -lab=#net9} -N -320 570 -320 610 { -lab=#net9} -N -320 570 -110 570 { -lab=#net9} -N -110 570 -110 610 { -lab=#net9} -N 70 550 70 580 { -lab=Iin2} -N 70 640 70 690 { -lab=#net13} -N 30 570 30 610 { -lab=#net9} -N -140 670 -140 720 { -lab=GND} -N -140 670 30 670 { -lab=GND} -N 30 670 30 720 { -lab=GND} -N -110 570 30 570 { -lab=#net9} -C {sky130_fd_pr/nfet_01v8.sym} 240 120 0 1 {name=M1B -W=2.75 -L=1.5 +N -220 70 -220 90 { +lab=#net2} +C {devices/lab_pin.sym} -620 -150 2 1 {name=p4 sig_type=std_logic lab=VINP +} +C {devices/lab_pin.sym} -460 -150 0 0 {name=p5 sig_type=std_logic lab=VINN} +C {devices/code_shown.sym} 540 -270 0 0 {name=SETUP +simulator=ngspice +only_toplevel=false +value=" +.lib CACE\{PDK_ROOT\}/CACE\{PDK\}/libs.tech/combined/sky130.lib.spice CACE\{corner\} + +.include CACE\{DUT_path\} + +.temp CACE\{temperature\} + +.option SEED=CACE[CACE\{seed=12345\} + CACE\{iterations=0\}] + +* Flag unsafe operating conditions (exceeds models' specified limits) +.option warn=1 +"} +C {devices/code_shown.sym} 540 -20 0 0 {name=CONTROL +simulator=ngspice +only_toplevel=false +value=" +.control + + * run ac simulation + ac dec 20 1 1e12 + + * measure parameters + let vout_mag = db((Vout)) + let vout_phase_margin = phase(v(Vout)) * 180/pi + 180 + meas ac A0 find vout_mag at=1 + meas ac UGF when vout_mag=0 + meas ac PM find vout_phase_margin when vout_mag=0 + + echo $&A0 $&ugf $&PM > CACE\{simpath\}/CACE\{filename\}_CACE\{N\}.data +.endc +"} +C {devices/vcvs.sym} -620 -40 0 1 {name=E1 value=0.5} +C {devices/vcvs.sym} -460 -40 0 0 {name=E2 value=-0.5} +C {devices/vsource.sym} -720 80 0 0 {name=Vdm value="ac 1" savecurrent=false} +C {devices/vsource.sym} -540 80 0 0 {name=Vcm value=CACE\{vcm\} savecurrent=false} +C {devices/gnd.sym} -720 130 0 0 {name=l10 lab=GND} +C {devices/gnd.sym} -540 130 0 0 {name=l11 lab=GND} +C {devices/gnd.sym} -540 0 0 0 {name=l13 lab=GND} +C {devices/vsource.sym} -810 100 0 0 {name=vin value=CACE\{vcc\} savecurrent=false} +C {devices/gnd.sym} -810 130 0 0 {name=l14 lab=GND} +C {devices/vdd.sym} -810 70 0 0 {name=l15 lab=VCC} +C {devices/capa.sym} 410 30 0 0 {name=C1 +m=1 +value=CACE\{cl\} +footprint=1206 +device="ceramic capacitor"} +C {devices/gnd.sym} 410 60 0 0 {name=l12 lab=GND} +C {devices/vdd.sym} 320 530 0 0 {name=l3 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 340 590 0 1 {name=CM1 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 240 40 0 1 {name=M2B -W=4.0 -L=2.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} 460 590 0 0 {name=CM2 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {devices/gnd.sym} 220 150 0 0 {name=l1 lab=GND} -C {devices/lab_pin.sym} -310 -110 0 0 {name=p1 sig_type=std_logic lab=VINN} -C {sky130_fd_pr/nfet_01v8.sym} -240 120 0 0 {name=M1A -W=2.75 -L=1.5 +C {devices/lab_pin.sym} 320 620 3 0 {name=p9 sig_type=std_logic lab=CM1} +C {devices/vdd.sym} 680 530 0 0 {name=l7 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 700 590 0 1 {name=CM3 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} -240 40 0 0 {name=M2A -W=4.0 -L=2.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} 820 590 0 0 {name=CM4 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {devices/gnd.sym} -220 150 0 1 {name=l2 lab=GND} -C {devices/vdd.sym} 300 320 0 0 {name=l3 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 320 380 0 1 {name=CM1 -W=1.88 -L=3.0 -nf=1 -mult=2 +C {devices/lab_pin.sym} 680 620 3 0 {name=p11 sig_type=std_logic lab=CM2} +C {devices/isource.sym} -380 360 0 0 {name=I0 value=CACE\{IBIAS\}} +C {devices/isource.sym} -210 360 0 0 {name=I1 value=CACE\{IBIAS\}} +C {sky130_fd_pr/nfet3_01v8.sym} -360 480 0 1 {name=M17 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} 440 380 0 0 {name=CM2 -W=1.88 -L=3.0 +C {sky130_fd_pr/nfet3_01v8.sym} -360 590 0 1 {name=M18 +L=2 +W=1.4 +body=GND nf=1 -mult=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {devices/lab_pin.sym} 310 -110 0 1 {name=p6 sig_type=std_logic lab=VINP -} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 200 -280 0 0 {name=M3B -W=4.53 -L=1.0 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -230 480 0 0 {name=M19 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} -200 -280 0 1 {name=M3A -W=4.53 -L=1.0 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -190 590 0 1 {name=M20 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {devices/vdd.sym} 0 -320 0 0 {name=l6 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 360 -280 0 0 {name=M4B -W=4.53 -L=1.0 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -20 480 0 0 {name=M21 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} -360 -280 0 1 {name=M4A -W=4.53 -L=1.0 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -20 590 0 0 {name=M22 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} -380 230 0 1 {name=l8 lab=GND} -C {devices/gnd.sym} 380 230 0 1 {name=l9 lab=GND} -C {devices/lab_pin.sym} 440 0 2 0 {name=p2 sig_type=std_logic lab=VOUT} -C {devices/lab_pin.sym} -620 -150 2 1 {name=p4 sig_type=std_logic lab=VINP -} -C {devices/lab_pin.sym} -460 -150 0 0 {name=p5 sig_type=std_logic lab=VINN} -C {devices/capa.sym} 410 30 0 0 {name=C1 -m=1 -value=CACE\{cl\} -footprint=1206 -device="ceramic capacitor"} -C {devices/gnd.sym} 410 60 0 0 {name=l12 lab=GND} -C {sky130_fd_pr/nfet_01v8.sym} -360 200 0 1 {name=M5A -W=0.45 -L=3.45 -nf=1 -mult=2 +C {devices/gnd.sym} 0 620 0 0 {name=l16 lab=GND} +C {devices/gnd.sym} -210 620 0 0 {name=l17 lab=GND} +C {devices/gnd.sym} -380 620 0 0 {name=l18 lab=GND} +C {devices/lab_pin.sym} 0 420 0 0 {name=p41 sig_type=std_logic lab=Iin1} +C {devices/lab_pin.sym} 140 420 0 1 {name=p42 sig_type=std_logic lab=Iin2} +C {sky130_fd_pr/nfet3_01v8.sym} 120 480 0 0 {name=M23 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -486,11 +494,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 360 200 0 0 {name=M5B -W=0.45 -L=3.45 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} 120 590 0 0 {name=M24 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -500,81 +509,48 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} -240 -110 0 0 {name=MinA -W=4.0 -L=2.0 +C {devices/gnd.sym} 140 620 0 0 {name=l19 lab=GND} +C {devices/lab_pin.sym} 480 620 3 0 {name=p3 sig_type=std_logic lab=Iin1} +C {devices/lab_pin.sym} 840 620 1 1 {name=p10 sig_type=std_logic lab=Iin2} +C {devices/vdd.sym} -380 330 0 0 {name=l4 lab=VCC} +C {devices/vdd.sym} -210 330 0 0 {name=l5 lab=VCC} +C {devices/gnd.sym} 220 150 0 0 {name=l1 lab=GND} +C {devices/lab_pin.sym} -310 -110 0 0 {name=p1 sig_type=std_logic lab=VINN} +C {devices/gnd.sym} -220 150 0 1 {name=l2 lab=GND} +C {devices/lab_pin.sym} 310 -110 0 1 {name=p6 sig_type=std_logic lab=VINP +} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 200 -280 0 0 {name=M3B +W=4.53 +L=1.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 240 -110 0 1 {name=MinB -W=4.0 -L=2.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} -200 -280 0 1 {name=M3A +W=4.53 +L=1.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {devices/code_shown.sym} 540 -270 0 0 {name=SETUP -simulator=ngspice -only_toplevel=false -value=" -.lib CACE\{PDK_ROOT\}/CACE\{PDK\}/libs.tech/combined/sky130.lib.spice CACE\{corner\} - -.include CACE\{DUT_path\} - -.temp CACE\{temperature\} - -.option SEED=CACE[CACE\{seed=12345\} + CACE\{iterations=0\}] - -* Flag unsafe operating conditions (exceeds models' specified limits) -.option warn=1 -"} -C {devices/code_shown.sym} 540 -20 0 0 {name=CONTROL -simulator=ngspice -only_toplevel=false -value=" -.control - - * run ac simulation - ac dec 20 1 1e12 - - * measure parameters - let vout_mag = db((Vout)) - let vout_phase_margin = phase(v(Vout)) * 180/pi + 180 - meas ac A0 find vout_mag at=1 - meas ac UGF when vout_mag=0 - meas ac PM find vout_phase_margin when vout_mag=0 - - echo $&A0 $&ugf $&PM > CACE\{simpath\}/CACE\{filename\}_CACE\{N\}.data -.endc -"} -C {sky130_tests/passgate_nlvt.sym} -100 -200 2 1 {name=x2 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} -C {sky130_tests/passgate_nlvt.sym} 120 -200 2 0 {name=x1 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} -C {devices/vdd.sym} -100 -230 0 0 {name=l20 lab=VCC} -C {devices/vdd.sym} 120 -230 0 0 {name=l21 lab=VCC} -C {devices/gnd.sym} -100 -170 0 1 {name=l22 lab=GND} -C {devices/gnd.sym} 120 -170 0 0 {name=l23 lab=GND} -C {devices/lab_pin.sym} -220 0 1 0 {name=p8 sig_type=std_logic lab=CM1} -C {devices/lab_pin.sym} 300 410 3 0 {name=p9 sig_type=std_logic lab=CM1} -C {devices/lab_pin.sym} 220 0 1 0 {name=p7 sig_type=std_logic lab=CM2} -C {devices/vdd.sym} -80 320 0 0 {name=l7 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} -60 380 0 1 {name=CM3 -W=1.88 -L=3.0 +C {devices/vdd.sym} 0 -320 0 0 {name=l6 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 360 -280 0 0 {name=M4B +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -586,9 +562,9 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} 60 380 0 0 {name=CM4 -W=1.88 -L=3.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} -360 -280 0 1 {name=M4A +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -600,25 +576,23 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {devices/lab_pin.sym} -80 410 3 0 {name=p11 sig_type=std_logic lab=CM2} -C {devices/vcvs.sym} -620 -40 0 1 {name=E1 value=0.5} -C {devices/vcvs.sym} -460 -40 0 0 {name=E2 value=-0.5} -C {devices/vsource.sym} -720 80 0 0 {name=Vdm value="ac 1" savecurrent=false} -C {devices/vsource.sym} -540 80 0 0 {name=Vcm value=CACE\{vcm\} savecurrent=false} -C {devices/gnd.sym} -720 130 0 0 {name=l10 lab=GND} -C {devices/gnd.sym} -540 130 0 0 {name=l11 lab=GND} -C {devices/gnd.sym} -540 0 0 0 {name=l13 lab=GND} -C {devices/vsource.sym} -810 100 0 0 {name=vin value=CACE\{vcc\} savecurrent=false} -C {devices/gnd.sym} -810 130 0 0 {name=l14 lab=GND} -C {devices/vdd.sym} -810 70 0 0 {name=l15 lab=VCC} -C {devices/isource.sym} -450 490 0 0 {name=I0 value=CACE\{IBIAS\}} -C {devices/isource.sym} -280 490 0 0 {name=I1 value=CACE\{IBIAS\}} -C {sky130_fd_pr/nfet3_01v8.sym} -430 610 0 1 {name=M17 -L=2 -W=4.15 -body=GND -nf=2 +C {devices/gnd.sym} -380 230 0 1 {name=l8 lab=GND} +C {devices/gnd.sym} 380 230 0 1 {name=l9 lab=GND} +C {devices/lab_pin.sym} 440 0 2 0 {name=p2 sig_type=std_logic lab=VOUT} +C {sky130_tests/passgate_nlvt.sym} -100 -200 2 0 {name=x2 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} +C {sky130_tests/passgate_nlvt.sym} 120 -200 2 1 {name=x1 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} +C {devices/vdd.sym} -100 -230 0 0 {name=l20 lab=VCC} +C {devices/vdd.sym} 120 -230 0 0 {name=l21 lab=VCC} +C {devices/gnd.sym} -100 -170 0 1 {name=l22 lab=GND} +C {devices/gnd.sym} 120 -170 0 0 {name=l23 lab=GND} +C {devices/lab_pin.sym} -220 0 1 0 {name=p8 sig_type=std_logic lab=CM1} +C {devices/lab_pin.sym} 220 0 1 0 {name=p7 sig_type=std_logic lab=CM2} +C {sky130_fd_pr/nfet3_01v8.sym} -240 40 0 0 {name=M2A +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -628,12 +602,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -430 720 0 1 {name=M18 -L=2 -W=1.4 -body=GND +C {sky130_fd_pr/nfet3_01v8.sym} -240 120 0 0 {name=M1A +L=0.15 +W=1 nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -643,12 +617,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -300 610 0 0 {name=M19 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 40 0 1 {name=M2B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -658,12 +632,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -260 720 0 1 {name=M20 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 120 0 1 {name=M1B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -673,12 +647,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -90 610 0 0 {name=M21 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} -240 -110 0 0 {name=MinA +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -688,12 +662,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -90 720 0 0 {name=M22 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 -110 0 1 {name=MinB +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -703,17 +677,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} -70 750 0 0 {name=l16 lab=GND} -C {devices/gnd.sym} -280 750 0 0 {name=l17 lab=GND} -C {devices/gnd.sym} -450 750 0 0 {name=l18 lab=GND} -C {devices/lab_pin.sym} -70 550 0 0 {name=p41 sig_type=std_logic lab=Iin1} -C {devices/lab_pin.sym} 70 550 0 1 {name=p42 sig_type=std_logic lab=Iin2} -C {sky130_fd_pr/nfet3_01v8.sym} 50 610 0 0 {name=M23 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} -360 200 0 1 {name=M5A +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -723,12 +692,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} 50 720 0 0 {name=M24 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 360 200 0 0 {name=M5B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -738,8 +707,3 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} 70 750 0 0 {name=l19 lab=GND} -C {devices/lab_pin.sym} 460 410 3 0 {name=p3 sig_type=std_logic lab=Iin1} -C {devices/lab_pin.sym} 80 410 1 1 {name=p10 sig_type=std_logic lab=Iin2} -C {devices/vdd.sym} -450 460 0 0 {name=l4 lab=VCC} -C {devices/vdd.sym} -280 460 0 0 {name=l5 lab=VCC} diff --git a/cace/templates/ota_tb_linearity.sch b/cace/templates/ota_tb_linearity.sch index 1e5dc2e..df727c5 100644 --- a/cace/templates/ota_tb_linearity.sch +++ b/cace/templates/ota_tb_linearity.sch @@ -5,10 +5,118 @@ K {} V {} S {} E {} +N 480 590 490 590 { +lab=VCC} +N 490 560 490 590 { +lab=VCC} +N 480 560 490 560 { +lab=VCC} +N 360 590 390 590 { +lab=Iin1} +N 390 590 440 590 { +lab=Iin1} +N 390 590 390 620 { +lab=Iin1} +N 390 620 480 620 { +lab=Iin1} +N 320 530 390 530 { +lab=VCC} +N 390 530 480 530 { +lab=VCC} +N 480 530 480 560 { +lab=VCC} +N 320 530 320 560 { +lab=VCC} +N 310 590 320 590 { +lab=VCC} +N 310 560 320 560 { +lab=VCC} +N 310 560 310 590 { +lab=VCC} +N 840 590 850 590 { +lab=VCC} +N 850 560 850 590 { +lab=VCC} +N 840 560 850 560 { +lab=VCC} +N 720 590 750 590 { +lab=Iin2} +N 750 590 800 590 { +lab=Iin2} +N 750 590 750 620 { +lab=Iin2} +N 750 620 840 620 { +lab=Iin2} +N 680 530 750 530 { +lab=VCC} +N 750 530 840 530 { +lab=VCC} +N 840 530 840 560 { +lab=VCC} +N 680 530 680 560 { +lab=VCC} +N 670 590 680 590 { +lab=VCC} +N 670 560 680 560 { +lab=VCC} +N 670 560 670 590 { +lab=VCC} +N -380 420 -380 450 { +lab=#net1} +N -380 510 -380 560 { +lab=#net2} +N -340 590 -310 590 { +lab=#net1} +N -310 420 -310 590 { +lab=#net1} +N -380 420 -310 420 { +lab=#net1} +N -210 420 -210 450 { +lab=#net3} +N -210 510 -210 560 { +lab=#net4} +N -170 590 -140 590 { +lab=#net3} +N -140 420 -140 590 { +lab=#net3} +N -210 420 -140 420 { +lab=#net3} +N 0 420 0 450 { +lab=Iin1} +N 0 510 0 560 { +lab=#net5} +N -340 480 -310 480 { +lab=#net1} +N -140 590 -40 590 { +lab=#net3} +N -380 390 -380 420 { +lab=#net1} +N -210 390 -210 420 { +lab=#net3} +N -310 480 -250 480 { +lab=#net1} +N -250 440 -250 480 { +lab=#net1} +N -250 440 -40 440 { +lab=#net1} +N -40 440 -40 480 { +lab=#net1} +N 140 420 140 450 { +lab=Iin2} +N 140 510 140 560 { +lab=#net6} +N 100 440 100 480 { +lab=#net1} +N -70 540 -70 590 { +lab=#net3} +N -70 540 100 540 { +lab=#net3} +N 100 540 100 590 { +lab=#net3} +N -40 440 100 440 { +lab=#net1} N 220 0 220 10 { lab=CM2} -N -220 70 -220 90 { -lab=#net1} N -320 0 -220 0 { lab=CM1} N -320 0 -320 120 { @@ -16,11 +124,11 @@ lab=CM1} N -320 120 -260 120 { lab=CM1} N 220 70 220 90 { -lab=#net2} +lab=#net7} N -310 40 -260 40 { -lab=VOUT} +lab=#net8} N -310 -110 -260 -110 { -lab=VOUT} +lab=#net8} N 260 120 320 120 { lab=CM2} N 220 0 320 0 { @@ -32,35 +140,35 @@ lab=VINP} N 260 -110 310 -110 { lab=VINP} N -220 80 -40 80 { -lab=#net1} +lab=#net9} N 40 -80 220 -80 { -lab=#net1} +lab=#net9} N -220 -80 -40 -80 { -lab=#net2} +lab=#net7} N 40 80 220 80 { -lab=#net2} +lab=#net7} N 140 -200 220 -200 { -lab=#net3} +lab=#net10} N -220 -200 -140 -200 { -lab=#net4} +lab=#net11} N -80 -200 80 -200 { -lab=#net5} +lab=#net12} N -180 -280 180 -280 { -lab=#net5} +lab=#net12} N -380 -320 380 -320 { lab=VCC} N 320 -280 340 -280 { -lab=#net3} +lab=#net10} N -340 -280 -320 -280 { -lab=#net4} +lab=#net11} N -340 200 340 200 { -lab=#net6} +lab=#net13} N -380 -250 -380 170 { -lab=#net6} +lab=#net13} N -380 160 -320 160 { -lab=#net6} +lab=#net13} N -320 160 -320 200 { -lab=#net6} +lab=#net13} N 380 -250 380 170 { lab=VOUT} N -380 -320 -380 -310 { @@ -71,52 +179,8 @@ N 220 -320 220 -310 { lab=VCC} N 380 -320 380 -310 { lab=VCC} -N 380 -0 440 0 { +N 380 0 440 0 { lab=VOUT} -N -220 -110 -210 -110 { -lab=#net2} -N -210 -110 -210 -80 { -lab=#net2} -N 210 -110 220 -110 { -lab=#net1} -N 210 -110 210 -80 { -lab=#net1} -N -390 200 -380 200 { -lab=GND} -N -390 200 -390 230 { -lab=GND} -N -390 230 -380 230 { -lab=GND} -N -220 120 -210 120 { -lab=GND} -N -210 120 -210 150 { -lab=GND} -N -220 150 -210 150 { -lab=GND} -N -220 40 -210 40 { -lab=#net1} -N -210 40 -210 70 { -lab=#net1} -N -220 70 -210 70 { -lab=#net1} -N 210 120 220 120 { -lab=GND} -N 210 120 210 150 { -lab=GND} -N 210 150 220 150 { -lab=GND} -N 210 40 220 40 { -lab=#net2} -N 210 40 210 70 { -lab=#net2} -N 210 70 220 70 { -lab=#net2} -N 380 200 390 200 { -lab=GND} -N 390 200 390 230 { -lab=GND} -N 380 230 390 230 { -lab=GND} N 220 -280 230 -280 { lab=VCC} N 230 -310 230 -280 { @@ -144,274 +208,216 @@ lab=VCC} N -220 0 -220 10 { lab=CM1} N -320 -280 -320 -200 { -lab=#net4} +lab=#net11} N -320 -200 -220 -200 { -lab=#net4} +lab=#net11} N 320 -280 320 -200 { -lab=#net3} +lab=#net10} N 220 -200 320 -200 { -lab=#net3} +lab=#net10} N -40 80 40 -80 { -lab=#net1} +lab=#net9} N 220 -250 220 -200 { -lab=#net3} +lab=#net10} N 220 -200 220 -140 { -lab=#net3} +lab=#net10} N 310 -110 310 40 { lab=VINP} N -40 -80 40 80 { -lab=#net2} +lab=#net7} N -310 -110 -310 40 { -lab=VOUT} +lab=#net8} N -220 -250 -220 -200 { -lab=#net4} +lab=#net11} N -220 -200 -220 -140 { -lab=#net4} -N -0 -280 -0 -200 { -lab=#net5} -N 450 380 460 380 { -lab=VCC} -N 460 350 460 380 { -lab=VCC} -N 450 350 460 350 { -lab=VCC} -N 330 380 360 380 { -lab=Iin1} -N 360 380 410 380 { -lab=Iin1} -N 360 380 360 410 { -lab=Iin1} -N 360 410 450 410 { -lab=Iin1} -N 290 320 360 320 { -lab=VCC} -N 360 320 450 320 { -lab=VCC} -N 450 320 450 350 { -lab=VCC} -N 290 320 290 350 { -lab=VCC} -N 280 380 290 380 { -lab=VCC} -N 280 350 290 350 { -lab=VCC} -N 280 350 280 380 { -lab=VCC} -N 70 380 80 380 { -lab=VCC} -N 80 350 80 380 { -lab=VCC} -N 70 350 80 350 { -lab=VCC} -N -50 380 -20 380 { -lab=Iin2} -N -20 380 30 380 { -lab=Iin2} -N -20 380 -20 410 { -lab=Iin2} -N -20 410 70 410 { -lab=Iin2} -N -90 320 -20 320 { -lab=VCC} -N -20 320 70 320 { -lab=VCC} -N 70 320 70 350 { -lab=VCC} -N -90 320 -90 350 { -lab=VCC} -N -100 380 -90 380 { -lab=VCC} -N -100 350 -90 350 { -lab=VCC} -N -100 350 -100 380 { -lab=VCC} -N -460 550 -460 580 { -lab=#net7} -N -460 640 -460 690 { -lab=#net8} -N -420 720 -390 720 { -lab=#net7} -N -390 550 -390 720 { -lab=#net7} -N -460 550 -390 550 { -lab=#net7} -N -290 550 -290 580 { -lab=GND} -N -290 640 -290 690 { -lab=#net9} -N -250 720 -220 720 { -lab=GND} -N -220 550 -220 720 { -lab=GND} -N -290 550 -220 550 { -lab=GND} -N -80 550 -80 580 { -lab=Iin1} -N -80 640 -80 690 { -lab=#net10} -N -420 610 -390 610 { -lab=#net7} -N -220 720 -120 720 { -lab=GND} -N -460 520 -460 550 { -lab=#net7} -N -290 520 -290 550 { -lab=GND} -N -390 610 -330 610 { -lab=#net7} -N -330 570 -330 610 { -lab=#net7} -N -330 570 -120 570 { -lab=#net7} -N -120 570 -120 610 { -lab=#net7} -N 60 550 60 580 { -lab=Iin2} -N 60 640 60 690 { lab=#net11} -N 20 570 20 610 { -lab=#net7} -N -150 670 -150 720 { -lab=GND} -N -150 670 20 670 { -lab=GND} -N 20 670 20 720 { -lab=GND} -N -120 570 20 570 { -lab=#net7} -C {sky130_fd_pr/nfet_01v8.sym} 240 120 0 1 {name=M1B -W=2.75 -L=1.5 +N 0 -280 0 -200 { +lab=#net12} +N -220 70 -220 90 { +lab=#net9} +C {devices/lab_pin.sym} -620 -80 2 1 {name=p4 sig_type=std_logic lab=VINP +} +C {devices/code_shown.sym} 540 -270 0 0 {name=SETUP +simulator=ngspice +only_toplevel=false +value=" +.lib CACE\{PDK_ROOT\}/CACE\{PDK\}/libs.tech/combined/sky130.lib.spice CACE\{corner\} + +.include CACE\{DUT_path\} + +.temp CACE\{temperature\} + +.option SEED=CACE[CACE\{seed=12345\} + CACE\{iterations=0\}] + +* Flag unsafe operating conditions (exceeds models' specified limits) +.option warn=1 +"} +C {devices/code_shown.sym} 540 -20 0 0 {name=CONTROL +simulator=ngspice +only_toplevel=false +value=".control + * run simulation + tran 50u 51.2m + save all + + linearize v(vout) + set specwindow=blackman + fft v(vout) + let vout_mag = mag(v(vout)) + + meas ac h1 find vout_mag at=1035.15625 + meas ac h2 find vout_mag at=2070.31250 + meas ac h3 find vout_mag at=3105.46875 + meas ac h4 find vout_mag at=4140.62500 + meas ac h5 find vout_mag at=5175.78125 + + let hd2 = db(h1 / h2) + let hd3 = db(h1 / h3) + let thd = db(h1 / (h2 + h3 + h4 + h5)) + + echo $&hd2 $&hd3 $&thd > CACE\{simpath\}/CACE\{filename\}_CACE\{N\}.data +.endc +"} +C {devices/vsource.sym} -810 110 0 0 {name=vin value=CACE\{vcc\} savecurrent=false} +C {devices/gnd.sym} -810 140 0 0 {name=l14 lab=GND} +C {devices/vdd.sym} -810 80 0 0 {name=l15 lab=VCC} +C {devices/vsource.sym} -620 -50 0 1 {name=Vdm value="sin(0 0.45 1035.15625 0 0 45.0)" savecurrent=false} +C {devices/vsource.sym} -620 10 0 0 {name=Vcm value=CACE\{vcm\} savecurrent=false} +C {devices/gnd.sym} -620 40 0 0 {name=l10 lab=GND} +C {devices/capa.sym} 410 30 0 0 {name=C1 +m=1 +value=CACE\{cl\} +footprint=1206 +device="ceramic capacitor"} +C {devices/gnd.sym} 410 60 0 0 {name=l12 lab=GND} +C {devices/vdd.sym} 320 530 0 0 {name=l3 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 340 590 0 1 {name=CM1 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 240 40 0 1 {name=M2B -W=4.0 -L=2.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} 460 590 0 0 {name=CM2 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {devices/gnd.sym} 220 150 0 0 {name=l1 lab=GND} -C {sky130_fd_pr/nfet_01v8.sym} -240 120 0 0 {name=M1A -W=2.75 -L=1.5 +C {devices/lab_pin.sym} 320 620 3 0 {name=p9 sig_type=std_logic lab=CM1} +C {devices/vdd.sym} 680 530 0 0 {name=l7 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 700 590 0 1 {name=CM3 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} -240 40 0 0 {name=M2A -W=4.0 -L=2.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} 820 590 0 0 {name=CM4 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {devices/gnd.sym} -220 150 0 1 {name=l2 lab=GND} -C {devices/lab_pin.sym} 310 -110 0 1 {name=p6 sig_type=std_logic lab=VINP -} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 200 -280 0 0 {name=M3B -W=4.53 -L=1.0 -nf=1 -mult=2 +C {devices/lab_pin.sym} 680 620 3 0 {name=p11 sig_type=std_logic lab=CM2} +C {devices/isource.sym} -380 360 0 0 {name=I0 value=CACE\{IBIAS\}} +C {devices/isource.sym} -210 360 0 0 {name=I1 value=CACE\{IBIAS\}} +C {sky130_fd_pr/nfet3_01v8.sym} -360 480 0 1 {name=M17 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} -200 -280 0 1 {name=M3A -W=4.53 -L=1.0 +C {sky130_fd_pr/nfet3_01v8.sym} -360 590 0 1 {name=M18 +L=2 +W=1.4 +body=GND nf=1 -mult=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {devices/vdd.sym} 0 -320 0 0 {name=l6 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 360 -280 0 0 {name=M4B -W=4.53 -L=1.0 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -230 480 0 0 {name=M19 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} -360 -280 0 1 {name=M4A -W=4.53 -L=1.0 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -190 590 0 1 {name=M20 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} -380 230 0 1 {name=l8 lab=GND} -C {devices/gnd.sym} 380 230 0 1 {name=l9 lab=GND} -C {devices/lab_pin.sym} 440 0 2 0 {name=p2 sig_type=std_logic lab=VOUT} -C {devices/lab_pin.sym} -620 -80 2 1 {name=p4 sig_type=std_logic lab=VINP -} -C {devices/capa.sym} 410 30 0 0 {name=C1 -m=1 -value=CACE\{cl\} -footprint=1206 -device="ceramic capacitor"} -C {devices/gnd.sym} 410 60 0 0 {name=l12 lab=GND} -C {sky130_fd_pr/nfet_01v8.sym} -360 200 0 1 {name=M5A -W=0.45 -L=3.45 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -20 480 0 0 {name=M21 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -421,11 +427,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 360 200 0 0 {name=M5B -W=0.45 -L=3.45 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -20 590 0 0 {name=M22 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -435,10 +442,16 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} -240 -110 0 0 {name=MinA -W=4.0 -L=2.0 -nf=1 +C {devices/gnd.sym} 0 620 0 0 {name=l16 lab=GND} +C {devices/gnd.sym} -210 620 0 0 {name=l17 lab=GND} +C {devices/gnd.sym} -380 620 0 0 {name=l18 lab=GND} +C {devices/lab_pin.sym} 0 420 0 0 {name=p41 sig_type=std_logic lab=Iin1} +C {devices/lab_pin.sym} 140 420 0 1 {name=p42 sig_type=std_logic lab=Iin2} +C {sky130_fd_pr/nfet3_01v8.sym} 120 480 0 0 {name=M23 +L=2 +W=4.15 +body=GND +nf=2 mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" @@ -449,10 +462,11 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 240 -110 0 1 {name=MinB -W=4.0 -L=2.0 -nf=1 +C {sky130_fd_pr/nfet3_01v8.sym} 120 590 0 0 {name=M24 +L=2 +W=4.15 +body=GND +nf=2 mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" @@ -463,66 +477,18 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/code_shown.sym} 540 -270 0 0 {name=SETUP -simulator=ngspice -only_toplevel=false -value=" -.lib CACE\{PDK_ROOT\}/CACE\{PDK\}/libs.tech/combined/sky130.lib.spice CACE\{corner\} - -.include CACE\{DUT_path\} - -.temp CACE\{temperature\} - -.option SEED=CACE[CACE\{seed=12345\} + CACE\{iterations=0\}] - -* Flag unsafe operating conditions (exceeds models' specified limits) -.option warn=1 -"} -C {devices/code_shown.sym} 540 -20 0 0 {name=CONTROL -simulator=ngspice -only_toplevel=false -value=".control - * run simulation - tran 50u 51.2m - save all - - linearize v(vout) - set specwindow=blackman - fft v(vout) - let vout_mag = mag(v(vout)) - - meas ac h1 find vout_mag at=1035.15625 - meas ac h2 find vout_mag at=2070.31250 - meas ac h3 find vout_mag at=3105.46875 - meas ac h4 find vout_mag at=4140.62500 - meas ac h5 find vout_mag at=5175.78125 - - let hd2 = db(h1 / h2) - let hd3 = db(h1 / h3) - let thd = db(h1 / (h2 + h3 + h4 + h5)) - - echo $&hd2 $&hd3 $&thd > CACE\{simpath\}/CACE\{filename\}_CACE\{N\}.data -.endc -"} -C {sky130_tests/passgate_nlvt.sym} -100 -200 2 0 {name=x2 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} -C {sky130_tests/passgate_nlvt.sym} 120 -200 2 1 {name=x1 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} -C {devices/vdd.sym} -100 -230 0 0 {name=l20 lab=VCC} -C {devices/vdd.sym} 120 -230 0 0 {name=l21 lab=VCC} -C {devices/gnd.sym} -100 -170 0 1 {name=l22 lab=GND} -C {devices/gnd.sym} 120 -170 0 0 {name=l23 lab=GND} -C {devices/lab_pin.sym} -220 0 1 0 {name=p8 sig_type=std_logic lab=CM1} -C {devices/lab_pin.sym} 220 0 1 0 {name=p7 sig_type=std_logic lab=CM2} -C {devices/vsource.sym} -810 110 0 0 {name=vin value=CACE\{vcc\} savecurrent=false} -C {devices/gnd.sym} -810 140 0 0 {name=l14 lab=GND} -C {devices/vdd.sym} -810 80 0 0 {name=l15 lab=VCC} -C {devices/vsource.sym} -620 -50 0 1 {name=Vdm value="sin(0 0.45 1035.15625 0 0 45.0)" savecurrent=false} -C {devices/vsource.sym} -620 10 0 0 {name=Vcm value=CACE\{vcm\} savecurrent=false} -C {devices/gnd.sym} -620 40 0 0 {name=l10 lab=GND} -C {devices/lab_pin.sym} -310 -110 0 0 {name=p1 sig_type=std_logic lab=VOUT} -C {devices/vdd.sym} 290 320 0 0 {name=l3 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 310 380 0 1 {name=CM1 -W=1.88 -L=3.0 +C {devices/gnd.sym} 140 620 0 0 {name=l19 lab=GND} +C {devices/lab_pin.sym} 480 620 3 0 {name=p3 sig_type=std_logic lab=Iin1} +C {devices/lab_pin.sym} 840 620 1 1 {name=p10 sig_type=std_logic lab=Iin2} +C {devices/vdd.sym} -380 330 0 0 {name=l4 lab=VCC} +C {devices/vdd.sym} -210 330 0 0 {name=l5 lab=VCC} +C {devices/gnd.sym} 220 150 0 0 {name=l1 lab=GND} +C {devices/gnd.sym} -220 150 0 1 {name=l2 lab=GND} +C {devices/lab_pin.sym} 310 -110 0 1 {name=p6 sig_type=std_logic lab=VINP +} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 200 -280 0 0 {name=M3B +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -534,9 +500,9 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} 430 380 0 0 {name=CM2 -W=1.88 -L=3.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} -200 -280 0 1 {name=M3A +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -548,11 +514,10 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {devices/lab_pin.sym} 290 410 3 0 {name=p9 sig_type=std_logic lab=CM1} -C {devices/vdd.sym} -90 320 0 0 {name=l7 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} -70 380 0 1 {name=CM3 -W=1.88 -L=3.0 +C {devices/vdd.sym} 0 -320 0 0 {name=l6 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 360 -280 0 0 {name=M4B +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -564,9 +529,9 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} 50 380 0 0 {name=CM4 -W=1.88 -L=3.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} -360 -280 0 1 {name=M4A +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -578,15 +543,23 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {devices/lab_pin.sym} -90 410 3 0 {name=p11 sig_type=std_logic lab=CM2} -C {devices/isource.sym} -460 490 0 0 {name=I0 value=CACE\{IBIAS\}} -C {devices/isource.sym} -290 490 0 0 {name=I1 value=CACE\{IBIAS\}} -C {sky130_fd_pr/nfet3_01v8.sym} -440 610 0 1 {name=M17 -L=2 -W=4.15 -body=GND -nf=2 +C {devices/gnd.sym} -380 230 0 1 {name=l8 lab=GND} +C {devices/gnd.sym} 380 230 0 1 {name=l9 lab=GND} +C {devices/lab_pin.sym} 440 0 2 0 {name=p2 sig_type=std_logic lab=VOUT} +C {sky130_tests/passgate_nlvt.sym} -100 -200 2 0 {name=x2 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} +C {sky130_tests/passgate_nlvt.sym} 120 -200 2 1 {name=x1 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} +C {devices/vdd.sym} -100 -230 0 0 {name=l20 lab=VCC} +C {devices/vdd.sym} 120 -230 0 0 {name=l21 lab=VCC} +C {devices/gnd.sym} -100 -170 0 1 {name=l22 lab=GND} +C {devices/gnd.sym} 120 -170 0 0 {name=l23 lab=GND} +C {devices/lab_pin.sym} -220 0 1 0 {name=p8 sig_type=std_logic lab=CM1} +C {devices/lab_pin.sym} 220 0 1 0 {name=p7 sig_type=std_logic lab=CM2} +C {sky130_fd_pr/nfet3_01v8.sym} -240 40 0 0 {name=M2A +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -596,12 +569,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -440 720 0 1 {name=M18 -L=2 -W=1.4 -body=GND +C {sky130_fd_pr/nfet3_01v8.sym} -240 120 0 0 {name=M1A +L=0.15 +W=1 nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -611,12 +584,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -310 610 0 0 {name=M19 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 40 0 1 {name=M2B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -626,12 +599,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -270 720 0 1 {name=M20 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 120 0 1 {name=M1B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -641,12 +614,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -100 610 0 0 {name=M21 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} -240 -110 0 0 {name=MinA +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -656,12 +629,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -100 720 0 0 {name=M22 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 -110 0 1 {name=MinB +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -671,17 +644,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} -80 750 0 0 {name=l16 lab=GND} -C {devices/gnd.sym} -290 750 0 0 {name=l17 lab=GND} -C {devices/gnd.sym} -460 750 0 0 {name=l18 lab=GND} -C {devices/lab_pin.sym} -80 550 0 0 {name=p41 sig_type=std_logic lab=Iin1} -C {devices/lab_pin.sym} 60 550 0 1 {name=p42 sig_type=std_logic lab=Iin2} -C {sky130_fd_pr/nfet3_01v8.sym} 40 610 0 0 {name=M23 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} -360 200 0 1 {name=M5A +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -691,12 +659,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} 40 720 0 0 {name=M24 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 360 200 0 0 {name=M5B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -706,8 +674,4 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} 60 750 0 0 {name=l19 lab=GND} -C {devices/lab_pin.sym} 450 410 3 0 {name=p3 sig_type=std_logic lab=Iin1} -C {devices/lab_pin.sym} 70 410 1 1 {name=p10 sig_type=std_logic lab=Iin2} -C {devices/vdd.sym} -460 460 0 0 {name=l4 lab=VCC} -C {devices/vdd.sym} -290 460 0 0 {name=l5 lab=VCC} +C {devices/lab_pin.sym} -310 -110 0 0 {name=p1 sig_type=std_logic lab=VOUT} diff --git a/cace/templates/ota_tb_noise.sch b/cace/templates/ota_tb_noise.sch index eb9219b..4de083e 100644 --- a/cace/templates/ota_tb_noise.sch +++ b/cace/templates/ota_tb_noise.sch @@ -5,204 +5,40 @@ K {} V {} S {} E {} -N 220 0 220 10 { -lab=CM2} -N -220 70 -220 90 { -lab=#net1} -N -320 0 -220 0 { -lab=CM1} -N -320 0 -320 120 { -lab=CM1} -N -320 120 -260 120 { -lab=CM1} -N 220 70 220 90 { -lab=#net2} -N -310 40 -260 40 { -lab=VINN} -N -310 -110 -260 -110 { -lab=VINN} -N 260 120 320 120 { -lab=CM2} -N 220 0 320 0 { -lab=CM2} -N 320 0 320 120 { -lab=CM2} -N 260 40 310 40 { -lab=VINP} -N 260 -110 310 -110 { -lab=VINP} -N -220 80 -40 80 { -lab=#net1} -N 40 -80 220 -80 { -lab=#net1} -N -220 -80 -40 -80 { -lab=#net2} -N 40 80 220 80 { -lab=#net2} -N 140 -200 220 -200 { -lab=#net3} -N -220 -200 -140 -200 { -lab=#net4} -N -80 -200 80 -200 { -lab=#net5} -N -180 -280 180 -280 { -lab=#net5} -N -380 -320 380 -320 { -lab=VCC} -N 320 -280 340 -280 { -lab=#net3} -N -340 -280 -320 -280 { -lab=#net4} -N -340 200 340 200 { -lab=#net6} -N -380 -250 -380 170 { -lab=#net6} -N -380 160 -320 160 { -lab=#net6} -N -320 160 -320 200 { -lab=#net6} -N 380 -250 380 170 { -lab=VOUT} -N -380 -320 -380 -310 { -lab=VCC} -N -220 -320 -220 -310 { -lab=VCC} -N 220 -320 220 -310 { -lab=VCC} -N 380 -320 380 -310 { -lab=VCC} -N 380 -0 440 0 { -lab=VOUT} -N -220 -110 -210 -110 { -lab=#net2} -N -210 -110 -210 -80 { -lab=#net2} -N 210 -110 220 -110 { -lab=#net1} -N 210 -110 210 -80 { -lab=#net1} -N -390 200 -380 200 { -lab=GND} -N -390 200 -390 230 { -lab=GND} -N -390 230 -380 230 { -lab=GND} -N -220 120 -210 120 { -lab=GND} -N -210 120 -210 150 { -lab=GND} -N -220 150 -210 150 { -lab=GND} -N -220 40 -210 40 { -lab=#net1} -N -210 40 -210 70 { -lab=#net1} -N -220 70 -210 70 { -lab=#net1} -N 210 120 220 120 { -lab=GND} -N 210 120 210 150 { -lab=GND} -N 210 150 220 150 { -lab=GND} -N 210 40 220 40 { -lab=#net2} -N 210 40 210 70 { -lab=#net2} -N 210 70 220 70 { -lab=#net2} -N 380 200 390 200 { -lab=GND} -N 390 200 390 230 { -lab=GND} -N 380 230 390 230 { -lab=GND} -N 220 -280 230 -280 { -lab=VCC} -N 230 -310 230 -280 { -lab=VCC} -N 220 -310 230 -310 { -lab=VCC} -N 380 -280 390 -280 { -lab=VCC} -N 390 -310 390 -280 { -lab=VCC} -N 380 -310 390 -310 { -lab=VCC} -N -230 -280 -220 -280 { -lab=VCC} -N -230 -310 -230 -280 { -lab=VCC} -N -230 -310 -220 -310 { -lab=VCC} -N -390 -280 -380 -280 { -lab=VCC} -N -390 -310 -390 -280 { -lab=VCC} -N -390 -310 -380 -310 { -lab=VCC} -N -220 0 -220 10 { -lab=CM1} -N -320 -280 -320 -200 { -lab=#net4} -N -320 -200 -220 -200 { -lab=#net4} -N 320 -280 320 -200 { -lab=#net3} -N 220 -200 320 -200 { -lab=#net3} -N -40 80 40 -80 { -lab=#net1} -N 220 -250 220 -200 { -lab=#net3} -N 220 -200 220 -140 { -lab=#net3} -N 310 -110 310 40 { -lab=VINP} -N -40 -80 40 80 { -lab=#net2} -N -310 -110 -310 40 { -lab=VINN} -N -220 -250 -220 -200 { -lab=#net4} -N -220 -200 -220 -140 { -lab=#net4} -N -0 -280 -0 -200 { -lab=#net5} N -540 -60 -500 -60 { -lab=#net7} +lab=#net2} N -720 -110 -720 50 { -lab=#net7} +lab=#net2} N -720 -110 -540 -110 { -lab=#net7} +lab=#net2} N -720 110 -720 130 { lab=GND} N -540 110 -540 130 { lab=GND} N -540 30 -460 30 { -lab=#net8} +lab=#net3} N -540 30 -540 50 { -lab=#net8} +lab=#net3} N -540 -20 -500 -20 { lab=GND} N -540 -20 -540 0 { lab=GND} N -620 -10 -620 30 { -lab=#net8} +lab=#net3} N -460 -10 -460 30 { -lab=#net8} +lab=#net3} N -540 -110 -540 -60 { -lab=#net7} +lab=#net2} N -460 -150 -460 -70 { lab=VINN} N -620 -150 -620 -70 { lab=VINP} N -620 30 -540 30 { -lab=#net8} +lab=#net3} N -580 -20 -540 -20 { lab=GND} N -580 -60 -540 -60 { -lab=#net7} +lab=#net2} N 480 590 490 590 { lab=VCC} N 490 560 490 590 { @@ -260,180 +96,179 @@ lab=VCC} N 670 560 670 590 { lab=VCC} N -380 420 -380 450 { -lab=#net9} +lab=#net4} N -380 510 -380 560 { -lab=#net10} +lab=#net5} N -340 590 -310 590 { -lab=#net9} +lab=#net4} N -310 420 -310 590 { -lab=#net9} +lab=#net4} N -380 420 -310 420 { -lab=#net9} +lab=#net4} N -210 420 -210 450 { -lab=#net11} +lab=#net6} N -210 510 -210 560 { -lab=#net12} +lab=#net7} N -170 590 -140 590 { -lab=#net11} +lab=#net6} N -140 420 -140 590 { -lab=#net11} +lab=#net6} N -210 420 -140 420 { -lab=#net11} +lab=#net6} N 0 420 0 450 { lab=Iin1} N 0 510 0 560 { -lab=#net13} +lab=#net8} N -340 480 -310 480 { -lab=#net9} +lab=#net4} N -140 590 -40 590 { -lab=#net11} +lab=#net6} N -380 390 -380 420 { -lab=#net9} +lab=#net4} N -210 390 -210 420 { -lab=#net11} +lab=#net6} N -310 480 -250 480 { -lab=#net9} +lab=#net4} N -250 440 -250 480 { -lab=#net9} +lab=#net4} N -250 440 -40 440 { -lab=#net9} +lab=#net4} N -40 440 -40 480 { -lab=#net9} +lab=#net4} N 140 420 140 450 { lab=Iin2} N 140 510 140 560 { -lab=#net14} -N 100 440 100 480 { lab=#net9} +N 100 440 100 480 { +lab=#net4} N -70 540 -70 590 { -lab=#net11} +lab=#net6} N -70 540 100 540 { -lab=#net11} +lab=#net6} N 100 540 100 590 { -lab=#net11} +lab=#net6} N -40 440 100 440 { -lab=#net9} -C {sky130_fd_pr/nfet_01v8.sym} 240 120 0 1 {name=M1B -W=2.75 -L=1.5 -nf=1 -mult=1 -ad="'int((nf+1)/2) * W/nf * 0.29'" -pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" -as="'int((nf+2)/2) * W/nf * 0.29'" -ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" -nrd="'0.29 / W'" nrs="'0.29 / W'" -sa=0 sb=0 sd=0 -model=nfet_01v8 -spiceprefix=X -} -C {sky130_fd_pr/nfet_01v8.sym} 240 40 0 1 {name=M2B -W=4.0 -L=2.0 -nf=1 -mult=1 -ad="'int((nf+1)/2) * W/nf * 0.29'" -pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" -as="'int((nf+2)/2) * W/nf * 0.29'" -ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" -nrd="'0.29 / W'" nrs="'0.29 / W'" -sa=0 sb=0 sd=0 -model=nfet_01v8 -spiceprefix=X -} -C {devices/gnd.sym} 220 150 0 0 {name=l1 lab=GND} -C {devices/lab_pin.sym} -310 -110 0 0 {name=p1 sig_type=std_logic lab=VINN} -C {sky130_fd_pr/nfet_01v8.sym} -240 120 0 0 {name=M1A -W=2.75 -L=1.5 -nf=1 -mult=1 -ad="'int((nf+1)/2) * W/nf * 0.29'" -pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" -as="'int((nf+2)/2) * W/nf * 0.29'" -ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" -nrd="'0.29 / W'" nrs="'0.29 / W'" -sa=0 sb=0 sd=0 -model=nfet_01v8 -spiceprefix=X -} -C {sky130_fd_pr/nfet_01v8.sym} -240 40 0 0 {name=M2A -W=4.0 -L=2.0 -nf=1 -mult=1 -ad="'int((nf+1)/2) * W/nf * 0.29'" -pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" -as="'int((nf+2)/2) * W/nf * 0.29'" -ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" -nrd="'0.29 / W'" nrs="'0.29 / W'" -sa=0 sb=0 sd=0 -model=nfet_01v8 -spiceprefix=X -} -C {devices/gnd.sym} -220 150 0 1 {name=l2 lab=GND} -C {devices/lab_pin.sym} 310 -110 0 1 {name=p6 sig_type=std_logic lab=VINP -} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 200 -280 0 0 {name=M3B -W=4.53 -L=1.0 -nf=1 -mult=2 -ad="'int((nf+1)/2) * W/nf * 0.29'" -pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" -as="'int((nf+2)/2) * W/nf * 0.29'" -ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" -nrd="'0.29 / W'" nrs="'0.29 / W'" -sa=0 sb=0 sd=0 -model=pfet_01v8_lvt -spiceprefix=X -} -C {sky130_fd_pr/pfet_01v8_lvt.sym} -200 -280 0 1 {name=M3A -W=4.53 -L=1.0 -nf=1 -mult=2 -ad="'int((nf+1)/2) * W/nf * 0.29'" -pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" -as="'int((nf+2)/2) * W/nf * 0.29'" -ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" -nrd="'0.29 / W'" nrs="'0.29 / W'" -sa=0 sb=0 sd=0 -model=pfet_01v8_lvt -spiceprefix=X -} -C {devices/vdd.sym} 0 -320 0 0 {name=l6 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 360 -280 0 0 {name=M4B -W=4.53 -L=1.0 -nf=1 -mult=2 -ad="'int((nf+1)/2) * W/nf * 0.29'" -pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" -as="'int((nf+2)/2) * W/nf * 0.29'" -ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" -nrd="'0.29 / W'" nrs="'0.29 / W'" -sa=0 sb=0 sd=0 -model=pfet_01v8_lvt -spiceprefix=X -} -C {sky130_fd_pr/pfet_01v8_lvt.sym} -360 -280 0 1 {name=M4A -W=4.53 -L=1.0 -nf=1 -mult=2 -ad="'int((nf+1)/2) * W/nf * 0.29'" -pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" -as="'int((nf+2)/2) * W/nf * 0.29'" -ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" -nrd="'0.29 / W'" nrs="'0.29 / W'" -sa=0 sb=0 sd=0 -model=pfet_01v8_lvt -spiceprefix=X -} -C {devices/gnd.sym} -380 230 0 1 {name=l8 lab=GND} -C {devices/gnd.sym} 380 230 0 1 {name=l9 lab=GND} -C {devices/lab_pin.sym} 440 0 2 0 {name=p2 sig_type=std_logic lab=VOUT} +lab=#net4} +N 220 0 220 10 { +lab=CM2} +N -320 0 -220 0 { +lab=CM1} +N -320 0 -320 120 { +lab=CM1} +N -320 120 -260 120 { +lab=CM1} +N 220 70 220 90 { +lab=#net1} +N -310 40 -260 40 { +lab=VINN} +N -310 -110 -260 -110 { +lab=VINN} +N 260 120 320 120 { +lab=CM2} +N 220 0 320 0 { +lab=CM2} +N 320 0 320 120 { +lab=CM2} +N 260 40 310 40 { +lab=VINP} +N 260 -110 310 -110 { +lab=VINP} +N -220 80 -40 80 { +lab=#net2} +N 40 -80 220 -80 { +lab=#net2} +N -220 -80 -40 -80 { +lab=#net1} +N 40 80 220 80 { +lab=#net1} +N 140 -200 220 -200 { +lab=#net3} +N -220 -200 -140 -200 { +lab=#net4} +N -80 -200 80 -200 { +lab=#net5} +N -180 -280 180 -280 { +lab=#net5} +N -380 -320 380 -320 { +lab=VCC} +N 320 -280 340 -280 { +lab=#net3} +N -340 -280 -320 -280 { +lab=#net4} +N -340 200 340 200 { +lab=#net6} +N -380 -250 -380 170 { +lab=#net6} +N -380 160 -320 160 { +lab=#net6} +N -320 160 -320 200 { +lab=#net6} +N 380 -250 380 170 { +lab=VOUT} +N -380 -320 -380 -310 { +lab=VCC} +N -220 -320 -220 -310 { +lab=VCC} +N 220 -320 220 -310 { +lab=VCC} +N 380 -320 380 -310 { +lab=VCC} +N 380 0 440 0 { +lab=VOUT} +N 220 -280 230 -280 { +lab=VCC} +N 230 -310 230 -280 { +lab=VCC} +N 220 -310 230 -310 { +lab=VCC} +N 380 -280 390 -280 { +lab=VCC} +N 390 -310 390 -280 { +lab=VCC} +N 380 -310 390 -310 { +lab=VCC} +N -230 -280 -220 -280 { +lab=VCC} +N -230 -310 -230 -280 { +lab=VCC} +N -230 -310 -220 -310 { +lab=VCC} +N -390 -280 -380 -280 { +lab=VCC} +N -390 -310 -390 -280 { +lab=VCC} +N -390 -310 -380 -310 { +lab=VCC} +N -220 0 -220 10 { +lab=CM1} +N -320 -280 -320 -200 { +lab=#net4} +N -320 -200 -220 -200 { +lab=#net4} +N 320 -280 320 -200 { +lab=#net3} +N 220 -200 320 -200 { +lab=#net3} +N -40 80 40 -80 { +lab=#net2} +N 220 -250 220 -200 { +lab=#net3} +N 220 -200 220 -140 { +lab=#net3} +N 310 -110 310 40 { +lab=VINP} +N -40 -80 40 80 { +lab=#net1} +N -310 -110 -310 40 { +lab=VINN} +N -220 -250 -220 -200 { +lab=#net4} +N -220 -200 -220 -140 { +lab=#net4} +N 0 -280 0 -200 { +lab=#net5} +N -220 70 -220 90 { +lab=#net2} C {devices/lab_pin.sym} -620 -150 2 1 {name=p4 sig_type=std_logic lab=VINP } C {devices/lab_pin.sym} -460 -150 0 0 {name=p5 sig_type=std_logic lab=VINN} @@ -443,62 +278,6 @@ value=CACE\{cl\} footprint=1206 device="ceramic capacitor"} C {devices/gnd.sym} 410 60 0 0 {name=l12 lab=GND} -C {sky130_fd_pr/nfet_01v8.sym} -360 200 0 1 {name=M5A -W=0.45 -L=3.45 -nf=1 -mult=2 -ad="'int((nf+1)/2) * W/nf * 0.29'" -pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" -as="'int((nf+2)/2) * W/nf * 0.29'" -ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" -nrd="'0.29 / W'" nrs="'0.29 / W'" -sa=0 sb=0 sd=0 -model=nfet_01v8 -spiceprefix=X -} -C {sky130_fd_pr/nfet_01v8.sym} 360 200 0 0 {name=M5B -W=0.45 -L=3.45 -nf=1 -mult=2 -ad="'int((nf+1)/2) * W/nf * 0.29'" -pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" -as="'int((nf+2)/2) * W/nf * 0.29'" -ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" -nrd="'0.29 / W'" nrs="'0.29 / W'" -sa=0 sb=0 sd=0 -model=nfet_01v8 -spiceprefix=X -} -C {sky130_fd_pr/nfet_01v8.sym} -240 -110 0 0 {name=MinA -W=4.0 -L=2.0 -nf=1 -mult=1 -ad="'int((nf+1)/2) * W/nf * 0.29'" -pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" -as="'int((nf+2)/2) * W/nf * 0.29'" -ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" -nrd="'0.29 / W'" nrs="'0.29 / W'" -sa=0 sb=0 sd=0 -model=nfet_01v8 -spiceprefix=X -} -C {sky130_fd_pr/nfet_01v8.sym} 240 -110 0 1 {name=MinB -W=4.0 -L=2.0 -nf=1 -mult=1 -ad="'int((nf+1)/2) * W/nf * 0.29'" -pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" -as="'int((nf+2)/2) * W/nf * 0.29'" -ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" -nrd="'0.29 / W'" nrs="'0.29 / W'" -sa=0 sb=0 sd=0 -model=nfet_01v8 -spiceprefix=X -} C {devices/code_shown.sym} 540 -270 0 0 {name=SETUP simulator=ngspice only_toplevel=false @@ -528,14 +307,6 @@ value=" .endc "} -C {sky130_tests/passgate_nlvt.sym} -100 -200 2 0 {name=x2 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} -C {sky130_tests/passgate_nlvt.sym} 120 -200 2 1 {name=x1 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} -C {devices/vdd.sym} -100 -230 0 0 {name=l20 lab=VCC} -C {devices/vdd.sym} 120 -230 0 0 {name=l21 lab=VCC} -C {devices/gnd.sym} -100 -170 0 1 {name=l22 lab=GND} -C {devices/gnd.sym} 120 -170 0 0 {name=l23 lab=GND} -C {devices/lab_pin.sym} -220 0 1 0 {name=p8 sig_type=std_logic lab=CM1} -C {devices/lab_pin.sym} 220 0 1 0 {name=p7 sig_type=std_logic lab=CM2} C {devices/vcvs.sym} -620 -40 0 1 {name=E1 value=0.5} C {devices/vcvs.sym} -460 -40 0 0 {name=E2 value=-0.5} C {devices/vsource.sym} -720 80 0 1 {name=Vdm value="1 ac 1" savecurrent=false} @@ -738,3 +509,196 @@ C {devices/lab_pin.sym} 480 620 3 0 {name=p3 sig_type=std_logic lab=Iin1} C {devices/lab_pin.sym} 840 620 1 1 {name=p10 sig_type=std_logic lab=Iin2} C {devices/vdd.sym} -380 330 0 0 {name=l4 lab=VCC} C {devices/vdd.sym} -210 330 0 0 {name=l5 lab=VCC} +C {devices/gnd.sym} 220 150 0 0 {name=l1 lab=GND} +C {devices/lab_pin.sym} -310 -110 0 0 {name=p1 sig_type=std_logic lab=VINN} +C {devices/gnd.sym} -220 150 0 1 {name=l2 lab=GND} +C {devices/lab_pin.sym} 310 -110 0 1 {name=p6 sig_type=std_logic lab=VINP +} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 200 -280 0 0 {name=M3B +W=4.53 +L=1.0 +nf=1 +mult=2 +ad="'int((nf+1)/2) * W/nf * 0.29'" +pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" +as="'int((nf+2)/2) * W/nf * 0.29'" +ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +model=pfet_01v8_lvt +spiceprefix=X +} +C {sky130_fd_pr/pfet_01v8_lvt.sym} -200 -280 0 1 {name=M3A +W=4.53 +L=1.0 +nf=1 +mult=2 +ad="'int((nf+1)/2) * W/nf * 0.29'" +pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" +as="'int((nf+2)/2) * W/nf * 0.29'" +ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +model=pfet_01v8_lvt +spiceprefix=X +} +C {devices/vdd.sym} 0 -320 0 0 {name=l6 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 360 -280 0 0 {name=M4B +W=4.53 +L=1.0 +nf=1 +mult=2 +ad="'int((nf+1)/2) * W/nf * 0.29'" +pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" +as="'int((nf+2)/2) * W/nf * 0.29'" +ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +model=pfet_01v8_lvt +spiceprefix=X +} +C {sky130_fd_pr/pfet_01v8_lvt.sym} -360 -280 0 1 {name=M4A +W=4.53 +L=1.0 +nf=1 +mult=2 +ad="'int((nf+1)/2) * W/nf * 0.29'" +pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" +as="'int((nf+2)/2) * W/nf * 0.29'" +ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +model=pfet_01v8_lvt +spiceprefix=X +} +C {devices/gnd.sym} -380 230 0 1 {name=l8 lab=GND} +C {devices/gnd.sym} 380 230 0 1 {name=l9 lab=GND} +C {devices/lab_pin.sym} 440 0 2 0 {name=p2 sig_type=std_logic lab=VOUT} +C {sky130_tests/passgate_nlvt.sym} -100 -200 2 0 {name=x2 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} +C {sky130_tests/passgate_nlvt.sym} 120 -200 2 1 {name=x1 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} +C {devices/vdd.sym} -100 -230 0 0 {name=l20 lab=VCC} +C {devices/vdd.sym} 120 -230 0 0 {name=l21 lab=VCC} +C {devices/gnd.sym} -100 -170 0 1 {name=l22 lab=GND} +C {devices/gnd.sym} 120 -170 0 0 {name=l23 lab=GND} +C {devices/lab_pin.sym} -220 0 1 0 {name=p8 sig_type=std_logic lab=CM1} +C {devices/lab_pin.sym} 220 0 1 0 {name=p7 sig_type=std_logic lab=CM2} +C {sky130_fd_pr/nfet3_01v8.sym} -240 40 0 0 {name=M2A +L=0.15 +W=1 +nf=1 +mult=1 +body=GND +ad="'int((nf+1)/2) * W/nf * 0.29'" +pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" +as="'int((nf+2)/2) * W/nf * 0.29'" +ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +model=nfet_01v8 +spiceprefix=X +} +C {sky130_fd_pr/nfet3_01v8.sym} -240 120 0 0 {name=M1A +L=0.15 +W=1 +nf=1 +mult=1 +body=GND +ad="'int((nf+1)/2) * W/nf * 0.29'" +pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" +as="'int((nf+2)/2) * W/nf * 0.29'" +ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +model=nfet_01v8 +spiceprefix=X +} +C {sky130_fd_pr/nfet3_01v8.sym} 240 40 0 1 {name=M2B +L=0.15 +W=1 +nf=1 +mult=1 +body=GND +ad="'int((nf+1)/2) * W/nf * 0.29'" +pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" +as="'int((nf+2)/2) * W/nf * 0.29'" +ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +model=nfet_01v8 +spiceprefix=X +} +C {sky130_fd_pr/nfet3_01v8.sym} 240 120 0 1 {name=M1B +L=0.15 +W=1 +nf=1 +mult=1 +body=GND +ad="'int((nf+1)/2) * W/nf * 0.29'" +pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" +as="'int((nf+2)/2) * W/nf * 0.29'" +ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +model=nfet_01v8 +spiceprefix=X +} +C {sky130_fd_pr/nfet3_01v8.sym} -240 -110 0 0 {name=MinA +L=0.15 +W=1 +nf=1 +mult=1 +body=GND +ad="'int((nf+1)/2) * W/nf * 0.29'" +pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" +as="'int((nf+2)/2) * W/nf * 0.29'" +ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +model=nfet_01v8 +spiceprefix=X +} +C {sky130_fd_pr/nfet3_01v8.sym} 240 -110 0 1 {name=MinB +L=0.15 +W=1 +nf=1 +mult=1 +body=GND +ad="'int((nf+1)/2) * W/nf * 0.29'" +pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" +as="'int((nf+2)/2) * W/nf * 0.29'" +ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +model=nfet_01v8 +spiceprefix=X +} +C {sky130_fd_pr/nfet3_01v8.sym} -360 200 0 1 {name=M5A +L=0.15 +W=1 +nf=1 +mult=1 +body=GND +ad="'int((nf+1)/2) * W/nf * 0.29'" +pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" +as="'int((nf+2)/2) * W/nf * 0.29'" +ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +model=nfet_01v8 +spiceprefix=X +} +C {sky130_fd_pr/nfet3_01v8.sym} 360 200 0 0 {name=M5B +L=0.15 +W=1 +nf=1 +mult=1 +body=GND +ad="'int((nf+1)/2) * W/nf * 0.29'" +pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" +as="'int((nf+2)/2) * W/nf * 0.29'" +ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +model=nfet_01v8 +spiceprefix=X +} diff --git a/cace/templates/ota_tb_offset.sch b/cace/templates/ota_tb_offset.sch index a1b1832..9615e84 100644 --- a/cace/templates/ota_tb_offset.sch +++ b/cace/templates/ota_tb_offset.sch @@ -5,10 +5,118 @@ K {} V {} S {} E {} +N 480 590 490 590 { +lab=VCC} +N 490 560 490 590 { +lab=VCC} +N 480 560 490 560 { +lab=VCC} +N 360 590 390 590 { +lab=Iin1} +N 390 590 440 590 { +lab=Iin1} +N 390 590 390 620 { +lab=Iin1} +N 390 620 480 620 { +lab=Iin1} +N 320 530 390 530 { +lab=VCC} +N 390 530 480 530 { +lab=VCC} +N 480 530 480 560 { +lab=VCC} +N 320 530 320 560 { +lab=VCC} +N 310 590 320 590 { +lab=VCC} +N 310 560 320 560 { +lab=VCC} +N 310 560 310 590 { +lab=VCC} +N 840 590 850 590 { +lab=VCC} +N 850 560 850 590 { +lab=VCC} +N 840 560 850 560 { +lab=VCC} +N 720 590 750 590 { +lab=Iin2} +N 750 590 800 590 { +lab=Iin2} +N 750 590 750 620 { +lab=Iin2} +N 750 620 840 620 { +lab=Iin2} +N 680 530 750 530 { +lab=VCC} +N 750 530 840 530 { +lab=VCC} +N 840 530 840 560 { +lab=VCC} +N 680 530 680 560 { +lab=VCC} +N 670 590 680 590 { +lab=VCC} +N 670 560 680 560 { +lab=VCC} +N 670 560 670 590 { +lab=VCC} +N -380 420 -380 450 { +lab=#net1} +N -380 510 -380 560 { +lab=#net2} +N -340 590 -310 590 { +lab=#net1} +N -310 420 -310 590 { +lab=#net1} +N -380 420 -310 420 { +lab=#net1} +N -210 420 -210 450 { +lab=#net3} +N -210 510 -210 560 { +lab=#net4} +N -170 590 -140 590 { +lab=#net3} +N -140 420 -140 590 { +lab=#net3} +N -210 420 -140 420 { +lab=#net3} +N 0 420 0 450 { +lab=Iin1} +N 0 510 0 560 { +lab=#net5} +N -340 480 -310 480 { +lab=#net1} +N -140 590 -40 590 { +lab=#net3} +N -380 390 -380 420 { +lab=#net1} +N -210 390 -210 420 { +lab=#net3} +N -310 480 -250 480 { +lab=#net1} +N -250 440 -250 480 { +lab=#net1} +N -250 440 -40 440 { +lab=#net1} +N -40 440 -40 480 { +lab=#net1} +N 140 420 140 450 { +lab=Iin2} +N 140 510 140 560 { +lab=#net6} +N 100 440 100 480 { +lab=#net1} +N -70 540 -70 590 { +lab=#net3} +N -70 540 100 540 { +lab=#net3} +N 100 540 100 590 { +lab=#net3} +N -40 440 100 440 { +lab=#net1} N 220 0 220 10 { lab=CM2} -N -220 70 -220 90 { -lab=#net1} N -320 0 -220 0 { lab=CM1} N -320 0 -320 120 { @@ -16,11 +124,11 @@ lab=CM1} N -320 120 -260 120 { lab=CM1} N 220 70 220 90 { -lab=#net2} +lab=#net7} N -310 40 -260 40 { -lab=VOUT} +lab=#net8} N -310 -110 -260 -110 { -lab=VOUT} +lab=#net8} N 260 120 320 120 { lab=CM2} N 220 0 320 0 { @@ -32,35 +140,35 @@ lab=VINP} N 260 -110 310 -110 { lab=VINP} N -220 80 -40 80 { -lab=#net1} +lab=#net9} N 40 -80 220 -80 { -lab=#net1} +lab=#net9} N -220 -80 -40 -80 { -lab=#net2} +lab=#net7} N 40 80 220 80 { -lab=#net2} +lab=#net7} N 140 -200 220 -200 { -lab=#net3} +lab=#net10} N -220 -200 -140 -200 { -lab=#net4} +lab=#net11} N -80 -200 80 -200 { -lab=#net5} +lab=#net12} N -180 -280 180 -280 { -lab=#net5} +lab=#net12} N -380 -320 380 -320 { lab=VCC} N 320 -280 340 -280 { -lab=#net3} +lab=#net10} N -340 -280 -320 -280 { -lab=#net4} +lab=#net11} N -340 200 340 200 { -lab=#net6} +lab=#net13} N -380 -250 -380 170 { -lab=#net6} +lab=#net13} N -380 160 -320 160 { -lab=#net6} +lab=#net13} N -320 160 -320 200 { -lab=#net6} +lab=#net13} N 380 -250 380 170 { lab=VOUT} N -380 -320 -380 -310 { @@ -71,52 +179,8 @@ N 220 -320 220 -310 { lab=VCC} N 380 -320 380 -310 { lab=VCC} -N 380 -0 440 0 { +N 380 0 440 0 { lab=VOUT} -N -220 -110 -210 -110 { -lab=#net2} -N -210 -110 -210 -80 { -lab=#net2} -N 210 -110 220 -110 { -lab=#net1} -N 210 -110 210 -80 { -lab=#net1} -N -390 200 -380 200 { -lab=GND} -N -390 200 -390 230 { -lab=GND} -N -390 230 -380 230 { -lab=GND} -N -220 120 -210 120 { -lab=GND} -N -210 120 -210 150 { -lab=GND} -N -220 150 -210 150 { -lab=GND} -N -220 40 -210 40 { -lab=#net1} -N -210 40 -210 70 { -lab=#net1} -N -220 70 -210 70 { -lab=#net1} -N 210 120 220 120 { -lab=GND} -N 210 120 210 150 { -lab=GND} -N 210 150 220 150 { -lab=GND} -N 210 40 220 40 { -lab=#net2} -N 210 40 210 70 { -lab=#net2} -N 210 70 220 70 { -lab=#net2} -N 380 200 390 200 { -lab=GND} -N 390 200 390 230 { -lab=GND} -N 380 230 390 230 { -lab=GND} N 220 -280 230 -280 { lab=VCC} N 230 -310 230 -280 { @@ -144,272 +208,202 @@ lab=VCC} N -220 0 -220 10 { lab=CM1} N -320 -280 -320 -200 { -lab=#net4} +lab=#net11} N -320 -200 -220 -200 { -lab=#net4} +lab=#net11} N 320 -280 320 -200 { -lab=#net3} +lab=#net10} N 220 -200 320 -200 { -lab=#net3} +lab=#net10} N -40 80 40 -80 { -lab=#net1} +lab=#net9} N 220 -250 220 -200 { -lab=#net3} +lab=#net10} N 220 -200 220 -140 { -lab=#net3} +lab=#net10} N 310 -110 310 40 { lab=VINP} N -40 -80 40 80 { -lab=#net2} +lab=#net7} N -310 -110 -310 40 { -lab=VOUT} +lab=#net8} N -220 -250 -220 -200 { -lab=#net4} +lab=#net11} N -220 -200 -220 -140 { -lab=#net4} -N -0 -280 -0 -200 { -lab=#net5} -N 420 390 430 390 { -lab=VCC} -N 430 360 430 390 { -lab=VCC} -N 420 360 430 360 { -lab=VCC} -N 300 390 330 390 { -lab=Iin1} -N 330 390 380 390 { -lab=Iin1} -N 330 390 330 420 { -lab=Iin1} -N 330 420 420 420 { -lab=Iin1} -N 260 330 330 330 { -lab=VCC} -N 330 330 420 330 { -lab=VCC} -N 420 330 420 360 { -lab=VCC} -N 260 330 260 360 { -lab=VCC} -N 250 390 260 390 { -lab=VCC} -N 250 360 260 360 { -lab=VCC} -N 250 360 250 390 { -lab=VCC} -N 40 390 50 390 { -lab=VCC} -N 50 360 50 390 { -lab=VCC} -N 40 360 50 360 { -lab=VCC} -N -80 390 -50 390 { -lab=Iin2} -N -50 390 0 390 { -lab=Iin2} -N -50 390 -50 420 { -lab=Iin2} -N -50 420 40 420 { -lab=Iin2} -N -120 330 -50 330 { -lab=VCC} -N -50 330 40 330 { -lab=VCC} -N 40 330 40 360 { -lab=VCC} -N -120 330 -120 360 { -lab=VCC} -N -130 390 -120 390 { -lab=VCC} -N -130 360 -120 360 { -lab=VCC} -N -130 360 -130 390 { -lab=VCC} -N -490 560 -490 590 { -lab=#net7} -N -490 650 -490 700 { -lab=#net8} -N -450 730 -420 730 { -lab=#net7} -N -420 560 -420 730 { -lab=#net7} -N -490 560 -420 560 { -lab=#net7} -N -320 560 -320 590 { -lab=GND} -N -320 650 -320 700 { -lab=#net9} -N -280 730 -250 730 { -lab=GND} -N -250 560 -250 730 { -lab=GND} -N -320 560 -250 560 { -lab=GND} -N -110 560 -110 590 { -lab=Iin1} -N -110 650 -110 700 { -lab=#net10} -N -450 620 -420 620 { -lab=#net7} -N -250 730 -150 730 { -lab=GND} -N -490 530 -490 560 { -lab=#net7} -N -320 530 -320 560 { -lab=GND} -N -420 620 -360 620 { -lab=#net7} -N -360 580 -360 620 { -lab=#net7} -N -360 580 -150 580 { -lab=#net7} -N -150 580 -150 620 { -lab=#net7} -N 30 560 30 590 { -lab=Iin2} -N 30 650 30 700 { lab=#net11} -N -10 580 -10 620 { -lab=#net7} -N -180 680 -180 730 { -lab=GND} -N -180 680 -10 680 { -lab=GND} -N -10 680 -10 730 { -lab=GND} -N -150 580 -10 580 { -lab=#net7} -C {sky130_fd_pr/nfet_01v8.sym} 240 120 0 1 {name=M1B -W=2.75 -L=1.5 +N 0 -280 0 -200 { +lab=#net12} +N -220 70 -220 90 { +lab=#net9} +C {devices/code_shown.sym} 540 -270 0 0 {name=SETUP +simulator=ngspice +only_toplevel=false +value=" +.lib CACE\{PDK_ROOT\}/CACE\{PDK\}/libs.tech/combined/sky130.lib.spice CACE\{corner\} + +.include CACE\{DUT_path\} + +.temp CACE\{temperature\} + +.option SEED=CACE[CACE\{seed=12345\} + CACE\{iterations=0\}] + +* Flag unsafe operating conditions (exceeds models' specified limits) +.option warn=1 +"} +C {devices/code_shown.sym} 540 -20 0 0 {name=CONTROL +simulator=ngspice +only_toplevel=false +value=" +.control + tran 1ms 10ms ; Transient analysis for 10ms + + meas ac offset find vout at=0 + + wrdata CACE\{simpath\}/CACE\{filename\}_CACE\{N\}.data offset + +.endc +"} +C {devices/vsource.sym} -820 100 0 0 {name=vin value=CACE\{vcc\} savecurrent=false} +C {devices/gnd.sym} -820 130 0 0 {name=l14 lab=GND} +C {devices/vdd.sym} -820 70 0 0 {name=l15 lab=VCC} +C {devices/vsource.sym} -700 100 0 0 {name=vinp value="PULSE(0 1.8 0 10ms 1ns 10ms 20ms)" savecurrent=false} +C {devices/gnd.sym} -700 130 0 1 {name=l10 lab=GND} +C {devices/lab_pin.sym} -700 70 2 1 {name=p3 sig_type=std_logic lab=VINP +} +C {devices/capa.sym} 410 30 0 0 {name=C1 +m=1 +value=CACE\{cl\} +footprint=1206 +device="ceramic capacitor"} +C {devices/gnd.sym} 410 60 0 0 {name=l12 lab=GND} +C {devices/vdd.sym} 320 530 0 0 {name=l3 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 340 590 0 1 {name=CM1 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 240 40 0 1 {name=M2B -W=4.0 -L=2.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} 460 590 0 0 {name=CM2 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {devices/gnd.sym} 220 150 0 0 {name=l1 lab=GND} -C {sky130_fd_pr/nfet_01v8.sym} -240 120 0 0 {name=M1A -W=2.75 -L=1.5 +C {devices/lab_pin.sym} 320 620 3 0 {name=p9 sig_type=std_logic lab=CM1} +C {devices/vdd.sym} 680 530 0 0 {name=l7 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 700 590 0 1 {name=CM3 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} -240 40 0 0 {name=M2A -W=4.0 -L=2.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} 820 590 0 0 {name=CM4 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {devices/gnd.sym} -220 150 0 1 {name=l2 lab=GND} -C {devices/lab_pin.sym} 310 -110 0 1 {name=p6 sig_type=std_logic lab=VINP -} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 200 -280 0 0 {name=M3B -W=4.53 -L=1.0 -nf=1 -mult=2 +C {devices/lab_pin.sym} 680 620 3 0 {name=p11 sig_type=std_logic lab=CM2} +C {devices/isource.sym} -380 360 0 0 {name=I0 value=CACE\{IBIAS\}} +C {devices/isource.sym} -210 360 0 0 {name=I1 value=CACE\{IBIAS\}} +C {sky130_fd_pr/nfet3_01v8.sym} -360 480 0 1 {name=M17 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} -200 -280 0 1 {name=M3A -W=4.53 -L=1.0 +C {sky130_fd_pr/nfet3_01v8.sym} -360 590 0 1 {name=M18 +L=2 +W=1.4 +body=GND nf=1 -mult=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {devices/vdd.sym} 0 -320 0 0 {name=l6 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 360 -280 0 0 {name=M4B -W=4.53 -L=1.0 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -230 480 0 0 {name=M19 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} -360 -280 0 1 {name=M4A -W=4.53 -L=1.0 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -190 590 0 1 {name=M20 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} -380 230 0 1 {name=l8 lab=GND} -C {devices/gnd.sym} 380 230 0 1 {name=l9 lab=GND} -C {devices/lab_pin.sym} 440 0 2 0 {name=p2 sig_type=std_logic lab=VOUT} -C {devices/capa.sym} 410 30 0 0 {name=C1 -m=1 -value=CACE\{cl\} -footprint=1206 -device="ceramic capacitor"} -C {devices/gnd.sym} 410 60 0 0 {name=l12 lab=GND} -C {sky130_fd_pr/nfet_01v8.sym} -360 200 0 1 {name=M5A -W=0.45 -L=3.45 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -20 480 0 0 {name=M21 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -419,11 +413,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 360 200 0 0 {name=M5B -W=0.45 -L=3.45 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -20 590 0 0 {name=M22 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -433,10 +428,16 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} -240 -110 0 0 {name=MinA -W=4.0 -L=2.0 -nf=1 +C {devices/gnd.sym} 0 620 0 0 {name=l16 lab=GND} +C {devices/gnd.sym} -210 620 0 0 {name=l17 lab=GND} +C {devices/gnd.sym} -380 620 0 0 {name=l18 lab=GND} +C {devices/lab_pin.sym} 0 420 0 0 {name=p41 sig_type=std_logic lab=Iin1} +C {devices/lab_pin.sym} 140 420 0 1 {name=p42 sig_type=std_logic lab=Iin2} +C {sky130_fd_pr/nfet3_01v8.sym} 120 480 0 0 {name=M23 +L=2 +W=4.15 +body=GND +nf=2 mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" @@ -447,10 +448,11 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 240 -110 0 1 {name=MinB -W=4.0 -L=2.0 -nf=1 +C {sky130_fd_pr/nfet3_01v8.sym} 120 590 0 0 {name=M24 +L=2 +W=4.15 +body=GND +nf=2 mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" @@ -461,54 +463,18 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/code_shown.sym} 540 -270 0 0 {name=SETUP -simulator=ngspice -only_toplevel=false -value=" -.lib CACE\{PDK_ROOT\}/CACE\{PDK\}/libs.tech/combined/sky130.lib.spice CACE\{corner\} - -.include CACE\{DUT_path\} - -.temp CACE\{temperature\} - -.option SEED=CACE[CACE\{seed=12345\} + CACE\{iterations=0\}] - -* Flag unsafe operating conditions (exceeds models' specified limits) -.option warn=1 -"} -C {devices/code_shown.sym} 540 -20 0 0 {name=CONTROL -simulator=ngspice -only_toplevel=false -value=" -.control - tran 1ms 10ms ; Transient analysis for 10ms - - meas ac offset find vout at=0 - - wrdata CACE\{simpath\}/CACE\{filename\}_CACE\{N\}.data offset - -.endc -"} -C {sky130_tests/passgate_nlvt.sym} -100 -200 2 0 {name=x2 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} -C {sky130_tests/passgate_nlvt.sym} 120 -200 2 1 {name=x1 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} -C {devices/vdd.sym} -100 -230 0 0 {name=l20 lab=VCC} -C {devices/vdd.sym} 120 -230 0 0 {name=l21 lab=VCC} -C {devices/gnd.sym} -100 -170 0 1 {name=l22 lab=GND} -C {devices/gnd.sym} 120 -170 0 0 {name=l23 lab=GND} -C {devices/lab_pin.sym} -220 0 1 0 {name=p8 sig_type=std_logic lab=CM1} -C {devices/lab_pin.sym} 220 0 1 0 {name=p7 sig_type=std_logic lab=CM2} -C {devices/vsource.sym} -820 100 0 0 {name=vin value=CACE\{vcc\} savecurrent=false} -C {devices/gnd.sym} -820 130 0 0 {name=l14 lab=GND} -C {devices/vdd.sym} -820 70 0 0 {name=l15 lab=VCC} -C {devices/vsource.sym} -700 100 0 0 {name=vinp value="PULSE(0 1.8 0 10ms 1ns 10ms 20ms)" savecurrent=false} -C {devices/lab_pin.sym} -310 -110 0 0 {name=p1 sig_type=std_logic lab=VOUT} -C {devices/gnd.sym} -700 130 0 1 {name=l10 lab=GND} -C {devices/lab_pin.sym} -700 70 2 1 {name=p3 sig_type=std_logic lab=VINP +C {devices/gnd.sym} 140 620 0 0 {name=l19 lab=GND} +C {devices/lab_pin.sym} 480 620 3 0 {name=p1 sig_type=std_logic lab=Iin1} +C {devices/lab_pin.sym} 840 620 1 1 {name=p10 sig_type=std_logic lab=Iin2} +C {devices/vdd.sym} -380 330 0 0 {name=l4 lab=VCC} +C {devices/vdd.sym} -210 330 0 0 {name=l5 lab=VCC} +C {devices/gnd.sym} 220 150 0 0 {name=l1 lab=GND} +C {devices/gnd.sym} -220 150 0 1 {name=l2 lab=GND} +C {devices/lab_pin.sym} 310 -110 0 1 {name=p6 sig_type=std_logic lab=VINP } -C {devices/vdd.sym} 260 330 0 0 {name=l3 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 280 390 0 1 {name=CM1 -W=1.88 -L=3.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} 200 -280 0 0 {name=M3B +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -520,9 +486,9 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} 400 390 0 0 {name=CM2 -W=1.88 -L=3.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} -200 -280 0 1 {name=M3A +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -534,11 +500,10 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {devices/lab_pin.sym} 260 420 3 0 {name=p9 sig_type=std_logic lab=CM1} -C {devices/vdd.sym} -120 330 0 0 {name=l7 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} -100 390 0 1 {name=CM3 -W=1.88 -L=3.0 +C {devices/vdd.sym} 0 -320 0 0 {name=l6 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 360 -280 0 0 {name=M4B +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -550,9 +515,9 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} 20 390 0 0 {name=CM4 -W=1.88 -L=3.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} -360 -280 0 1 {name=M4A +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -564,15 +529,23 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {devices/lab_pin.sym} -120 420 3 0 {name=p11 sig_type=std_logic lab=CM2} -C {devices/isource.sym} -490 500 0 0 {name=I0 value=CACE\{IBIAS\}} -C {devices/isource.sym} -320 500 0 0 {name=I1 value=CACE\{IBIAS\}} -C {sky130_fd_pr/nfet3_01v8.sym} -470 620 0 1 {name=M17 -L=2 -W=4.15 -body=GND -nf=2 +C {devices/gnd.sym} -380 230 0 1 {name=l8 lab=GND} +C {devices/gnd.sym} 380 230 0 1 {name=l9 lab=GND} +C {devices/lab_pin.sym} 440 0 2 0 {name=p4 sig_type=std_logic lab=VOUT} +C {sky130_tests/passgate_nlvt.sym} -100 -200 2 0 {name=x2 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} +C {sky130_tests/passgate_nlvt.sym} 120 -200 2 1 {name=x1 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} +C {devices/vdd.sym} -100 -230 0 0 {name=l20 lab=VCC} +C {devices/vdd.sym} 120 -230 0 0 {name=l21 lab=VCC} +C {devices/gnd.sym} -100 -170 0 1 {name=l22 lab=GND} +C {devices/gnd.sym} 120 -170 0 0 {name=l23 lab=GND} +C {devices/lab_pin.sym} -220 0 1 0 {name=p8 sig_type=std_logic lab=CM1} +C {devices/lab_pin.sym} 220 0 1 0 {name=p7 sig_type=std_logic lab=CM2} +C {sky130_fd_pr/nfet3_01v8.sym} -240 40 0 0 {name=M2A +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -582,12 +555,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -470 730 0 1 {name=M18 -L=2 -W=1.4 -body=GND +C {sky130_fd_pr/nfet3_01v8.sym} -240 120 0 0 {name=M1A +L=0.15 +W=1 nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -597,12 +570,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -340 620 0 0 {name=M19 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 40 0 1 {name=M2B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -612,12 +585,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -300 730 0 1 {name=M20 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 120 0 1 {name=M1B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -627,12 +600,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -130 620 0 0 {name=M21 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} -240 -110 0 0 {name=MinA +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -642,12 +615,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -130 730 0 0 {name=M22 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 -110 0 1 {name=MinB +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -657,17 +630,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} -110 760 0 0 {name=l16 lab=GND} -C {devices/gnd.sym} -320 760 0 0 {name=l17 lab=GND} -C {devices/gnd.sym} -490 760 0 0 {name=l18 lab=GND} -C {devices/lab_pin.sym} -110 560 0 0 {name=p41 sig_type=std_logic lab=Iin1} -C {devices/lab_pin.sym} 30 560 0 1 {name=p42 sig_type=std_logic lab=Iin2} -C {sky130_fd_pr/nfet3_01v8.sym} 10 620 0 0 {name=M23 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} -360 200 0 1 {name=M5A +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -677,12 +645,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} 10 730 0 0 {name=M24 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 360 200 0 0 {name=M5B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -692,8 +660,4 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} 30 760 0 0 {name=l19 lab=GND} -C {devices/lab_pin.sym} 420 420 3 0 {name=p4 sig_type=std_logic lab=Iin1} -C {devices/lab_pin.sym} 40 420 1 1 {name=p10 sig_type=std_logic lab=Iin2} -C {devices/vdd.sym} -490 470 0 0 {name=l4 lab=VCC} -C {devices/vdd.sym} -320 470 0 0 {name=l5 lab=VCC} +C {devices/lab_pin.sym} -310 -110 0 0 {name=p2 sig_type=std_logic lab=VOUT} diff --git a/cace/templates/ota_tb_power.sch b/cace/templates/ota_tb_power.sch index 8daa14f..56b7d45 100644 --- a/cace/templates/ota_tb_power.sch +++ b/cace/templates/ota_tb_power.sch @@ -5,10 +5,152 @@ K {} V {} S {} E {} +N -540 -60 -500 -60 { +lab=#net7} +N -720 -110 -720 50 { +lab=#net7} +N -720 -110 -540 -110 { +lab=#net7} +N -720 110 -720 130 { +lab=GND} +N -540 110 -540 130 { +lab=GND} +N -540 30 -460 30 { +lab=#net8} +N -540 30 -540 50 { +lab=#net8} +N -540 -20 -500 -20 { +lab=GND} +N -540 -20 -540 0 { +lab=GND} +N -620 -10 -620 30 { +lab=#net8} +N -460 -10 -460 30 { +lab=#net8} +N -540 -110 -540 -60 { +lab=#net7} +N -460 -150 -460 -70 { +lab=VINN} +N -620 -150 -620 -70 { +lab=VINP} +N -620 30 -540 30 { +lab=#net8} +N -580 -20 -540 -20 { +lab=GND} +N -580 -60 -540 -60 { +lab=#net7} +N 480 590 490 590 { +lab=VCC} +N 490 560 490 590 { +lab=VCC} +N 480 560 490 560 { +lab=VCC} +N 360 590 390 590 { +lab=Iin1} +N 390 590 440 590 { +lab=Iin1} +N 390 590 390 620 { +lab=Iin1} +N 390 620 480 620 { +lab=Iin1} +N 320 530 390 530 { +lab=VCC} +N 390 530 480 530 { +lab=VCC} +N 480 530 480 560 { +lab=VCC} +N 320 530 320 560 { +lab=VCC} +N 310 590 320 590 { +lab=VCC} +N 310 560 320 560 { +lab=VCC} +N 310 560 310 590 { +lab=VCC} +N 840 590 850 590 { +lab=VCC} +N 850 560 850 590 { +lab=VCC} +N 840 560 850 560 { +lab=VCC} +N 720 590 750 590 { +lab=Iin2} +N 750 590 800 590 { +lab=Iin2} +N 750 590 750 620 { +lab=Iin2} +N 750 620 840 620 { +lab=Iin2} +N 680 530 750 530 { +lab=VCC} +N 750 530 840 530 { +lab=VCC} +N 840 530 840 560 { +lab=VCC} +N 680 530 680 560 { +lab=VCC} +N 670 590 680 590 { +lab=VCC} +N 670 560 680 560 { +lab=VCC} +N 670 560 670 590 { +lab=VCC} +N -380 420 -380 450 { +lab=#net4} +N -380 510 -380 560 { +lab=#net5} +N -340 590 -310 590 { +lab=#net4} +N -310 420 -310 590 { +lab=#net4} +N -380 420 -310 420 { +lab=#net4} +N -210 420 -210 450 { +lab=#net6} +N -210 510 -210 560 { +lab=#net7} +N -170 590 -140 590 { +lab=#net6} +N -140 420 -140 590 { +lab=#net6} +N -210 420 -140 420 { +lab=#net6} +N 0 420 0 450 { +lab=Iin1} +N 0 510 0 560 { +lab=#net8} +N -340 480 -310 480 { +lab=#net4} +N -140 590 -40 590 { +lab=#net6} +N -380 390 -380 420 { +lab=#net4} +N -210 390 -210 420 { +lab=#net6} +N -310 480 -250 480 { +lab=#net4} +N -250 440 -250 480 { +lab=#net4} +N -250 440 -40 440 { +lab=#net4} +N -40 440 -40 480 { +lab=#net4} +N 140 420 140 450 { +lab=Iin2} +N 140 510 140 560 { +lab=#net9} +N 100 440 100 480 { +lab=#net4} +N -70 540 -70 590 { +lab=#net6} +N -70 540 100 540 { +lab=#net6} +N 100 540 100 590 { +lab=#net6} +N -40 440 100 440 { +lab=#net4} N 220 0 220 10 { lab=CM2} -N -220 70 -220 90 { -lab=#net1} N -320 0 -220 0 { lab=CM1} N -320 0 -320 120 { @@ -16,7 +158,7 @@ lab=CM1} N -320 120 -260 120 { lab=CM1} N 220 70 220 90 { -lab=#net2} +lab=#net1} N -310 40 -260 40 { lab=VINN} N -310 -110 -260 -110 { @@ -32,13 +174,13 @@ lab=VINP} N 260 -110 310 -110 { lab=VINP} N -220 80 -40 80 { -lab=#net1} +lab=#net2} N 40 -80 220 -80 { -lab=#net1} -N -220 -80 -40 -80 { lab=#net2} +N -220 -80 -40 -80 { +lab=#net1} N 40 80 220 80 { -lab=#net2} +lab=#net1} N 140 -200 220 -200 { lab=#net3} N -220 -200 -140 -200 { @@ -73,50 +215,6 @@ N 380 -320 380 -310 { lab=VCC} N 380 0 440 0 { lab=VOUT} -N -220 -110 -210 -110 { -lab=#net2} -N -210 -110 -210 -80 { -lab=#net2} -N 210 -110 220 -110 { -lab=#net1} -N 210 -110 210 -80 { -lab=#net1} -N -390 200 -380 200 { -lab=GND} -N -390 200 -390 230 { -lab=GND} -N -390 230 -380 230 { -lab=GND} -N -220 120 -210 120 { -lab=GND} -N -210 120 -210 150 { -lab=GND} -N -220 150 -210 150 { -lab=GND} -N -220 40 -210 40 { -lab=#net1} -N -210 40 -210 70 { -lab=#net1} -N -220 70 -210 70 { -lab=#net1} -N 210 120 220 120 { -lab=GND} -N 210 120 210 150 { -lab=GND} -N 210 150 220 150 { -lab=GND} -N 210 40 220 40 { -lab=#net2} -N 210 40 210 70 { -lab=#net2} -N 210 70 220 70 { -lab=#net2} -N 380 200 390 200 { -lab=GND} -N 390 200 390 230 { -lab=GND} -N 380 230 390 230 { -lab=GND} N 220 -280 230 -280 { lab=VCC} N 230 -310 230 -280 { @@ -152,7 +250,7 @@ lab=#net3} N 220 -200 320 -200 { lab=#net3} N -40 80 40 -80 { -lab=#net1} +lab=#net2} N 220 -250 220 -200 { lab=#net3} N 220 -200 220 -140 { @@ -160,7 +258,7 @@ lab=#net3} N 310 -110 310 40 { lab=VINP} N -40 -80 40 80 { -lab=#net2} +lab=#net1} N -310 -110 -310 40 { lab=VINN} N -220 -250 -220 -200 { @@ -169,285 +267,180 @@ N -220 -200 -220 -140 { lab=#net4} N 0 -280 0 -200 { lab=#net5} -N -540 -60 -500 -60 { -lab=#net7} -N -720 -110 -720 50 { -lab=#net7} -N -720 -110 -540 -110 { -lab=#net7} -N -720 110 -720 130 { -lab=GND} -N -540 110 -540 130 { -lab=GND} -N -540 30 -460 30 { -lab=#net8} -N -540 30 -540 50 { -lab=#net8} -N -540 -20 -500 -20 { -lab=GND} -N -540 -20 -540 0 { -lab=GND} -N -620 -10 -620 30 { -lab=#net8} -N -460 -10 -460 30 { -lab=#net8} -N -540 -110 -540 -60 { -lab=#net7} -N -460 -150 -460 -70 { -lab=VINN} -N -620 -150 -620 -70 { -lab=VINP} -N -620 30 -540 30 { -lab=#net8} -N -580 -20 -540 -20 { -lab=GND} -N -580 -60 -540 -60 { -lab=#net7} -N 480 380 490 380 { -lab=VCC} -N 490 350 490 380 { -lab=VCC} -N 480 350 490 350 { -lab=VCC} -N 360 380 390 380 { -lab=Iin1} -N 390 380 440 380 { -lab=Iin1} -N 390 380 390 410 { -lab=Iin1} -N 390 410 480 410 { -lab=Iin1} -N 320 320 390 320 { -lab=VCC} -N 390 320 480 320 { -lab=VCC} -N 480 320 480 350 { -lab=VCC} -N 320 320 320 350 { -lab=VCC} -N 310 380 320 380 { -lab=VCC} -N 310 350 320 350 { -lab=VCC} -N 310 350 310 380 { -lab=VCC} -N 100 380 110 380 { -lab=VCC} -N 110 350 110 380 { -lab=VCC} -N 100 350 110 350 { -lab=VCC} -N -20 380 10 380 { -lab=Iin2} -N 10 380 60 380 { -lab=Iin2} -N 10 380 10 410 { -lab=Iin2} -N 10 410 100 410 { -lab=Iin2} -N -60 320 10 320 { -lab=VCC} -N 10 320 100 320 { -lab=VCC} -N 100 320 100 350 { -lab=VCC} -N -60 320 -60 350 { -lab=VCC} -N -70 380 -60 380 { -lab=VCC} -N -70 350 -60 350 { -lab=VCC} -N -70 350 -70 380 { -lab=VCC} -N -430 550 -430 580 { -lab=#net9} -N -430 640 -430 690 { -lab=#net10} -N -390 720 -360 720 { -lab=#net9} -N -360 550 -360 720 { -lab=#net9} -N -430 550 -360 550 { -lab=#net9} -N -260 550 -260 580 { -lab=#net11} -N -260 640 -260 690 { -lab=#net12} -N -220 720 -190 720 { -lab=#net11} -N -190 550 -190 720 { -lab=#net11} -N -260 550 -190 550 { -lab=#net11} -N -50 550 -50 580 { -lab=Iin1} -N -50 640 -50 690 { -lab=#net13} -N -390 610 -360 610 { -lab=#net9} -N -190 720 -90 720 { -lab=#net11} -N -430 520 -430 550 { -lab=#net9} -N -260 520 -260 550 { -lab=#net11} -N -360 610 -300 610 { -lab=#net9} -N -300 570 -300 610 { -lab=#net9} -N -300 570 -90 570 { -lab=#net9} -N -90 570 -90 610 { -lab=#net9} -N 90 550 90 580 { -lab=Iin2} -N 90 640 90 690 { -lab=#net14} -N 50 570 50 610 { -lab=#net9} -N -120 670 -120 720 { -lab=#net11} -N -120 670 50 670 { -lab=#net11} -N 50 670 50 720 { -lab=#net11} -N -90 570 50 570 { -lab=#net9} -C {sky130_fd_pr/nfet_01v8.sym} 240 120 0 1 {name=M1B -W=2.75 -L=1.5 +N -220 70 -220 90 { +lab=#net2} +C {devices/lab_pin.sym} -620 -150 2 1 {name=p4 sig_type=std_logic lab=VINP +} +C {devices/lab_pin.sym} -460 -150 0 0 {name=p5 sig_type=std_logic lab=VINN} +C {devices/code_shown.sym} 540 -270 0 0 {name=SETUP +simulator=ngspice +only_toplevel=false +value=" +.lib CACE\{PDK_ROOT\}/CACE\{PDK\}/libs.tech/combined/sky130.lib.spice CACE\{corner\} + +.include CACE\{DUT_path\} + +.temp CACE\{temperature\} + +.option SEED=CACE[CACE\{seed=12345\} + CACE\{iterations=0\}] + +* Flag unsafe operating conditions (exceeds models' specified limits) +.option warn=1 +"} +C {devices/code_shown.sym} 540 -20 0 0 {name=CONTROL +simulator=ngspice +only_toplevel=false +value=" +.control + op + let power = i(vin) * v(vcc) * -1 + echo $&power > CACE\{simpath\}/CACE\{filename\}_CACE\{N\}.data +.endc +"} +C {devices/vcvs.sym} -620 -40 0 1 {name=E1 value=0.5} +C {devices/vcvs.sym} -460 -40 0 0 {name=E2 value=-0.5} +C {devices/vsource.sym} -720 80 0 0 {name=Vdm value="ac 1" savecurrent=false} +C {devices/vsource.sym} -540 80 0 0 {name=Vcm value=CACE\{vcm\} savecurrent=false} +C {devices/gnd.sym} -720 130 0 0 {name=l10 lab=GND} +C {devices/gnd.sym} -540 130 0 0 {name=l11 lab=GND} +C {devices/gnd.sym} -540 0 0 0 {name=l13 lab=GND} +C {devices/vsource.sym} -810 100 0 0 {name=vin value=CACE\{vcc\} savecurrent=false} +C {devices/gnd.sym} -810 130 0 0 {name=l14 lab=GND} +C {devices/vdd.sym} -810 70 0 0 {name=l15 lab=VCC} +C {devices/capa.sym} 410 30 0 0 {name=C1 +m=1 +value=CACE\{cl\} +footprint=1206 +device="ceramic capacitor"} +C {devices/gnd.sym} 410 60 0 0 {name=l12 lab=GND} +C {devices/vdd.sym} 320 530 0 0 {name=l3 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 340 590 0 1 {name=CM1 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 240 40 0 1 {name=M2B -W=4.0 -L=2.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} 460 590 0 0 {name=CM2 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {devices/gnd.sym} 220 150 0 0 {name=l1 lab=GND} -C {devices/lab_pin.sym} -310 -110 0 0 {name=p1 sig_type=std_logic lab=VINN} -C {sky130_fd_pr/nfet_01v8.sym} -240 120 0 0 {name=M1A -W=2.75 -L=1.5 +C {devices/lab_pin.sym} 320 620 3 0 {name=p9 sig_type=std_logic lab=CM1} +C {devices/vdd.sym} 680 530 0 0 {name=l7 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 700 590 0 1 {name=CM3 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} -240 40 0 0 {name=M2A -W=4.0 -L=2.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} 820 590 0 0 {name=CM4 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {devices/gnd.sym} -220 150 0 1 {name=l2 lab=GND} -C {devices/lab_pin.sym} 310 -110 0 1 {name=p6 sig_type=std_logic lab=VINP -} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 200 -280 0 0 {name=M3B -W=4.53 -L=1.0 -nf=1 -mult=2 +C {devices/lab_pin.sym} 680 620 3 0 {name=p11 sig_type=std_logic lab=CM2} +C {devices/isource.sym} -380 360 0 0 {name=I0 value=CACE\{IBIAS\}} +C {devices/isource.sym} -210 360 0 0 {name=I1 value=CACE\{IBIAS\}} +C {sky130_fd_pr/nfet3_01v8.sym} -360 480 0 1 {name=M17 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} -200 -280 0 1 {name=M3A -W=4.53 -L=1.0 +C {sky130_fd_pr/nfet3_01v8.sym} -360 590 0 1 {name=M18 +L=2 +W=1.4 +body=GND nf=1 -mult=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {devices/vdd.sym} 0 -320 0 0 {name=l6 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 360 -280 0 0 {name=M4B -W=4.53 -L=1.0 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -230 480 0 0 {name=M19 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} -360 -280 0 1 {name=M4A -W=4.53 -L=1.0 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -190 590 0 1 {name=M20 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} -380 230 0 1 {name=l8 lab=GND} -C {devices/gnd.sym} 380 230 0 1 {name=l9 lab=GND} -C {devices/lab_pin.sym} 440 0 2 0 {name=p2 sig_type=std_logic lab=VOUT} -C {devices/lab_pin.sym} -620 -150 2 1 {name=p4 sig_type=std_logic lab=VINP -} -C {devices/lab_pin.sym} -460 -150 0 0 {name=p5 sig_type=std_logic lab=VINN} -C {devices/capa.sym} 410 30 0 0 {name=C1 -m=1 -value=CACE\{cl\} -footprint=1206 -device="ceramic capacitor"} -C {devices/gnd.sym} 410 60 0 0 {name=l12 lab=GND} -C {sky130_fd_pr/nfet_01v8.sym} -360 200 0 1 {name=M5A -W=0.45 -L=3.45 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -20 480 0 0 {name=M21 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -457,11 +450,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 360 200 0 0 {name=M5B -W=0.45 -L=3.45 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -20 590 0 0 {name=M22 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -471,10 +465,16 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} -240 -110 0 0 {name=MinA -W=4.0 -L=2.0 -nf=1 +C {devices/gnd.sym} 0 620 0 0 {name=l16 lab=GND} +C {devices/gnd.sym} -210 620 0 0 {name=l17 lab=GND} +C {devices/gnd.sym} -380 620 0 0 {name=l18 lab=GND} +C {devices/lab_pin.sym} 0 420 0 0 {name=p41 sig_type=std_logic lab=Iin1} +C {devices/lab_pin.sym} 140 420 0 1 {name=p42 sig_type=std_logic lab=Iin2} +C {sky130_fd_pr/nfet3_01v8.sym} 120 480 0 0 {name=M23 +L=2 +W=4.15 +body=GND +nf=2 mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" @@ -485,10 +485,11 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 240 -110 0 1 {name=MinB -W=4.0 -L=2.0 -nf=1 +C {sky130_fd_pr/nfet3_01v8.sym} 120 590 0 0 {name=M24 +L=2 +W=4.15 +body=GND +nf=2 mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" @@ -499,53 +500,19 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/code_shown.sym} 540 -270 0 0 {name=SETUP -simulator=ngspice -only_toplevel=false -value=" -.lib CACE\{PDK_ROOT\}/CACE\{PDK\}/libs.tech/combined/sky130.lib.spice CACE\{corner\} - -.include CACE\{DUT_path\} - -.temp CACE\{temperature\} - -.option SEED=CACE[CACE\{seed=12345\} + CACE\{iterations=0\}] - -* Flag unsafe operating conditions (exceeds models' specified limits) -.option warn=1 -"} -C {devices/code_shown.sym} 540 -20 0 0 {name=CONTROL -simulator=ngspice -only_toplevel=false -value=" -.control - op - let power = i(vin) * v(vcc) * -1 - echo $&power > CACE\{simpath\}/CACE\{filename\}_CACE\{N\}.data -.endc -"} -C {sky130_tests/passgate_nlvt.sym} -100 -200 2 0 {name=x2 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} -C {sky130_tests/passgate_nlvt.sym} 120 -200 2 1 {name=x1 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} -C {devices/vdd.sym} -100 -230 0 0 {name=l20 lab=VCC} -C {devices/vdd.sym} 120 -230 0 0 {name=l21 lab=VCC} -C {devices/gnd.sym} -100 -170 0 1 {name=l22 lab=GND} -C {devices/gnd.sym} 120 -170 0 0 {name=l23 lab=GND} -C {devices/lab_pin.sym} -220 0 1 0 {name=p8 sig_type=std_logic lab=CM1} -C {devices/lab_pin.sym} 220 0 1 0 {name=p7 sig_type=std_logic lab=CM2} -C {devices/vcvs.sym} -620 -40 0 1 {name=E1 value=0.5} -C {devices/vcvs.sym} -460 -40 0 0 {name=E2 value=-0.5} -C {devices/vsource.sym} -720 80 0 0 {name=Vdm value="ac 1" savecurrent=false} -C {devices/vsource.sym} -540 80 0 0 {name=Vcm value=CACE\{vcm\} savecurrent=false} -C {devices/gnd.sym} -720 130 0 0 {name=l10 lab=GND} -C {devices/gnd.sym} -540 130 0 0 {name=l11 lab=GND} -C {devices/gnd.sym} -540 0 0 0 {name=l13 lab=GND} -C {devices/vsource.sym} -810 100 0 0 {name=vin value=CACE\{vcc\} savecurrent=false} -C {devices/gnd.sym} -810 130 0 0 {name=l14 lab=GND} -C {devices/vdd.sym} -810 70 0 0 {name=l15 lab=VCC} -C {devices/vdd.sym} 320 320 0 0 {name=l3 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 340 380 0 1 {name=CM1 -W=1.88 -L=3.0 +C {devices/gnd.sym} 140 620 0 0 {name=l19 lab=GND} +C {devices/lab_pin.sym} 480 620 3 0 {name=p3 sig_type=std_logic lab=Iin1} +C {devices/lab_pin.sym} 840 620 1 1 {name=p10 sig_type=std_logic lab=Iin2} +C {devices/vdd.sym} -380 330 0 0 {name=l4 lab=VCC} +C {devices/vdd.sym} -210 330 0 0 {name=l5 lab=VCC} +C {devices/gnd.sym} 220 150 0 0 {name=l1 lab=GND} +C {devices/lab_pin.sym} -310 -110 0 0 {name=p1 sig_type=std_logic lab=VINN} +C {devices/gnd.sym} -220 150 0 1 {name=l2 lab=GND} +C {devices/lab_pin.sym} 310 -110 0 1 {name=p6 sig_type=std_logic lab=VINP +} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 200 -280 0 0 {name=M3B +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -557,9 +524,9 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} 460 380 0 0 {name=CM2 -W=1.88 -L=3.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} -200 -280 0 1 {name=M3A +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -571,11 +538,10 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {devices/lab_pin.sym} 320 410 3 0 {name=p9 sig_type=std_logic lab=CM1} -C {devices/vdd.sym} -60 320 0 0 {name=l7 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} -40 380 0 1 {name=CM3 -W=1.88 -L=3.0 +C {devices/vdd.sym} 0 -320 0 0 {name=l6 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 360 -280 0 0 {name=M4B +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -587,9 +553,9 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} 80 380 0 0 {name=CM4 -W=1.88 -L=3.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} -360 -280 0 1 {name=M4A +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -601,15 +567,23 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {devices/lab_pin.sym} -60 410 3 0 {name=p11 sig_type=std_logic lab=CM2} -C {devices/isource.sym} -430 490 0 0 {name=I0 value=CACE\{IBIAS\}} -C {devices/isource.sym} -260 490 0 0 {name=I1 value=CACE\{IBIAS\}} -C {sky130_fd_pr/nfet3_01v8.sym} -410 610 0 1 {name=M17 -L=2 -W=4.15 -body=GND -nf=2 +C {devices/gnd.sym} -380 230 0 1 {name=l8 lab=GND} +C {devices/gnd.sym} 380 230 0 1 {name=l9 lab=GND} +C {devices/lab_pin.sym} 440 0 2 0 {name=p2 sig_type=std_logic lab=VOUT} +C {sky130_tests/passgate_nlvt.sym} -100 -200 2 0 {name=x2 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} +C {sky130_tests/passgate_nlvt.sym} 120 -200 2 1 {name=x1 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} +C {devices/vdd.sym} -100 -230 0 0 {name=l20 lab=VCC} +C {devices/vdd.sym} 120 -230 0 0 {name=l21 lab=VCC} +C {devices/gnd.sym} -100 -170 0 1 {name=l22 lab=GND} +C {devices/gnd.sym} 120 -170 0 0 {name=l23 lab=GND} +C {devices/lab_pin.sym} -220 0 1 0 {name=p8 sig_type=std_logic lab=CM1} +C {devices/lab_pin.sym} 220 0 1 0 {name=p7 sig_type=std_logic lab=CM2} +C {sky130_fd_pr/nfet3_01v8.sym} -240 40 0 0 {name=M2A +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -619,12 +593,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -410 720 0 1 {name=M18 -L=2 -W=1.4 -body=GND +C {sky130_fd_pr/nfet3_01v8.sym} -240 120 0 0 {name=M1A +L=0.15 +W=1 nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -634,12 +608,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -280 610 0 0 {name=M19 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 40 0 1 {name=M2B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -649,12 +623,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -240 720 0 1 {name=M20 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 120 0 1 {name=M1B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -664,12 +638,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -70 610 0 0 {name=M21 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} -240 -110 0 0 {name=MinA +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -679,12 +653,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -70 720 0 0 {name=M22 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 -110 0 1 {name=MinB +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -694,17 +668,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} -50 750 0 0 {name=l16 lab=GND} -C {devices/gnd.sym} -260 750 0 0 {name=l17 lab=GND} -C {devices/gnd.sym} -430 750 0 0 {name=l18 lab=GND} -C {devices/lab_pin.sym} -50 550 0 0 {name=p41 sig_type=std_logic lab=Iin1} -C {devices/lab_pin.sym} 90 550 0 1 {name=p42 sig_type=std_logic lab=Iin2} -C {sky130_fd_pr/nfet3_01v8.sym} 70 610 0 0 {name=M23 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} -360 200 0 1 {name=M5A +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -714,12 +683,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} 70 720 0 0 {name=M24 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 360 200 0 0 {name=M5B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -729,8 +698,3 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} 90 750 0 0 {name=l19 lab=GND} -C {devices/lab_pin.sym} 480 410 3 0 {name=p3 sig_type=std_logic lab=Iin1} -C {devices/lab_pin.sym} 100 410 1 1 {name=p10 sig_type=std_logic lab=Iin2} -C {devices/vdd.sym} -430 460 0 0 {name=l4 lab=VCC} -C {devices/vdd.sym} -260 460 0 0 {name=l5 lab=VCC} diff --git a/cace/templates/ota_tb_psrr.sch b/cace/templates/ota_tb_psrr.sch index 0e210cb..2967040 100644 --- a/cace/templates/ota_tb_psrr.sch +++ b/cace/templates/ota_tb_psrr.sch @@ -5,10 +5,118 @@ K {} V {} S {} E {} +N 480 590 490 590 { +lab=VCC} +N 490 560 490 590 { +lab=VCC} +N 480 560 490 560 { +lab=VCC} +N 360 590 390 590 { +lab=Iin1} +N 390 590 440 590 { +lab=Iin1} +N 390 590 390 620 { +lab=Iin1} +N 390 620 480 620 { +lab=Iin1} +N 320 530 390 530 { +lab=VCC} +N 390 530 480 530 { +lab=VCC} +N 480 530 480 560 { +lab=VCC} +N 320 530 320 560 { +lab=VCC} +N 310 590 320 590 { +lab=VCC} +N 310 560 320 560 { +lab=VCC} +N 310 560 310 590 { +lab=VCC} +N 840 590 850 590 { +lab=VCC} +N 850 560 850 590 { +lab=VCC} +N 840 560 850 560 { +lab=VCC} +N 720 590 750 590 { +lab=Iin2} +N 750 590 800 590 { +lab=Iin2} +N 750 590 750 620 { +lab=Iin2} +N 750 620 840 620 { +lab=Iin2} +N 680 530 750 530 { +lab=VCC} +N 750 530 840 530 { +lab=VCC} +N 840 530 840 560 { +lab=VCC} +N 680 530 680 560 { +lab=VCC} +N 670 590 680 590 { +lab=VCC} +N 670 560 680 560 { +lab=VCC} +N 670 560 670 590 { +lab=VCC} +N -380 420 -380 450 { +lab=#net1} +N -380 510 -380 560 { +lab=#net2} +N -340 590 -310 590 { +lab=#net1} +N -310 420 -310 590 { +lab=#net1} +N -380 420 -310 420 { +lab=#net1} +N -210 420 -210 450 { +lab=#net3} +N -210 510 -210 560 { +lab=#net4} +N -170 590 -140 590 { +lab=#net3} +N -140 420 -140 590 { +lab=#net3} +N -210 420 -140 420 { +lab=#net3} +N 0 420 0 450 { +lab=Iin1} +N 0 510 0 560 { +lab=#net5} +N -340 480 -310 480 { +lab=#net1} +N -140 590 -40 590 { +lab=#net3} +N -380 390 -380 420 { +lab=#net1} +N -210 390 -210 420 { +lab=#net3} +N -310 480 -250 480 { +lab=#net1} +N -250 440 -250 480 { +lab=#net1} +N -250 440 -40 440 { +lab=#net1} +N -40 440 -40 480 { +lab=#net1} +N 140 420 140 450 { +lab=Iin2} +N 140 510 140 560 { +lab=#net6} +N 100 440 100 480 { +lab=#net1} +N -70 540 -70 590 { +lab=#net3} +N -70 540 100 540 { +lab=#net3} +N 100 540 100 590 { +lab=#net3} +N -40 440 100 440 { +lab=#net1} N 220 0 220 10 { lab=CM2} -N -220 70 -220 90 { -lab=#net1} N -320 0 -220 0 { lab=CM1} N -320 0 -320 120 { @@ -16,11 +124,11 @@ lab=CM1} N -320 120 -260 120 { lab=CM1} N 220 70 220 90 { -lab=#net2} +lab=#net7} N -310 40 -260 40 { -lab=VOUT} +lab=#net8} N -310 -110 -260 -110 { -lab=VOUT} +lab=#net8} N 260 120 320 120 { lab=CM2} N 220 0 320 0 { @@ -32,35 +140,35 @@ lab=VINP} N 260 -110 310 -110 { lab=VINP} N -220 80 -40 80 { -lab=#net1} +lab=#net9} N 40 -80 220 -80 { -lab=#net1} +lab=#net9} N -220 -80 -40 -80 { -lab=#net2} +lab=#net7} N 40 80 220 80 { -lab=#net2} +lab=#net7} N 140 -200 220 -200 { -lab=#net3} +lab=#net10} N -220 -200 -140 -200 { -lab=#net4} +lab=#net11} N -80 -200 80 -200 { -lab=#net5} +lab=#net12} N -180 -280 180 -280 { -lab=#net5} +lab=#net12} N -380 -320 380 -320 { lab=VCC} N 320 -280 340 -280 { -lab=#net3} +lab=#net10} N -340 -280 -320 -280 { -lab=#net4} +lab=#net11} N -340 200 340 200 { -lab=#net6} +lab=#net13} N -380 -250 -380 170 { -lab=#net6} +lab=#net13} N -380 160 -320 160 { -lab=#net6} +lab=#net13} N -320 160 -320 200 { -lab=#net6} +lab=#net13} N 380 -250 380 170 { lab=VOUT} N -380 -320 -380 -310 { @@ -71,52 +179,8 @@ N 220 -320 220 -310 { lab=VCC} N 380 -320 380 -310 { lab=VCC} -N 380 -0 440 0 { +N 380 0 440 0 { lab=VOUT} -N -220 -110 -210 -110 { -lab=#net2} -N -210 -110 -210 -80 { -lab=#net2} -N 210 -110 220 -110 { -lab=#net1} -N 210 -110 210 -80 { -lab=#net1} -N -390 200 -380 200 { -lab=GND} -N -390 200 -390 230 { -lab=GND} -N -390 230 -380 230 { -lab=GND} -N -220 120 -210 120 { -lab=GND} -N -210 120 -210 150 { -lab=GND} -N -220 150 -210 150 { -lab=GND} -N -220 40 -210 40 { -lab=#net1} -N -210 40 -210 70 { -lab=#net1} -N -220 70 -210 70 { -lab=#net1} -N 210 120 220 120 { -lab=GND} -N 210 120 210 150 { -lab=GND} -N 210 150 220 150 { -lab=GND} -N 210 40 220 40 { -lab=#net2} -N 210 40 210 70 { -lab=#net2} -N 210 70 220 70 { -lab=#net2} -N 380 200 390 200 { -lab=GND} -N 390 200 390 230 { -lab=GND} -N 380 230 390 230 { -lab=GND} N 220 -280 230 -280 { lab=VCC} N 230 -310 230 -280 { @@ -144,272 +208,205 @@ lab=VCC} N -220 0 -220 10 { lab=CM1} N -320 -280 -320 -200 { -lab=#net4} +lab=#net11} N -320 -200 -220 -200 { -lab=#net4} +lab=#net11} N 320 -280 320 -200 { -lab=#net3} +lab=#net10} N 220 -200 320 -200 { -lab=#net3} +lab=#net10} N -40 80 40 -80 { -lab=#net1} +lab=#net9} N 220 -250 220 -200 { -lab=#net3} +lab=#net10} N 220 -200 220 -140 { -lab=#net3} +lab=#net10} N 310 -110 310 40 { lab=VINP} N -40 -80 40 80 { -lab=#net2} +lab=#net7} N -310 -110 -310 40 { -lab=VOUT} +lab=#net8} N -220 -250 -220 -200 { -lab=#net4} +lab=#net11} N -220 -200 -220 -140 { -lab=#net4} -N -0 -280 -0 -200 { -lab=#net5} -N 420 390 430 390 { -lab=VCC} -N 430 360 430 390 { -lab=VCC} -N 420 360 430 360 { -lab=VCC} -N 300 390 330 390 { -lab=Iin1} -N 330 390 380 390 { -lab=Iin1} -N 330 390 330 420 { -lab=Iin1} -N 330 420 420 420 { -lab=Iin1} -N 260 330 330 330 { -lab=VCC} -N 330 330 420 330 { -lab=VCC} -N 420 330 420 360 { -lab=VCC} -N 260 330 260 360 { -lab=VCC} -N 250 390 260 390 { -lab=VCC} -N 250 360 260 360 { -lab=VCC} -N 250 360 250 390 { -lab=VCC} -N 40 390 50 390 { -lab=VCC} -N 50 360 50 390 { -lab=VCC} -N 40 360 50 360 { -lab=VCC} -N -80 390 -50 390 { -lab=Iin2} -N -50 390 0 390 { -lab=Iin2} -N -50 390 -50 420 { -lab=Iin2} -N -50 420 40 420 { -lab=Iin2} -N -120 330 -50 330 { -lab=VCC} -N -50 330 40 330 { -lab=VCC} -N 40 330 40 360 { -lab=VCC} -N -120 330 -120 360 { -lab=VCC} -N -130 390 -120 390 { -lab=VCC} -N -130 360 -120 360 { -lab=VCC} -N -130 360 -130 390 { -lab=VCC} -N -490 560 -490 590 { -lab=#net7} -N -490 650 -490 700 { -lab=#net8} -N -450 730 -420 730 { -lab=#net7} -N -420 560 -420 730 { -lab=#net7} -N -490 560 -420 560 { -lab=#net7} -N -320 560 -320 590 { -lab=GND} -N -320 650 -320 700 { -lab=#net9} -N -280 730 -250 730 { -lab=GND} -N -250 560 -250 730 { -lab=GND} -N -320 560 -250 560 { -lab=GND} -N -110 560 -110 590 { -lab=Iin1} -N -110 650 -110 700 { -lab=#net10} -N -450 620 -420 620 { -lab=#net7} -N -250 730 -150 730 { -lab=GND} -N -490 530 -490 560 { -lab=#net7} -N -320 530 -320 560 { -lab=GND} -N -420 620 -360 620 { -lab=#net7} -N -360 580 -360 620 { -lab=#net7} -N -360 580 -150 580 { -lab=#net7} -N -150 580 -150 620 { -lab=#net7} -N 30 560 30 590 { -lab=Iin2} -N 30 650 30 700 { lab=#net11} -N -10 580 -10 620 { -lab=#net7} -N -180 680 -180 730 { -lab=GND} -N -180 680 -10 680 { -lab=GND} -N -10 680 -10 730 { -lab=GND} -N -150 580 -10 580 { -lab=#net7} -C {sky130_fd_pr/nfet_01v8.sym} 240 120 0 1 {name=M1B -W=2.75 -L=1.5 +N 0 -280 0 -200 { +lab=#net12} +N -220 70 -220 90 { +lab=#net9} +C {devices/code_shown.sym} 540 -270 0 0 {name=SETUP +simulator=ngspice +only_toplevel=false +value=" +.lib CACE\{PDK_ROOT\}/CACE\{PDK\}/libs.tech/combined/sky130.lib.spice CACE\{corner\} + +.include CACE\{DUT_path\} + +.temp CACE\{temperature\} + +.option SEED=CACE[CACE\{seed=12345\} + CACE\{iterations=0\}] + +* Flag unsafe operating conditions (exceeds models' specified limits) +.option warn=1 +"} +C {devices/code_shown.sym} 540 -20 0 0 {name=CONTROL +simulator=ngspice +only_toplevel=false +value=" +.control + * run ac simulation + ac dec 20 1 1e12 + + * measure parameters + let cmrr_val = db(v(vout)) 180/pi*ph(v(vout)) + + wrdata CACE\{simpath\}/CACE\{filename\}_CACE\{N\}.data cmrr_val + +.endc +"} +C {devices/vsource.sym} -590 90 0 0 {name=Vin value="dc 1.8 ac 1" savecurrent=false} +C {devices/gnd.sym} -590 120 0 0 {name=l14 lab=GND} +C {devices/vdd.sym} -590 60 0 0 {name=l15 lab=VCC} +C {devices/vsource.sym} -470 90 0 0 {name=Vin1 value=1.2 savecurrent=false} +C {devices/gnd.sym} -470 120 0 0 {name=l10 lab=GND +value=1.2} +C {devices/lab_pin.sym} -470 60 3 1 {name=p4 sig_type=std_logic lab=VINP +} +C {devices/capa.sym} 410 30 0 0 {name=C1 +m=1 +value=CACE\{cl\} +footprint=1206 +device="ceramic capacitor"} +C {devices/gnd.sym} 410 60 0 0 {name=l12 lab=GND} +C {devices/vdd.sym} 320 530 0 0 {name=l3 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 340 590 0 1 {name=CM1 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 240 40 0 1 {name=M2B -W=4.0 -L=2.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} 460 590 0 0 {name=CM2 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {devices/gnd.sym} 220 150 0 0 {name=l1 lab=GND} -C {sky130_fd_pr/nfet_01v8.sym} -240 120 0 0 {name=M1A -W=2.75 -L=1.5 +C {devices/lab_pin.sym} 320 620 3 0 {name=p9 sig_type=std_logic lab=CM1} +C {devices/vdd.sym} 680 530 0 0 {name=l7 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 700 590 0 1 {name=CM3 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} -240 40 0 0 {name=M2A -W=4.0 -L=2.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} 820 590 0 0 {name=CM4 +W=1.88 +L=3.0 nf=1 -mult=1 +mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=nfet_01v8 +model=pfet_01v8_lvt spiceprefix=X } -C {devices/gnd.sym} -220 150 0 1 {name=l2 lab=GND} -C {devices/lab_pin.sym} 310 -110 0 1 {name=p6 sig_type=std_logic lab=VINP -} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 200 -280 0 0 {name=M3B -W=4.53 -L=1.0 -nf=1 -mult=2 +C {devices/lab_pin.sym} 680 620 3 0 {name=p11 sig_type=std_logic lab=CM2} +C {devices/isource.sym} -380 360 0 0 {name=I0 value=CACE\{IBIAS\}} +C {devices/isource.sym} -210 360 0 0 {name=I1 value=CACE\{IBIAS\}} +C {sky130_fd_pr/nfet3_01v8.sym} -360 480 0 1 {name=M17 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} -200 -280 0 1 {name=M3A -W=4.53 -L=1.0 +C {sky130_fd_pr/nfet3_01v8.sym} -360 590 0 1 {name=M18 +L=2 +W=1.4 +body=GND nf=1 -mult=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {devices/vdd.sym} 0 -320 0 0 {name=l6 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 360 -280 0 0 {name=M4B -W=4.53 -L=1.0 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -230 480 0 0 {name=M19 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} -360 -280 0 1 {name=M4A -W=4.53 -L=1.0 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -190 590 0 1 {name=M20 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" ps="'2*int((nf+2)/2) * (W/nf + 0.29)'" nrd="'0.29 / W'" nrs="'0.29 / W'" sa=0 sb=0 sd=0 -model=pfet_01v8_lvt +model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} -380 230 0 1 {name=l8 lab=GND} -C {devices/gnd.sym} 380 230 0 1 {name=l9 lab=GND} -C {devices/lab_pin.sym} 440 0 2 0 {name=p2 sig_type=std_logic lab=VOUT} -C {devices/capa.sym} 410 30 0 0 {name=C1 -m=1 -value=CACE\{cl\} -footprint=1206 -device="ceramic capacitor"} -C {devices/gnd.sym} 410 60 0 0 {name=l12 lab=GND} -C {sky130_fd_pr/nfet_01v8.sym} -360 200 0 1 {name=M5A -W=0.45 -L=3.45 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -20 480 0 0 {name=M21 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -419,11 +416,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 360 200 0 0 {name=M5B -W=0.45 -L=3.45 -nf=1 -mult=2 +C {sky130_fd_pr/nfet3_01v8.sym} -20 590 0 0 {name=M22 +L=2 +W=4.15 +body=GND +nf=2 +mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -433,10 +431,16 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} -240 -110 0 0 {name=MinA -W=4.0 -L=2.0 -nf=1 +C {devices/gnd.sym} 0 620 0 0 {name=l16 lab=GND} +C {devices/gnd.sym} -210 620 0 0 {name=l17 lab=GND} +C {devices/gnd.sym} -380 620 0 0 {name=l18 lab=GND} +C {devices/lab_pin.sym} 0 420 0 0 {name=p41 sig_type=std_logic lab=Iin1} +C {devices/lab_pin.sym} 140 420 0 1 {name=p42 sig_type=std_logic lab=Iin2} +C {sky130_fd_pr/nfet3_01v8.sym} 120 480 0 0 {name=M23 +L=2 +W=4.15 +body=GND +nf=2 mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" @@ -447,10 +451,11 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet_01v8.sym} 240 -110 0 1 {name=MinB -W=4.0 -L=2.0 -nf=1 +C {sky130_fd_pr/nfet3_01v8.sym} 120 590 0 0 {name=M24 +L=2 +W=4.15 +body=GND +nf=2 mult=1 ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" @@ -461,57 +466,18 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/code_shown.sym} 540 -270 0 0 {name=SETUP -simulator=ngspice -only_toplevel=false -value=" -.lib CACE\{PDK_ROOT\}/CACE\{PDK\}/libs.tech/combined/sky130.lib.spice CACE\{corner\} - -.include CACE\{DUT_path\} - -.temp CACE\{temperature\} - -.option SEED=CACE[CACE\{seed=12345\} + CACE\{iterations=0\}] - -* Flag unsafe operating conditions (exceeds models' specified limits) -.option warn=1 -"} -C {devices/code_shown.sym} 540 -20 0 0 {name=CONTROL -simulator=ngspice -only_toplevel=false -value=" -.control - * run ac simulation - ac dec 20 1 1e12 - - * measure parameters - let cmrr_val = db(v(vout)) 180/pi*ph(v(vout)) - - wrdata CACE\{simpath\}/CACE\{filename\}_CACE\{N\}.data cmrr_val - -.endc -"} -C {sky130_tests/passgate_nlvt.sym} -100 -200 2 0 {name=x2 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} -C {sky130_tests/passgate_nlvt.sym} 120 -200 2 1 {name=x1 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} -C {devices/vdd.sym} -100 -230 0 0 {name=l20 lab=VCC} -C {devices/vdd.sym} 120 -230 0 0 {name=l21 lab=VCC} -C {devices/gnd.sym} -100 -170 0 1 {name=l22 lab=GND} -C {devices/gnd.sym} 120 -170 0 0 {name=l23 lab=GND} -C {devices/lab_pin.sym} -220 0 1 0 {name=p8 sig_type=std_logic lab=CM1} -C {devices/lab_pin.sym} 220 0 1 0 {name=p7 sig_type=std_logic lab=CM2} -C {devices/vsource.sym} -590 90 0 0 {name=Vin value="dc 1.8 ac 1" savecurrent=false} -C {devices/gnd.sym} -590 120 0 0 {name=l14 lab=GND} -C {devices/vdd.sym} -590 60 0 0 {name=l15 lab=VCC} -C {devices/vsource.sym} -470 90 0 0 {name=Vin1 value=1.2 savecurrent=false} -C {devices/gnd.sym} -470 120 0 0 {name=l10 lab=GND -value=1.2} -C {devices/lab_pin.sym} -470 60 3 1 {name=p4 sig_type=std_logic lab=VINP +C {devices/gnd.sym} 140 620 0 0 {name=l19 lab=GND} +C {devices/lab_pin.sym} 480 620 3 0 {name=p3 sig_type=std_logic lab=Iin1} +C {devices/lab_pin.sym} 840 620 1 1 {name=p10 sig_type=std_logic lab=Iin2} +C {devices/vdd.sym} -380 330 0 0 {name=l4 lab=VCC} +C {devices/vdd.sym} -210 330 0 0 {name=l5 lab=VCC} +C {devices/gnd.sym} 220 150 0 0 {name=l1 lab=GND} +C {devices/gnd.sym} -220 150 0 1 {name=l2 lab=GND} +C {devices/lab_pin.sym} 310 -110 0 1 {name=p6 sig_type=std_logic lab=VINP } -C {devices/lab_pin.sym} -310 -110 0 0 {name=p1 sig_type=std_logic lab=VOUT} -C {devices/vdd.sym} 260 330 0 0 {name=l3 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} 280 390 0 1 {name=CM1 -W=1.88 -L=3.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} 200 -280 0 0 {name=M3B +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -523,9 +489,9 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} 400 390 0 0 {name=CM2 -W=1.88 -L=3.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} -200 -280 0 1 {name=M3A +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -537,11 +503,10 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {devices/lab_pin.sym} 260 420 3 0 {name=p9 sig_type=std_logic lab=CM1} -C {devices/vdd.sym} -120 330 0 0 {name=l7 lab=VCC} -C {sky130_fd_pr/pfet_01v8_lvt.sym} -100 390 0 1 {name=CM3 -W=1.88 -L=3.0 +C {devices/vdd.sym} 0 -320 0 0 {name=l6 lab=VCC} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 360 -280 0 0 {name=M4B +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -553,9 +518,9 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {sky130_fd_pr/pfet_01v8_lvt.sym} 20 390 0 0 {name=CM4 -W=1.88 -L=3.0 +C {sky130_fd_pr/pfet_01v8_lvt.sym} -360 -280 0 1 {name=M4A +W=4.53 +L=1.0 nf=1 mult=2 ad="'int((nf+1)/2) * W/nf * 0.29'" @@ -567,15 +532,23 @@ sa=0 sb=0 sd=0 model=pfet_01v8_lvt spiceprefix=X } -C {devices/lab_pin.sym} -120 420 3 0 {name=p11 sig_type=std_logic lab=CM2} -C {devices/isource.sym} -490 500 0 0 {name=I0 value=CACE\{IBIAS\}} -C {devices/isource.sym} -320 500 0 0 {name=I1 value=CACE\{IBIAS\}} -C {sky130_fd_pr/nfet3_01v8.sym} -470 620 0 1 {name=M17 -L=2 -W=4.15 -body=GND -nf=2 +C {devices/gnd.sym} -380 230 0 1 {name=l8 lab=GND} +C {devices/gnd.sym} 380 230 0 1 {name=l9 lab=GND} +C {devices/lab_pin.sym} 440 0 2 0 {name=p2 sig_type=std_logic lab=VOUT} +C {sky130_tests/passgate_nlvt.sym} -100 -200 2 0 {name=x2 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} +C {sky130_tests/passgate_nlvt.sym} 120 -200 2 1 {name=x1 W_N=0.5 L_N=4 W_P=3 L_P=4 VCCBPIN=VCC VSSBPIN=VSS m=1} +C {devices/vdd.sym} -100 -230 0 0 {name=l20 lab=VCC} +C {devices/vdd.sym} 120 -230 0 0 {name=l21 lab=VCC} +C {devices/gnd.sym} -100 -170 0 1 {name=l22 lab=GND} +C {devices/gnd.sym} 120 -170 0 0 {name=l23 lab=GND} +C {devices/lab_pin.sym} -220 0 1 0 {name=p8 sig_type=std_logic lab=CM1} +C {devices/lab_pin.sym} 220 0 1 0 {name=p7 sig_type=std_logic lab=CM2} +C {sky130_fd_pr/nfet3_01v8.sym} -240 40 0 0 {name=M2A +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -585,12 +558,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -470 730 0 1 {name=M18 -L=2 -W=1.4 -body=GND +C {sky130_fd_pr/nfet3_01v8.sym} -240 120 0 0 {name=M1A +L=0.15 +W=1 nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -600,12 +573,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -340 620 0 0 {name=M19 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 40 0 1 {name=M2B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -615,12 +588,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -300 730 0 1 {name=M20 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 120 0 1 {name=M1B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -630,12 +603,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -130 620 0 0 {name=M21 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} -240 -110 0 0 {name=MinA +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -645,12 +618,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} -130 730 0 0 {name=M22 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 240 -110 0 1 {name=MinB +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -660,17 +633,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} -110 760 0 0 {name=l16 lab=GND} -C {devices/gnd.sym} -320 760 0 0 {name=l17 lab=GND} -C {devices/gnd.sym} -490 760 0 0 {name=l18 lab=GND} -C {devices/lab_pin.sym} -110 560 0 0 {name=p41 sig_type=std_logic lab=Iin1} -C {devices/lab_pin.sym} 30 560 0 1 {name=p42 sig_type=std_logic lab=Iin2} -C {sky130_fd_pr/nfet3_01v8.sym} 10 620 0 0 {name=M23 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} -360 200 0 1 {name=M5A +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -680,12 +648,12 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {sky130_fd_pr/nfet3_01v8.sym} 10 730 0 0 {name=M24 -L=2 -W=4.15 -body=GND -nf=2 +C {sky130_fd_pr/nfet3_01v8.sym} 360 200 0 0 {name=M5B +L=0.15 +W=1 +nf=1 mult=1 +body=GND ad="'int((nf+1)/2) * W/nf * 0.29'" pd="'2*int((nf+1)/2) * (W/nf + 0.29)'" as="'int((nf+2)/2) * W/nf * 0.29'" @@ -695,8 +663,4 @@ sa=0 sb=0 sd=0 model=nfet_01v8 spiceprefix=X } -C {devices/gnd.sym} 30 760 0 0 {name=l19 lab=GND} -C {devices/lab_pin.sym} 420 420 3 0 {name=p3 sig_type=std_logic lab=Iin1} -C {devices/lab_pin.sym} 40 420 1 1 {name=p10 sig_type=std_logic lab=Iin2} -C {devices/vdd.sym} -490 470 0 0 {name=l4 lab=VCC} -C {devices/vdd.sym} -320 470 0 0 {name=l5 lab=VCC} +C {devices/lab_pin.sym} -310 -110 0 0 {name=p1 sig_type=std_logic lab=VOUT}