Skip to content

Repro: maxViaCount is dropped from autorouter input - #3363

Open
MustafaMulla29 wants to merge 8 commits into
mainfrom
repro/max-via-count-dropped-from-srj
Open

Repro: maxViaCount is dropped from autorouter input#3363
MustafaMulla29 wants to merge 8 commits into
mainfrom
repro/max-via-count-dropped-from-srj

Conversation

@MustafaMulla29

@MustafaMulla29 MustafaMulla29 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • adds a standalone tests/repros/repro-rp2040-crystal-max-via-count.test.tsx; the existing primitive trace-max-via-count test remains unchanged
  • uses the default autorouter with the RP2040 module crystal-area layout
  • copies the real RP2040 QFN footprint, crystal, load capacitors, core capacitor, IOVDD decoupling capacitors, PCB positions, and local power/ground connections
  • explicitly asserts that XIN, XOUT, CXIN, and CXOUT receive source_trace.max_via_count: 0 from the four-pin crystal
  • uses PCB notes to explain the expected zero-via constraint, the dropped router-input limit, and the resulting two-via route
  • includes a red PCB-note arrow pointing to the renderer’s DRC diamond in the normal full-board snapshot
  • visually reproduces PCB trace uses 2 vias, exceeding the 0 maximum
  • remains test.failing, so this PR contains only the regression reproduction

Why this matters

The crystal applies a zero-via constraint to its XIN/XOUT signals. Core preserves it as source_trace.max_via_count but drops it while creating the autorouter input. The default autorouter therefore chooses a legal two-via path without knowing that vias are forbidden, and DRC reports the violation only after routing.

Testing

  • bun test tests/components/primitive-components/trace-max-via-count.test.tsx tests/repros/repro-rp2040-crystal-max-via-count.test.tsx
  • bunx biome check tests/components/primitive-components/trace-max-via-count.test.tsx tests/repros/repro-rp2040-crystal-max-via-count.test.tsx

Related

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview Aug 21, 2026 3:43pm

Request Review

@github-actions

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

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.

1 participant