Menu

#56 Ngspice runs and runs without completing

v1.0 (example)
open
nobody
None
5
2022-12-18
2022-04-04
Jarvis
No

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.

Discussion

  • Holger Vogt

    Holger Vogt - 2022-04-04

    Please upgrade to ngspice-36.

     
  • Jarvis

    Jarvis - 2022-04-04

    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.

     
  • Holger Vogt

    Holger Vogt - 2022-04-04

    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.

     
    • Jarvis

      Jarvis - 2022-04-07

      Thank you for your suggestion. Unfortunately, I cannot share the HSPICE models, as they are proprietary.

       
  • Giles Atkinson

    Giles Atkinson - 2022-04-07

    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?

     
  • Jarvis

    Jarvis - 2022-04-13

    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.

     
  • Giles Atkinson

    Giles Atkinson - 2022-04-15

    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

     
  • Bohdan Tkhir

    Bohdan Tkhir - 2022-05-27

    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.

     
  • Giles Atkinson

    Giles Atkinson - 2022-12-18

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.