Conversation
Issue tscircuit#15: the decoupling_caps partition was packed wherever the global packer had room, leaving caps 5-12 body-widths away from the chip they decouple. PlaceNetOnlyDecouplingRowsSolver only handles rail-shared (net-only) partitions, so directly-wired cap groups never moved. New PlaceChipConnectedDecouplingCapsSolver runs right after it and translates each directly-wired cap group rigidly (preserving its row layout) until its rail edge abuts the main chip's connected-pin side. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <[email protected]>
The nearest cap can only abut the intermediate partition member between the row and the chip (measured 2.73 on repro50, was 5.46 pre-fix). Must stay strictly positive so the group never pushes into the chip. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Generated with Codebuff 🤖 Co-Authored-By: Codebuff <[email protected]>
|
Short technical summary for reviewers — this PR completes the decap-placement solver family started in #177 (net-only rows) and #202 (rail-only caps): the third case, pin-to-pin connected decoupling caps, currently never moves. Measured on the repo's own
The layout follows the invariant merged in #246-adjacent repro tests: each rail keeps its own row, single y, equal pitch — the rows are only pulled up against the main chip, aligned through the group's own rail pin pair. Snapshot diffs touch only the 4 expected RP2040 SVGs; the other 110 tests are byte-identical. Note on #250: complementary, not competing — that one handles a single fixed cap inside a partition row; this one moves whole chip-connected partitions against the chip. They can land in either order. Happy to adjust geometry or guard conditions to match what you'd expect here. cc @mohan-bee — since you authored #177/#202, would value your eyes on whether this matches the family's intended semantics. Closes the core "caps sit right next to the chip they decouple" criterion of #15. |
|
Fresh measurements, same repro50 fixture, both branches run side by side against today's main (v0.0.97):
Correction to my earlier summary: the 5.46 I quoted was measured on the base commit this branch was cut from — on today's main the gap is 3.33. The number drifts with every upstream packing change precisely because nothing in the pipeline enforces proximity; that drift is itself part of the case for this PR. The solver pins the group to the physical minimum and the regression test keeps it there as main evolves. PR description has been updated with these numbers and a reproduce block. |
|
Four-channel verification summary for reviewers (everything below is reproducible from the PR description's reproduce block): 1. Deterministic regression test — 2. Live solver measurement (same fixture run on both branches):
3. CI — all 4 checks green on Ubuntu ( 4. Blast radius — 7 files: 1 new solver (299 lines), 1 pipeline registration (15 lines), 1 test (107 lines), and exactly the 4 expected RP2040 snapshots. Zero snapshot drift across the rest of the 114-test suite. |
/claim #15
Problem
Issue #15's "acceptable solution" requires decoupling caps to sit right next to the chip they decouple. On main, the directly-wired cap partition is packed wherever the global packer has room — and no pipeline phase ever moves it:
PlaceNetOnlyDecouplingRowsSolveronly handles rail-shared (net-only) partitions; on pin-to-pin wired caps it bails out earlyMeasured on today's main (v0.0.97, repro50 fixture): nearest cap gap 3.33 to U3 — and it was 5.46 on the base commit this branch was cut from. The gap drifts with every upstream packing change precisely because nothing in the pipeline enforces proximity; this solver pins it to the physical minimum and a regression test keeps it there.
Fix
New
PlaceChipConnectedDecouplingCapsSolverruns right afterPlaceNetOnlyDecouplingRowsSolverinLayoutPipelineSolverand handles the directly-wired sibling case:netPairpins, not shared nets) and leaves untouched groups exactly where they wereBefore / After (repro50 RP2040 fixture)
Reproduce
Verification
PlaceChipConnectedDecouplingCapsSolver01.test.ts: solver solves, groups hug the chip (gap bounds), rows stay co-linear, zero overlapsworkflow_dispatchhelper, removed before opening this PR) so the pixel comparison cannot drift with local fontsCloses #15