Should I be concerned about these ngspice warnings...
# analog-design
l
Should I be concerned about these ngspice warnings? I think I always get them if I use a transistor.
Copy code
option SCALE: Scale is set to 1e-06 for instance and model parameters
Warning: Model issue on line 2610 :
  .model sky130_fd_pr__model__parasitic__diode_ps2nw d level=3.0 tlevc=1.0 ...
unrecognized parameter (vb) - ignored
unrecognized parameter (gap1) - ignored
unrecognized parameter (gap2) - ignored
unrecognized parameter (xw) - ignored
s
I have the same warnings. They come from diodes (or diodes embedded in transistor models). I think we have to live with these for the time being. Diodes work in the new Tim Edward's combined models, they were extremely buggy in the default binned models.
l
How can I tell if I have the new or old models?
Also, is there any chance that this diode stuff could be causing my low-leakage capacitor switch to not work? I've tried everything but I can't get the leakage below 200fA when voltage across switch ranges by 0.4v
s
check the xschemrc for these lines:
# set SKYWATER_MODELS ${PDK_ROOT}/${PDK}/libs.tech/ngspice
set SKYWATER_MODELS ${PDK_ROOT}/${PDK}/libs.tech/combined
The first line (commented here) are the old spice models the second line are the new models. For the 400fA leakage consider that ngspice adds a GMIN conductance of 1e-12 mho to all nodes to help convergence. So every electrical node has 1GΩ to ground. You can change this:
.option GMIN=1e-16
😮 1
l
Will things break or be unrealistic with lower GMIN?
s
no, nothing breaks. Your circuit will be more realistic, since it does not have these GMIN artifacts. The only problem could be ngspice not being able to find a solution. But currently ngspice handles these problems quite well, for example temporarily increasing GMIN , finding a DC solution , then going back to the required GMIN value.
l
THAT WAS IT THANK YOU
I was tweaking everything for 2 days 🙏
How might someone like me learn of other important such things that could make my simulations unrealistic or something?
s
I don't think there is a magic recipe. Keep doing the job, you will become another expert 🙂 I have worked 26 years in VLSI design, and many problems are recurring
l
Oh man
Also I was on the
libs.tech/ngspice
-- I just tried the
libs.tech/combined
but I am getting
Copy code
Error: Could not find include file /home/l/git/RTimothyEdwards--open_pdks/sky130/sky130A/libs.tech/combined/r+c/res_typical__cap_typical.spice
My open_pdks repo is 2 or 3 weeks old
s
Anyway be careful if a 200fA can break your circuit. This is an extremely low value. Try for example a simulation at 125C, transistor leakage will increase, so you will see if it is robust.
👍 1
for the open_pdks i also am scheduling a full update tomorrow, @Tim Edwards has done quite a lot of updates to make the new modelset (the "combined" models) production quality, so we are doing the switchover.
😮 1
🙌 1
for the leakage try a 85C simulation in the 'ff' (fast-n, fast-p) process corner. Faster transistors have lower Vth and as such higher leakage, plus temperature.
👍 1
h
If you are interested in circuit simulation, try to get this book: K. Kundert, “The Designer’s Guide to SPICE and Spectre,” Kluwer, 2003.
🙏 1
You will find plenty of useful information in the Kundert book.
t
@Luke Harold Miles: Yes, the current version of the repositories and open_pdks looks complete for running the combined SkyWater models. There are probably obscure issues remaining here and there, but @Stefan Schippers has done a pretty thorough job of checking and validating.
😄 1
l
Ah so it's not cooking; it's cooked; and I should update now?
t
Depends on how you feel about being a guinea pig cutting-edge early adopter. : )
😁 1
l
Great, I just installed it. Will let you know if I get new problems.
Before I think I only got the diode warning (first message in thread) once when running
sky130A/libs.tech/xschem/sky130_tests/test_nmos.sch
. Now I get once per transistor and it's slightly different.
Copy code
Warning: Model issue on line:
  .model xm8.xdndrain1:sky130_fd_pr__model__parasitic__diode_ps2dn_diode d ...
unrecognized parameter (vb) - ignored
unrecognized parameter (gap1) - ignored
unrecognized parameter (gap2) - ignored
unrecognized parameter (xw) - ignored
("Before" was open_pdks installed about 2 weeks ago. I think this commit.)
Are these reports helpful/useful at all?