kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #25648
Re: Integrated Simulator
I think your proposal is the best way. I had to do something similar
many years ago with another scientist's FORTRAN code - in that case
the code either asked for user input or simply called exit() - both of
those being extremely bad behavior for a shared library. From my point
of view your proposed change should be an improvement to the ngspice
code (I hope it doesn't require as much refactoring as the fortran code
I had to deal with).
- Cirilo
On Wed, Aug 3, 2016 at 10:06 PM, Maciej Sumiński <maciej.suminski@xxxxxxx>
wrote:
> TL;DR: I consider preparing a script that builds patched ngspice DLL to
> solve the problem.
>
> The bug stems from the fact that when an error occurs user is expected
> to answer whether the simulation should be continued with y/n. As there
> is no way we can answer the question when ngspice runs from a shared
> library, the simulation hangs.
>
> There is no directive to skip the question. The only way is to run in
> batch mode, but it might be done only by running ngspice with -b parameter.
>
> Ideally it should be patched in the ngspice source code (I am going to
> propose it to the ngspice devs), but once it is accepted, it will take a
> lot of time before the code is included the next release.
>
> What I consider right now, is to modify get_libngspice_so.sh, to make it
> multiplatform and add the required patch there. Currently, it should not
> be a big deal as the shared library is only delivered by Arch Linux (and
> I believe Arch users are able to cope with such problem anyway).
>
> What do you think? Does anyone see a better solution?
>
> Regards,
> Orson
>
> On 07/21/2016 11:16 PM, Chris Pavlina wrote:
> > Really, really nice! I made it do a thing!
> https://misc.c4757p.com/kicad_sim.png
> >
> > I feel bad to provide a bug report on my very first communcation on
> > this, but... found one: not sure if this sort of thing is actually
> > standard SPICE or an LTspice extension, but I tried parameterizing a
> > component value, setting a resistor's value to {R} - that sort of thing
> > leads to irrecoverable lockups here.
> >
> > On Thu, Jul 21, 2016 at 09:37:57PM +0200, Tomasz Wlostowski wrote:
> >> Hi,
> >>
> >> As some of you have noticed, we've been working on a "secret" feature
> >> during the hackathon at CERN. The feature we're talking about is an
> >> integrated circuit simulator. Currently it features:
> >> - Seamless integration into schematic editor,
> >> - AC/Transient/DC sweep simulations,
> >> - Voltage probing from the schematics,
> >> - Live tuning of component values.
> >>
> >> A video demonstrating the capabilities of the new simulator is available
> >> on Tom's YouTube channel [1].
> >>
> >> The code is currently available in the ngspice branch on Tom's GitHub
> >> [2] for review & testing. It's a big feature, so we didn't want to push
> >> it immediately to the product branch. We'll greatly appreciate your
> >> feedback!
> >>
> >> The simulator uses ngspice [3] as the Spice kernel. We'd like to thank
> >> ngspice developers for providing a DLL interface which made seamless
> >> integration of ngspice into Kicad possible.
> >>
> >> In order to get started:
> >> - install ngspice shared library (is not provided by many Linux distros,
> >> Arch Linux is a known exception, so you might have to compile it from
> >> the sources with --with-ngshared --enable-xspice options). Windows
> >> DLLs, msys2 PKGBUILD & binary packages (to be included soon in
> >> the official msys2 repo, currently merged to
> >> https://github.com/Alexpux/MINGW-packages/) & Linux script to build the
> >> library are available at [4].
> >> - compile eeschema with -DKICAD_SPICE=ON option,
> >> - have a look at some examples in demos/simulation directory.
> >>
> >> Happy simulating,
> >> Tom
> >>
> >> [1] https://youtu.be/A2_-hdRcf4U
> >> [2] https://github.com/twlostow/kicad-dev/tree/ngspice
> >> [3] http://ngspice.sourceforge.net/
> >> [4] https://orson.net.pl/pub/libngspice
> >>
> >> _______________________________________________
> >> Mailing list: https://launchpad.net/~kicad-developers
> >> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> >> Unsubscribe : https://launchpad.net/~kicad-developers
> >> More help : https://help.launchpad.net/ListHelp
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help : https://help.launchpad.net/ListHelp
> >
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
>
References