Repair fine-pitch BGA pad escapes with an incremental solver - #93
Open
seveibar wants to merge 10 commits into
Open
Repair fine-pitch BGA pad escapes with an incremental solver#93seveibar wants to merge 10 commits into
seveibar wants to merge 10 commits into
Conversation
Benchmark This PRRun benchmarks by commenting on this PR: Everything after Examples:
Any PR whose title contains |
seveibar
force-pushed
the
fix/fine-pitch-pad-escape
branch
from
September 5, 2026 03:36
84f72d5 to
b95b389
Compare
…-pitch-pad-escape
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fine-pitch BGA escapes can remain blocked after ordinary bend and terminal repair. Export a shared incremental
FinePitchPadEscapeSolverthat searches local pad channels and, for remaining conflicts, bounded terminal-via escape candidates. Integration for both Pipeline7 and Pipeline9 is in tscircuit/tscircuit-autorouter#2389.The consuming PR now routes the completely trace-free bugreport104 pedometer with 0 benchmark-relaxed DRC errors in both pipelines, compared with 45/36 on its previous revision and 32/31 on the independent main baseline. The consuming PR also aligns cleanup spacing objectives with the unchanged benchmark evaluator and corrects shared circular-pad taper sizing.
Solver behavior
_step()with at most one candidate/DRC evaluation per step; progress, statistics, visualization, and typed completed output follow the solver lifecycle. Pipelines call.step(), not.solve().Pipeline7 runs this as a dedicated stage after exact repair. Pipeline9 steps it as an active child after terminal relocation and before regional repair. No pipeline-specific geometry code is required here.
Visual reproductions
Terminal-via escape: 3 errors → 0
This small four-layer BGA fixture shows why moving only intermediate bends is insufficient. The existing via moves closer to the terminal, shortening the outer-layer escape. Both endpoints and the unrelated inner-layer trace remain unchanged, and the via count stays at two. Red denotes top-layer copper, green inner1, yellow inner2, and blue circles vias; pads are drawn as circles.
bun test tests/terminal-via-escape.test.ts tests/terminal-via-escape-start.test.ts tests/terminal-via-escape-stepping.test.ts tests/terminal-via-escape-snapshot.test.ts --timeout 9999999Original captured pad crossing: 1 error → 0
The matched close-up below uses the real pedometer capture. Blue is 0.10 mm trace copper, red is offending pad 34, green is terminal pad 33, and pale gray is the original 0.05 mm clearance envelope. White dots mark interior bends. This local-channel example does not move the via or terminal.
Only the display is cropped: DRC and repair use the entire captured route and all 21 pads. Run
bun startand open the pedometer-bga-pad-escape Cosmos fixture for pan/zoom and step-by-step debugging.Validation and dependency scope
test.skipwhen committed, with solved SVGs checked in.9d6da7d), retaining inclusive declared via-span checks and staged trace/via repair improvements. The exact consumed commit is003e0391e70302b9c0dc83e49623ff8514ce1ee2.