Skip to content

Improve decoupling cap main-pin layout#101

Open
Iineman2 wants to merge 2 commits into
tscircuit:mainfrom
Iineman2:codex/main-pin-decoupling-cap-layout
Open

Improve decoupling cap main-pin layout#101
Iineman2 wants to merge 2 commits into
tscircuit:mainfrom
Iineman2:codex/main-pin-decoupling-cap-layout

Conversation

@Iineman2
Copy link
Copy Markdown

@Iineman2 Iineman2 commented May 12, 2026

Summary

  • add a deterministic fast path for decoupling_caps partitions instead of sending tiny bypass-cap groups through the generic packer
  • order caps by their strongly connected main-chip pin coordinate when that context is available, with natural chip-id fallback when it is not
  • compute spacing from the chip body plus pin envelope so protruding pads cannot overlap in the generated row
  • add focused solver coverage for x-side/y-side main-pin ordering, pin-envelope spacing, and fallback ordering
  • pin circuit-to-svg to a version that exports the schematic simulation helper required by the existing test suite, making CI runnable again

/claim #15

Verification

  • npm exec --yes bun -- test tests/PackInnerPartitionsSolver/decoupling-cap-main-pin-layout.test.ts
  • npm exec --yes bun -- test
  • npm exec --yes bun -- x tsc --noEmit
  • npm exec --yes bun -- run build
  • npm exec --yes bun -- x biome format package.json lib/solvers/PackInnerPartitionsSolver/SingleInnerPartitionPackingSolver.ts tests/PackInnerPartitionsSolver/decoupling-cap-main-pin-layout.test.ts
  • git diff --check

@Iineman2 Iineman2 force-pushed the codex/main-pin-decoupling-cap-layout branch from 971079e to 4636c9a Compare May 12, 2026 08:13
@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

@Iineman2 is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

@MattCrossingham
Copy link
Copy Markdown

Nice work on the CI fix and the deterministic layout, @Iineman2! I had a similar approach in #92, but yours is cleaner with the dependency pin. I've closed my layout PR to keep things tidy for the maintainers. Once yours is merged, I'll rebase my Trace Alignment logic (#98) on top of it so they work together.

@Iineman2
Copy link
Copy Markdown
Author

Iineman2 commented May 12, 2026

Added an extra quality pass on the decoupling-cap layout work:

  • decoupling-cap-only partitions now inherit the group's allowed power/ground nets from strongly connected main-chip pins, so the cap pins retain VCC/GND identity even when the main chip is excluded from the partition
  • unrelated external nets are intentionally not copied into the cap partition
  • cap ordering now prefers the positive-voltage main pin when a capacitor has both power and ground strong connections, which makes the layout more stable for real decap pin ordering
  • added regression coverage for inherited decap nets and voltage-aware main-pin ordering

Local verification:

  • npx --yes bun test tests\\ChipPartitionsSolver.test.ts tests\\PackInnerPartitionsSolver\\decoupling-cap-main-pin-layout.test.ts -> 10 pass
  • npx --yes bun test -> 24 pass, 1 skip
  • npx --yes bun x tsc --noEmit -> pass
  • npx --yes bun run build -> pass
  • git diff --check -> pass

CI after the latest push: test, format-check, and type-check are passing. The remaining red Vercel status is the usual tscircuit team authorization gate for fork PRs.

@Iineman2 Iineman2 force-pushed the codex/main-pin-decoupling-cap-layout branch from 3ef7a23 to b76fde2 Compare May 12, 2026 13:26
@Iineman2 Iineman2 force-pushed the codex/main-pin-decoupling-cap-layout branch from b76fde2 to 66683c6 Compare May 12, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants