Menu

How to make ngspice.dll to just store current nodes value?

fiveight
2017-05-09
2017-05-11
  • fiveight

    fiveight - 2017-05-09

    Hi All:
    I am working with ngspice.dll. And I get nodes value in senddata callback function. I want to store nodes value of current moment only by myself, and make ngspice not to store history nodes values. So ngspice will not eat memory more and more. How can I do this?
    Thanks!

     

    Last edit: fiveight 2017-05-09
    • marcel hendrix

      marcel hendrix - 2017-05-09

      It is not possible, as it will destroy NGSPICE's fundamental
      algorithms for step size prediction, Newton-Raphson iteration,
      .MEASURE, most of the interpreter functions, and the core of
      XSPICE's scheduler. Unfortunately.

      -marcel

       
  • fiveight

    fiveight - 2017-05-09

    I am working in interactive mode, and doing transient analysis on digital circuit. Is there any way to make ngspice to delete history nodes value during simultion? I think while simulating ngspice dose not need all history nodes value.
    I use Multisim to simulate my circuit too. It can use static memory while simulating, if I set logic analysis instrument in circuit, Multisim eat memory slowly.

     

    Last edit: fiveight 2017-05-09
  • marcel hendrix

    marcel hendrix - 2017-05-10

    AFAIR, an XSPICE user model can set a breakpoint in the past. Which history nodes are safe to delete then? Multisim may make use of the fact that it does not allow user models.

    -marcel

     
  • fiveight

    fiveight - 2017-05-11

    Thank!
    But I still think while simulation ngspice does not need all history values of nodes.
    Hope ngspice can supply a command to clear these useless values next version.

     
    • Holger Vogt

      Holger Vogt - 2017-07-31

      There is now a new ngspice branch shared-xspice, that adds two things:
      XSPICE event nodes are available via the shared ngspice interface.
      An enhancement of the 'save' command (if shared ngspice is used)
      save none
      will prevent storing the analog simulation data. These are stll available via the
      SendData callback function. Restrictions apply in using other commands:
      measure, write, fft, etc. do not make sense any more. All data processing
      now is in the reponsibility of the calling process.
      This is not available however for the XSPICE event nodes (digital simulation).
      Currently there is no command available to restrict event nodes for saving.
      So memory consumption for simulation with event nodes may be huge.
      I will look into this next.

      Holger

       
      • fiveight

        fiveight - 2017-08-01

        Good job!
        Thanks!
        I will try this.

         
      • fiveight

        fiveight - 2017-10-11

        Hi Holger!
        Does Ngspice-27 DLL support "save none" command now?
        And is this available for XSPICE event nodes?
        Thanks!

         

Log in to post a comment.