fix: use declared pin side when grouping same-side passives (#15) - #169
fix: use declared pin side when grouping same-side passives (#15)#169DPS0340 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@mohan-bee you've been deep in the crystal/decoupling layout work here — mind casting an eye over this one? It's adjacent to #15. Small change (2 files, +50 total): Deliberately scoped to the grouping stage only — I left the row placement for the merged group alone so it stays reviewable. CI green, mergeable. |
|
no snapshots ! |
|
@MustafaMulla29 adding you — you've merged 8 of the last ~25 here, more than anyone, and I'd only tagged @mohan-bee. Whoever has a moment. 2 files, +45/-5, one of which is the test. Progress on #15. That split U3's decoupling caps into an The fix makes the declared Regression test covers the corner-pin case and fails on |
Progress on tscircuit#15. findSameSidePassiveGroups inferred a main-chip pin's side from its offset (|x| vs |y|), which misclassifies corner pins on tall chips: U3.44 at offset (-1.9, 2.0) is declared side x- but reads as y+ from the offset. On the LayoutPipelineSolver06 board this split U3's decoupling caps into an x- group and a phantom y+ group, so C10/C11 (and rail siblings C7/C18) were never grouped with the left-edge rows and packed as loose singles. The declared ChipPin.side is now authoritative, rotated by the chip's fixed rotation; offset inference remains as a fallback for pins without a declared side. All caps on the 06 board now group on x-, and the RP2040 boards keep their existing rows (snapshots unchanged).
a152ef9 to
a53355b
Compare
|
@mohan-bee — rebased onto current Asking about this one specifically because you're the person merging in this repo and it's small: 2 files, +45/-5. Re-verified after the rebase:
Recap of what it fixes, since it's been open a couple of days:
That split U3's decoupling caps into a real The fix treats the declared Happy to close it if the approach isn't what you want for #15 — I'd rather that than have it sit. |
Progress on #15 — fixes the corner-pin misgrouping that leaves caps out of the decoupling rows.
Problem
findSameSidePassiveGroupsinfers a main-chip pin's side from its offset (|x|vs|y|). On tall chips this misclassifies corner pins: on theLayoutPipelineSolver06board,U3.44is declaredside: "x-"(left edge) but sits near the top at offset(-1.9, 2.0), where|y| > |x|reads asy+.This split U3's decoupling caps into an
x-group and a phantomy+group (C18, C7, C10— pinsU3.23/U3.50/U3.44, all actually left-edge pins). Result on the 06 board: C10 and C11 pack as loose singles floating between the cap rows and U3 instead of joining the rows — the "messy" arrangement in the issue screenshot.Fix
The declared
ChipPin.sideis now authoritative (rotated by the chip's fixed rotation); offset inference remains only as a fallback for pins without a declared side.Before/after grouping on the 06 board:
Verification
tests/PackInnerPartitionsSolver/findSameSidePassiveGroups-corner-pins.test.ts(fails onmain: phantomy+group)bun test— 56 pass, 0 fail; RP2040 board snapshots unchanged (their rows were already correct and stay byte-identical)bunx tsc --noEmit/bun run format:check— cleanScoped intentionally small: this fixes the grouping stage only. If you'd like, I can follow up on the row placement for the merged group (C10/C11 vertical spread on the 06 board) as a separate PR so each change stays reviewable.