Jeff Young
b2e512bfab
We must infer a pinMap when inferring other fields for RLC passives.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13162
2022-12-14 23:23:41 +00:00
Jeff Young
a2ba9137b8
Use only first letter of prefix for RLC primary value name.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13162
2022-12-14 23:23:41 +00:00
jean-pierre charras
cdcf875ec0
sim_model: Fix another not handled exception that fully freeze Eeschema.
...
Can happens with schematics with old sim parameter syntax.
Fix also another crash in sim_model.
2022-12-14 17:47:20 +01:00
Jeff Young
ce6378fed3
Use symbol pin names for left-hand-side of auto-generated pinMaps.
2022-12-14 15:13:29 +00:00
Jeff Young
6abdfc76da
Replace 1:1 pin map on legacy conversion now that we can accept indexes.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13152
2022-12-14 14:22:35 +00:00
Jeff Young
50ccc4e6da
Fix issue converting legacy SPICE models.
...
1) if a legacy model references a library then we need to see if said
libraray exists and read model from it if so
2) legacy node ordering is by index, not pin name
3) we can't auto-generate a pin map when we don't know the pin names,
so don't try
2022-12-14 13:36:28 +00:00
jean-pierre charras
bbdb30135e
sim_model: Fix a not handled exception that fully freeze Eeschema.
...
Can happens with schematics with old sim parameter syntax.
2022-12-13 11:15:02 +01:00
Jeff Young
1baec20cf6
Handle SPICE <-> SI conversions in inferred models.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13112
2022-12-09 22:02:52 +00:00
Jeff Young
60c937186a
When migrating simulation models update value to a reference.
2022-12-09 20:24:25 +00:00
Jeff Young
05b9836f60
Remove ugly hack of passing SCH_SYMBOL as parent of LIB_FIELD array.
...
Also adds simulation model inference to Symbol Editor's Simulation Model
Editor, and adds write-back from both Simulation Model Editors to their
parent Symbol Fields Editor dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/12505
2022-12-09 20:24:25 +00:00
Jeff Young
3ae404f764
Move model inference to SIM_MODEL so it can also be used for behavioral models.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12505
2022-12-09 20:24:25 +00:00
Jeff Young
8931e55dd2
Templatize MigrateSimModel() so it can be used on LIB_SYMBOLs as well.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13080
2022-12-08 23:57:43 +00:00
Jeff Young
39ad7c8205
Formatting and Kicad naming conventions.
2022-12-06 16:01:18 +00:00
Jeff Young
b7d41e0e56
Update simulator with NUMERIC_EVAL, decimal separator processing, etc.
...
Also includes fixes for instance data and resolving of textvar
references.
Also includes virtual d'tors for IBIS parser to get rid of all the
compile warnings on CLang.
Fixes https://gitlab.com/kicad/code/kicad/issues/12357
2022-12-05 12:40:29 +00:00
Mikolaj Wielgus
7d207c5d2f
Sim Ibis: Change some strings for consistency
2022-11-30 17:38:09 +01:00
Mikolaj Wielgus
e39c0b20ea
Sim: Universally initialize enum parameters with their default values
2022-11-30 12:45:59 +01:00
Mikolaj Wielgus
b025b103de
Sim Model Editor: Make the VBIC model the first BJT model to select
2022-11-29 10:13:20 +01:00
Mikolaj Wielgus
d836fbaaaa
Sim: Add VBIC model support
...
Update generate_sim_model_ngspice_data.bash a little, but it's still
outdated.
2022-11-28 04:45:36 +01:00
Mikolaj Wielgus
a65b35107d
Sim: Make Sim.Pins have key-value pairs instead of a sequence
...
Moreover, upgrade models on schematic load instead of on model load
2022-11-25 05:38:21 +01:00
jean-pierre charras
b0b8a8dd67
Fix the order of some includes to avoid a conflict with a Windows header
2022-11-22 07:33:14 +01:00
Mikolaj Wielgus
23480cdee3
Sim: Make empty Sim.Params mean storing primary value in Value
2022-11-22 07:09:52 +01:00
Mikolaj Wielgus
1550a1e3a4
Sim Model Editor: Add "Save {} in Value field as "{}"" checkbox
2022-11-22 07:09:52 +01:00
Mikolaj Wielgus
d63eac9778
Sim: s/SIM_MODEL_MUTUAL_INDUCTOR/SIM_MODEL_L_MUTUAL/
2022-11-21 05:01:12 +01:00
Mikolaj Wielgus
6969362813
Sim Model Editor: Don't provide library-only models as builtins
2022-11-20 22:07:39 +01:00
Mikolaj Wielgus
0f4cc2450d
Sim Model Editor: Don't throw an error on opening a NONE model
2022-11-18 09:06:55 +01:00
Mikolaj Wielgus
e7c43ca20a
Sim: Remove inference from Reference and Value
2022-11-18 08:39:15 +01:00
jean-pierre charras
7c9f3981ef
Revert "Reorder includes is some simulator files to fix issues on msys2 (no code change)"
...
This reverts commit 78e45fa1b9
.
Looks like it creates a compil issue on MSVC
2022-11-12 20:47:36 +01:00
jean-pierre charras
78e45fa1b9
Reorder includes is some simulator files to fix issues on msys2 (no code change)
...
Due to pegtl.hpp included in some files, reordering include fix some conflicts:
wxWidgets files must be included before pegtl.hpp, to compile with wxWidgets 3.0
I sometimes use wxWidgets 3.0 for debugging purposes.
2022-11-12 19:54:26 +01:00
Mikolaj Wielgus
f33cd3e383
Sim: Remove vestiges of (de)serialization from SIM_MODEL
2022-11-11 05:17:26 +01:00
Mikolaj Wielgus
490069c5e6
Move (de)serialization of models into fields to new SIM_SERDE class
2022-11-11 03:08:32 +01:00
Mikolaj Wielgus
e8762da4f4
Revert "Support for variable references in SPICE models."
...
This reverts commit 95ebfeeed1
.
This reverts commit 672ce650a9
.
2022-11-07 19:37:40 +01:00
Jeff Young
95ebfeeed1
Support for variable references in SPICE models.
...
Also fixes a couple of bugs where sheet instance data wasn't being
handled correctly.
2022-11-07 10:57:34 +00:00
Mikolaj Wielgus
5eca8dd8de
Undo hardcoding swapping of diode pins
...
Revert commits d1e2acd3
70b4d1aa
cff508fb
2022-10-30 11:01:59 +01:00
Mikolaj Wielgus
cff508fb3b
Sim: Reverse diode model pin order to match diode symbols
2022-10-28 14:01:09 +02:00
Jeff Young
a9a2cc3e84
Enhance readability of Simulation Model dialog.
2022-10-27 00:01:38 +01:00
Mikolaj Wielgus
aa0e3666d1
Sim: Skip param name when writing primary param in model's Value field
2022-10-26 09:03:02 +02:00
Fabien Corona
20b63f305e
Sim: Ibis improvements and fixes
...
Follow-up after the KIBIS and KIBIS GUI merge requests.
- Move KIBIS from Pcbnew to Eeschema space,
- Make KIBIS obtain the Ku/Kd coefficients via the `SPICE_SIMULATOR` class instead of calling the `ngspice` executable via `system()`,
- Allow to toggle between differential and single-ended model in the GUI,
- Various GUI fixes and improvements.
2022-10-25 09:45:40 +00:00
Mikolaj Wielgus
3e0f4a47b0
Sim: Remove pins field in all inferred models with linear pin mapping
2022-10-25 08:52:12 +02:00
Mikolaj Wielgus
d14de1ce78
Sim: Rename Value field's "principal value" to "primary value"
2022-10-24 11:04:47 +02:00
Mikolaj Wielgus
958bd1897d
Sim: Add potentiometer model
2022-10-22 04:33:52 +02:00
Mikolaj Wielgus
f95e77499b
Sim: Make exception messages slightly more verbose
2022-10-21 08:15:29 +02:00
Mikolaj Wielgus
9819fa43dd
Sim: Allow principal value in Value field to be followed by regular params
2022-10-21 08:14:13 +02:00
Mikolaj Wielgus
2475a703d6
Sim Model Editor: Checkbox for toggling inference
2022-10-16 05:10:57 +02:00
Mikolaj Wielgus
c8e13813d9
Sim: Rename Sim_Disabled field to Sim_Enable
2022-10-16 00:49:44 +02: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
c857e533a9
Sim: Fix crash when a field tries to set an inexistent parameter
...
Refactored SetParamValue() and friends to use exceptions instead of
return values.
2022-10-12 04:27:48 +02:00
Mikolaj Wielgus
72402cf687
Sim: Override base model type if there's a Sim_Type field
2022-10-09 20:46:05 +02:00
Mikolaj Wielgus
120b569048
Sim: Support ako models
2022-10-04 17:48:10 +02:00
Mikolaj Wielgus
0d369f700f
Sim: Basic cleanup after KIBIS merge
...
- Some preliminary refactoring,
- Use multiple types for IBIS drivers instead of a wftype variable,
- Remove the m_requiresUIUpdate variable and its accessors.
2022-09-30 16:17:00 +02:00
jean-pierre charras
46b0c116cd
fix a compil warning.
2022-09-29 13:06:50 +02:00