Commit Graph

33 Commits

Author SHA1 Message Date
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
Mikolaj Wielgus ce84a48037 Sim: Implement loading Spice library files
Implement parsing and loading Spice libraries into KiCad. This is done
without any involvement of Ngspice -- we create our own in-tree parser
using PEGTL -- because Ngspice doesn't offer any intermediate output we
could plug ourselves into. We don't parse everything -- just the library
content, so this won't be that much effort.

We implement some basic Spice code preview to give the user a hint what
Spice code eir model will correspond to.
2022-07-30 02:25:34 +00:00
Mikolaj Wielgus 978f01553b Sim Model Editor: Serialize models in fields
Implemented serialization and deserialization of models in symbol fields
through the SIM_VALUE class. We don't carry the Spice legacy of
case-insensitive suffixes, instead we conform to the SI standard (i.e. M
is Mega, not milli, P is peta, p is pico).

Parameter grid value validation is implemented by simply not allowing
any characters that will make the value invalid (instead of highlighting
the field in a red color). This will likely be changed at some point in
the future.
2022-07-30 02:25:34 +00:00
Mikolaj Wielgus c5a256291e Sim Model Editor: Display model parameters
This commit adds parameter display functionality, via a wxPropertyGrid
widget, to the Sim Model Editor. To faciliate that, a SIM_VALUE class is
created to serialize, deserialize, and validate numeric values in the
new parameter grid.

SPICE_MODEL is renamed to SIM_MODEL and split into several subclasses
that correspond to different model kinds.
2022-07-30 02:25:34 +00:00
Mikolaj Wielgus 229e5c9e0f Begin development of a new Sim Model Editor dialog
With that also begin reworking the internal structure of the simulation
model storage. Some models have parameter information extracted from
Ngspice, which was specially patched to faciliate that. The model is
stored and managed by the SPICE_MODEL class (later will be renamed to
SIM_MODEL).
2022-07-30 02:25:34 +00:00
Fabien Corona 58e167013d SPICE: Add support for transmission lines 2022-01-23 17:23:22 +00:00
Wayne Stambaugh 0795fcb810 Minor dialog layout fixes. 2021-10-21 08:59:55 -04:00
Jonathan Haas f90164f7cf Fix some typos and improve wording 2021-03-02 19:13:49 +01:00
Sylwester Kocjan 095102614f Eeschema: Fix non-visible source types in SPICE model dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6540
2020-11-29 07:39:37 +00:00
Wayne Stambaugh f35736cdd7 Eeschema: minor dialog and panel layout fixes. 2020-11-14 07:40:17 -05:00
Wayne Stambaugh d8ffea881e Improve dialog static sizer box consistency.
Remove colons from the end of static sizer box labels from a few dialogs so
they are consistent with all dialogs.
2020-10-22 22:00:04 -04:00
Seth Hillbrand 316ca120e8 Don't translate spice prefixes or numbers 2020-10-20 12:51:23 -07:00
jean-pierre charras 17fad3a9a4 Minor cosmetic fix and enhancement is 2 dialogs. 2020-05-23 09:48:05 +02:00
Sylwester Kocjan c7daca1e78 Eeschema: Adding new source types in SPICE model
NEW: Adds support in eeschema for three new source types
used in .TRAN simulation: single frequency FM, AM, and random.
2020-03-23 16:49:21 +00:00
Simon Richter 270aaec443 Rewrite FBP files generated with unreleased wxFB
These use a few features that are too new, causing errors when trying to
edit with a released version of wxFormBuilder.
2020-01-07 13:32:33 +00:00
jean-pierre charras e6346c7408 Pcbnew: fix crash on Linux (when opening Edit Spice model in component properties)
It happens when the spice library model shown in dialog is a large file.
Looks like the wxTextCtrl used to displays the library content
creates the crash ( GKT bug?) for large texts.

The fix is to replace this wxTextCtrlt by a wxStyledTextCtrl.
It has advantages (does not crash... and much faster display) and
inconvenients (cannot disable editing).

Fixes: lp:1853161
https://bugs.launchpad.net/kicad/+bug/1853161
2019-11-21 13:13:15 +01:00
jean-pierre charras db7deff21b DIALOG_SPICE_MODEL_BASE: fix minor wxWidgets alerts. 2018-11-23 10:21:57 +01:00
Maciej Suminski f2f6dffd16 Refactored logic in Spice model editor dialog
- Removed redundant enums
- Stored Spice model description in an array
- Made code generic by using the model description array
2018-09-22 19:04:54 +02:00
Seth Hillbrand 3e652f2d40 Standardize colons and units in spice model dialog 2018-04-23 12:31:23 -07:00
Wayne Stambaugh f7ab50f791 UI string normalization.
Replace all instances of "component" and "part" with "symbol" when
referring to schematic and library symbols.

Replace all instances of "component" with "footprint" when referring to
board and library footprints.

Minor dialog layout fixes to some of the dialogs impacted by the UI
string changes.
2017-12-24 10:04:32 -05:00
Maciej Suminski 2b052265b2 Added library contents preview to Spice model editor dialog 2017-10-27 17:10:37 +02:00
Maciej Suminski 162d445ce4 Spice Model Editor upgrades
- set a proper title for the dialog
- changed the library parser delimiters to all whitespaces
- sorts the model list in the alphabetical order
- one tab to select subcircuit and semiconductor models
- model type is automatically selected
2017-10-27 16:53:04 +02:00
Ingo Kletti df15e63d41 Fix Unit naming typo in eeschema spice model config 2017-10-16 20:07:26 +02:00
jean-pierre charras 1051732580 DIALOG_SPICE_MODEL_BASE: cosmetic enhancements (mainly better look of spice units table in Passive notebook page) 2016-09-19 18:48:07 +02:00
jean-pierre charras 0719f8d214 Fixes: lp:1624659 (fix some issues in countries which are not using a point as decimal separator)
https://bugs.launchpad.net/kicad/+bug/1624659
Small enhancement in dialog_spice_model_base.cpp: add comments about spice values notation.
2016-09-17 18:34:44 +02:00
jean-pierre charras 13cfe74956 Simulator dialogs: fix minimal sizes and best sizes. 2016-08-20 17:25:51 +02:00
jean-pierre charras 5ed19b6e82 Dialogs for simulator: cosmetic enhancements, make them translatable and resizable. Remove 2 printf used in debug. 2016-08-15 09:53:15 +02:00
Maciej Suminski 46ecfd8139 Resized simulator dialogs 2016-08-11 14:42:16 +02:00
Maciej Suminski 2b041425e5 Resized Spice model dialog 2016-08-11 14:42:14 +02:00
Maciej Suminski 741ae10a97 Improved Spice model dialog for sources Now user can specify both DC/AC & transient analysis specifications at once. 2016-08-11 14:42:09 +02:00
Maciej Suminski 53d772989a Store relative library path if possible 2016-08-11 14:42:08 +02:00
Maciej Suminski 114e3638e7 Renamed tabs in Spice model dialog 2016-08-11 14:41:52 +02:00
Maciej Suminski 246a43baf0 Spice model editor dialog 2016-08-11 14:41:40 +02:00