Commit Graph

953 Commits

Author SHA1 Message Date
ecorm ff3288dab6 Add quotes around paths when KIBIS generates waveforms via ngspice
Fixes #16655
2024-02-01 17:20:16 +00:00
Jeff Young a2b204572d Don't assert when a sim returns no results.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16749
2024-01-25 15:40:12 +00:00
Jeff Young 70bca8bc4e Provide popups for inductor references.
Also fixes a long-standing bug deleting the last field of
a symbol in the Symbol Editor.
2024-01-25 15:30:25 +00:00
Jeff Young 340d1b7fad Guard against nullptr access. 2024-01-25 15:30:25 +00:00
Jeff Young a263b6d343 Mutual inductance statements have no model. 2024-01-23 15:14:09 +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 4b1fc9c129 Update AM and SFFM source parameters to ngspice-43.
Note: there's no migration strategy because they didn't
work at all prior to ngspice-43.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16529
2024-01-10 20:27:52 +00:00
Ian McInerney e7746d3bc8 Fix spelling mistakes 2024-01-10 16:17:07 +00:00
Jeff Young 84d161a4b7 Don't use referential values as defaults. 2024-01-06 22:01:23 +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 e438fc2569 Remove dead code. (Coverity)
Also fixes a (small) memory leak.
2024-01-04 15:57:30 +00:00
Jeff Young cdb99de862 Use HasSymbol() instead of a null logger. 2023-12-28 21:52:26 +00:00
Jeff Young e59612d56c Add realloc locking calls for ngspice42.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15941
2023-12-28 19:36:18 +00:00
Marek Roszko 9a890cdba9 Kick the wildcards and file exts into a static class, export it from kicommon 2023-12-27 21:10:01 -05: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
Wayne Stambaugh fd91f8933e Fix a SPICE simulator crash on run of a second OP command.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16341
2023-12-18 09:43:40 -05:00
Seth Hillbrand 343828c552 Fix invalid string compare in IBIS parser
strcmp returns 0 if strings are the same but compareIbisWord returns
True (1).

Adds an IBIS simulation QA test case to catch this in the future

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16223

(cherry picked from commit ef8b6bf9e1)
2023-11-30 09:16:38 -08:00
Alex Shvartzkop 08e6e0258f IBIS: add stub for Model Spec; support empty strings in line with keywords. 2023-11-29 00:24:34 +03: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 32806a3b8b Make sure plot tab gets its SpicePlotName updated.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16013
2023-11-04 15:45:08 +00:00
Jeff Young 1c746f0134 Correctly parse fft commands with linearize in them.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16011
2023-11-04 15:45:08 +00:00
Jeff Young 6b29c346b9 When presented with empty text we don't want to Normalize() the SIM_VALUE.
But we *do* need to update NUMERICAL_EVALUATOR::m_originalText by
calling NUMERICAL_EVALUATOR::Process().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15871
2023-10-27 16:59:28 +01:00
Seth Hillbrand 1290cf6241 Fix missing random sim command
(cherry picked from commit 3ce4a5bf7f)
2023-10-26 09:47:43 -07:00
Alex Shvartzkop 71fb1afe4c Add ngspice lib paths for when running from build dir. 2023-10-22 19:58:17 +03:00
Jeff Young 68e46ecad5 Don't set modified flag when updating measurement format internally.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15909
2023-10-21 14:26:31 +01:00
Jeff Young eff4e2cc9c Convert windows file paths to unix notation.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15888
2023-10-21 13:33:22 +01:00
Jeff Young 12118b6246 Make sure measurements are updated from grid before saving workbook.
Also fixes a typo when loading measurements.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15909
2023-10-20 17:36:17 +01:00
Jeff Young 62eaa7e1c7 Signals already have gain/phase broken out; user-defined signals don't.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15903
2023-10-20 14:09:46 +01:00
Marek Roszko bee6e6be01 AddMenuLanguageList should live in EDA_BASE_FRAME, its only user 2023-10-16 19:49:52 -04:00
Wayne Stambaugh b5eee9dd7e Coverity warning fixes. 2023-10-16 17:04:14 -04:00
Jeff Young 0b06a1376b Don't turn an empty string into a '0'.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15871
2023-10-13 19:07:45 +01:00
Marek Roszko 0fe2e06949 Fix ambiguous cast compiler errors on MSVC 2023-10-12 19:07:12 -04:00
Jeff Young e9bdfe7210 Save trace colors during session.
My first thought was to move the color out of the TRACE, which is
really a view object.  However we can't make signals a first-class
citizen either, because they change depending on what the current
simulation tab is and so (for instance) we can only load in the
workbook signals for the current tab.  Hours later I backed it all
out and arrived at this simpler, less "correct" solution.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14231
2023-10-04 17:13:08 +01:00
Jeff Young ed4d66e76b Remove dead code. 2023-10-04 17:13:08 +01:00
Jeff Young 0c055e15b7 Keep user-defined signals separate.
They can't be plotted till the end of the sim.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15803
2023-10-03 12:59:49 +01:00
Jeff Young 827942c560 Clarity. 2023-10-03 12:59:49 +01:00
Jeff Young 2dfdf0682f Don't ask for empty data. 2023-10-03 12:59:49 +01:00
Jeff Young a475b01a90 Remove ic parameter from voltage-controlled sources.
It was never supported by ngspice (or LTspice or pspice).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15787
2023-10-01 12:16:25 +01:00
Jeff Young aab0696bb6 Zoom undo/redo for simulator.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14580
2023-09-26 13:19:41 +01:00
Jeff Young 463e7c3b30 Improve performance & responsiveness of sim updates.
The x-axis only needs to be fetched once per update.  Same for
redrawing the screen.  And there's no reason to fetch more y data
than we have x data for (which happens to subsequent traces as
the sim is still running as we're updating).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15673
2023-09-22 21:40:52 +01:00
Jeff Young 2f475d99dd Don't update signals and measurements for each refresh.
We only need to do them on the final refresh.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15673
2023-09-20 17:34:34 +01:00
Jeff Young 1ff279bf72 Don't auto-adjust time axis while sim is running.
Just use start and end time.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15673
2023-09-20 17:34:34 +01:00
Jeff Young 8672cdb3bd Handle power operating points.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15689
2023-09-19 17:37:51 +01:00
Jeff Young ff88ed76f0 Hack to prevent timer event starvation on MSW.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15673
2023-09-19 17:04:05 +01:00
Alex Shvartzkop 1decd31baf Vertically center wxGrid cells by default. 2023-09-18 17:15:34 +03:00
Jeff Young e5bce16e31 Don't reset cursor x position during a sim refresh.
The sim may not be complete yet.  And even if it is, the user
didn't ask us to move their cursor.  Just leave it where it is
with an undefined y value.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15672
2023-09-17 19:23:46 +01:00
Jeff Young be4c89011c Don't confuse "significant digits" with "decimal places".
Also raises the default significant digits for cursors to 3.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15669
2023-09-17 12:42:06 +01:00
Jeff Young ede542f911 Collect comment lines into following spice unit.
This can't distinguish a header block comment in front of a file
with multiple spice units, and so will include that into the first
unit only.

Also fixes the pin assignments reference textbox to use a
fixed-width font as many .subckt's contain ASCII graphics for
pin definitions (not that it helps any with the test case from
the given bug).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15660
2023-09-15 20:08:45 +01:00
Jeff Young 4a59f0de43 Apply DC voltage source exception to current sources.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15626
2023-09-12 13:45:28 +01:00