← Back to team overview

kicad-developers team mailing list archive

Re: Integrated Simulator

 

Hi Tom,

Thank you for the report. I have just updated the get_libngspice_so.sh
[1] script. Would you try it again?

Regards,
Orson

1. https://orson.net.pl/pub/libngspice/get_libngspice_so.sh

On 07/22/2016 03:30 PM, Tom Andrews wrote:
> Hi guys,
> 
> Thanks very much for adding this feature for a start, definitely something
> I've been wishing for.
> 
> Run into an issue off the bat;
> Used the script to download/compile the shared lib, and compiled eeschema
> with -DKICAD_SPICE=ON, all good.
> Loaded up eeschema and opened up sallen_key.sch, opened the simulation
> window and set setting to transient with 1n step and 1s finish time,
> clicked OK and pressed Run/Stop Simulation, it said no circuits loaded, I
> stopped and restart the simulation and the program segfaulted, with this
> error in GDB.
> (I'm running LMDE 64 bit, kernel 3.16.0-4-amd64)
> 
> 14:26:35: Debug: LoadAllLibraries SEARCH_STACK:
> 14:26:35: Debug:   [ 0]:/home/tom/kicad-dev/demos/simulation/sallen_key
> 14:26:35: Debug:   [ 1]:/home/tom/kicad-dev/build/debug/template
> 14:26:35: Debug:   [ 2]:/usr/local/share
> OpenProjectFiles: loading schematic
> /home/tom/kicad-dev/demos/simulation/sallen_key/sallen_key.sch
> CheckComponentsToPartsLinks: resync-ing
> /home/tom/kicad-dev/demos/simulation/sallen_key/sallen_key.sch
> Player 4
> Create class 4
> Player 0
> stat 1 immed 0 quit 0
> [New Thread 0x7fffdeffd700 (LWP 3558)]
> [Thread 0x7fffdeffd700 (LWP 3558) exited]
> /usr/local/lib/ngspice/spice2poly.cm: cannot open shared object file: No
> such file or directory
> Error: Library /usr/local/lib/ngspice/spice2poly.cm couldn't be loaded!
> /usr/local/lib/ngspice/analog.cm: cannot open shared object file: No such
> file or directory
> Error: Library /usr/local/lib/ngspice/analog.cm couldn't be loaded!
> /usr/local/lib/ngspice/digital.cm: cannot open shared object file: No such
> file or directory
> Error: Library /usr/local/lib/ngspice/digital.cm couldn't be loaded!
> /usr/local/lib/ngspice/xtradev.cm: cannot open shared object file: No such
> file or directory
> Error: Library /usr/local/lib/ngspice/xtradev.cm couldn't be loaded!
> /usr/local/lib/ngspice/xtraevt.cm: cannot open shared object file: No such
> file or directory
> Error: Library /usr/local/lib/ngspice/xtraevt.cm couldn't be loaded!
> ******
> ** ngspice-26 shared library
> ** Creation Date: Fri Jul 22 12:00:06 BST 2016
> ******
> Error: .include filename missing
> Error: ngspice.dll cannot recover and awaits to be detached
> Error: there aren't any circuits loaded.
> stat 1 immed 0 quit 0
> [New Thread 0x7fffdeffd700 (LWP 3559)]
> [Thread 0x7fffdeffd700 (LWP 3559) exited]
> /usr/local/lib/ngspice/spice2poly.cm: cannot open shared object file: No
> such file or directory
> Error: Library /usr/local/lib/ngspice/spice2poly.cm couldn't be loaded!
> /usr/local/lib/ngspice/analog.cm: cannot open shared object file: No such
> file or directory
> Error: Library /usr/local/lib/ngspice/analog.cm couldn't be loaded!
> /usr/local/lib/ngspice/digital.cm: cannot open shared object file: No such
> file or directory
> Error: Library /usr/local/lib/ngspice/digital.cm couldn't be loaded!
> /usr/local/lib/ngspice/xtradev.cm: cannot open shared object file: No such
> file or directory
> Error: Library /usr/local/lib/ngspice/xtradev.cm couldn't be loaded!
> /usr/local/lib/ngspice/xtraevt.cm: cannot open shared object file: No such
> file or directory
> Error: Library /usr/local/lib/ngspice/xtraevt.cm couldn't be loaded!
> ******
> ** ngspice-26 shared library
> ** Creation Date: Fri Jul 22 12:00:06 BST 2016
> ******
> Error: .include filename missing
> Error: ngspice.dll cannot recover and awaits to be detached
> Background thread stopped with timeout = 0
> Error: there aren't any circuits loaded.
> [Thread 0x7fffdf7fe700 (LWP 3553) exited]
> stat 1 immed 0 quit 0
> [New Thread 0x7fffdeffd700 (LWP 3560)]
> [Thread 0x7fffdeffd700 (LWP 3560) exited]
> /usr/local/lib/ngspice/spice2poly.cm: cannot open shared object file: No
> such file or directory
> Error: Library /usr/local/lib/ngspice/spice2poly.cm couldn't be loaded!
> /usr/local/lib/ngspice/analog.cm: cannot open shared object file: No such
> file or directory
> Error: Library /usr/local/lib/ngspice/analog.cm couldn't be loaded!
> /usr/local/lib/ngspice/digital.cm: cannot open shared object file: No such
> file or directory
> Error: Library /usr/local/lib/ngspice/digital.cm couldn't be loaded!
> /usr/local/lib/ngspice/xtradev.cm: cannot open shared object file: No such
> file or directory
> Error: Library /usr/local/lib/ngspice/xtradev.cm couldn't be loaded!
> /usr/local/lib/ngspice/xtraevt.cm: cannot open shared object file: No such
> file or directory
> Error: Library /usr/local/lib/ngspice/xtraevt.cm couldn't be loaded!
> ******
> ** ngspice-26 shared library
> ** Creation Date: Fri Jul 22 12:00:06 BST 2016
> ******
> Error: .include filename missing
> Error: ngspice.dll cannot recover and awaits to be detached
> Background thread stopped with timeout = 0
> Error: there aren't any circuits loaded.
> stat 1 immed 0 quit 0
> [New Thread 0x7fffdeffd700 (LWP 3561)]
> [Thread 0x7fffdeffd700 (LWP 3561) exited]
> /usr/local/lib/ngspice/spice2poly.cm: cannot open shared object file: No
> such file or directory
> Error: Library /usr/local/lib/ngspice/spice2poly.cm couldn't be loaded!
> /usr/local/lib/ngspice/analog.cm: cannot open shared object file: No such
> file or directory
> Error: Library /usr/local/lib/ngspice/analog.cm couldn't be loaded!
> /usr/local/lib/ngspice/digital.cm: cannot open shared object file: No such
> file or directory
> Error: Library /usr/local/lib/ngspice/digital.cm couldn't be loaded!
> /usr/local/lib/ngspice/xtradev.cm: cannot open shared object file: No such
> file or directory
> Error: Library /usr/local/lib/ngspice/xtradev.cm couldn't be loaded!
> /usr/local/lib/ngspice/xtraevt.cm: cannot open shared object file: No such
> file or directory
> Error: Library /usr/local/lib/ngspice/xtraevt.cm couldn't be loaded!
> ******
> ** ngspice-26 shared library
> ** Creation Date: Fri Jul 22 12:00:06 BST 2016
> ******
> Error: .include filename missing
> Error: ngspice.dll cannot recover and awaits to be detached
> Background thread stopped with timeout = 0
> Error: there aren't any circuits loaded.
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007fffe831f552 in std::_Rb_tree<wxString, std::pair<wxString const,
> int>, std::_Select1st<std::pair<wxString const, int> >,
> std::less<wxString>, std::allocator<std::pair<wxString const, int> >
>> ::_S_right (__x=0x6d65642f7665642d)
>     at /usr/include/c++/4.9/bits/stl_tree.h:553
> 553      { return static_cast<_Link_type>(__x->_M_right); }
> 
> Let me know how I can be more use/provide more info.
> 
> Cheers,
> 
> Tom
> 
> 
> On Fri, Jul 22, 2016 at 12:41 PM, Wayne Stambaugh <stambaughw@xxxxxxxxx>
> wrote:
> 
>> Thank you CERN for contributing this excellent addition to KiCad.
>> Needless to say that I was shocked at how far along the simulator was
>> when I arrived at CERN since I had no idea they were even working on
>> simulation.  It moves KiCad one step closer to world domination! ;)
>>
>> On 7/21/2016 3:37 PM, 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
> 


Attachment: signature.asc
Description: OpenPGP digital signature


References