Add verbose flag, WireViz dev dep, and rendered diagram examples

- Gate model/value heuristic output behind --verbose/-v flag (quiet by default)
- Add wireviz>=0.4 as dev dependency for roundtrip render tests
- Generate SVG/PNG diagram renders for inter_module, single_module, hierarchical
- Embed rendered diagrams in README with layout optimization callout
This commit is contained in:
Ryan Malloy 2026-02-13 09:19:18 -07:00
parent fd822e07ce
commit 95ed08866c
9 changed files with 425 additions and 14 deletions

View file

@ -0,0 +1,160 @@
metadata:
title: 'Wiring diagram: hierarchical'
source: tests/fixtures/hierarchical.net
generator: spice2wireviz 2026.2.14
connectors:
J_PWR:
type: BARREL_JACK
pinlabels:
- VIN_RAW
- GND
notes: 'SPICE ref: J_PWR'
TP_3V3:
type: TP
style: simple
pinlabels:
- V3V3
notes: 'SPICE ref: TP_3V3'
J_USB:
type: USB_B_CONN
pinlabels:
- GND
- USB_DP
- USB_DM
notes: 'SPICE ref: J_USB'
X_REG:
type: regulator
pinlabels:
- VIN
- GND
- VOUT
notes: 'SPICE instance: X_REG (regulator)'
X_MAIN:
type: main_board
pinlabels:
- USB_D+
- USB_D-
- VCC
- GND
- SDA
- SCL
- ALERT
notes: 'SPICE instance: X_MAIN (main_board)'
X_SENSOR:
type: sensor_module
pinlabels:
- VCC
- GND
- SDA
- SCL
- ALERT
notes: 'SPICE instance: X_SENSOR (sensor_module)'
cables:
W1:
category: bundle
colors:
- BK
- ''
wirelabels:
- GND
- VIN_RAW
notes: 'Nets: GND, VIN_RAW'
W2:
category: bundle
wirecount: 2
wirelabels:
- USB_DM
- USB_DP
notes: 'Nets: USB_DM, USB_DP'
W3:
colors:
- BK
wirelabels:
- GND
notes: 'Net: GND'
W5:
wirecount: 1
wirelabels:
- V3V3
notes: 'Net: V3V3'
W7:
category: bundle
colors:
- BK
- ''
wirelabels:
- GND
- V3V3
notes: 'Nets: GND, V3V3'
W8:
category: bundle
wirecount: 3
wirelabels:
- ALERT_SIG
- I2C_SCL
- I2C_SDA
notes: 'Nets: ALERT_SIG, I2C_SCL, I2C_SDA'
W9:
category: bundle
colors:
- BK
- ''
wirelabels:
- GND
- V3V3
notes: 'Nets: GND, V3V3'
connections:
- - J_USB: 1
- W3: 1
- X_REG: 2
- - X_REG:
- 2
- 3
- W7:
- 1
- 2
- X_MAIN:
- 4
- 3
- - X_MAIN:
- 7
- 6
- 5
- W8:
- 1
- 2
- 3
- X_SENSOR:
- 5
- 4
- 3
- - TP_3V3: 1
- W5: 1
- X_REG: 3
- - J_USB:
- 3
- 2
- W2:
- 1
- 2
- X_MAIN:
- 2
- 1
- - X_REG:
- 2
- 3
- W9:
- 1
- 2
- X_SENSOR:
- 2
- 1
- - J_PWR:
- 2
- 1
- W1:
- 1
- 2
- X_REG:
- 2
- 1

View file

@ -0,0 +1,93 @@
metadata:
title: 'Wiring diagram: multi_board'
source: tests/fixtures/multi_board.net
generator: spice2wireviz 2026.2.14
connectors:
J_CHASSIS:
type: chassis_gnd
pinlabels:
- EARTH
- GND
notes: 'SPICE ref: J_CHASSIS'
TP_VCC:
type: TP
style: simple
pinlabels:
- VCC
notes: 'SPICE ref: TP_VCC'
X1:
type: power_supply
pinlabels:
- VCC
- GND
notes: 'SPICE instance: X1 (power_supply)'
X2:
type: amplifier
pinlabels:
- VIN
- GND
- VOUT
notes: 'SPICE instance: X2 (amplifier)'
X3:
type: io_board
pinlabels:
- GND
- SIG_IN
- SIG_OUT
- CTRL
notes: 'SPICE instance: X3 (io_board)'
cables:
W1:
colors:
- BK
wirelabels:
- GND
notes: 'Net: GND'
W3:
colors:
- RD
wirelabels:
- VCC
notes: 'Net: VCC'
W5:
category: bundle
colors:
- BK
- RD
wirelabels:
- GND
- VCC
notes: 'Nets: GND, VCC'
W6:
colors:
- BK
wirelabels:
- GND
notes: 'Net: GND'
W8:
wirecount: 1
wirelabels:
- AUDIO_OUT
notes: 'Net: AUDIO_OUT'
connections:
- - TP_VCC: 1
- W3: 1
- X1: 1
- - X1:
- 2
- 1
- W5:
- 1
- 2
- X2:
- 2
- 1
- - X2: 3
- W8: 1
- X3: 2
- - J_CHASSIS: 2
- W1: 1
- X1: 2
- - X1: 2
- W6: 1
- X3: 1

View file

@ -0,0 +1,67 @@
metadata:
title: 'Wiring diagram: simple_board'
source: tests/fixtures/simple_board.net
generator: spice2wireviz 2026.2.14
connectors:
amplifier_board:
type: Module Interface
pinlabels:
- VIN
- GND
- VOUT
- SIGNAL_IN
notes: 'SPICE subcircuit: .subckt amplifier_board'
J1:
type: PWR_CONN
pinlabels:
- VIN
- GND
notes: 'SPICE ref: J1, nets: VIN, GND'
J2:
type: SIG_CONN
pinlabels:
- VOUT
- SIGNAL_IN
notes: 'SPICE ref: J2, nets: SIGNAL_IN, VOUT'
TP1:
type: TP
style: simple
pinlabels:
- N001
notes: 'SPICE ref: TP1, nets: N001'
cables:
W_J1:
category: bundle
colors:
- ''
- BK
wirelabels:
- VIN
- GND
notes: 'Nets: VIN, GND'
W_J2:
category: bundle
wirecount: 2
wirelabels:
- VOUT
- SIGNAL_IN
notes: 'Nets: VOUT, SIGNAL_IN'
connections:
- - amplifier_board:
- 1
- 2
- W_J1:
- 1
- 2
- J1:
- 1
- 2
- - amplifier_board:
- 3
- 4
- W_J2:
- 1
- 2
- J2:
- 1
- 2