Commit Graph

1037 Commits

Author SHA1 Message Date
Jon Evans 5beb79bbdc Disable spice directives test for now 2023-01-29 12:15:04 -05:00
Jon Evans 675b6b5d5c Fix logic error in ec4d377d
Also fixup goldens for importers for new default island mode
2023-01-27 10:16:56 -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
JamesJCode 24fd659bce Eeschema: QA schematic loader now traverses hierarchical sheets
(Assumes all nested schematics are in the same directory as the root schematic)
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
Marek Roszko b2421c7d9f Fix tiny bug in double 2 string formatting
- I forgot to handle the trailing dots when I added the fmt variant
- UIDouble2Str (the original) lacked the comma check
- Add unit test lol
2023-01-21 13:54:52 -05: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
Marek Roszko 358a05a2c8 msvc warning fix 2023-01-16 22:44:19 -05:00
jean-pierre charras 167e430fd9 Fix a compil issue in mocks.cpp. 2023-01-16 20:04:03 +01: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
Tomasz Wlostowski 7da98a447a qa: enable tool framework for the P&S debug tool 2023-01-12 23:37:07 +01:00
Tomasz Wlostowski dd1a780d1f qa: follow up router API changes in the PNS log player/regression test tool 2023-01-12 23:37:07 +01:00
Seth Hillbrand 1c90eeaa5a Fix missing parameter in CADSTAR test 2023-01-10 16:48:07 -08:00
Roberto Fernandez Bautista ee6e86d1db Add conversion from CADSTAR SHAPE to SHAPE_POLY_SET 2023-01-10 22:28:01 +01:00
jean-pierre charras 31202a2eb3 Fix a compil issue in QA tests 2023-01-09 19:44:04 +01:00
Jeff Young e9a21130a8 Add a few more MARKUP_PARSER test cases. 2023-01-08 23:33:36 +00:00
Roberto Fernandez Bautista e7e151c46c MARKUP_PARSER grammar should match everything, even incomplete markup
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13438
2023-01-09 00:17:11 +01:00
Marek Roszko 570fa246ae Fix typo in matrix3 multiply, add unit tests 2023-01-05 21:06:52 -05:00
Seth Hillbrand fc86998bf6 Ensure duplicate pin names get unique nets
Same pin name != same net name unless the pins are explicitly connected

Also add pin number to all unconnected pads ensuring they have unique
nets

Fixes https://gitlab.com/kicad/code/kicad/issues/13236
2023-01-04 11:32:15 -08: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
Tomasz Wlostowski 7d40bbdf38 router: mark the head trace (as opposed to the 'fixed tail') with fully saturated color
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11386
2022-12-29 17:54:59 +01:00
Jeff Young 6940333f40 Update test cases for unknown-variable = error. 2022-12-27 20:14:13 +00:00
jean-pierre charras 438c4b58a3 Try to fix a QA issue probably due to the order some Ctors are called.
This is not the first time an issue is created by the order of ctors.
2022-12-27 19:56:04 +01:00
Wayne Stambaugh 78e2f0fd4d Sheet instance handling improvements. 2022-12-26 08:30:03 -05:00
Jon Evans b85fab9ab6 Support DXF ellipses and elliptical arcs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12563
2022-12-24 22:46:07 -05:00
Jeff Young 7abfa46531 Inferred sim value improvements, and a unit test for them. 2022-12-21 17:03:49 +00:00
Jeff Young a3a2e2e5b1 Update demos and legacy qa files SpiceMapping -> Spice_Node_Sequence.
Also removes migration in the code as it will no longer be needed.
2022-12-19 12:04:53 +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 cfbf14ebfd Attempt to fix build issue with NGSPICE off. 2022-12-08 23:57:42 +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
Jeff Young 8260f0ee13 Add support for unitless values to PCB_EXPR_EVALUATOR.
Fixes https://gitlab.com/kicad/code/kicad/issues/13016
2022-11-29 14:24:20 +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