Activity for Andres Faina

  • Andres Faina Andres Faina posted a comment on discussion Help

    I tried to add a delay in the results callback and it works great to slow down the simulation. I will take a look at external voltages sources, to control behavioral resistors. Thanks for the good ideas!

  • Andres Faina Andres Faina posted a comment on discussion Help

    Hi, I am trying to use ngspice to create an interactive simulation where the user can change properties of the circuits being simulated (e.g., adjust a potentiometer or close a switch). For that, I need to control the simulation speed of ngspice (slow it down) as some parameters of the circuit may need to be changed. I have tried some options, but I found some issues: Halting the simulation and resuming it. The problem with this approach is that ngspice can simulate very fast sometimes and I need...

  • Andres Faina Andres Faina modified a comment on discussion Help

    Thanks for the explanation. But why do I get several calls for the same time step? Should I not receive one per time step or is the interp option not taken into account for the callbacks? Time and voltage does not seem to change... sdata() veccount: 27; vecindex: 54, time: 1.3499999999999992, v(4): 3.2582054796697899 sdata() veccount: 27; vecindex: 54, time: 1.3499999999999992, v(4): 3.2582054796697899 sdata() veccount: 27; vecindex: 55, time: 1.3749999999999991, v(4): 5.2878398632903876 sdata()...

  • Andres Faina Andres Faina posted a comment on discussion Help

    Thanks for the explanation. But why do I get several calls for the same time step? Should I not receive one per time step or is the interp option not taken into account for the callbacks?

  • Andres Faina Andres Faina modified a comment on discussion Help

    duplicated

  • Andres Faina Andres Faina modified a comment on discussion Help

    duplicated

  • Andres Faina Andres Faina posted a comment on discussion Help

    Yes, adding ".save @r1[p] all" fixes the crash. In any case, that line seems that it is not necessary if you wait until the background thread finishes the calculation. What it puzzles me is that it also does not crash if we do not pass the pointers to the callbacks SendData and SendInitData. What about the number of messages received in the callback of SendData? I received 8 calls for index 0, then one call per index and then suddelnly I receive hundreds or thousands of calls for some index (e.g.,...

  • Andres Faina Andres Faina modified a comment on discussion Help

    Yes, adding ".save @r1[p] all" fixes the crash. In any case, that line seems that it is not necessary if you wait until the background thread finishes the calculation. What it puzzles me is that it also does not crash if we do not pass the pointers to the callbacks SendData and SendInitData. What about the number of messages received in the callback of SendData? I received 8 calls for index 0, then one call per index and then suddelnly I receive hundreds or thousands of calls for some index (e.g.,...

  • Andres Faina Andres Faina posted a comment on discussion Help

    Yes, adding ".save @r1[p] all" fixes the crash. In any case, that line seems that it is not necessary if you wait until the background thread finishes the calculation. What it puzzles me is that it also does not crash if we do not pass the pointers to the callbacks SendData and SendInitData. What about the number of messages received in the callback of SendData? I received 8 calls for index 0, then one call per index and then suddelnly I receive hundreds or thousands of calls for some index (e.g.,...

  • Andres Faina Andres Faina posted a comment on discussion Help

    Yes, adding ".save @r1[p] all" fixes the crash. In any case, that line seems that it is not necessary if you wait until the background thread finishes the calculation. What it puzzles me is that it also does not crash if we do not pass the pointers to the callbacks SendData and SendInitData. What about the number of messages received in the callback of SendData? I received 8 calls for index 0, then one call per index and then suddelnly I receive hundreds or thousands of calls for some index (e.g.,...

  • Andres Faina Andres Faina posted a comment on discussion Help

    Hi, I am using the shared library and I found a strange issue that crashes the program, see attached files of a minimum example. I tested it in windows and with ngspice 42 (code modified from https://sourceforge.net/p/ngspice/discussion/133842/thread/6ac5ccc7f1/). The issue appears when 1) dl_ngSpice_Init is called with pointers to SendData, SendInit-Data and 2) we use a background thread (bg_run) and I request the power of a resistor using ngGet_Vec_Info("@r1[p]"); If I change just one of these...

  • Andres Faina Andres Faina posted a comment on discussion ngspice-devel

    Hi, I am implementing a basic simulator in Fritzing for teaching electronics. The first implementation is working and available here: https://github.com/fritzing/fritzing-app/tree/simulator https://github.com/fritzing/fritzing-app/blob/simulator/src/simulation/SIMULATOR_README.MD I am using ngpice as a shared library (reusing some code from Kicad) and I would like to detect when the simulation has been aborted or there are any errors (convergence problems, unable to find definition of model, etc.)....

1
MongoDB Logo MongoDB