Hi there, has been a while since used the ngspice models for sky130 and I may be missing something o...
u
Hi there, has been a while since used the ngspice models for sky130 and I may be missing something obvious. Why would below work with lines 21,22 (when swapping the comments) but not 23,24?
Copy code
21 *X0 vss vout vin vss sky130_fd_pr__nfet_01v8 w=650000u l=150000u
 22 *X1 vdd vout vin vdd sky130_fd_pr__pfet_01v8 w=1000000u l=150000u
 23 X0 vout vin vss vss sky130_fd_pr__nfet_01v8 w=0.65 l=0.15
 24 X1 vout vin vdd vdd sky130_fd_pr__pfet_01v8 w=1.0 l=0.15
Additionally, I remember the models use the
option scale=1e-6;
but the MOSFET bins seem to be in meters, not sure how this gets resolved in the end, any clues?
Copy code
>>> grep lmin cells/nfet_01v8/sky130_fd_pr__nfet_01v8__tt.pm3.spice |tail
+ lmin = 1.5e-07 lmax = 1.8e-07 wmin = 3.9e-07 wmax = 4.2e-7
+ lmin = 2.0e-05 lmax = 0.0001 wmin = 3.6e-07 wmax = 3.9e-7
+ lmin = 8.0e-06 lmax = 2.0e-05 wmin = 3.6e-07 wmax = 3.9e-7
This is commit f62031a1be9aefe902d6d54cddd6f59b57627436, from https://github.com/google/skywater-pdk-libs-sky130_fd_pr.git And I'm using ngspice-36
t
As for the first question: The order of pin connections got changed. MOSFETs should always have pins in order (D G S B), and while drain and source can be swapped without issue, in your example, the drain, gate, and source have all been reordered.
👍 1
The models are correct; the scaling happens somewhere between the subcircuit call and the model parameters. It is quite confusing; I tried once to get rid of the scalefactor in the model files, but there were vast complications in the way the parameter equations were written that would make that change difficult and time-consuming.
👍 1
u
Thanks a lot, I got so fixated on the scaling aspect that a missed a simple typo. Also, I was checking the manual, it seems that the semantic for the scale option is to only scale the device parameters so it should have no consequence on the ranges.