I'm trying to simulate cell rise and fall times of some digital library cells with HSPICE models. I cannot get ngpice to run to completion even if just look for the operating point(op). Ngspice runs and runs for hours before I kill the process. I know my setup is good as I’ve been able to run the same simulation with SPICE models from the sky130A process. With the HSPICE models, I’ve reduced the number of included libraries to a minimum and I’ve tried running a trans sim without first obtaining the operating point but that hasn’t helped.
Is there any way to know what is holding up ngspice ? Running in debug mode hasn’t helped because I never get the output text files. I’m running ngspice revision 31 on Ubuntu 20.04.4 LTS. Any help or suggestions are appreciated.
Please upgrade to ngspice-36.
Hi, I've upgraded to ngspice-36 and I'm still having the same problem where the simulation runs without sending out any data. As these are HSPICE models, I've set the compatibility mode to hs. For debug, I've added "set ngdebug" in .spiceinit. I'll note that this a elementary simulation with just a CMOS inverter.
The only way to analyse it would be to run it and have a look.
So please post the complete package (netlist and models), if possible as a zip or 7z file.
Thank you for your suggestion. Unfortunately, I cannot share the HSPICE models, as they are proprietary.
A plausible cause is that your input has provoked a latent infinite loop bug. The usual way to find it would be to reproduce the problem with a debug build, running under a debugger. Then keep interrupting the program, take a stack trace and continue, building up a picture of what is happening. Are you able to do that?
Hi Giles,
Unfortunately, I don't have the knowledge to debug something as you've described. Is the debugger you've suggested part of ngspice or is it an environment I would set up? Would this information be in the ngspice-36 manual?
I believe the problem lies with the HSPICE models that I've inherited, not with ngspice or my simulation.
Jarvis,
Those files probably work well with the simulator they are meant for, so this could be seen as a possible weakness in ngspice's compatability support. Before trying to go further, simple causes of the problem should be eliminated. I think the next question is, what exactly did you do to enable HSPICE support?
My suggested use of a debugger is not specific to ngspice, but more of a generic software support technique in cases where confidentiality prevents developers from reproducing the problem themselves. I have successful experience of this in previous employment and learned that it requires time and commitment on both sides.
Giles
Hi, Jarvis
Try to use Callgrind. You will see which file called the most.
I recommend to use it with kcachegrind GUI.
Super useful tool.
Two (I think) infinite loop bugs were fixed for transient simulations in version 38. (See bug #385). So if this is still relevant it could be worth upgrading again.