Commit Graph

44 Commits

Author SHA1 Message Date
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
Jeff Young 2899ee1eb4 Restore labelling and layout changes lost in revert. 2022-11-05 16:50:54 +00:00
Jeff Young 1737a3b94e Fix bugs where values didn't get commited to param grid.
This would happen if you click on another grid cell after changing
a value, or clicking OK in the dialog.  The old value would get
saved and the new value lost.
2022-10-31 14:09:30 +00:00
Jeff Young 6390c28737 Don't conflate instance and ibis widgets. 2022-10-31 14:09:30 +00:00
Jeff Young 20a4d76635 Reduce line-breaking. 2022-10-31 14:09:30 +00:00
Mikolaj Wielgus 355d5014f5 Revert changing inference checkbox to radio button
Reverts 5e1561fc22
and 6c84e0c2f0.
2022-10-31 07:29:38 +01:00
Jeff Young 5e1561fc22 Some bug fixes for inferred models. 2022-10-29 18:44:49 +01:00
Jeff Young 6c84e0c2f0 Dialog changes for inferred models. 2022-10-29 17:08:06 +01:00
Jeff Young fb8493d0bc Move model pin editor to GRID_CELL_ICON_TEXT_POPUP.
wxChoice is hopeless on Mac (it still doesn't highlight on rollover),
and using a char for the "assigned" graphic isn't great.
2022-10-28 15:27:00 +01:00
Jeff Young a42c60d493 Less repetition in pin numbers. 2022-10-28 15:27:00 +01:00
Jeff Young f3ba10ac67 Usability improvements to Pin Assignments in Sim Model dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/12720

Fixes https://gitlab.com/kicad/code/kicad/issues/12721
2022-10-28 00:34:24 +01:00
Jeff Young a9a2cc3e84 Enhance readability of Simulation Model dialog. 2022-10-27 00:01:38 +01: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 958bd1897d Sim: Add potentiometer model 2022-10-22 04:33:52 +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 d9eb76eae0 Sim: Refactor SPICE_GENERATOR methods to accept a single SPICE_ITEM 2022-10-11 02:22:59 +02:00
Mikolaj Wielgus 6f2b2d7e19 Sim: Minor SIM_LIBRARY cleanup 2022-10-06 14:08:01 +02:00
Mikolaj Wielgus 8e34dae347 Sim Model Editor: Fix exclude symbol checkbox
Fixes https://gitlab.com/kicad/code/kicad/issues/12344
2022-10-05 11:24:46 +02:00
Mikolaj Wielgus 2f756d9d23 Sim Model Editor: Fix Model panel sizing 2022-10-04 23:47:52 +02:00
Mikolaj Wielgus c2765f40ca Sim Model Dialog: Fix nullptr dereference 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
Fabien Corona 7e486327d9 Ibis differential and PRBS models 2022-09-29 08:35:01 +00:00
Fabien Corona 528fe4d371 Add Ibis to spice model editor
ADDED: IBIS models are now supported in Sim Model Editor
2022-09-27 20:47:00 +00:00
Ian McInerney c71c192372 Fix warning generated by sim string changes 2022-09-24 01:37:57 +01:00
Mikolaj Wielgus e4865ce543 Excise wxString from simulation 2022-09-22 07:41:52 +02:00
Mikolaj Wielgus a8d7a845b6 Sim: Rename SIM_MODEL_SPICE to SIM_MODEL_RAW_SPICE 2022-09-18 07:25:56 +02:00
Mikolaj Wielgus e4c5bc6c66 Sim: Refactor Spice code generation to a new SPICE_GENERATOR class 2022-09-14 09:36:49 +02:00
Mikolaj Wielgus 91358dfcac Sim Model Editor: Fix Enable/Disable of parameters
Only SIM_STRING_PROPERTY-based parameters were updated.
2022-09-11 15:24:16 +02:00
Mikolaj Wielgus f6b1ff821b Sim Model Editor: Improve raw model code preview
- Show whole file below the item line for reference
- Fix pin sequence in item line (was not displayed)
2022-09-03 16:20:41 +02:00
Mikolaj Wielgus bd6c153ad9 Sim: Implement "enum" model parameters for switches
Displayed in Sim Model Dialog parameter grid as a dropdown
(wxEnumProperty).
2022-08-30 09:45:49 +02:00
Mikolaj Wielgus 3b3131ad74 Create class for voltage and current -controlled switches
Unfortunately, along the way it turned out that Ngspice's .probe alli
breaks current-controlled switches. So they won't work in that case for
now.
2022-08-29 03:49:41 +02:00
Mikolaj Wielgus 963900ab83 Sort sim model pins by symbol pin number in sim model dialog 2022-08-26 04:36:48 +02:00
Mikolaj Wielgus 6fad25f8ed Allow mapping sim model pins to arbitrary string symbol pin numbers
This change removes the incorrect assumption that symbol pin numbers are
integers and are the same as indexes in the vector storing the symbol
pins.

"~" is now used to denote a floating sim model pin.
2022-08-22 08:13:26 +02:00
jean-pierre charras 488a53e71b Fix a few minor Coverity warnings 2022-08-12 10:51:36 +02:00
Mikolaj Wielgus 5d64fc12a1 Attempt to fix GCC MSYS2 build crash
Initialize ngspice_models.cpp structures at runtime on demand. Use
a sequence of std::vector::emplace_back() instead of
brace-initialization.
2022-08-02 14:47:28 +02:00
jean-pierre charras c815847b1e DIALOG_SIM_MODEL: fix some issues (not all)
* internationalize
* fix min size
* show lib filename in a not editable wxTextCtrl instead of a wxStatic Text
2022-08-02 12:52:22 +02:00
Seth Hillbrand 4074409890 Fix broken compile on Linux/Mac
Template instantiations need to follow the template definitions or you
don't get all of the template members, just the ones called from within
the file
2022-07-31 19:49:28 -07:00
jean-pierre charras 4915f6ca20 Fix a few compil warnings 2022-07-30 14:06:51 +02:00
Mikolaj Wielgus 7cf5138c63 Sim: Bugfixes, mostly for MS Windows compilation errors
Unfortunately, Windows headers define a lot of macros for common words,
so we had to rename some enums to not collide.

We also fix some of the many bugs related to the new simulation
architecture and the Spice Model Editor dialog.
2022-07-30 02:25:34 +00:00
Mikolaj Wielgus 739b9255d9 Sim Model Editor improvements
- Tab-switching,
- Automatic expansion of categories on tab-switch,
- Various minor simulation improvements,
- Various new simulation-related bugfixes.
2022-07-30 02:25:34 +00:00
Mikolaj Wielgus 6984f63af8 Sim: Transmission line models
Implement transmission line models and perform some adjustments to
the current models. Add some QA tests.
2022-07-30 02:25:34 +00:00
Mikolaj Wielgus fe38c622a9 Sim: Improvements to model serialization
Don't serialize parameters in certain models for default values. Infer
models from Value field for some kinds of models. Resolve synonyms when
loading models from Spice libraries.
2022-07-30 02:25:34 +00:00
Mikolaj Wielgus 6450ec6b85 Sim: Spice netlist exporter rewrite
Rewrite the spice exporter to work with the new simulation model
architecture and data model, with many bugfixes related to the latter
two along the way.
2022-07-30 02:25:34 +00:00
Renamed from eeschema/dialogs/dialog_spice_model.cpp (Browse further)