[SOLVED] Unknown model type spice2poly

I am using a manufacturer SPICE model which contains this statement
F1 4 10 POLY(2) VS1 VS2 (0,2.42834E-5,3.8E-5)

which leads to a warning when running the simulator.

a$poly$f.xu1.f1 %vnam [ v.xu1.vs1 v.xu1.vs2 ] %id ( 0 xu1.10 ) a$poly$f.xu1.f1
MIF-ERROR - unable to find definition of model a$poly$f.xu1.f1
Warning: Model issue on line 0 :
.model a$poly$f.xu1.f1 spice2poly coef = [ 0 2.42834e-5 3.8e-5 ] ...
Unknown model type spice2poly - ignored

Does someone know how to fix this issue without reinstalling ngspice or KiCad stable? Some workaround how to define this model as a function or something like this?

I found some posts, but could not really solve it.


https://sourceforge.net/p/ngspice/discussion/127605/thread/5356888d/
https://archives.seul.org/geda/user/Jun-2006/msg00165.html

What version of KiCad are you using? Does the spice2poly.cm file exist in your KiCad/lib/ngspice/ directory? Also, are you able to upload here the entire subcircuit for this device?

Thanks for the reply. There is a /usr/local/lib/ngspice/spice2poly.cm in my drive, but not under KiCad.

The models is this one:
https://www.analog.com/media/en/simulation-models/spice-models/ad780.cir

I am using

Application: Eeschema
Version: 5.1.6-c6e7f7d~87~ubuntu18.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.58.0 OpenSSL/1.1.1 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 5.4.0-40-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.58.0
    Compiler: GCC 7.5.0 with C++ ABI 1011

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

It somehow got solved. I had lately uninstalled ngspice via sudo apt remove ngspice. I had reinstalled it yesterday, but somehow it did not find it. After (I guess) restarting KiCad, it works fine and I get this 'message instead:
Reducing trtol to 1 for xspice 'A' devices

Ah, OK. Glad it works now. Yeah, the TRTOL message is perfectly normal.

1 Like

Just got the same error from the same demo under Kicad 6.02. Restarting Kicad does not solve the problem.

This is an installation problem.

What is your operating system?

If you are on Ubuntu (you did not tell us), try reinstalling ngspice:
sudo apt installl ngspice
as done here Kicad 6.0 & ngspice 31 - #7 by tylerkiwi sucessfully.

1 Like