@tscircuit/fanout-solver 0.0.52 → 0.0.53
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/README.md +35 -70
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ and treats each bus-layer decision atomically.
|
|
|
16
16
|
- Detects rectangular pad footprints through obstacle `componentId` metadata,
|
|
17
17
|
including perimeter packages and two-pad passives.
|
|
18
18
|
- Handles multiple mixed footprints inside one shared breakout boundary.
|
|
19
|
-
- Routes perimeter and inner-matrix pads
|
|
19
|
+
- Routes perimeter and inner-matrix pads.
|
|
20
20
|
- Uses `sharedBoundary` as the common exit rectangle. Without one, it infers a
|
|
21
21
|
shared rectangle around the source footprints selected for the buses, without
|
|
22
22
|
expanding that boundary to include destination footprints.
|
|
@@ -280,20 +280,32 @@ parameters. Each sample has one shared boundary around all of its footprints,
|
|
|
280
280
|
and component bounds come from the exact footprinter-generated copper pad
|
|
281
281
|
extents.
|
|
282
282
|
|
|
283
|
-
##
|
|
283
|
+
## Dataset 31 benchmark
|
|
284
284
|
|
|
285
|
-
Run `./benchmark.sh` (or `bun run benchmark`) to benchmark
|
|
286
|
-
|
|
287
|
-
|
|
285
|
+
Run `./benchmark.sh` (or `bun run benchmark`) to benchmark **only the 12 AM62L
|
|
286
|
+
directional cases** from
|
|
287
|
+
[`tscircuit/dataset-fanout31-am62l`](https://github.com/tscircuit/dataset-fanout31-am62l).
|
|
288
|
+
The upstream revision is pinned in `scripts/generate-repro/package.json` and
|
|
289
|
+
recorded in every report. Other datasets remain available for regression tests
|
|
290
|
+
and the debugger, but have no benchmark commands or workflows.
|
|
288
291
|
|
|
289
292
|
```sh
|
|
290
293
|
./benchmark.sh
|
|
291
294
|
./benchmark.sh --list
|
|
292
|
-
./benchmark.sh --
|
|
293
|
-
./benchmark.sh --dataset srj19,srj29 --sample sample001
|
|
295
|
+
./benchmark.sh --sample 11-left-center
|
|
294
296
|
./benchmark.sh --concurrency 8 --sample-timeout-seconds 300
|
|
295
297
|
```
|
|
296
298
|
|
|
299
|
+
Before timing the solver, the benchmark renders the selected upstream TSX/core
|
|
300
|
+
circuits and captures their exact fanout-solver constructor inputs into
|
|
301
|
+
`benchmark-results/inputs/<sample-id>.json`. Each case retains all 135 AM62L
|
|
302
|
+
connections, 573 pad obstacles, nine DDR buses, 102 plane drops, and the original
|
|
303
|
+
clearance, differential-pair, and length-skew constraints. The timed workers run
|
|
304
|
+
**this checkout's solver**, not the upstream package's released solver.
|
|
305
|
+
To capture the inputs without solving, use `bun run generate:dataset31`.
|
|
306
|
+
The optional `--dataset dataset31` flag is accepted for explicit CI invocation;
|
|
307
|
+
other dataset selections are rejected.
|
|
308
|
+
|
|
297
309
|
Each sample runs in an isolated process, with up to four concurrent processes
|
|
298
310
|
locally and a **120-second hard timeout** by default. A synchronous solver hang,
|
|
299
311
|
exception, or unsolved case does not prevent later samples from running.
|
|
@@ -301,80 +313,33 @@ Assignment budgets and circuit constraints remain at each sample's defaults;
|
|
|
301
313
|
`--max-layer-combinations` explicitly overrides only the search budget.
|
|
302
314
|
|
|
303
315
|
The ordered `benchmark-results/benchmark.json` and `benchmark.md` reports contain
|
|
304
|
-
the commit, configuration,
|
|
305
|
-
timing, and partial routing/validation counts. Reports are saved after
|
|
306
|
-
completed sample, including the total selected count to identify incomplete runs.
|
|
316
|
+
the solver commit, dataset revision, configuration, solve totals, every sample's
|
|
317
|
+
status and timing, and partial routing/validation counts. Reports are saved after
|
|
318
|
+
every completed sample, including the total selected count to identify incomplete runs.
|
|
307
319
|
Timed-out workers do not retain their in-flight routing counts.
|
|
308
320
|
Compare reports with the same budgets to track progress. Solved means validated
|
|
309
|
-
fanout, not downstream inter-chip routing
|
|
310
|
-
|
|
311
|
-
are
|
|
312
|
-
command failures (nonzero exit).
|
|
321
|
+
AM62L fanout, not RAM fanout or downstream inter-chip routing. Partial, error,
|
|
322
|
+
and timeout rows are benchmark results (exit 0); invalid CLI arguments or report
|
|
323
|
+
I/O failures are command failures (nonzero exit).
|
|
313
324
|
|
|
314
325
|
### PR comment trigger
|
|
315
326
|
|
|
316
327
|
Once `.github/workflows/benchmark.yml` is on the default branch, a repository
|
|
317
328
|
writer can comment **`/benchmark`** on an open PR. The workflow captures that
|
|
318
|
-
PR's exact head SHA, runs all samples on a **32-vCPU Blacksmith ARM**
|
|
319
|
-
then updates a status comment with solve totals, per-sample results,
|
|
320
|
-
to the complete JSON/Markdown
|
|
321
|
-
run, optionally supplying an open PR number. No custom
|
|
329
|
+
PR's exact head SHA, runs all 12 dataset 31 samples on a **32-vCPU Blacksmith ARM**
|
|
330
|
+
runner, then updates a status comment with solve totals, per-sample results,
|
|
331
|
+
and a link to the complete JSON/Markdown reports and captured inputs. The Actions
|
|
332
|
+
UI also supports a manual run, optionally supplying an open PR number. No custom
|
|
333
|
+
bot token is required.
|
|
322
334
|
|
|
323
335
|
The runner defaults to 32 processes and a 120-second per-sample deadline; set
|
|
324
336
|
repository variables `BENCHMARK_CONCURRENCY` and
|
|
325
337
|
`BENCHMARK_SAMPLE_TIMEOUT_SECONDS` to change these. PR code runs with a read-only
|
|
326
338
|
token and no persisted checkout credentials. A separate job uses the trusted
|
|
327
339
|
workflow revision to validate report data and post comments; it never executes
|
|
328
|
-
PR code.
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
## SRJ29 benchmark
|
|
332
|
-
|
|
333
|
-
The repository loads all 200 samples from the derivative
|
|
334
|
-
[`tscircuit/dataset-srj29-bga-decoupling`](https://github.com/tscircuit/dataset-srj29-bga-decoupling)
|
|
335
|
-
as a pinned development dependency. The adapter keeps the complete obstacle
|
|
336
|
-
field, including opposite-layer capacitor pads and bodies. VCC and GND are
|
|
337
|
-
grouped onto opposite boundary corridors, while the capacitor pad remains the
|
|
338
|
-
downstream endpoint of every power connection; a local capacitor or plane via
|
|
339
|
-
alone cannot count as a solved BGA pin. Remaining edge signals are grouped by
|
|
340
|
-
direction. Every adapted problem uses the same six-layer stackup (`top`,
|
|
341
|
-
`inner1` through `inner4`, and `bottom`) so benchmark improvements are directly
|
|
342
|
-
comparable.
|
|
343
|
-
|
|
344
|
-
The dedicated legacy SRJ29 report remains available with:
|
|
345
|
-
|
|
346
|
-
```sh
|
|
347
|
-
bun run benchmark:srj29
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
Use `--sample sample001`, `--limit 10`, or
|
|
351
|
-
`--max-layer-combinations 16` for shorter runs. Samples run one at a time by
|
|
352
|
-
default and print progress as they finish. `--concurrency 8` runs isolated
|
|
353
|
-
samples in parallel, and `--sample-timeout-seconds 600` prevents a difficult
|
|
354
|
-
sample from blocking the remaining work. Each run writes the full ordered
|
|
355
|
-
results to `benchmark-results/srj29.json` and
|
|
356
|
-
`benchmark-results/srj29.md`. A row is marked solved only when every input
|
|
357
|
-
connection has a validated breakout and an independent physical-copper audit
|
|
358
|
-
proves that the emitted wires, vias, and same-net pads connect every original
|
|
359
|
-
endpoint on compatible layers. A second independent audit checks every emitted
|
|
360
|
-
trace and via against different-net pads, obstacles, traces, and vias on every
|
|
361
|
-
physical layer in its span. Reaching an arbitrary boundary point, retaining an
|
|
362
|
-
unrouted endpoint in the output JSON, or emitting copper with a DRC violation
|
|
363
|
-
does not count. The report separates fanout-prefix completion from physically
|
|
364
|
-
connected original connections so partial progress remains visible without
|
|
365
|
-
overstating it as a solution. Partial solutions are reported as benchmark
|
|
366
|
-
results instead of failing the command. `bun run benchmark:srj29` is an alias
|
|
367
|
-
for the same command.
|
|
368
|
-
|
|
369
|
-
The `SRJ29 Benchmark` GitHub Actions workflow runs the complete dataset on a
|
|
370
|
-
Blacksmith 32-vCPU ARM runner with 32 sample processes by default. It can be
|
|
371
|
-
started manually with an optional sample id, or for a pull request by adding
|
|
372
|
-
`[BENCHMARK TEST]` to its title. The workflow publishes the Markdown summary and
|
|
373
|
-
uploads both reports as an artifact.
|
|
374
|
-
|
|
375
|
-
Run `bun run start` and inspect the SRJ29 fixtures to step through the selected
|
|
376
|
-
sample. The derivative dataset also publishes dedicated Cosmos pages for the
|
|
377
|
-
first ten samples.
|
|
340
|
+
PR code. The trusted renderer rejects legacy or mixed-dataset reports, so PR
|
|
341
|
+
comments contain only dataset 31 results. Only exact commands from non-bot users
|
|
342
|
+
with current write, maintain, or admin access are accepted.
|
|
378
343
|
|
|
379
344
|
## Dataset 02
|
|
380
345
|
|
|
@@ -527,8 +492,8 @@ bun run render:dataset
|
|
|
527
492
|
bun run start
|
|
528
493
|
```
|
|
529
494
|
|
|
530
|
-
The benchmark runs
|
|
531
|
-
|
|
495
|
+
The benchmark runs only the 12 dataset 31 AM62L cases and reports solve counts,
|
|
496
|
+
validation, and timing. `bun run start` opens all regression
|
|
532
497
|
datasets in the standard tscircuit solver debugger. `bun run
|
|
533
498
|
render:dataset` writes `graphics-debug` PNGs under one subdirectory per dataset,
|
|
534
499
|
with a red shared boundary, gray component courtyards, and green fanout-exit
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/fanout-solver",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.53",
|
|
4
4
|
"description": "BGA fanout solver with coordinated bus-layer escapes for SimpleRouteJson",
|
|
5
5
|
"module": "lib/index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"test": "bun test",
|
|
33
33
|
"benchmark": "bun benchmarks/run-benchmark.ts",
|
|
34
34
|
"generate:repro04": "bun scripts/generate-repro/generate-repro04.tsx",
|
|
35
|
-
"
|
|
35
|
+
"generate:dataset31": "bun scripts/generate-repro/generate-dataset31.tsx",
|
|
36
36
|
"render:dataset": "bun scripts/render-dataset-pngs.ts",
|
|
37
37
|
"format": "biome format --write .",
|
|
38
38
|
"format:check": "biome format ."
|