Jeff Young
29360b1aef
Raw spice models don't have pin names.
2024-05-10 20:58:13 +01:00
Jeff Young
d9f0c8e1f3
Remove accidentally committed lines.
2024-05-10 15:58:48 +01:00
Jeff Young
a20a6e0787
Don't add duplicate SIM fields.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17970
2024-05-10 11:35:49 +01:00
Jeff Young
95136494b3
RIP LIB_PIN.
2024-04-20 12:10:31 +01:00
Jeff Young
d77eae3e7e
Collapse LIB_FIELD into SCH_FIELD.
2024-04-13 15:42:13 +01:00
Jeff Young
73f94175de
Formatting.
2024-03-11 17:46:09 +00:00
Jeff Young
9281561938
Fix include paths and merge conflicts.
2024-03-11 12:11:00 +00:00
Michal Grzegorzek
25abba7432
Add XSPICE node/port modifiers: %d [ ~ ] etc.
2024-03-11 12:03:37 +00:00
Alex Shvartzkop
cb25c8620e
Performance optimizations for database libraries.
...
(cherry picked from commit e68df8e1d1
)
2024-02-23 20:29:18 +03:00
Jeff Young
340d1b7fad
Guard against nullptr access.
2024-01-25 15:30:25 +00:00
Jeff Young
1bd8da41a7
Mutual Inductor isn't an inductor.
...
It's a statement about two other inductors.
2024-01-23 15:07:29 +00:00
Jeff Young
7c5eaed69e
Un-comment and repair TRRANDOM sources.
...
Also adds new parameters to AM sources for ngspice-43.
Also fixes a bug in the spice parameter parser (which would
puke on any parameter name starting with one of the flag
parameter strings).
Also fixes a bug where the skipped source parameters would
get set to "0" instead of their default values.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16393
2024-01-06 20:34:36 +00:00
Jeff Young
bbdefa05eb
Un-comment and repair AM and SFFM sources.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16529
2024-01-06 14:49:05 +00:00
Jeff Young
47e07f507e
nullptr safety
...
(Can't actually happen as the 4 base fields are mandatory,
but it'll keep Coverity happy.)
2023-12-18 17:01:55 +00:00
Jeff Young
196e05bc51
Borrow parts of simulator's separator-detection algorithm.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15248
2023-11-20 13:47:24 +00:00
Jeff Young
7a2a2e2df0
Remove error-prone SetReporter() API.
2023-09-06 11:37:50 +01:00
Jeff Young
30a6d33177
Better fix for primary param in value field with other params in params field.
...
(Replaces 2c8178829982c6e15e443b5a7868b8c953d5126f.)
2023-08-30 00:53:01 +01:00
Mike Williams
bdecdce1b4
Exclude from Sim: move from field to attribute
2023-08-08 12:36:36 -04:00
jean-pierre charras
3a82374719
sim/sim_model: fix an annoying issue when adding new fields: their ID was
...
set in undefined, that create an issue (the canonical name was returned as
"Field-1", breaking the schematic file).
Now, new field IDs are not set to -1, and the saved file uses the field name
(if exist) when saving fields with undefined ID.
2023-08-01 13:37:53 +02:00
Jeff Young
30c2049977
Handle inference of V7 symbol lib DC voltage/current sources.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15127
2023-07-07 16:25:05 +01:00
Jeff Young
80340c607c
ADDED noise simulation GUI.
2023-07-03 16:26:20 +01:00
Jeff Young
7138e8a62e
Don't double-create pins when migrating old models.
2023-06-21 16:34:35 +01:00
Jeff Young
03486443c7
Fix more SPICE case-insensitivity bugs.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14793
2023-05-22 11:46:28 +01:00
Mark Visser
0d235ac64b
fix bug whereby spice params with capital letters no longer cause an error and data loss
...
Spice parameters were converted to lower-case before comparison. This is incorrect, as it
is legal and common for spice parameters to contain capital letters (e.g. potentiometers
typically use Rt and SET as their parameters).
Spice parameters are not case sensitive, so the correct behaviour is to instead do a
case-insensitive comparison on the parameter name.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14793
2023-05-21 17:50:35 -04:00
Jeff Young
58f4943597
ADDED voltage- & current-controlled voltage & current sources
...
Added GUI support for ngspice VCVS, VCCS, CCVS and CCCS.
2023-05-20 21:04:39 +01:00
Jeff Young
b41d446f58
Fix a bunch more issues with sheetpaths and allowExtraText.
...
A sheetpath is required to correctly resolve text variables.
Depending on currentSheet is rife with bugs.
There are many places where we do *not* want to be prepending
field names to the field values, such as netlisting,
building PDF hypertext menus, etc.
Also, Find/Replace needs to work on unresolved text, as
that's what we're going to display (and if replace nuked
your variable references you wouldn't be happy).
2023-05-05 17:23:52 +01:00
Jeff Young
60b019591d
Simulator fixes.
...
1) Don't read libraries multiple times
2) VDMOS default is nchan if not specified
3) In the absence of a workbook default to LTSpice compatability
4) Don't attempt to write out a model line for a subckt; it never has
a baseModel
2023-04-24 13:52:52 +01:00
jean-pierre charras
f56e569a25
Ensure we do not use a non existing pin in SIM_MODEL::MigrateSimModel()
...
Fixes #14522
https://gitlab.com/kicad/code/kicad/issues/14522
2023-04-12 09:37:59 +02:00
qu1ck
0c049eccc7
Fix a bunch of compiler warnings
2023-04-11 17:01:30 +00:00
Jeff Young
1788db53e5
Don't complain about no sim model when running Sim Model Editor dialog.
...
Also removes some atrophied code, and makes sure changes to the parameter
grid for raw spice models gets saved.
2023-03-25 20:22:04 +00:00
Jeff Young
60aadfee40
Move separation of model name from params earlier in the process.
...
We need just the model name when we look for a match in the library file.
2023-03-25 12:45:36 +00:00
Jeff Young
b8cf7cc080
Split name from additional params only when model is a library reference.
2023-03-22 13:52:17 +00:00
Jeff Young
39a801423e
Separate legacy model name from parameters.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13988
2023-03-21 13:29:17 +00:00
Jeff Young
607622e8f8
Make the two Create() methods more parallel.
2023-03-17 15:58:28 +00:00
Jeff Young
6d296038f3
Improve simulation error reporting.
...
1) More REPORTER, less exception processing
2) Remove UI calls from SPICE_MODEL
3) Don't replace netlist with errors; show both
4) Don't bail out of netlist generation after single error
Fixes https://gitlab.com/kicad/code/kicad/issues/14295
2023-03-16 16:12:29 +00:00
jean-pierre charras
6343147bb3
Fix Coverity warnings.
2023-03-08 11:37:56 +01:00
Wayne Stambaugh
4e99812145
Coverity fixes and code cleaning.
2023-03-04 13:02:05 -05:00
Jeff Young
190ee58ccf
Don't deliver pedantic error messages to user.
2023-03-02 00:38:39 +00:00
Jeff Young
f5edcf82f2
Move only-write-model-if-it-contains-overrides up to base class.
...
It's necessary to keep us from writing out model lines for included
models and fall-backs of included models.
2023-03-01 13:31:57 +00:00
Jeff Young
1fdc81e68d
Make substrate and thermal junction nodes optional.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/14083
2023-02-25 20:36:30 +00:00
Jeff Young
2e5bf0210a
Clear model name when switching to internal model.
...
Also fixes a bug to ensure that a modelLine gets written when using
an internal model.
Fixes https://gitlab.com/kicad/code/kicad/issues/14083
2023-02-25 15:22:20 +00:00
Jeff Young
9a0aeb4344
Adjust AC-small-signal plot names when saving placeholders.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/14016
2023-02-25 13:26:33 +00:00
Jeff Young
5a12e5ee76
Only write included models if they have overridden parameters.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13953
2023-02-24 20:31:35 +00:00
Jeff Young
8059edff0e
Don't mess up user formatting if eval'ing didn't actually change value.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13989
2023-02-24 12:44:55 +00:00
Jeff Young
71df3f9edb
Don't allow extra text in Sim.* fields.
...
(In particular, the field name.)
Fixes https://gitlab.com/kicad/code/kicad/issues/13996
2023-02-24 12:44:55 +00:00
Jeff Young
fe2679d965
Implement default levels for JFETs, MOSFETs and MESFETs.
2023-02-22 15:54:18 +00:00
Jeff Young
cb71ea872b
Don't allow 0 field text size.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13987
2023-02-22 11:40:49 +00:00
Jeff Young
68fe146861
Remove most of SIM_VALUE in favour of good old wxString.
...
This allows us to save the user's intent, including units, formatting,
and crucially variable references.
2023-02-22 10:45:27 +00:00
Jeff Young
90adc26b73
Remove dead and redundant code.
2023-02-22 10:45:27 +00:00
Marek Roszko
aacc9746e3
Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere
2023-02-18 22:57:18 -05:00