Don't Understand the Simulation Error Message

I am getting this simulation error:

Compatibility modes selected: ps lt
Circuit: KiCad schematic
Error: unknown subckt: xu1 net-_r2-pad1_ net-_r4-pad1_ net-_r1-pad2_ 0 igniter_current opamp
Error: there aren't any circuits loaded.

Can someone explain it too me. I know it has something to do with the op amp I added to the circuit, but not sure how to debug it.

Compatibility modes selected: ps lt
Circuit: KiCad schematic
Error: unknown subckt: xu1 net-_r2-pad1_ net-_r4-pad1_ net-_r1-pad2_ 0 igniter_current opamp
Error: there aren't any circuits loaded.

When I run the ERC, I get this error, but the power pin (4) is connected in the schematic.

Error: Input Power pin not driven by any Output Power pins
Symbol U1 [OPAMP] Pin 4 [V+ Power input, Line]

Thanks!
Mark

tlv2462.spi (797 Bytes)
MOSFET-test2.kicad_sch (51.3 KB)

unknown subckt

It’s looking for a model by the name OPAMP, since that’s what is in the Spice_Model field. Change it to TLV246X since that’s what is in the model file.

Thanks! I learned something new about spice files!

Mark

1 Like

After fixing the model name and replacing all the values using scientific notation (e.g 1.2E-6) with values using spice notation (e.g. 1.2u), I still get this error:

Compatibility modes selected: ps lt
Circuit: KiCad schematic
Warning : voltage source v1 has non-increasing PWL time points.
Warning : voltage source v1 has non-increasing PWL time points.
Warning : voltage source v1 has non-increasing PWL time points.
Warning : voltage source v1 has non-increasing PWL time points.
Warning : voltage source v1 has non-increasing PWL time points.
Error on line 0 :
a$poly$f.xu1.fb %vnam [ v.xu1.vb v.xu1.vc v.xu1.ve v.xu1.vlp v.xu1.vln ] %id ( xu1.7 xu1.99 ) a$poly$f.xu1.fb
MIF-ERROR - model: a$poly$f.xu1.fb - Bad real value
Background thread stopped with timeout = 0
Error: circuit not parsed.

I don’t understand the warning about v1 nor the error for a$poly$f...

v1 is defined as PWL (0 0 1 1 2 2 3 3 4 4 5 5 5 5 5 5 5 5 5 5 5 5), which should be a ramp voltage from 0 to 5 volts and remaining at 5 volts. It worked before in an earlier rendition of this circuit without the op amp.

A follow up questions. Is there a difference in spice between 10.0000p and 10.0p and 10p?

Thanks!

Mark
MOSFET-test2.kicad_sch (51.3 KB)

This model is the original one from the TI data sheet
tlv2462.spi (797 Bytes)
This model has my edits, and is the one used to generate the error messages.
tlv2462.spi (721 Bytes)

Not sure what’s going on there at a glance either.

I think it’ll work but it’s definitely dodgy, you shouldn’t need to repeat equal time points like that. 0 0 1 1 2 2 3 3 4 4 5 5 is enough and should silence the warning. It always holds the last value for the rest of time.

No

Thanks - removing the extraneous 5 5 5 5 entries got rid of the v1 errors. Strange that this error did not come up in my earlier model.

I still have this error:

Compatibility modes selected: ps lt
Circuit: KiCad schematic
Error on line 0 :
a$poly$f.xu1.fb %vnam [ v.xu1.vb v.xu1.vc v.xu1.ve v.xu1.vlp v.xu1.vln ] %id ( xu1.7 xu1.99 ) a$poly$f.xu1.fb
MIF-ERROR - model: a$poly$f.xu1.fb - Bad real value
Background thread stopped with timeout = 0
Error: circuit not parsed.

I had a similar error with my earlier schematic/simulation, and it turned out I had to install the ngspice package on my Ubuntu system for it to be resolved. I was missing the *.cm files. They are still there, so I am not sure what else is not working in my kicad/ngspice setup. I installed kicad from the kicad website download section:

Application: KiCad Schematic Editor
Version: 6.0.8-f2edbf62ab~116~ubuntu20.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Platform: Linux 6.0.1-surface x86_64, 64 bit, Little endian, wxGTK, ubuntu, x11
Build Info:
    Date: Sep 30 2022 16:52:13
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.71.0
    OCC: 7.5.2
    Curl: 7.85.0
    ngspice: 36
    Compiler: GCC 9.4.0 with C++ ABI 1013
Build settings:
    KICAD_USE_OCC=ON
    KICAD_SPICE=ON

and the version of ngspice installed is version 36.

Thanks for any insights you can provide.

Mark

The error is:

Where did you get the TI model from?
Do you have a decent text editor which may switch the encoding of the text between UTF8 and ANSI? Your file tlv2462.spi is encoded in UTF8. After switching the encoding to ANSI, watch the ‘-’ characters.

It is not ‘-’, but something like ‘−’, a hyphen only seen in UTF8, but not usable as a mathematical operator or for describing negative numbers as ngspice input. ngspice does like to see the standard ‘-’ when dealing with numbers, so if it gets something like −2 instead of -2, it will complain about a bad real value. When I replace all UTF8 - by the correct ANSI -, the model will be accepted by ngspice.

Thanks!

The model is from the TI data sheet - https://www.ti.com/lit/ds/symlink/tlv2460.pdf?ts=1666565540448&ref_url=https%3A%2F%2Fwww.ti.com%2Fproduct%2FTLV2460

I figured out how to change from UTF-8 to ANSI, and now the error messages are gone. I will remember this for future copy and paste from data sheets.

I have two warnings -

Compatibility modes selected: ps lt
Circuit: KiCad schematic
Reducing trtol to 1 for xspice 'A' devices
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
Warning: v1: no DC value, transient time 0 value used
Warning: v.xf1.v1: has no value, DC 0 assumed

Not sure about the v.xf1.v1, unless they are the same warning? v1 is defined to be 0 at time 0, so not sure what to change in the simulation parameters to address the warnings.

Mark

You may forget about these warnings. Upcoming ngspice-38 will suppress them when dc value (or 0 when not given) and time 0 value are the same.

1 Like