kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #25524
Re: Integrated Simulator
-
To:
Chris Pavlina <pavlina.chris@xxxxxxxxx>
-
From:
Tomasz Wlostowski <tomasz.wlostowski@xxxxxxx>
-
Date:
Mon, 25 Jul 2016 15:18:51 +0200
-
Authentication-results:
spf=pass (sender IP is 188.184.36.48) smtp.mailfrom=cern.ch; lists.launchpad.net; dkim=none (message not signed) header.d=none;lists.launchpad.net; dmarc=bestguesspass action=none header.from=cern.ch;
-
Cc:
Kicad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
In-reply-to:
<20160722122855.GA21364@turnip.local>
-
Spamdiagnosticmetadata:
NSPM
-
Spamdiagnosticoutput:
1:99
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0
On 22.07.2016 14:28, Chris Pavlina wrote:
> On Fri, Jul 22, 2016 at 10:54:27AM +0200, Tomasz Wlostowski wrote:
>> On 21.07.2016 23:16, 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.
>>>
Hi Chris,
Check with a debugger if it freezes inside ngspice yes_or_no() function
which prompts the user on the console whether to continue or not. It
seems you have an error in your circuit. NgSPICE DLL does not have all
communication channels redirected to the callback functions, some of
them include reporting problems with parametrizable components.
If this is the case, we should contact NGSpice team to fix this (or send
them a patch ;-)
Tom
PS. Could you upload the circuit that triggers the freeze?
>>
>> Hi Chris,
>>
>> Two quick questions:
>> - Do you have NGspice compiled with XSPICE support?
>> - Could you run eeschema with forced "C" locale?
>
> Yup, ngspice has XSPICE support compiled in. Forcing C locale changes
> the behavior slightly but doesn't fix it:
>
> With default locale (en_US.utf8), a simple circuit consisting of a
> voltage source V=12 and a resistor {R} with the parameter left
> unspecified freezes kicad completely (can only be quit by SIGTERM). With
> C locale, this doesn't seem to cause a freeze, but after attempting
> to specify that parameter by adding ".param R 12", *then* it freezes.
>
>>
>> Tom
>>> 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
>>
References