fix: prevent net-label-only nets from being routed as trace pairs#340
Open
tungnguyentu wants to merge 1 commit into
Open
fix: prevent net-label-only nets from being routed as trace pairs#340tungnguyentu wants to merge 1 commit into
tungnguyentu wants to merge 1 commit into
Conversation
…circuit#79) Root cause: `getConnectivityMapsFromInputProblem` passed `directConnMap.netMap` by reference, so `netConnMap.addConnections()` mutated `directConnMap.netMap`. This caused `MspConnectionPairSolver` to queue net-only nets for routing. Fix: - Shallow-copy netMap when building `netConnMap` to prevent aliasing - Filter `queuedDcNetIds` to only include nets with at least one pin in a direct connection (net-only nets are handled by NetLabelPlacementSolver) Adds regression tests covering: net-only-only scenario produces 0 MSP pairs, direct connections still route, mixed scenario routes only direct nets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Fixes #79
/claim #79
Root Cause
getConnectivityMapsFromInputProblemconstructednetConnMapwith a direct reference todirectConnMap.netMap. WhennetConnMap.addConnections()ran for net connections, it also mutateddirectConnMap.netMap— so net-only connections appeared indcConnMap, causingMspConnectionPairSolverto create MSP trace pairs for pins connected only vianetConnections.Fix
Shallow-copy
netMapwhen constructingnetConnMap:Filter
queuedDcNetIdsto only include nets with at least one pin in adirectConnection. Net-only nets are handled byNetLabelPlacementSolver, not by trace routing.Tests
MspConnectionPairSolver_netLabelOnly.test.ts— 3 regression tests:MspConnectionPairSolver_repro1assertion from 4 → 2 pairs (GND is net-only in that fixture, so it should not be routed)