Seth Hillbrand
60374daa49
Fix ERC global label unit tests
...
Need to test all units in the subgraph as there are chances that the
subgraph might have more than one label, which needs to be consistently
handled
2022-09-12 13:16:45 -07:00
Seth Hillbrand
f900acdac9
Fix override in mock base
2022-09-12 13:16:45 -07: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
Jeff Young
fdf71ba005
Fix linker error (doubly defined symbol).
2022-09-10 10:26:10 +01:00
Mikolaj Wielgus
cb6b2da55f
Sim QA: Display the original netlist even if circuit fails to parse
2022-09-10 02:45:48 +02:00
Seth Hillbrand
f2e3329617
Add ERC QA tests
2022-09-09 17:21:57 -07:00
Jon Evans
a5246a6df7
DbLib: Support showing field names
2022-09-04 13:01:32 -04:00
Jeff Young
efae2bbb4c
Better feedback for netclass assignment patterns.
2022-09-03 21:33:56 +01:00
Mikolaj Wielgus
b225e53135
Sim QA: Test raw model with fewer pins than its symbol
2022-09-02 16:42:15 +02:00
Jeff Young
9188838e50
RIP EDA_RECT.
2022-08-31 23:57:24 +01:00
Jeff Young
b4492e0bd2
More EDA_RECE yeetage.
2022-08-31 17:19:50 +01:00
Jeff Young
2dc6300501
Move EDA_ITEM bounding boxes to BOX2I.
2022-08-31 10:16:55 +01:00
Mikolaj Wielgus
121fad63ab
Sim QA: Add Directives test
...
This test checks whether Spice directives placed in schematics as text
objects are properly included in the generated Spice netlist.
2022-08-31 09:41:35 +02:00
Mikolaj Wielgus
bd6c153ad9
Sim: Implement "enum" model parameters for switches
...
Displayed in Sim Model Dialog parameter grid as a dropdown
(wxEnumProperty).
2022-08-30 09:45:49 +02:00
Seth Hillbrand
eda27a09d6
Add broken SHAPE_POLY_SET test
...
Remove null segments only removes a single segment rather than all,
potentially null segments in a row
2022-08-29 17:08:01 -07:00
Mikolaj Wielgus
385e5deaaa
Add Switches sim QA test
...
Tests voltage switches. Current switches will be tested as well once
they're fixed to work with .probe alli command in Ngspice.
2022-08-29 04:30:21 +02:00
Mikolaj Wielgus
3b3131ad74
Create class for voltage and current -controlled switches
...
Unfortunately, along the way it turned out that Ngspice's .probe alli
breaks current-controlled switches. So they won't work in that case for
now.
2022-08-29 03:49:41 +02:00
Marek Roszko
dbd38882c0
Silence msvc warning about printf
2022-08-26 19:26:51 -04:00
Jon Evans
ae6a2a6443
ADDED: Database libraries MVP
...
Allows placing parts from an external database that reference symbols from another loaded library.
Includes:
- nanodbc wrapper
- database schematic library plugin
- basic tests
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7436
2022-08-26 10:51:13 -04:00
Mikolaj Wielgus
103b8a0d2c
Update the Opamp test to use a symbol with unordered pins
2022-08-26 04:36:48 +02:00
Seth Hillbrand
f1261e71d4
Replace boost::optional with std::optional
2022-08-25 15:50:47 -07:00
Mikolaj Wielgus
c6defadb78
Add Fliege filter Spice netlist exporter test
...
Which we use to test multi-part symbols, as Fliege filter has two op
amps.
2022-08-25 08:47:31 +02:00
Mikolaj Wielgus
8a6a0ff7dc
Allow inferred voltage/current sources to have a single float in Value
...
Update Opamp test to use this feature.
2022-08-24 06:19:38 +02:00
Marek Roszko
fc99b3ba95
Don't link gdiplus everywhere anymore
...
Tested on msys2 which is the only place it would have been buggy
CMake seems to share the gdiplus linkage with the other dependencies automatically now
2022-08-23 23:51:35 -04:00
Maciej Suminski
7f00efe6cf
Properties: Fixed conditional properties using enum values in the conditions
...
When wxAny holds an enum, it cannot be compared with an integer due to a
missing conversion function. In such case, conditional properties
compare a raw value rather than wxAny.
2022-08-22 21:32:32 -04:00
Maciej Suminski
d5677a6dfe
Properties: const getters
2022-08-22 21:32:32 -04:00
Maciej Suminski
3220a1dfbc
Properties: Code formatting
2022-08-22 21:32:32 -04:00
Maciej Suminski
f6f6ebd5f9
WIP: Properties GUI
2022-08-22 21:32:32 -04:00
Maciej Suminski
745c94b0a1
Properties (introspection)
...
Introduces classes:
- INSPECTED: base class for types taking advantage of
generic properties system.
- PROPERTY*: meta-data storing information about properties
- PROPERTY_MANAGER: singleton class to get properties data
2022-08-22 21:32:00 -04:00
Roberto Fernandez Bautista
1fa1b44d02
Fix SHAPE_LINE_CHAIN::Simplify() when there are only 3 points in the chain
...
We weren't updating m_shapes properly.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11695
2022-08-19 20:49:49 +01:00
Seth Hillbrand
b9461f2ba7
Re-enable tests for zones
...
Avoid invalid substantial checks triggered by signed floating point
zeros. Adds a QA check to ensure zone-self checks are maintained
2022-08-18 17:06:29 -07:00
jean-pierre charras
adac433103
Fix a Coverity warning
2022-08-17 09:29:04 +02:00
jean-pierre charras
994e702cce
QA test for spice tests: generate a warning if ngspice cannot be run, but nor a QA fail.
...
if ngspice cannot be run this is an install problem, not aQA issue.
2022-08-16 18:56:38 +02:00
Seth Hillbrand
30a72101f3
Explicitly set the connection width error
2022-08-16 05:31:46 -07:00
Jeff Young
1f347582f8
Introduce new marker type so we can track DRC errors on the drawing sheet.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12221
2022-08-15 18:03:03 +01:00
Jeff Young
a9536b5de9
CHANGED netclass assignments now done via canvas or via patterns.
2022-08-14 22:56:29 +01:00
jean-pierre charras
9b20e7debb
QA eeschema tests: avoid crash if spice code models are not found.
2022-08-12 10:49:57 +02:00
Mikolaj Wielgus
b6f6d1ef81
Sim QA: Add legacy_opamp test to check legacy subckt fields
...
In particular, Spice_Node_Sequence needed some additional coverage.
2022-08-11 21:23:05 +02:00
Mikolaj Wielgus
c669d55eb8
Sim QA: Use uopamp_lvl2 instead of uopamp_lvl1 in Opamp test
2022-08-11 18:32:20 +02:00
Mikolaj Wielgus
fbc42bf569
Sim QA: Display the original netlist on failure
2022-08-11 15:50:16 +02:00
Mikolaj Wielgus
a1a99b1ec2
Sim QA: Check NGSPICE's LoadNetlist() and Run() status code
2022-08-10 17:54:28 +02:00
jean-pierre charras
962546436d
QA test for LegacyLaserDriver: modify a parameter to pass QA on W10.
2022-08-10 14:04:28 +02:00
jean-pierre charras
cc1e99ff5d
QA test: annotate rlc.kicad_sch. only annotated schematic give reliable result.
2022-08-10 11:16:07 +02:00
Marek Roszko
cf7576484f
Move KIPLATFORM::APP::Init in qa_gerbview
2022-08-08 22:31:41 -04:00
Marek Roszko
e1dcf4f3e2
Avoid use after free in qa_eeschema due to pointer reuse
2022-08-08 22:23:22 -04:00
Marek Roszko
09da6f32dc
Copy ngspice codemodels for MSVC
2022-08-08 21:57:44 -04:00
Marek Roszko
8fd524aec1
Ensure all QA tests on windows use a manifest
...
We want UTF8 mode enabled via manifest for accurate behavior that matches the application
2022-08-08 21:26:02 -04:00
Mikolaj Wielgus
28179296db
Sim QA: Output more debug info when a test fails
...
Also fix a bug due to unsigned int wraparound.
2022-08-09 03:09:16 +02:00
Marek Roszko
22649f79e8
Fix some ngspice handling during build for MSVC
2022-08-08 18:42:27 -04:00
Mikolaj Wielgus
128fedec1a
Sim QA: Commit the missing rlc unit test project
2022-08-08 22:05:15 +02:00
Mikolaj Wielgus
5a51e38d34
Sim QA: Abort test (not only warn) if Ngspice ptr is null
2022-08-08 17:18:12 +02:00
Mikolaj Wielgus
f6771ed789
Sim QA: Add rlc project to test RLC ideal model inference
2022-08-08 17:06:50 +02:00
jean-pierre charras
f0c58ccdc1
test_drc_copper_conn: print more info if a test fails.
2022-08-08 16:19:26 +02:00
Mikolaj Wielgus
c9f3507ff7
Sim: Don't require ngspice.h for SIM_MODEL_NGSPICE
2022-08-05 18:26:09 +02:00
Mikolaj Wielgus
9e7bc585ef
Sim QA: Test only specific hardcoded points of the results
...
We don't want to assume Ngspice results to be very deterministic.
2022-08-04 21:07:43 +02:00
Mikolaj Wielgus
9a6d3be948
Remove the sim QA tests that are still failing
...
Displaying fewer digits is not working -- it seems that Ngspice is rounding the
numbers down (?).
2022-08-03 17:23:53 +02:00
Mikolaj Wielgus
800b512fe8
Further cut off digits down to one after period in sim QA
...
We just want to make sure our netlist exporter works. Being
deterministic is the simulator's job, not ours, though perhaps we should
investigate that too eventually.
2022-08-03 16:25:00 +02:00
Jeff Young
ced55583a6
Back out unordered_map change for SCH_ITEM.
...
We're sensitive to the ordering in this one.
Also fixes a problem with the unit tests when KICAD_SPICE=OFF.
2022-08-03 14:29:34 +01:00
Mikolaj Wielgus
37209bb496
Try to fix Ngspice QA by resampling and cutting off value digits
...
`linearize` command resamples the data. Fourth and further digits from
decimal point are cut off by using `wrdata` command instead of `write`.
Oddly, "sources" unit test is not working (so it's still uncommented) --
some substantially different values are generated when generating the
reference with standalone Ngspice.
2022-08-03 14:28:01 +02:00
Jeff Young
cc78997386
Add annular ring test and fix footprint/pad mismatch in other test.
2022-08-01 21:50:35 +01:00
Jeff Young
203d778c92
Fix test failure.
2022-08-01 21:42:02 +01:00
Jeff Young
90a98478b5
Attempt to fix compile.
2022-08-01 13:09:51 +01:00
Jeff Young
0304ad4494
Move connection width testing to rule system.
...
Also copies connection width progress reporting architecture over to
the sliver checker.
2022-08-01 13:09:51 +01:00
Mikolaj Wielgus
5e47ce8963
Fix build errors when KICAD_SPICE=OFF
2022-07-31 07:59:00 +02:00
Mikolaj Wielgus
0f915bf8a0
Comment out two more failing sim QA tests
2022-07-30 09:57:48 +02:00
Mikolaj Wielgus
d7e5254c17
Comment out failing sim QA tests
...
The tests will probably have to test against manually specified bounds
and inexact points.
Added a previously mistakenly uncommitted cmos_not.csv.
2022-07-30 09:19:20 +02:00
Mikolaj Wielgus
7cf5138c63
Sim: Bugfixes, mostly for MS Windows compilation errors
...
Unfortunately, Windows headers define a lot of macros for common words,
so we had to rename some enums to not collide.
We also fix some of the many bugs related to the new simulation
architecture and the Spice Model Editor dialog.
2022-07-30 02:25:34 +00:00
Mikolaj Wielgus
739b9255d9
Sim Model Editor improvements
...
- Tab-switching,
- Automatic expansion of categories on tab-switch,
- Various minor simulation improvements,
- Various new simulation-related bugfixes.
2022-07-30 02:25:34 +00:00
Mikolaj Wielgus
6984f63af8
Sim: Transmission line models
...
Implement transmission line models and perform some adjustments to
the current models. Add some QA tests.
2022-07-30 02:25:34 +00:00
Mikolaj Wielgus
fe38c622a9
Sim: Improvements to model serialization
...
Don't serialize parameters in certain models for default values. Infer
models from Value field for some kinds of models. Resolve synonyms when
loading models from Spice libraries.
2022-07-30 02:25:34 +00:00
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
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
Tomasz Wlostowski
739f74db5f
qa: revert e4a36135
2022-07-21 19:17:16 +02:00
luz paz
79fa911e0e
Fix various typos
...
Found via `codespell -q 3 -S *.po,./thirdparty,./Documentation/changelogs -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,ba,busses,dout,einstance,leaded,modul,ontext,ot,overide,serie,te,,tesselate,tesselator,tht`
2022-07-21 16:31:41 +00:00
Tomasz Wlostowski
e4a36135c6
qa: added missing PCB_SELECTION_TOOL mock code
2022-07-21 13:06:36 +02:00
Marek Roszko
2ed95073a6
Use kiplatform::app::init to suppress gerbview qa noise on msvc
2022-07-18 21:35:05 -04:00
Marek Roszko
1278b2916c
Add missing util mocks breaking compile
2022-07-17 11:37:51 -04:00
Jeff Young
b727bfc16d
Performance: avoid sqrt at all costs.
2022-07-16 18:42:32 +01:00
Alex
ded4840130
Add test for rescale<int64_t>
2022-07-16 17:37:50 +00:00
Mike Williams
199d595ccd
QA: Fix missing PCB_BITMAP case
2022-07-14 09:03:43 -04:00
Jeff Young
d24e6c3408
Auto-annotate (and then don't re-annotate) power symbols.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11942
2022-07-11 21:46:01 -06:00
Jeff Young
57acce9e55
Share more code between selection tools.
2022-07-11 19:04:08 -06:00
Seth Hillbrand
3081023b5e
ADDED: Minimum copper connection width DRC check
...
Checks all copper connections in each net/layer for minimum width
setting.
Fixes https://gitlab.com/kicad/code/kicad/issues/9870
2022-07-11 19:26:56 +00:00
Seth Hillbrand
261a557ea2
Update Altium SCH QA with rounding factors
2022-07-07 12:01:38 -07:00
Jeff Young
7633540492
Fix build issue.
2022-06-29 07:34:46 -06:00
Jeff Young
ce4cedb5b4
Regression test case for 11814.
2022-06-15 11:45:29 +01:00
Seth Hillbrand
20f4e62176
Rename signalIntegrity to ibis
...
We do not use camelCase in KiCad
2022-06-10 13:35:48 -07:00
Fabien Corona
0d35d69f70
ADDED: Read IBIS files
2022-06-09 18:30:51 +00:00
Roberto Fernandez Bautista
80c8cfbbda
Add PEGTL playground tool
2022-06-09 17:35:00 +01:00
Jon Evans
af8deff063
Handle zero-length lines in log viewer
2022-06-07 19:49:38 -04:00
Tomasz Wlostowski
563b67f9a0
qa: some new stuff for the P&S debugger:
...
- search/filter in messages
- detection of non-45 degree lines
- indication of routing stage status (OK/FAIL)
- loading of project files (for custom DRC rules)
2022-06-03 23:28:41 +02:00
Tomasz Wlostowski
e6ebc2b9b9
geometry: use dedicated 64-bit integer square root for distance computations
...
Guarantees 1 LSB error, while the C++ double type has 55 mantissa bits (meaning for sqrt(X) >~ 2^22.5) the error is not guaranteed.
2022-06-03 23:28:41 +02:00
Tomasz Wlostowski
5fd84dbacc
qa/pns: draw single segments too in the log viewer frame
2022-06-03 23:28:41 +02:00
Jeff Young
09c9bc3037
Fix net ordering in gold file.
2022-05-27 21:28:17 +01:00
Jeff Young
e9e1878d96
Attempt to fix eeschema tests.
...
(Slashes in netnames must be escaped or else we think they're path
separators.)
2022-05-27 17:53:11 +01:00
Roberto Fernandez Bautista
55f22c526a
Fix annotation of incomplete multi-unit symbols and re-annotation of duplicates
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11496
2022-05-26 09:23:36 +00:00
Jeff Young
4cd48cd5c9
Fix some test issues.
2022-04-23 22:15:39 +01:00
Seth Hillbrand
aac6f576c2
Fix broken comparison in pin_numbers
...
Pin names like "+V" were incorrectly parsed as doubles leading to broken
comparisons. These caused heap overflows when sorting pin tables
This corrects the comparison so that numeric sorts are only performed
when there is an actual number in the symbol segment. Also adds unit
tests for common error cases
2022-04-19 14:46:05 -07:00