| **.subckt sawgen-fet-sky130 |
| V1 VDD GND 10 |
| V2 GND VEE 10 |
| XM5 cur cur VDD 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 |
| XM6 saw cur VDD 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' |
| + 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 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 |
| 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 |
| 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 |
| |
| |
| .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) |
| |
| |
| .model 2N3904 NPN(IS=1E-14 VAF=100 Bf=300 IKF=0.4 XTB=1.5 BR=4 CJC=4E-12 CJE=8E-12 RB=20 RC=0.1 |
| + RE=0.1 TR=250E-9 TF=350E-12 ITF=1 VTF=2 XTF=3 Vceo=40 Icrating=200m mfg=Philips) |
| |
| .model 2N3906 PNP(IS=1E-14 VAF=100 BF=200 IKF=0.4 XTB=1.5 BR=4 CJC=4.5E-12 CJE=10E-12 RB=20 |
| + RC=0.1 RE=0.1 TR=250E-9 TF=350E-12 ITF=1 VTF=2 XTF=3 Vceo=40 Icrating=200m mfg=Philips) |
| |
| //.include /usr/share/pdk/sky130A/libs.ref/sky130_fd_pr/spice/sky130_fd_pr__nfet_g5v0d10v5.pm3.spice |
| //.include /usr/share/pdk/sky130A/libs.ref/sky130_fd_pr/spice/sky130_fd_pr__res_high_po_0p35.model.spice |
| |
| .lib /usr/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice tt |
| .include /usr/share/pdk/sky130A/libs.ref/sky130_fd_sc_hvl/spice/sky130_fd_sc_hvl.spice |
| |
| |
| .ic V(saw)=0 |
| .control |
| tran 10n 200u |
| plot V(saw) V(cur) V(vt) V(vd) |
| //V(Vt) V(vd) |
| //plot V(vd) |
| //plot I(Vb) |
| .endc |
| |
| **** end user architecture code |
| **.ends |
| .GLOBAL VDD |
| .GLOBAL GND |
| .GLOBAL VEE |
| ** flattened .save nodes |
| .end |