Mikolaj Wielgus
c464c5b87b
Sim: cleanup: use unique_ptr for PARAM::value
2022-10-03 22:15:14 +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
Fabien Corona
7e486327d9
Ibis differential and PRBS models
2022-09-29 08:35:01 +00:00
jean-pierre charras
dcc325b3b2
More about fix compil issues and warnings, especially in ibis code.
...
A few are msys2 specific and due to include files order.
2022-09-28 11:26:07 +02:00
Mikolaj Wielgus
b3b2b8b3f0
Sim: Don't hold KIBIS in MODEL_TYPE enum
...
Fixes pipeline error.
2022-09-28 11:14:50 +02:00
Mikolaj Wielgus
b7c8570b2a
Sim: Fix infinite recursion
2022-09-28 11:14:50 +02: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
jean-pierre charras
7584ccc758
Fix duplicate variable member m_userUnits, creating issues depending on
...
the way it was acceded (by name or by accessor).
2022-09-26 19:47:28 +02:00
Ian McInerney
1683e552f7
Add/fix some variable initializations
2022-09-25 00:48:38 +01:00
Ian McInerney
fdb97a46c1
Don't copy items in for loops when not needed
2022-09-24 03:46:06 +01:00
Mikolaj Wielgus
e27969217c
Add missing virtual destructor in SPICE_GENERATOR
2022-09-22 11:17:07 +02:00
Mikolaj Wielgus
e4865ce543
Excise wxString from simulation
2022-09-22 07:41:52 +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
Mikolaj Wielgus
8599323dce
Sim: Move Spice model parsing to a separate class hierarchy
...
Roughly analogous to the SPICE_GENERATOR hierarchy.
2022-09-19 07:24:46 +02:00
Mikolaj Wielgus
0efc1149af
Sim: Create a common base class for models sourced from Spice libs
2022-09-18 21:25:28 +02:00
Marek Roszko
63295cfb9e
Remove unused vars
2022-09-18 08:49:07 -04:00
Mikolaj Wielgus
3b94624e90
Commit forgotten files
...
I must stop forgetting to commit new and renamed files.
2022-09-18 07:27:47 +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
4128a5533f
Sim LTspice compat: Ignore mfg, icrating, vceo, type params
2022-09-18 04:14:57 +02:00
Mikolaj Wielgus
dcb3f16fbc
Sim: Don't use long type in SIM_VALUE
2022-09-18 02:25:40 +02:00
Mikolaj Wielgus
15b5b48992
Sim: More descriptive parsing errors in all Spice parsers
...
In my previous commit, which changed Spice parsing errors to be more
descriptive, I forgot to apply this to all invocations of the Spice
parser. This commit corrects that.
2022-09-17 08:46:45 +02:00
Mikolaj Wielgus
5fa0a1a064
Sim: Output more descriptive parsing errors
2022-09-17 08:29:18 +02:00
Mikolaj Wielgus
d48ec3aa8c
Sim: Slightly simplify grammars
2022-09-17 02:18:23 +02:00
Mikolaj Wielgus
545212eb13
Sim Window: Support dark theme
2022-09-16 06:57:27 +02:00
Mikolaj Wielgus
4ae2225b6d
Sim: Replace all wxStrings with std::strings in SIM_VALUE
2022-09-16 06:11:14 +02:00
Mikolaj Wielgus
d19b2dbfe4
Sim Model Editor: Display error when failing to set parameter
2022-09-16 05:44:23 +02:00
Mikolaj Wielgus
ce3fe46751
Sim Window: Display latest netlist without having to run sim
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11787
2022-09-16 03:12:28 +02:00
Mikolaj Wielgus
907ad27e7f
Sim: Move SPICE_GENERATOR class to a new file
2022-09-15 05:26:23 +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
ba723d36c9
Sim: Don't generate .model line when there's no instance param overrides
2022-09-14 03:16:53 +02:00
Mikolaj Wielgus
0e0d1a34f5
Sim: Spice grammar fixes
...
- Fix parsing .model lines with model names containingnon-alphanumeric
characters like - and _,
- Fix parsing libraries in which EOF is not preceded by a newline.
Fixes https://gitlab.com/kicad/code/kicad/issues/12394
2022-09-12 04:05:17 +02:00
Mikolaj Wielgus
e56635a02b
Sim: Add mutual inductor model
2022-09-11 19:23:01 +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
1b7ff376b0
Sim: Simplify generated .model cards
...
One parameter per line instead of wrapping after a certain line width.
Consistent with the formatting in the recently added generation of
.subckt cards from the schematic.
2022-09-10 02:45:48 +02:00
Mikolaj Wielgus
300a1c4144
Add a new schematic exporter to Spice .subckt model
...
An option to use the current sheet as root is added to both the original
and new (.subckt model) exporters.
2022-09-09 16:18:48 +02:00
Marek Roszko
9f522e1343
Forgot to actually change the fmt specifiers...
2022-09-08 07:17:58 -04:00
Marek Roszko
5b96736059
LOCALE_IO is expensive to hammer, use fmt
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12377
2022-09-08 07:04:45 -04:00
Mikolaj Wielgus
72651dffe8
Sim Model Editor: Fix crash on selecting behavioral models
...
Accidentally there was an infinite recursion.
2022-09-03 20:06:14 +02:00
Mikolaj Wielgus
70ab5db0e9
Sim Model Editor: Fix crash on selecting tline models
...
Dereferencing std::optional<T> objects was undefined behavior.
Change some forgotten SIM_VALUE_INST<T> usages to their corresponding
typedefs.
2022-09-03 19:52:24 +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
cfdf6c097d
Sim: Fix crash due to accessing param 0 of TYPE::NONE model
2022-09-02 20:21:09 +02:00
Mikolaj Wielgus
94bbb2e267
Sim: Skip NC pins of raw Spice models when generating netlist
...
Unconnected pins were erroreously placed in raw Spice item
instantiations, resulting in passing more pins than model had.
2022-09-01 11:41:43 +02:00
Mikolaj Wielgus
748324f4cd
Sim: Use O-devices to simulate all tlines (much faster than T-devices)
2022-08-31 15:50:11 +02:00
jean-pierre charras
f679400e91
simulator: fix a issue when the simulation ends, but ngspice is still running.
...
For instance if a lot of simulation results must be written to a file (using wrdata).
In this case the tools in simulator frame toolbar were never enabled.
2022-08-31 12:07:05 +02:00
Mikolaj Wielgus
39ac58ea33
Use the PEGTL grammar for detecting .control and .subckt text directives
2022-08-30 17:27:58 +02:00
Marek Roszko
ae637296cd
Fix MSVC compile
2022-08-30 07:24:58 -04:00
Mikolaj Wielgus
2bcfe5e42c
Fix Spice subcircuit parsing
...
When parsing a subcircuit, the parser was incorrectly identifying
parameters of models inside it as belonging to the subcircuit.
2022-08-30 12:09:10 +02:00