This sawgen is good enough. Going to use offchip cap.
diff --git a/xschem/sawgen-fet-sky130.sch b/xschem/sawgen-fet-sky130.sch index 4a2dffd..9d7d580 100644 --- a/xschem/sawgen-fet-sky130.sch +++ b/xschem/sawgen-fet-sky130.sch
@@ -16,34 +16,28 @@ N 480 -780 490 -780 { lab=cur} N 490 -780 560 -780 { lab=cur} N 600 -860 600 -810 { lab=VDD} -N 600 -640 600 -620 { lab=GND} N 510 -780 510 -730 { lab=cur} N 440 -730 510 -730 { lab=cur} N 600 -730 730 -730 { lab=saw} N 730 -730 730 -710 { lab=saw} -N 770 -680 970 -680 { lab=#net1} -N 840 -680 840 -650 { lab=#net1} -N 730 -620 800 -620 { lab=#net2} -N 730 -650 730 -620 { lab=#net2} -N 730 -620 730 -600 { lab=#net2} -N 780 -620 780 -570 { lab=#net2} -N 770 -570 780 -570 { lab=#net2} +N 770 -680 970 -680 { lab=vt} +N 840 -680 840 -650 { lab=vt} +N 730 -620 800 -620 { lab=vd} +N 730 -650 730 -620 { lab=vd} +N 730 -620 730 -600 { lab=vd} N 840 -590 840 -520 { lab=GND} -N 730 -540 730 -520 { lab=GND} N 930 -730 950 -730 { lab=GND} N 930 -600 950 -600 { lab=GND} N 970 -860 970 -760 { lab=VDD} -N 970 -700 970 -680 { lab=#net1} -N 970 -680 970 -630 { lab=#net1} +N 970 -700 970 -680 { lab=vt} +N 970 -680 970 -630 { lab=vt} N 970 -570 970 -520 { lab=GND} N 440 -750 440 -720 { lab=cur} N 440 -720 440 -700 { lab=cur} N 440 -640 440 -620 { lab=GND} N 600 -750 600 -700 { lab=saw} -N 580 -630 600 -630 { lab=GND} -N 580 -660 580 -630 { lab=GND} -N 580 -700 580 -680 { lab=saw} -N 580 -700 600 -700 { lab=saw} +N 600 -700 600 -670 { lab=saw} +N 870 -710 870 -680 { lab=vt} C {devices/code_shown.sym} -880 -90 0 0 {name=s1 only_toplevel=false value=" .model BSS84 VDMOS(pchan Rg=3 Vto=-2.1 Rd=2.4 Rs=1.8 Rb=3 Kp=.2 Cgdmax=.04n Cgdmin=.001n Cgs=.02n Cjo=.01n Is=2p mfg=Philips Vds=-50 Ron=6000m Qg=1n) .model 2N7002 VDMOS(Rg=3 Vto=1.6 Rd=0 Rs=.75 Rb=.14 Kp=.17 mtriode=1.25 Cgdmax=80p Cgdmin=12p Cgs=50p Cjo=50p Is=.04p mfg=Fairchild Vds=60 Ron=2 Qg=1.5n) @@ -69,7 +63,7 @@ C {devices/code_shown.sym} -10 -470 0 0 {name=s2 only_toplevel=false value=".ic V(saw)=0 .control tran 10n 200u -plot V(saw) V(cur) +plot V(saw) V(cur) V(vt) V(vd) //V(Vt) V(vd) //plot V(vd) //plot I(Vb) @@ -120,11 +114,10 @@ C {devices/gnd.sym} 440 -620 0 0 {name=l18 lab=GND} C {devices/vdd.sym} 440 -860 0 0 {name=l19 lab=VDD} C {devices/vdd.sym} 600 -860 0 0 {name=l20 lab=VDD} -C {devices/gnd.sym} 600 -620 0 0 {name=l21 lab=GND} C {devices/lab_pin.sym} 440 -720 0 0 {name=l5 sig_type=std_logic lab=cur} C {sky130_fd_pr/pfet3_g5v0d10v5.sym} 750 -680 0 1 {name=M1 L=0.8 -W=2 +W=16 body=VDD nf=1 mult=1 @@ -137,21 +130,6 @@ model=pfet_g5v0d10v5 spiceprefix=X } -C {sky130_fd_pr/nfet3_g5v0d10v5.sym} 750 -570 0 1 {name=M2 -L=0.8 -W=2 -body=GND -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_g5v0d10v5 -spiceprefix=X -} C {sky130_fd_pr/nfet3_g5v0d10v5.sym} 820 -620 0 0 {name=M4 L=0.8 W=2 @@ -167,7 +145,6 @@ model=nfet_g5v0d10v5 spiceprefix=X } -C {devices/gnd.sym} 730 -520 0 0 {name=l7 lab=GND} C {devices/gnd.sym} 840 -520 0 0 {name=l8 lab=GND} C {sky130_fd_pr/res_high_po_0p35.sym} 970 -730 0 0 {name=R3 W=0.35 @@ -185,9 +162,20 @@ C {devices/gnd.sym} 930 -600 0 0 {name=l10 lab=GND} C {devices/gnd.sym} 970 -520 0 0 {name=l11 lab=GND} C {devices/vdd.sym} 970 -860 0 0 {name=l13 lab=VDD} -C {sky130_fd_pr/vpp_cap.sym} 600 -670 0 0 {name=C1 -model=cap_vpp_11p5x11p7_l1m1m2m3m4_shieldm5 -W=1 -L=1 -mult=5000 -spiceprefix=X} +C {devices/capa.sym} 600 -640 0 0 {name=C1 +m=1 +value=1n +footprint=1206 +device="ceramic capacitor"} +C {devices/gnd.sym} 600 -610 0 0 {name=l1 lab=GND} +C {devices/lab_pin.sym} 730 -630 0 0 {name=l6 sig_type=std_logic lab=vd} +C {devices/lab_pin.sym} 870 -710 0 0 {name=l14 sig_type=std_logic lab=vt} +C {sky130_fd_pr/diode.sym} 730 -570 2 0 {name=D1 +model=diode_pw2nd_05v5 +area=1 +} +C {sky130_fd_pr/diode.sym} 730 -510 2 0 {name=D2 +model=diode_pw2nd_05v5 +area=1 +} +C {devices/gnd.sym} 730 -480 0 0 {name=l7 lab=GND}
diff --git a/xschem/sawgen-fet-sky130.spice b/xschem/sawgen-fet-sky130.spice index 98b6357..5422cf6 100644 --- a/xschem/sawgen-fet-sky130.spice +++ b/xschem/sawgen-fet-sky130.spice
@@ -8,18 +8,17 @@ + pd='2*int((nf+1)/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 mult=1 m=1 XR8 GND cur GND sky130_fd_pr__res_high_po_0p35 W=0.35 L=20 mult=1 m=1 -XM1 net2 net1 saw VDD sky130_fd_pr__pfet_g5v0d10v5 L=0.8 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' +XM1 vd vt saw VDD sky130_fd_pr__pfet_g5v0d10v5 L=0.8 W=16 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' + pd='2*int((nf+1)/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 mult=1 m=1 -XM2 net2 net2 GND GND sky130_fd_pr__nfet_g5v0d10v5 L=0.8 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' +XM4 vt vd GND GND sky130_fd_pr__nfet_g5v0d10v5 L=0.8 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' + pd='2*int((nf+1)/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 mult=1 m=1 -XM4 net1 net2 GND GND sky130_fd_pr__nfet_g5v0d10v5 L=0.8 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' -+ pd='2*int((nf+1)/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 mult=1 m=1 -XR3 net1 VDD GND sky130_fd_pr__res_high_po_0p35 W=0.35 L=20 mult=1 m=1 -XR4 GND net1 GND sky130_fd_pr__res_high_po_0p35 W=0.35 L=20 mult=1 m=1 -XC2 saw GND GND sky130_fd_pr__cap_var_lvt W=0.5 L=0.5 VM=1 +XR3 vt VDD GND sky130_fd_pr__res_high_po_0p35 W=0.35 L=20 mult=1 m=1 +XR4 GND vt GND sky130_fd_pr__res_high_po_0p35 W=0.35 L=20 mult=1 m=1 +C1 saw GND 1n m=1 +D1 vd net1 sky130_fd_pr__diode_pw2nd_05v5 area=1 +D2 net1 GND sky130_fd_pr__diode_pw2nd_05v5 area=1 **** begin user architecture code @@ -45,7 +44,7 @@ .ic V(saw)=0 .control tran 10n 200u -plot V(saw) V(cur) +plot V(saw) V(cur) V(vt) V(vd) //V(Vt) V(vd) //plot V(vd) //plot I(Vb)