Ngspice-28 for KiCad

Yes, exactly. The idea was that we are not PSPICE, but ngspice. But we want to read PSPICE model files.

However I never thought about adding an .include statement to the text field!

1 Like

That could be done even before this nice spicey gui was added. When I generated netlists for spice via the netlist button in version 4, it was good to keep the schematic self-contained and completely documented without the need to manually add stuff afterwards to the generated file. One had to be careful to not end up with a very messy schematic, but at least it contained everything needed to be able to pick up the schematic again after 6 months or so.

Today’s solution is much neater, because the model is directly coupled to the part. That is much much better.

I would like to suggest to add a phrase containing the word “only” to section 16.13.5 of the user manual and make the behaviour explicit. Perhaps I am more thinking in terms of a reference manual than a users manual, but I think it might be better to be clear, than it is to leave the matter open to interpretation in a multi language and multicultural environment.

m

On windows 10, I cannot seem to create a file as .spiceinit. It demands a “valid filename”. I looked throughout the ngspice_dll_64.zip and found a global init file called spinit. Should the init file in the C:\users<your name> be spinit or spiceinit without the leading period.

Use the alternative name

spice.rc

A post was merged into an existing topic: How to install a spice app into Eeschema?

Application: kicad
Version: 5.0.0-fee4fd1~66~ubuntu18.04.1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-30-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
Boost: 1.65.1
OpenCASCADE Community Edition: 6.9.1
Curl: 7.58.0
Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_WXPYTHON=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON

To get the .spiceinit to be read, I had to put it into /usr/share/kicad on Linux Mint 19 (Ubuntu 18.04). I added the “set ngdebug” line to .spiceinit to be sure that I could tell it was being read. I had followed mifi’s “FOR THE RECORD (on Linux)” above. By the way, before moving the .spiceinit to where it was actually being read, I noticed that KiCAD worked fine with VDMOS models (except that the GUI does not put them in the pulldown menu, as others have noted). It appears that “set ngbehavior=ps” is not required for just reading VDMOS models, only PSPICE? Upgrading KiCAD to NGspice 28 is a major step forward, as I use a lot of VDMOS models (often from LTspice). Thanks to all who have made this possible.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.