Commit Graph

121 Commits

Author SHA1 Message Date
Seth Hillbrand 7d9222926a Connectivity: Correct alias-based bus resolution
Aliases in bus resolution were being resolved without a path, making
them effectively global nets.  This applies the corrected path to the
bus members and adds a QA to catch this error
2023-06-02 14:25:26 -07:00
Seth Hillbrand 57f0150a23 Ensure _changed_ netlist is propagated
The propagation is currently (maybe not needed) limited to the global
name that is the source of the change.  We also need to propagate the
global name that is changed in case the global is set in a tree leaf and
not the root

Fixes https://gitlab.com/kicad/code/kicad/issues/14657

(cherry picked from commit 6e4de18e15)
2023-05-09 12:13:30 -07:00
Jeff Young e28b50e8d6 Fix a bunch more issues with sheetpaths and allowExtraText.
A sheetpath is required to correctly resolve text variables.
Depending on currentSheet is rife with bugs.

There are many places where we do *not* want to be prepending
field names to the field values, such as netlisting,
building PDF hypertext menus, etc.

Also, Find/Replace needs to work on unresolved text, as
that's what we're going to display (and if replace nuked
your variable references you wouldn't be happy).

(cherry picked from commit b41d446f58)
2023-05-05 18:02:59 +01:00
Mark Roszko 57ae43890c Update 5 files
- /eeschema/CMakeLists.txt
- /eeschema/eeschema.cpp
- /pcbnew/pcbnew.cpp
- /qa/qa_utils/pcb_test_frame.cpp
- /qa/unittests/eeschema/test_module.cpp
2023-05-03 17:32:55 +00:00
Seth Hillbrand 68dfcddbe9 Allow bus elements to connect
Previously, bus elements that were not instantiated as individual nets
could not connect to each other.  This caused issues for complex
schematics where busses needed to connect to other busses with elements
that resolved to the same net names.  Functionally, this means mixing
bus elements, which we will replace with first-class elements in version
8 but currently can only be accomplished either by using bus aliases and
  this patch or by individually instantiating each bus element as a
local label

Fixes https://gitlab.com/kicad/code/kicad/issues/14300

(cherry picked from commit 16b4ec3c7e)
2023-04-12 16:10:50 +02:00
Seth Hillbrand 39dcd0a352 Handle nested netclass assignments
Netclass directives should not be overriden, instead hold our error
checking for actually missing nets

Fixes https://gitlab.com/kicad/code/kicad/issues/14494

(cherry picked from commit 012737593b)
2023-04-06 17:38:42 -07:00
Jeff Young 141b332d4f Add regression test for 13988.
(cherry picked from commit 35ca3e7264)
2023-03-25 15:37:57 +00:00
Seth Hillbrand 89488a43b9 Pins are case-sensitive
Cleanup should remove mis-matched cases

Fixes https://gitlab.com/kicad/code/kicad/issues/14415

(cherry picked from commit 0984599624)
2023-03-24 11:35:20 -07:00
Jeff Young b7cd1dd764 Handle single-token flag parameters.
Also fixes a bug where all VDMOS instance parameters weren't marked as
instance parameters.

Also fixes a bug where VDMOS thermal models weren't supported (they
have two extra pins: Tj and Tcase).

(cherry picked from commit 5bda3b99f9)
2023-03-22 14:12:42 +00:00
Jeff Young e20614660b Fix qa gold value.
(cherry picked from commit 6eb73133f0)
2023-03-12 21:06:28 +00:00
JamesJCode b82020722b Eeschema netlist output: Propagate NC across hierarchical schematics
Fixes #12580

Additionally does not export no_connect netlist annotation on pins
which are both connected to another pin and a NC item, unless all
connected pins are stacked at the symbol level.

Adds testing of pin types to netlist QA unit tests.

(cherry picked from commit 9dca70a773)
2023-03-06 16:22:25 -08:00
Jeff Young 05d425ea88 Add 12505 to the regression test suite.
Fixes https://gitlab.com/kicad/code/kicad/issues/12505

(cherry picked from commit d96598c87c)
2023-03-06 10:27:46 +00:00
Jeff Young 7f6cb9b07b Remove most of SIM_VALUE in favour of good old wxString.
This allows us to save the user's intent, including units, formatting,
and crucially variable references.

(cherry picked from commit 68fe146861)
2023-02-24 20:47:22 +00:00
Fabien Corona c00a98fed4 Revert "sim - Remember the option to save powers"
This reverts commit 74dcc1b9d5.
2023-02-20 20:59:52 +01:00
Fabien Corona 74dcc1b9d5 sim - Remember the option to save powers
Fixes #13978


(cherry picked from commit 2a3b70b7eb)
2023-02-20 19:38:19 +00:00
Jeff Young 8b03c093f9 Move potentiometer pin model to r0, wiper, r1, and remove flipping code.
Fixes https://gitlab.com/kicad/code/kicad/issues/13741
2023-02-02 16:22:13 +00:00
Jeff Young 9ca539b416 Remove TL072.031 from regression test. 2023-01-31 14:57:52 +00:00
Jeff Young c939b1ef76 Followed-by-3-digits doesn't guarantee a thousands separator.
Fixes https://gitlab.com/kicad/code/kicad/issues/13708
2023-01-30 21:22:48 +00:00
Jon Evans 5beb79bbdc Disable spice directives test for now 2023-01-29 12:15:04 -05:00
JamesJCode fef3274e8e Eeschema: ERC checks handle connections between a common sub-circuit
Fixes #10926

Contains the following changes:

    - Adds a new ERC_SCH_PIN_CONTEXT class which is used to provide deterministic
      comparison between items causing ERC violations (e.g. pins) when associated
      with a SCH_SHEET_PATH context.

    - Adds association of SCH_SHEET_PATHs for ERC_ITEMs and the sub-schematic items
      which caused an ERC violation. This allows correct display of markers on the
      sheets of interest only, and allows correct naming resolution and cross-probing
      from the ERC dialog.

    - Adds a new ERC_TREE_MODEL class, derived from RC_TREE_MODEL, which correctly
      resolves component references across heirarchical sheets using the associated
      SCH_SHEET_PATHs. This allows sheet-specific component references to be displayed
      correctly in the ERC results tree.

    - Updates SCH_MARKER to only draw sheet-specific markers on the sheet causing
      an ERC violation.

    - Increments the schematic file version.

    - When loading a schematic with legacy ERC exclusions, discards those of type
      ERCE_PIN_TO_PIN_WARNING, ERCE_PIN_TO_PIN_ERROR, ERCE_HIERACHICAL_LABEL, and
      ERCE_DIFFERENT_UNIT_NET as there is no safe way to automatically infer the
      information which is now stored with these exclusions (sheet paths for error
      location and related items). Requiring users to (once) re-add exclusions is
      preferable to silently incorrectly matching new ERC issues to legacy exclusions.
2023-01-24 14:11:01 +00:00
Seth Hillbrand 9861ed1a5f Don't special case power symbol re-annotation
When the designer asks to reset annotations, we reset all annotations
including power symbols.  This may create additional churn in the files
but only when requested and is useful to fix schematic errors

Fixes https://gitlab.com/kicad/code/kicad/issues/13138
2023-01-23 13:19:01 -08:00
jean-pierre charras f6d9a2574b Fix a QA simulation test on W1/msys2:
- Gives a bigger relative tolerance when comparing 2 values to pass some tests
- Fix error in test_sim_regressions.cpp for 3 TestNetlist() calls
2023-01-22 16:52:11 +01:00
Jeff Young 232e4d34f1 Use default error limits. They're already relative to the value. 2023-01-22 14:35:27 +00:00
Jeff Young 241dc0d96b Add SPICE regression test. 2023-01-21 19:32:25 +00:00
Jeff Young 259e382041 Add simulation regression test for legacy fixups. 2023-01-21 19:32:25 +00:00
Jeff Young e218c7109b Test case for immediate SBCKT models. 2023-01-21 19:32:25 +00:00
Jeff Young 6053b86a24 Add new spice regression test for windows path separators. 2023-01-21 19:32:25 +00:00
Seth Hillbrand 6fa2eedb4b Avoid the obsolete GetNextPin() call
This iterated over all pins to find the pin after a given item.  Because
out pattern is consistently to iterate in the outer loop, this means
that we were an O(n^2) loop for the pins just to find their names.  This
affected very large parts (e.g. FPGAs) when switching sheets to display
2023-01-20 14:12:15 -08:00
Roberto Fernandez Bautista 355e817302 Move DefaultTransform definition to transform.cpp, so it can be shared 2023-01-15 19:17:51 +01:00
Roberto Fernandez Bautista d063eb431b Move FixupJunctions to SCHEMATIC 2023-01-15 19:17:50 +01:00
Jeff Young 9b9795a87d Reduce reliance on exception processing -- it's waay too bugy at present.
This moves some stuff to REPORTER APIs.  Moving more stuff would be good,
but it probably too high-risk at present.  We'll wait for 8.0 for that....

Fixes https://gitlab.com/kicad/code/kicad/issues/13359
2023-01-03 17:20:23 +00:00
Jeff Young 7abfa46531 Inferred sim value improvements, and a unit test for them. 2022-12-21 17:03:49 +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
Seth Hillbrand ba11de6e66 Update QA test schematics with valid and invalid variants 2022-12-09 02:14:05 +00:00
Barabas Raffai 63da407345 Add tests for no connect flag 2022-12-09 02:14:05 +00:00
Jeff Young ce8fa2ad00 Move previous fix to subclass (which overrides the base class). 2022-12-07 17:13:19 +00:00
Jeff Young 5aa204e194 Another attempted sim testcases fix. 2022-12-07 15:07:25 +00:00
Jeff Young b9287968d6 Update symbol default prefixes after updating instance data.
Also moves the sim model fixups after the instance data updating as
it uses the prefixes.
2022-12-07 01:34:56 +00:00
Jeff Young 69448afb47 Don't run simulation twice when the sim command is overridden.
Fixes https://gitlab.com/kicad/code/kicad/issues/12731
2022-12-07 01:34:56 +00:00
Jeff Young 38906397d2 Move V6->V7 sim model migration from sheets to screens.
Also moves passive RLC inference out from migration to just-in-time
creation for the simulator or netlisting.

Also fixes a version guard mismatch because the spice migration was
done inside UpdateSymbolInstances (which has its own version guard).

Also changed UpdateSymbolInstances to UpdateSymbolInstanceData so
someone else in the future doesn't think it's a general-purpose symbol
instance updater.
2022-12-06 16:01:18 +00:00
Mikolaj Wielgus 9055043409 Sim QA: Test for duplicates and wrongly deduplicated parameters
(adapt tests to the names of the newly deduplicated parameters)
2022-11-29 15:04:38 +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 484620eeb5 Sim QA: Add test for VDMOS 2022-11-29 09:48:01 +01:00
Mikolaj Wielgus 5fb191e4d6 Sim QA: Test all BJT parameters in each model 2022-11-28 09:49:48 +01:00
Mikolaj Wielgus 26644952a4 Sim QA: Test all diode parameters 2022-11-28 08:01:50 +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 f2fb734e06 Sim QA: Add test for Numparam expressions inside .subckt 2022-11-27 06:32:17 +01:00
Mikolaj Wielgus 08d37d2795 Sim QA: Add Spice .subckt parsing tests 2022-11-26 10:24:11 +01:00
Wayne Stambaugh cd92088b7a Fix disabled schematic page numbering unit tests. 2022-11-23 08:05:35 -05:00
Wayne Stambaugh d37015bada Temporarily disable unit tests so builds pass. 2022-11-22 19:08:08 -05:00