Add BOM output, fix LTspice Tier 2 import, real .asc integration tests
- Fix _try_ltspice_generation() to use spicelib.simulators.ltspice_simulator.LTspice instead of the abstract Simulator base class (which always returned unavailable) - Use LTspice.create_netlist() instead of Simulator.run() for correct netlist generation - Add --ltspice-exe CLI option to specify LTspice binary path - Add --bom flag for component BOM CSV output (works on any parse completeness) - Add --bom-wiring flag for wiring BOM CSV from mapped output - Add real 1002A.asc demo circuit and pre-generated .net as test fixtures - Add @pytest.mark.ltspice marker for tests requiring LTspice binary - Bump version to 2026.2.14
This commit is contained in:
parent
08c92bfefb
commit
5a5337566c
11 changed files with 607 additions and 14 deletions
96
tests/fixtures/1002A.asc
vendored
Normal file
96
tests/fixtures/1002A.asc
vendored
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
Version 4
|
||||
SHEET 1 896 680
|
||||
WIRE -256 64 -256 48
|
||||
WIRE -128 64 -128 48
|
||||
WIRE 288 64 128 64
|
||||
WIRE 400 64 368 64
|
||||
WIRE 432 64 400 64
|
||||
WIRE 544 64 512 64
|
||||
WIRE 32 112 16 112
|
||||
WIRE 128 112 128 64
|
||||
WIRE 128 112 112 112
|
||||
WIRE 160 112 128 112
|
||||
WIRE 272 112 240 112
|
||||
WIRE -256 160 -256 144
|
||||
WIRE -128 160 -128 144
|
||||
WIRE 192 208 192 192
|
||||
WIRE 128 224 128 112
|
||||
WIRE 160 224 128 224
|
||||
WIRE 448 224 448 208
|
||||
WIRE 272 240 272 112
|
||||
WIRE 272 240 224 240
|
||||
WIRE 304 240 272 240
|
||||
WIRE 400 240 400 64
|
||||
WIRE 400 240 384 240
|
||||
WIRE 416 240 400 240
|
||||
WIRE 64 256 -96 256
|
||||
WIRE 160 256 64 256
|
||||
WIRE 544 256 544 64
|
||||
WIRE 544 256 480 256
|
||||
WIRE 592 256 544 256
|
||||
WIRE -96 272 -96 256
|
||||
WIRE 416 272 400 272
|
||||
WIRE 192 288 192 272
|
||||
WIRE 448 304 448 288
|
||||
WIRE -96 384 -96 352
|
||||
WIRE 160 384 -96 384
|
||||
WIRE 400 384 400 272
|
||||
WIRE 400 384 160 384
|
||||
WIRE -96 400 -96 384
|
||||
WIRE -96 496 -96 480
|
||||
FLAG -128 160 0
|
||||
FLAG 192 192 +V
|
||||
FLAG -128 48 +V
|
||||
FLAG 192 288 -V
|
||||
FLAG -256 160 0
|
||||
FLAG -256 48 -V
|
||||
FLAG 16 112 0
|
||||
FLAG -96 496 0
|
||||
FLAG 448 208 +V
|
||||
FLAG 448 304 -V
|
||||
FLAG 64 256 IN-
|
||||
FLAG 160 384 IN+
|
||||
FLAG 592 256 OUT
|
||||
SYMBOL voltage -128 48 R0
|
||||
SYMATTR InstName V1
|
||||
SYMATTR Value 15
|
||||
SYMBOL voltage -256 48 R0
|
||||
SYMATTR InstName V2
|
||||
SYMATTR Value -15
|
||||
SYMBOL res 256 96 R90
|
||||
WINDOW 0 0 56 VBottom 2
|
||||
WINDOW 3 32 56 VTop 2
|
||||
SYMATTR InstName R1
|
||||
SYMATTR Value 10K
|
||||
SYMBOL res 128 96 R90
|
||||
WINDOW 0 0 56 VBottom 2
|
||||
WINDOW 3 32 56 VTop 2
|
||||
SYMATTR InstName R2
|
||||
SYMATTR Value 100K
|
||||
SYMBOL voltage -96 256 R0
|
||||
SYMATTR InstName V3
|
||||
SYMATTR Value SINE(0 1m 100)
|
||||
SYMBOL res 384 48 R90
|
||||
WINDOW 0 0 56 VBottom 2
|
||||
WINDOW 3 32 56 VTop 2
|
||||
SYMATTR InstName R3
|
||||
SYMATTR Value 2.2K
|
||||
SYMBOL res 400 224 R90
|
||||
WINDOW 0 0 56 VBottom 2
|
||||
WINDOW 3 32 56 VTop 2
|
||||
SYMATTR InstName R4
|
||||
SYMATTR Value 10K
|
||||
SYMBOL res 528 48 R90
|
||||
WINDOW 0 0 56 VBottom 2
|
||||
WINDOW 3 32 56 VTop 2
|
||||
SYMATTR InstName R5
|
||||
SYMATTR Value 100K
|
||||
SYMBOL voltage -96 384 R0
|
||||
SYMATTR InstName V4
|
||||
SYMATTR Value SINE(0 1 10)
|
||||
SYMBOL opamps\\LT1002A 192 176 R0
|
||||
SYMATTR InstName U1
|
||||
SYMBOL opamps\\LT1002A 448 192 R0
|
||||
SYMATTR InstName U2
|
||||
TEXT 440 392 Left 2 !.tran 300m
|
||||
TEXT -48 -16 Left 2 ;Two Op Amp Instrumentation Amplifier
|
||||
19
tests/fixtures/1002A.net
vendored
Normal file
19
tests/fixtures/1002A.net
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
* Z:\tmp\1002A.asc
|
||||
* Generated by LTspice 26.0.1 for Windows.
|
||||
V1 +V 0 15
|
||||
V2 -V 0 -15
|
||||
R1 N003 N001 10K
|
||||
R2 N001 0 100K
|
||||
V3 IN- IN+ SINE(0 1m 100)
|
||||
R3 N002 N001 2.2K
|
||||
R4 N002 N003 10K
|
||||
R5 OUT N002 100K
|
||||
V4 IN+ 0 SINE(0 1 10)
|
||||
X§U1 IN- N001 +V -V N003 LT1001 ;§pnba In+)In-)V+)V-)OUT
|
||||
X§U2 IN+ N002 +V -V OUT LT1001 ;§pnba In+)In-)V+)V-)OUT
|
||||
.tran 300m
|
||||
* Two Op Amp Instrumentation Amplifier
|
||||
* Library below included based on ModelFile attribute of instance X§U1, X§U2 (C:\users\rpm\AppData\Local\LTspice\lib\sym\OpAmps\LT1002A.asy)
|
||||
.lib LTC.lib
|
||||
.backanno
|
||||
.end
|
||||
Loading…
Add table
Add a link
Reference in a new issue