@tscircuit/schematic-trace-solver 0.0.156 → 0.0.158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +151 -57
- package/lib/solvers/MspConnectionPairSolver/MspConnectionPairSolver.ts +10 -2
- package/lib/solvers/SameNetJunctionAlignmentSolver/alignSameNetJunctions.ts +196 -67
- package/package.json +1 -1
- package/site/bug-reports/bug-report-20260826T072956Z.page.tsx +4 -0
- package/site/components/PipelineDebugger.tsx +4 -2
- package/site/examples/example51.page.tsx +3 -1
- package/tests/bug-reports/bug-report-20260706T213649Z/__snapshots__/bug-report-20260706T213649Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260706T220324Z/__snapshots__/bug-report-20260706T220324Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260707T020342Z/__snapshots__/bug-report-20260707T020342Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260707T092615Z/__snapshots__/bug-report-20260707T092615Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260707T134549Z/__snapshots__/bug-report-20260707T134549Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260707T134722Z/__snapshots__/bug-report-20260707T134722Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260707T140410Z/__snapshots__/bug-report-20260707T140410Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260707T141025Z/__snapshots__/bug-report-20260707T141025Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260707T141421Z/__snapshots__/bug-report-20260707T141421Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260707T230831Z/__snapshots__/bug-report-20260707T230831Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260708T053736Z/__snapshots__/bug-report-20260708T053736Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260708T055430Z/__snapshots__/bug-report-20260708T055430Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260708T095725Z/__snapshots__/bug-report-20260708T095725Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260716T144856Z/__snapshots__/bug-report-20260716T144856Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260717T022934Z/__snapshots__/bug-report-20260717T022934Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260717T031704Z/__snapshots__/bug-report-20260717T031704Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260717T042845Z/__snapshots__/bug-report-20260717T042845Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260721T221026Z/__snapshots__/bug-report-20260721T221026Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260724T175257Z/__snapshots__/bug-report-20260724T175257Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260728T144234Z/__snapshots__/bug-report-20260728T144234Z.snap.svg +4 -4
- package/tests/bug-reports/bug-report-20260728T225606Z/__snapshots__/bug-report-20260728T225606Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260730T061837Z/__snapshots__/bug-report-20260730T061837Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260731T052229Z/__snapshots__/bug-report-20260731T052229Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260804T095800Z/__snapshots__/bug-report-20260804T095800Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260804T171919Z/__snapshots__/bug-report-20260804T171919Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260804T225912Z/__snapshots__/bug-report-20260804T225912Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260805T061316Z/__snapshots__/bug-report-20260805T061316Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260806T061548Z/__snapshots__/bug-report-20260806T061548Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260806T093501Z/__snapshots__/bug-report-20260806T093501Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260811T075142Z/__snapshots__/bug-report-20260811T075142Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260815T073240Z/__snapshots__/bug-report-20260815T073240Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260819T091818Z/__snapshots__/bug-report-20260819T091818Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260825T045913Z/__snapshots__/bug-report-20260825T045913Z.snap.svg +4 -4
- package/tests/bug-reports/bug-report-20260825T103621Z/__snapshots__/bug-report-20260825T103621Z.snap.svg +2 -2
- package/tests/bug-reports/bug-report-20260826T072956Z/__snapshots__/bug-report-20260826T072956Z.snap.svg +842 -0
- package/tests/bug-reports/bug-report-20260826T072956Z/bug-report-20260826T072956Z.json +2452 -0
- package/tests/bug-reports/bug-report-20260826T072956Z/bug-report-20260826T072956Z.test.ts +12 -0
- package/tests/examples/__snapshots__/example01.snap.svg +2 -2
- package/tests/examples/__snapshots__/example02.snap.svg +12 -12
- package/tests/examples/__snapshots__/example03.snap.svg +2 -2
- package/tests/examples/__snapshots__/example04.snap.svg +2 -2
- package/tests/examples/__snapshots__/example05.snap.svg +2 -2
- package/tests/examples/__snapshots__/example06.snap.svg +2 -2
- package/tests/examples/__snapshots__/example07.snap.svg +2 -2
- package/tests/examples/__snapshots__/example08.snap.svg +2 -2
- package/tests/examples/__snapshots__/example09.snap.svg +2 -2
- package/tests/examples/__snapshots__/example10.snap.svg +2 -2
- package/tests/examples/__snapshots__/example11.snap.svg +2 -2
- package/tests/examples/__snapshots__/example12.snap.svg +2 -2
- package/tests/examples/__snapshots__/example13.snap.svg +2 -2
- package/tests/examples/__snapshots__/example14.snap.svg +2 -2
- package/tests/examples/__snapshots__/example15.snap.svg +2 -2
- package/tests/examples/__snapshots__/example16.snap.svg +2 -2
- package/tests/examples/__snapshots__/example17.snap.svg +2 -2
- package/tests/examples/__snapshots__/example18.snap.svg +2 -2
- package/tests/examples/__snapshots__/example19.snap.svg +2 -2
- package/tests/examples/__snapshots__/example20.snap.svg +2 -2
- package/tests/examples/__snapshots__/example21.snap.svg +2 -2
- package/tests/examples/__snapshots__/example22.snap.svg +2 -2
- package/tests/examples/__snapshots__/example23.snap.svg +2 -2
- package/tests/examples/__snapshots__/example24.snap.svg +2 -2
- package/tests/examples/__snapshots__/example25.snap.svg +2 -2
- package/tests/examples/__snapshots__/example26.snap.svg +2 -2
- package/tests/examples/__snapshots__/example27.snap.svg +2 -2
- package/tests/examples/__snapshots__/example28.snap.svg +2 -2
- package/tests/examples/__snapshots__/example29.snap.svg +2 -2
- package/tests/examples/__snapshots__/example30.snap.svg +2 -2
- package/tests/examples/__snapshots__/example31.snap.svg +2 -2
- package/tests/examples/__snapshots__/example32.snap.svg +2 -2
- package/tests/examples/__snapshots__/example33.snap.svg +2 -2
- package/tests/examples/__snapshots__/example34.snap.svg +2 -2
- package/tests/examples/__snapshots__/example35.snap.svg +2 -2
- package/tests/examples/__snapshots__/example36.snap.svg +2 -2
- package/tests/examples/__snapshots__/example37.snap.svg +2 -2
- package/tests/examples/__snapshots__/example38.snap.svg +2 -2
- package/tests/examples/__snapshots__/example39.snap.svg +2 -2
- package/tests/examples/__snapshots__/example40.snap.svg +2 -2
- package/tests/examples/__snapshots__/example41.snap.svg +2 -2
- package/tests/examples/__snapshots__/example42.snap.svg +2 -2
- package/tests/examples/__snapshots__/example43.snap.svg +2 -2
- package/tests/examples/__snapshots__/example44.snap.svg +2 -2
- package/tests/examples/__snapshots__/example45.snap.svg +2 -2
- package/tests/examples/__snapshots__/example46.snap.svg +2 -2
- package/tests/examples/__snapshots__/example47.snap.svg +2 -2
- package/tests/examples/__snapshots__/example48.snap.svg +2 -2
- package/tests/examples/__snapshots__/example49.snap.svg +2 -2
- package/tests/examples/__snapshots__/example50.snap.svg +2 -2
- package/tests/examples/__snapshots__/example51.snap.svg +4 -4
- package/tests/fixtures/matcher.ts +3 -3
- package/tests/repros/__snapshots__/board-1273-trace-overlap-cycle.snap.svg +73 -82
- package/tests/repros/__snapshots__/board-15984-same-net-junction.snap.svg +12 -12
- package/tests/repros/__snapshots__/board1096-usb-label-overlap-iteration.snap.svg +5 -5
- package/tests/repros/__snapshots__/bugreport-001-gnd-overlap.snap.svg +2 -2
- package/tests/repros/__snapshots__/manufacturePartNumber-text-box.snap.svg +2 -2
- package/tests/repros/__snapshots__/netlabel-connector-through-rail-label.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-atmega328p-fault-pullup.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-atmega328p-missing-gnd-netlabel.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-board-589-regulator-section.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-board-648-esp12f-section.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-bq24074-battery-charger.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-bq25895-cross-net-trace-overlap.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-cc2340r5.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-core-555-power-cross-net-overlap.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-core-subcircuit-missing-ground.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-core-tb67s579ftg-inline-label-routing.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-dc-power-isolated-routing.snap.svg +129 -0
- package/tests/repros/__snapshots__/repro-example35-minimize-trace-crossing.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-ground-label-on-lower-rail-end.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-ina237-current-monitor.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-missing-trace-netlabel.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-mspm0l1306-capacitor-symmetry.snap.svg +182 -0
- package/tests/repros/__snapshots__/repro-netlabel-collision-687.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-netlabel-overlap-trace.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-nrf52810-clock-routing.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-pga300-c6-trace-alignment.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-pga300-redundant-ground-traces.snap.svg +288 -0
- package/tests/repros/__snapshots__/repro-pmp11282-isolated-dcdc.snap.svg +1290 -0
- package/tests/repros/__snapshots__/repro-power-group-rail-labels.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-rectifier-trace-overlap.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-rp2040-gamepad-trace-alignment.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-rp2040-usb-cc2-ground-overlap.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-rp2040-v3v3-label-placement.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-rp2040-zero-crystal-fallback-netlabels.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-ti-power-output-section.snap.svg +4 -4
- package/tests/repros/__snapshots__/repro-tida00553-j4-cell-divider.snap.svg +130 -0
- package/tests/repros/__snapshots__/repro-tida010076-j4-ground-bus.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-tida010076-page02.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-tps61222-trace-intersection.snap.svg +4 -4
- package/tests/repros/__snapshots__/repro-type-c-16pin-self-connection.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-type-c-16pin-to-resistor.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-type-c-vbus-led-ground-label.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-usb-power-vbus-label-detour.snap.svg +12 -12
- package/tests/repros/__snapshots__/repro-vcc-pin1-detour.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro129-host-custom-symbol-passives.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro130-bq27441-fuel-gauge-trace-through-c1.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro161-power-section-autolayout.snap.svg +4 -4
- package/tests/repros/__snapshots__/repro47-endpoint-obstacle-detour.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro48-555-timer-vcc-rail-label.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro5-escape-padded-text-obstacles.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro51-overlap-junction-crossing.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro84-stacked-gnd-label-orientation.snap.svg +2 -2
- package/tests/repros/__snapshots__/small-variant-resistor-facing-direction.snap.svg +2 -2
- package/tests/repros/__snapshots__/trace-overlap-box-resistor.snap.svg +2 -2
- package/tests/repros/assets/repro-dc-power-isolated-routing.input.json +193 -0
- package/tests/repros/assets/repro-mspm0l1306-capacitor-symmetry.input.json +537 -0
- package/tests/repros/assets/repro-pga300-redundant-ground-traces.input.json +858 -0
- package/tests/repros/assets/repro-pmp11282-isolated-dcdc.input.json +4570 -0
- package/tests/repros/board-1273-trace-overlap-cycle.test.ts +1 -1
- package/tests/repros/repro-dc-power-isolated-routing.test.ts +13 -0
- package/tests/repros/repro-mspm0l1306-capacitor-symmetry.test.ts +54 -0
- package/tests/repros/repro-pga300-redundant-ground-traces.test.ts +33 -0
- package/tests/repros/repro-pmp11282-isolated-dcdc.test.ts +77 -0
- package/tests/repros/repro-tida00553-j4-cell-divider.test.ts +111 -0
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/anchored-net-label-width.snap.svg +2 -2
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/inline-net-label-anchored-label-clearance.snap.svg +2 -2
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/inline-net-label-port-stub.snap.svg +2 -2
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/inline-net-label-two-pin-net.snap.svg +2 -2
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/inline-net-label01.snap.svg +2 -2
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/inline-net-label02.snap.svg +2 -2
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/terminal-stub-trace-clearance.snap.svg +2 -2
- package/tests/solvers/SameNetJunctionAlignmentSolver/parallel-load-rails.test.ts +291 -0
- package/tests/solvers/SchematicTraceSingleLineSolver2/__snapshots__/SchematicTraceSingleLineSolver2_01-example17-d1_1-u1_1.snap.svg +2 -2
- package/tests/solvers/SchematicTraceSingleLineSolver2/__snapshots__/SchematicTraceSingleLineSolver2_repro47-short-opposing-pins.snap.svg +2 -2
- package/tests/solvers/TraceCleanupSolver/__snapshots__/TraceCleanupSolver.snap.svg +2 -2
- package/tests/solvers/TraceLabelOverlapAvoidanceSolver/__snapshots__/TraceLabelOverlapAvoidanceSolver.snap.svg +2 -2
- package/tests/solvers/TraceLabelOverlapAvoidanceSolver/sub-solver/__snapshots__/MergedNetLabelObstacles.snap.svg +2 -2
- package/tests/solvers/TraceLabelOverlapAvoidanceSolver/sub-solver/__snapshots__/OverlapAvoidanceStepSolver.snap.svg +2 -2
- package/tests/solvers/TraceLabelOverlapAvoidanceSolver/sub-solver/__snapshots__/SingleOverlapSolver.snap.svg +2 -2
|
@@ -24,7 +24,7 @@ test("board 1273 solves within the trace overlap iteration limit", async () => {
|
|
|
24
24
|
|
|
25
25
|
expect(solver.solved).toBe(true)
|
|
26
26
|
expect(solver.failed).toBe(false)
|
|
27
|
-
expect(solver.traceOverlapShiftSolver?.iterations).toBe(
|
|
27
|
+
expect(solver.traceOverlapShiftSolver?.iterations).toBe(27)
|
|
28
28
|
expect(solver.postLabelTraceOverlapShiftSolver?.iterations).toBe(1)
|
|
29
29
|
await expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
30
30
|
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
3
|
+
import "tests/fixtures/matcher"
|
|
4
|
+
import inputProblem from "./assets/repro-dc-power-isolated-routing.input.json"
|
|
5
|
+
|
|
6
|
+
test("isolated DC power regulator trace routing", () => {
|
|
7
|
+
const solver = new SchematicTracePipelineSolver(inputProblem as any)
|
|
8
|
+
|
|
9
|
+
solver.solve()
|
|
10
|
+
|
|
11
|
+
expect(solver.failed).toBe(false)
|
|
12
|
+
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
13
|
+
})
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
3
|
+
import type { InputProblem } from "lib/types/InputProblem"
|
|
4
|
+
import "tests/fixtures/matcher"
|
|
5
|
+
import inputProblem from "./assets/repro-mspm0l1306-capacitor-symmetry.input.json"
|
|
6
|
+
|
|
7
|
+
// Captured from tscircuit/ti#119, Microcontroller_MSPM0L1306 at b5ee159.
|
|
8
|
+
// Only opaque component/port IDs and display metadata were normalized.
|
|
9
|
+
// C1/C2 are already level; their VDD/VSS rail junctions should be level too.
|
|
10
|
+
test("repro: MSPM0L1306 aligned decoupling capacitor rails", async () => {
|
|
11
|
+
const solver = new SchematicTracePipelineSolver(
|
|
12
|
+
inputProblem as unknown as InputProblem,
|
|
13
|
+
{
|
|
14
|
+
hideRatsNet: true,
|
|
15
|
+
},
|
|
16
|
+
)
|
|
17
|
+
solver.solve()
|
|
18
|
+
|
|
19
|
+
expect(solver.solved).toBe(true)
|
|
20
|
+
expect(solver.failed).toBe(false)
|
|
21
|
+
|
|
22
|
+
const traces = solver.netLabelToTraceSolver!.getOutput().traces
|
|
23
|
+
const getTrace = (...pinIds: string[]) => {
|
|
24
|
+
const trace = traces.find((trace) =>
|
|
25
|
+
pinIds.every((pinId) => trace.pinIds.includes(pinId)),
|
|
26
|
+
)
|
|
27
|
+
expect(trace).toBeDefined()
|
|
28
|
+
return trace!
|
|
29
|
+
}
|
|
30
|
+
for (const [pin, railY] of [
|
|
31
|
+
[1, 2.05],
|
|
32
|
+
[2, 0.65],
|
|
33
|
+
] as const) {
|
|
34
|
+
const path = getTrace(`C1.${pin}`, `C2.${pin}`).tracePath
|
|
35
|
+
const horizontalSegments = path.slice(1).flatMap((end, index) => {
|
|
36
|
+
const start = path[index]!
|
|
37
|
+
return Math.abs(start.y - end.y) < 1e-6 ? [[start, end]] : []
|
|
38
|
+
})
|
|
39
|
+
expect(horizontalSegments).toHaveLength(1)
|
|
40
|
+
const [start, end] = horizontalSegments[0]!
|
|
41
|
+
expect(start!.y).toBeCloseTo(railY, 6)
|
|
42
|
+
expect(end!.y).toBeCloseTo(railY, 6)
|
|
43
|
+
expect([start!.x, end!.x].sort()).toEqual([-3.5, -4.5].sort())
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// The lower return should continue the C1 column, not introduce a third
|
|
47
|
+
// column between C1/C2 or an extra horizontal step near VSS.
|
|
48
|
+
const returnPath = getTrace("C3.2", "C2.2").tracePath
|
|
49
|
+
expect(returnPath.some((point) => Math.abs(point.x + 4.5) < 1e-6)).toBe(true)
|
|
50
|
+
expect(returnPath.every((point) => [-4.5, -3.5].includes(point.x))).toBe(true)
|
|
51
|
+
expect(returnPath.some((point) => Math.abs(point.y - 0.65) < 1e-6)).toBe(true)
|
|
52
|
+
|
|
53
|
+
await expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
54
|
+
})
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
3
|
+
import type { InputProblem } from "lib/types/InputProblem"
|
|
4
|
+
import "tests/fixtures/matcher"
|
|
5
|
+
import inputProblem from "./assets/repro-pga300-redundant-ground-traces.input.json"
|
|
6
|
+
|
|
7
|
+
// Full solver input captured from tscircuit/ti#117 at 067b6a2 using
|
|
8
|
+
// `tsci build ... --schematic-only --disable-pcb --solver-debug`.
|
|
9
|
+
// Only the debug serializer's { value_type: "undefined" } markers were removed.
|
|
10
|
+
const COMP = "schematic_port_10"
|
|
11
|
+
const GND = "schematic_port_7"
|
|
12
|
+
const C3_GND = "schematic_port_32"
|
|
13
|
+
const R1_GND = "schematic_port_38"
|
|
14
|
+
|
|
15
|
+
test("repro: PGA300 adds redundant ground branches at COMP", async () => {
|
|
16
|
+
const solver = new SchematicTracePipelineSolver(
|
|
17
|
+
inputProblem as unknown as InputProblem,
|
|
18
|
+
)
|
|
19
|
+
solver.solve()
|
|
20
|
+
|
|
21
|
+
expect(solver.solved).toBe(true)
|
|
22
|
+
const { traces } = solver.netLabelToTraceSolver!.getOutput()
|
|
23
|
+
const hasPair = (a: string, b: string) =>
|
|
24
|
+
traces.some((trace) => trace.pinIds.includes(a) && trace.pinIds.includes(b))
|
|
25
|
+
|
|
26
|
+
// Current bug: the global GND spanning tree substitutes these two branches
|
|
27
|
+
// for the explicitly requested COMP -> R1 connection in the source circuit.
|
|
28
|
+
expect(hasPair(COMP, GND)).toBe(true)
|
|
29
|
+
expect(hasPair(COMP, C3_GND)).toBe(true)
|
|
30
|
+
expect(hasPair(COMP, R1_GND)).toBe(false)
|
|
31
|
+
|
|
32
|
+
await expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
33
|
+
})
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { MspConnectionPairSolver } from "lib/solvers/MspConnectionPairSolver/MspConnectionPairSolver"
|
|
3
|
+
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
4
|
+
import type { InputProblem } from "lib/types/InputProblem"
|
|
5
|
+
import "tests/fixtures/matcher"
|
|
6
|
+
import inputProblemJson from "./assets/repro-pmp11282-isolated-dcdc.input.json"
|
|
7
|
+
|
|
8
|
+
const cloneInputProblem = (): InputProblem =>
|
|
9
|
+
JSON.parse(JSON.stringify(inputProblemJson))
|
|
10
|
+
|
|
11
|
+
test("repro PMP11282 isolated DC/DC traces and endpoint net labels", () => {
|
|
12
|
+
const inputProblem = cloneInputProblem()
|
|
13
|
+
const pairSolver = new MspConnectionPairSolver({ inputProblem })
|
|
14
|
+
|
|
15
|
+
pairSolver.solve()
|
|
16
|
+
|
|
17
|
+
const uniquePairIds = new Set(
|
|
18
|
+
pairSolver.mspConnectionPairs.map((pair) => pair.mspPairId),
|
|
19
|
+
)
|
|
20
|
+
expect(inputProblem.chips).toHaveLength(112)
|
|
21
|
+
expect(inputProblem.directConnections).toHaveLength(163)
|
|
22
|
+
expect(pairSolver.solved).toBe(true)
|
|
23
|
+
expect(pairSolver.mspConnectionPairs).toHaveLength(203)
|
|
24
|
+
expect(uniquePairIds.size).toBe(203)
|
|
25
|
+
|
|
26
|
+
const defaultPipeline = new SchematicTracePipelineSolver(
|
|
27
|
+
cloneInputProblem(),
|
|
28
|
+
{ hideRatsNet: true },
|
|
29
|
+
)
|
|
30
|
+
defaultPipeline.solve()
|
|
31
|
+
|
|
32
|
+
const defaultTraceSolver = defaultPipeline.schematicTraceLinesSolver!
|
|
33
|
+
expect(defaultPipeline.solved).toBe(false)
|
|
34
|
+
expect(defaultPipeline.failed).toBe(true)
|
|
35
|
+
expect(defaultPipeline.error).toBe(
|
|
36
|
+
"SchematicTraceLinesSolver ran out of iterations",
|
|
37
|
+
)
|
|
38
|
+
expect(defaultTraceSolver.solvedTracePaths).toHaveLength(72)
|
|
39
|
+
expect(defaultTraceSolver.failedConnectionPairs).toHaveLength(35)
|
|
40
|
+
expect(defaultTraceSolver.queuedConnectionPairs).toHaveLength(95)
|
|
41
|
+
|
|
42
|
+
// Let the same unmodified production pipeline reach its downstream stages
|
|
43
|
+
// by increasing only this test instance's nested-solver budget. This keeps
|
|
44
|
+
// the reproduction production-code-free while exposing the resulting labels.
|
|
45
|
+
const diagnosticPipeline = new SchematicTracePipelineSolver(
|
|
46
|
+
cloneInputProblem(),
|
|
47
|
+
{ hideRatsNet: true },
|
|
48
|
+
)
|
|
49
|
+
diagnosticPipeline.solveUntilPhase("schematicTraceLinesSolver")
|
|
50
|
+
diagnosticPipeline.step()
|
|
51
|
+
diagnosticPipeline.schematicTraceLinesSolver!.MAX_ITERATIONS *=
|
|
52
|
+
diagnosticPipeline.mspConnectionPairSolver!.mspConnectionPairs.length
|
|
53
|
+
diagnosticPipeline.solve()
|
|
54
|
+
|
|
55
|
+
const finalOutput = diagnosticPipeline.inlineNetLabelSolver!.getOutput()
|
|
56
|
+
const endpointPairLabels = finalOutput.netLabelPlacements.filter((label) =>
|
|
57
|
+
label.netId?.includes(" to "),
|
|
58
|
+
)
|
|
59
|
+
const endpointPairNetIds = new Set(
|
|
60
|
+
endpointPairLabels.map((label) => label.netId!),
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
expect(diagnosticPipeline.solved).toBe(true)
|
|
64
|
+
expect(diagnosticPipeline.failed).toBe(false)
|
|
65
|
+
expect(
|
|
66
|
+
diagnosticPipeline.schematicTraceLinesSolver!.solvedTracePaths,
|
|
67
|
+
).toHaveLength(145)
|
|
68
|
+
expect(
|
|
69
|
+
diagnosticPipeline.schematicTraceLinesSolver!.failedConnectionPairs,
|
|
70
|
+
).toHaveLength(58)
|
|
71
|
+
expect(finalOutput.netLabelPlacements).toHaveLength(106)
|
|
72
|
+
expect(endpointPairLabels).toHaveLength(80)
|
|
73
|
+
expect(endpointPairNetIds.size).toBe(62)
|
|
74
|
+
expect(endpointPairNetIds).toContain("U500.pin8 to C501.pin1")
|
|
75
|
+
expect(endpointPairNetIds).toContain("L500.pin1 to L500.pin2")
|
|
76
|
+
expect(diagnosticPipeline).toMatchSolverSnapshot(import.meta.path)
|
|
77
|
+
}, 30_000)
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
3
|
+
import type { InputProblem } from "lib/types/InputProblem"
|
|
4
|
+
import "tests/fixtures/matcher"
|
|
5
|
+
|
|
6
|
+
const horizontalResistor = (name: string, x: number) => ({
|
|
7
|
+
chipId: name,
|
|
8
|
+
center: { x, y: 2 },
|
|
9
|
+
width: 0.72,
|
|
10
|
+
height: 0.68,
|
|
11
|
+
pins: [
|
|
12
|
+
{
|
|
13
|
+
pinId: `${name}.1`,
|
|
14
|
+
displayName: "1",
|
|
15
|
+
x: x - 0.36,
|
|
16
|
+
y: 2,
|
|
17
|
+
_facingDirection: "x-" as const,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
pinId: `${name}.2`,
|
|
21
|
+
displayName: "2",
|
|
22
|
+
x: x + 0.36,
|
|
23
|
+
y: 2,
|
|
24
|
+
_facingDirection: "x+" as const,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
// Isolated from the TIDA-00553 battery-pack cell-count selector. R26-R29
|
|
30
|
+
// form the VFB divider, J4 pins 1/3/5 tap its intermediate nodes, and J4 pins
|
|
31
|
+
// 2/4/6 share the ground end of the divider.
|
|
32
|
+
const inputProblem: InputProblem = {
|
|
33
|
+
chips: [
|
|
34
|
+
horizontalResistor("R26", 7.2),
|
|
35
|
+
horizontalResistor("R27", 8.2),
|
|
36
|
+
horizontalResistor("R28", 9.2),
|
|
37
|
+
horizontalResistor("R29", 10.2),
|
|
38
|
+
{
|
|
39
|
+
chipId: "J4",
|
|
40
|
+
center: { x: 10.4, y: 0.6 },
|
|
41
|
+
width: 1.6,
|
|
42
|
+
height: 0.8,
|
|
43
|
+
pins: [
|
|
44
|
+
{ pinId: "J4.1", displayName: "1", x: 9.6, y: 0.8 },
|
|
45
|
+
{ pinId: "J4.2", displayName: "2", x: 11.2, y: 0.8 },
|
|
46
|
+
{ pinId: "J4.3", displayName: "3", x: 9.6, y: 0.6 },
|
|
47
|
+
{ pinId: "J4.4", displayName: "4", x: 11.2, y: 0.6 },
|
|
48
|
+
{ pinId: "J4.5", displayName: "5", x: 9.6, y: 0.4 },
|
|
49
|
+
{ pinId: "J4.6", displayName: "6", x: 11.2, y: 0.4 },
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
directConnections: [
|
|
54
|
+
{
|
|
55
|
+
netId: "4-Cell/J4-R26",
|
|
56
|
+
netLabelText: "J4_5",
|
|
57
|
+
netLabelWidth: 0.6,
|
|
58
|
+
pinIds: ["J4.5", "R26.2"],
|
|
59
|
+
},
|
|
60
|
+
{ netId: "4-Cell/J4-R27", pinIds: ["J4.5", "R27.1"] },
|
|
61
|
+
{ netId: "3-Cell/J4-R27", pinIds: ["J4.3", "R27.2"] },
|
|
62
|
+
{ netId: "3-Cell/J4-R28", pinIds: ["J4.3", "R28.1"] },
|
|
63
|
+
{ netId: "2-Cell/J4-R28", pinIds: ["J4.1", "R28.2"] },
|
|
64
|
+
{ netId: "2-Cell/J4-R29", pinIds: ["J4.1", "R29.1"] },
|
|
65
|
+
],
|
|
66
|
+
netConnections: [
|
|
67
|
+
{
|
|
68
|
+
netId: "U2_VFB",
|
|
69
|
+
netLabelText: "U2_VFB",
|
|
70
|
+
netLabelWidth: 1.12,
|
|
71
|
+
pinIds: ["R26.1"],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
netId: "GND",
|
|
75
|
+
netLabelText: "GND",
|
|
76
|
+
netLabelWidth: 0.42,
|
|
77
|
+
netLabelHeight: 0.48,
|
|
78
|
+
pinIds: ["R29.2", "J4.2", "J4.4", "J4.6"],
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
textBoxes: [
|
|
82
|
+
{
|
|
83
|
+
chipId: "J4",
|
|
84
|
+
center: { x: 10.12, y: 0.07 },
|
|
85
|
+
width: 0.24,
|
|
86
|
+
height: 0.18,
|
|
87
|
+
text: "J4",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
chipId: "J4",
|
|
91
|
+
center: { x: 10.12, y: 1.115 },
|
|
92
|
+
width: 0.36,
|
|
93
|
+
height: 0.25,
|
|
94
|
+
text: "J4",
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
availableNetLabelOrientations: {
|
|
98
|
+
U2_VFB: ["x-"],
|
|
99
|
+
"4-Cell/J4-R26": ["x-"],
|
|
100
|
+
"4-Cell/J4-R27": ["x-"],
|
|
101
|
+
GND: ["y-"],
|
|
102
|
+
},
|
|
103
|
+
maxMspPairDistance: 2.4,
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
test("repro TIDA-00553 J4 cell divider routing", () => {
|
|
107
|
+
const solver = new SchematicTracePipelineSolver(inputProblem)
|
|
108
|
+
|
|
109
|
+
solver.solve()
|
|
110
|
+
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
111
|
+
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="1200" height="2016" viewBox="0 0 1200 2016" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Solver debug visualization on top and Circuit JSON schematic on the bottom">
|
|
2
2
|
<g transform="translate(0, 0) scale(1.875, 1.875) translate(0, 0)">
|
|
3
3
|
<rect width="100%" height="100%" fill="white"/><g><polyline data-points="5.575,1.4 2.045,2.6" data-type="line" data-label="" points="447.56446991404016,256.8863419293219 258.75835721107927,192.70296084049664" fill="none" stroke="hsl(193, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="5.575,1.2 2.045,2.4" data-type="line" data-label="" points="447.56446991404016,267.5835721107927 258.75835721107927,203.40019102196752" fill="none" stroke="hsl(191, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="5.575,1 2.045,2.2" data-type="line" data-label="" points="447.56446991404016,278.2808022922636 258.75835721107927,214.0974212034384" fill="none" stroke="hsl(72, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="5.575,0.8 2.045,2" data-type="line" data-label="" points="447.56446991404016,288.97803247373446 258.75835721107927,224.79465138490926" fill="none" stroke="hsl(74, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="5.575,0.6 2.045,0.7" data-type="line" data-label="" points="447.56446991404016,299.67526265520536 258.75835721107927,294.3266475644699" fill="none" stroke="hsl(184, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="5.575,1.4 5.375,1.4 5.375,2.6 2.045,2.6" data-type="line" data-label="" points="447.56446991404016,256.8863419293219 436.86723973256926,256.8863419293219 436.86723973256926,192.70296084049664 258.75835721107927,192.70296084049664" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="5.575,1.2 3.81,1.2 3.81,2.4 2.045,2.4" data-type="line" data-label="" points="447.56446991404016,267.5835721107927 353.1614135625597,267.5835721107927 353.1614135625597,203.40019102196752 258.75835721107927,203.40019102196752" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="5.575,1 3.71,1 3.71,2.2 2.045,2.2" data-type="line" data-label="" points="447.56446991404016,278.2808022922636 347.81279847182424,278.2808022922636 347.81279847182424,214.0974212034384 258.75835721107927,214.0974212034384" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="5.575,0.8 2.245,0.8 2.245,2 2.045,2" data-type="line" data-label="" points="447.56446991404016,288.97803247373446 269.4555873925501,288.97803247373446 269.4555873925501,224.79465138490926 258.75835721107927,224.79465138490926" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="5.575,0.6 3.81,0.6 3.81,0.7 2.045,0.7" data-type="line" data-label="" points="447.56446991404016,299.67526265520536 353.1614135625597,299.67526265520536 353.1614135625597,294.3266475644699 258.75835721107927,294.3266475644699" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="U1" data-x="0" data-y="0" x="40" y="161.9484240687679" width="218.75835721107927" height="339.6370582617001" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018696428571428572"/></g><g><rect data-type="rect" data-label="J4" data-x="7" data-y="-0.4" x="447.5644699140401" y="246.189111747851" width="152.43553008595984" height="213.94460362941737" fill="hsl(186, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018696428571428572"/></g><g><rect data-type="rect" data-label="TB67S579FTG" data-x="2.405" data-y="3.525" x="242.71251193887292" y="138.41451766953202" width="70.60171919770775" height="9.627507163323742" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.018696428571428572"/></g><g><rect data-type="rect" data-label="U1" data-x="1.865" data-y="3.29" x="239.50334288443167" y="149.11174785100286" width="19.25501432664757" height="13.371537726838596" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.018696428571428572"/></g><g><rect data-type="rect" data-label="J4" data-x="6.095" data-y="1.715" x="465.74976122254054" y="233.35243553008593" width="19.255014326647597" height="13.371537726838568" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.018696428571428572"/></g><g><rect data-type="rect" data-label="INLINE netId: OUT_A_P
|
|
4
4
|
axis: x
|
|
@@ -70,7 +70,7 @@ SERIAL_IN" data-x="4.6925" data-y="0.6" cx="400.3629417382999" cy="299.675262655
|
|
|
70
70
|
});
|
|
71
71
|
]]></script>
|
|
72
72
|
</g>
|
|
73
|
-
<g transform="translate(
|
|
73
|
+
<g transform="translate(0, 1216)">
|
|
74
74
|
<style>
|
|
75
75
|
.boundary { fill: rgb(245, 241, 237); }
|
|
76
76
|
.schematic-boundary { fill: none; stroke: #fff; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="1200" height="2016" viewBox="0 0 1200 2016" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Solver debug visualization on top and Circuit JSON schematic on the bottom">
|
|
2
2
|
<g transform="translate(0, 0) scale(1.875, 1.875) translate(0, 0)">
|
|
3
3
|
<rect width="100%" height="100%" fill="white"/><g><polyline data-points="-0.7,0.2 -1.3290000000000002,0.2" data-type="line" data-label="" points="337.7926421404682,320 219.98662207357856,320" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-0.7,0.4 -1.3290000000000002,0.4" data-type="line" data-label="" points="337.7926421404682,282.54180602006693 219.98662207357856,282.54180602006693" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-0.7,0 -1.38,0" data-type="line" data-label="" points="337.7926421404682,357.4581939799331 210.43478260869568,357.4581939799331" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="U1" data-x="0" data-y="0.2" x="337.79264214046816" y="226.35451505016724" width="262.2073578595318" height="187.29096989966553" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.005339285714285715"/></g><g><rect data-type="rect" data-label="netId: D_MINUS
|
|
4
4
|
globalConnNetId: connectivity_net0" data-x="-1.81" data-y="0.4" x="40" y="263.81270903010034" width="179.79933110367892" height="37.45819397993313" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.005339285714285715"/></g><g><rect data-type="rect" data-label="netId: D_PLUS
|
|
@@ -55,7 +55,7 @@ SWCLK" data-x="-1.04" data-y="0" cx="274.11371237458195" cy="357.4581939799331"
|
|
|
55
55
|
});
|
|
56
56
|
]]></script>
|
|
57
57
|
</g>
|
|
58
|
-
<g transform="translate(
|
|
58
|
+
<g transform="translate(0, 1216)">
|
|
59
59
|
<style>
|
|
60
60
|
.boundary { fill: rgb(245, 241, 237); }
|
|
61
61
|
.schematic-boundary { fill: none; stroke: #fff; }
|
package/tests/solvers/InlineNetLabelSolver/__snapshots__/inline-net-label-port-stub.snap.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="1200" height="2016" viewBox="0 0 1200 2016" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Solver debug visualization on top and Circuit JSON schematic on the bottom">
|
|
2
2
|
<g transform="translate(0, 0) scale(1.875, 1.875) translate(0, 0)">
|
|
3
3
|
<rect width="100%" height="100%" fill="white"/><g><polyline data-points="-0.5,0.3 -2.3499999999999996,0.3" data-type="line" data-label="" points="262.79569892473114,271.8279569892473 40,271.8279569892473" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.5,-0.2 2.3,-0.2" data-type="line" data-label="" points="383.2258064516129,332.04301075268813 600,332.04301075268813" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-0.5,-0.1 -2.3499999999999996,-0.1" data-type="line" data-label="" points="262.79569892473114,320 40,320" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-0.2,0.5 -0.2,1.45" data-type="line" data-label="" points="298.9247311827957,247.74193548387095 298.9247311827957,133.33333333333331" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.2,-0.5 0.2,-1.65" data-type="line" data-label="" points="347.09677419354836,368.17204301075265 347.09677419354836,506.66666666666663" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="U1" data-x="0" data-y="0" x="262.79569892473114" y="247.74193548387098" width="120.43010752688178" height="120.4301075268817" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008303571428571428"/></g><g><rect data-type="rect" data-label="INLINE netId: NET_PRU0_MII_TX_CLK1
|
|
4
4
|
axis: x
|
|
@@ -65,7 +65,7 @@ NET_BOTTOM" data-x="0.2" data-y="-1.075" cx="347.09677419354836" cy="437.4193548
|
|
|
65
65
|
});
|
|
66
66
|
]]></script>
|
|
67
67
|
</g>
|
|
68
|
-
<g transform="translate(
|
|
68
|
+
<g transform="translate(0, 1216)">
|
|
69
69
|
<style>
|
|
70
70
|
.boundary { fill: rgb(245, 241, 237); }
|
|
71
71
|
.schematic-boundary { fill: none; stroke: #fff; }
|
package/tests/solvers/InlineNetLabelSolver/__snapshots__/inline-net-label-two-pin-net.snap.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="1200" height="2016" viewBox="0 0 1200 2016" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Solver debug visualization on top and Circuit JSON schematic on the bottom">
|
|
2
2
|
<g transform="translate(0, 0) scale(1.875, 1.875) translate(0, 0)">
|
|
3
3
|
<rect width="100%" height="100%" fill="white"/><g><polyline data-points="-0.5,1 0.5,1" data-type="line" data-label="" points="264,208 376,208" fill="none" stroke="hsl(253, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-0.5,1 0.5,1" data-type="line" data-label="" points="264,208 376,208" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.5,-1 -0.19999999999999996,-1" data-type="line" data-label="" points="152,432 297.6,432" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.5,-1 0.19999999999999996,-1" data-type="line" data-label="" points="488,432 342.4,432" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="U1" data-x="-1" data-y="1" x="152" y="152" width="112" height="112" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="U2" data-x="1" data-y="1" x="376" y="152" width="112" height="112" fill="hsl(165, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="U3" data-x="-2" data-y="-1" x="40" y="376" width="112" height="112" fill="hsl(166, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="U4" data-x="2" data-y="-1" x="488" y="376" width="112" height="112" fill="hsl(167, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="INLINE netId: NET_ROUTED
|
|
4
4
|
axis: x
|
|
@@ -58,7 +58,7 @@ NET_SECTIONED" data-x="0.85" data-y="-1" cx="415.2" cy="432" r="3" fill="green"/
|
|
|
58
58
|
});
|
|
59
59
|
]]></script>
|
|
60
60
|
</g>
|
|
61
|
-
<g transform="translate(
|
|
61
|
+
<g transform="translate(0, 1216)">
|
|
62
62
|
<style>
|
|
63
63
|
.boundary { fill: rgb(245, 241, 237); }
|
|
64
64
|
.schematic-boundary { fill: none; stroke: #fff; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="1200" height="2016" viewBox="0 0 1200 2016" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Solver debug visualization on top and Circuit JSON schematic on the bottom">
|
|
2
2
|
<g transform="translate(0, 0) scale(1.875, 1.875) translate(0, 0)">
|
|
3
3
|
<rect width="100%" height="100%" fill="white"/><g><polyline data-points="0.5,0 2.5,0" data-type="line" data-label="" points="214.33962264150944,71.69811320754715 425.66037735849056,71.69811320754715" fill="none" stroke="hsl(48, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0,-2.5 0,-4" data-type="line" data-label="" points="161.50943396226415,335.84905660377353 161.50943396226415,494.33962264150944" fill="none" stroke="hsl(136, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.5,0 2.5,0" data-type="line" data-label="" points="214.33962264150944,71.69811320754715 425.66037735849056,71.69811320754715" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0,-2.5 0,-4" data-type="line" data-label="" points="161.50943396226415,335.84905660377353 161.50943396226415,494.33962264150944" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="U1" data-x="0" data-y="0" x="108.67924528301887" y="39.999999999999986" width="105.66037735849056" height="63.39622641509433" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="U2" data-x="3" data-y="0" x="425.66037735849056" y="39.999999999999986" width="105.66037735849056" height="63.39622641509433" fill="hsl(165, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="U3" data-x="0" data-y="-2" x="129.81132075471697" y="230.18867924528303" width="63.39622641509436" height="105.66037735849054" fill="hsl(166, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="U4" data-x="0" data-y="-4.5" x="129.81132075471697" y="494.3396226415094" width="63.39622641509436" height="105.66037735849056" fill="hsl(167, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009464285714285715"/></g><g><rect data-type="rect" data-label="INLINE netId: USER_LED_ANODE
|
|
4
4
|
axis: x
|
|
@@ -55,7 +55,7 @@ SPI_SCK" data-x="0" data-y="-3.25" cx="161.50943396226415" cy="415.0943396226415
|
|
|
55
55
|
});
|
|
56
56
|
]]></script>
|
|
57
57
|
</g>
|
|
58
|
-
<g transform="translate(
|
|
58
|
+
<g transform="translate(0, 1216)">
|
|
59
59
|
<style>
|
|
60
60
|
.boundary { fill: rgb(245, 241, 237); }
|
|
61
61
|
.schematic-boundary { fill: none; stroke: #fff; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="1200" height="2016" viewBox="0 0 1200 2016" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Solver debug visualization on top and Circuit JSON schematic on the bottom">
|
|
2
2
|
<g transform="translate(0, 0) scale(1.875, 1.875) translate(0, 0)">
|
|
3
3
|
<rect width="100%" height="100%" fill="white"/><g><polyline data-points="0.6000000000000001,-0.30000000000000004 2.435,0" data-type="line" data-label="" points="201.34453781512605,376.47058823529414 448.06722689075633,336.1344537815126" fill="none" stroke="hsl(48, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.6000000000000001,-0.30000000000000004 1.5175,-0.30000000000000004 1.5175,0 2.435,0" data-type="line" data-label="" points="201.34453781512605,376.47058823529414 324.7058823529412,376.47058823529414 324.7058823529412,336.1344537815126 448.06722689075633,336.1344537815126" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="40" y="268.9075630252101" width="161.34453781512605" height="134.45378151260502" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.0074375"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="3" data-y="0.13249999999999998" x="448.0672268907564" y="256.8067226890756" width="151.93277310924367" height="123.02521008403363" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.0074375"/></g><g><rect data-type="rect" data-label="U1" data-x="-0.08000000000000002" data-y="0.615" x="85.7142857142857" y="236.6386554621849" width="48.40336134453783" height="33.613445378151255" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.0074375"/></g><g><rect data-type="rect" data-label="INLINE netId: USER_LED_ANODE
|
|
4
4
|
axis: x
|
|
@@ -58,7 +58,7 @@ USER_LED_ANODE" data-x="1.5175" data-y="0" cx="324.7058823529412" cy="336.134453
|
|
|
58
58
|
});
|
|
59
59
|
]]></script>
|
|
60
60
|
</g>
|
|
61
|
-
<g transform="translate(
|
|
61
|
+
<g transform="translate(0, 1216)">
|
|
62
62
|
<style>
|
|
63
63
|
.boundary { fill: rgb(245, 241, 237); }
|
|
64
64
|
.schematic-boundary { fill: none; stroke: #fff; }
|
package/tests/solvers/InlineNetLabelSolver/__snapshots__/terminal-stub-trace-clearance.snap.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="
|
|
1
|
+
<svg width="1200" height="2016" viewBox="0 0 1200 2016" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Solver debug visualization on top and Circuit JSON schematic on the bottom">
|
|
2
2
|
<g transform="translate(0, 0) scale(1.875, 1.875) translate(0, 0)">
|
|
3
3
|
<rect width="100%" height="100%" fill="white"/><g><polyline data-points="0.5,-0.1 1,-0.1 1,0.5" data-type="line" data-label="" points="413.33333333333337,394.66666666666663 600,394.66666666666663 600,170.66666666666666" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.5,0.3 0.95,0.3" data-type="line" data-label="" points="413.33333333333337,245.33333333333331 581.3333333333333,245.33333333333331" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.5,0.1 0.95,0.1" data-type="line" data-label="" points="413.33333333333337,320 581.3333333333333,320" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="U1" data-x="0" data-y="0.1" x="40" y="170.66666666666669" width="373.33333333333337" height="298.66666666666663" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.0026785714285714286"/></g><g><rect data-type="rect" data-label="INLINE netId: SCL
|
|
4
4
|
axis: x
|
|
@@ -54,7 +54,7 @@ SDA" data-x="0.725" data-y="0.1" cx="497.3333333333333" cy="320" r="3" fill="gre
|
|
|
54
54
|
});
|
|
55
55
|
]]></script>
|
|
56
56
|
</g>
|
|
57
|
-
<g transform="translate(
|
|
57
|
+
<g transform="translate(0, 1216)">
|
|
58
58
|
<style>
|
|
59
59
|
.boundary { fill: rgb(245, 241, 237); }
|
|
60
60
|
.schematic-boundary { fill: none; stroke: #fff; }
|