19 Commits

Author SHA1 Message Date
Jeff Young
c7859e7ed7 Clean up (and better comment) referential model handling. 2024-09-02 09:50:31 +01:00
Jeff Young
ee77d06be7 Turn off LTspiceXVII/lib/cmp hack.
Now that performance has improved and we process models
one-by-one there's no need to create fallback models for
the (copiously buggy) standard LTspice libs.
2024-09-01 22:14:15 +01:00
Jeff Young
33efd9e0ef Revert single parsing because we use different parsers
for different model types.

Alos fix AKO & SUBCKT model handling, which can't be done
in parallel because they refer to other models.
2024-09-01 10:56:05 +01:00
Jeff Young
1959bacf08 Performance.
Don't parse PEGTL twice, once for modelType and once for
model itself.

Also don't do O(n^2) searches on parameter names when
reading libraries.

And, because it's still too slow, multi-thread it.
2024-08-31 18:51:28 +01:00
Jeff Young
7f6ab7043b Clean up more exception processing in simulation GUI.
This allows us to more correctly report errors without
dialog issues, logs popping up, etc.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18259
2024-07-03 13:32:44 +01:00
Jeff Young
7a2a2e2df0 Remove error-prone SetReporter() API. 2023-09-06 11:37:50 +01:00
jean-pierre charras
a9fff82664 spice_library_parser: catch an exception thrown when a spice model cannot be built.
Fixes #15012
https://gitlab.com/kicad/code/kicad/-/issues/15012
2023-06-20 10:26:42 +02:00
Jeff Young
69500bfcaa LTSpice schematic import based on the work of Chetan Shinde. 2023-04-24 13:52:52 +01:00
Jeff Young
c381b6d024 More robust file reading for simulator files. 2023-04-24 13:52:52 +01:00
Jeff Young
9b9795a87d Reduce reliance on exception processing -- it's waay too bugy at present.
This moves some stuff to REPORTER APIs.  Moving more stuff would be good,
but it probably too high-risk at present.  We'll wait for 8.0 for that....

Fixes https://gitlab.com/kicad/code/kicad/issues/13359
2023-01-03 17:20:23 +00:00
Seth Hillbrand
10a3d57193 Add sim_lib callback to resolve embeded libs
Also teach parser to look for include directives in libraries

We get KiCad variable resolution in include pathnames for free.

Fixes https://gitlab.com/kicad/code/kicad/issues/13083
2022-12-14 13:31:41 -08:00
Jeff Young
f29f0c5c0a Don't push a model that didn't load.
Fixes https://gitlab.com/kicad/code/kicad/issues/12689
2022-12-04 21:06:35 +00:00
jean-pierre charras
8ab8a48657 fix order of includes to avoid conflicts with a Windows header. 2022-12-03 10:59:46 +01:00
Mikolaj Wielgus
bbcb0c04fc Sim: Don't crash when parsing unknown model in a Spice file 2022-11-27 08:59:54 +01:00
Mikolaj Wielgus
c3d5b3b3e5 Sim: Only store device type in reference, not full model type
Instead of Reference="VSIN1", Value="dc=1 ampl=2 f=3", it's now
Reference="V1", Value="SIN dc=1 ampl=2 f=3".
2022-10-15 19:36:26 +02:00
Mikolaj Wielgus
120b569048 Sim: Support ako models 2022-10-04 17:48:10 +02:00
jean-pierre charras
b6663a1c41 minor fixes. 2022-09-21 15:49:50 +02:00
jean-pierre charras
78087597cd Avoid including plotters/plotter.h in many files.
It avoid a large rebuild when modifying the plot code.
2022-09-21 08:52:34 +02:00
Mikolaj Wielgus
2bf6791352 Sim: Move SIM_LIBRARY_SPICE parsing facilities to a new class
This leaves SIM_LIBRARY_SPICE very small, but it will grow larger later.
2022-09-20 08:17:51 +02:00