Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RWRoute] Always clear prev pointer of unpreserved RouteNode-s #1056

Merged
merged 8 commits into from
Sep 20, 2024

Conversation

eddieh-xlnx
Copy link
Collaborator

@eddieh-xlnx eddieh-xlnx commented Sep 10, 2024

Very rare behaviour described below.

Context: Net1 is a fully routed net utilizing a number of nodes (Node1, Node2, Node3, ...)

  1. During clock routing, it's decided that Node1 is needed to complete the clock net, and so the entirety of Net1 is unpreserved, and the result of the clock route is then preserved.
  2. During static net routing, Node2 is determined to be needed to complete a static net. Since Node2 is no longer being preserved, the static net gets to preserve it.

Note that because Node2 was unpreserved previously, it already exists in the routing graph as a RouteNode.

  1. Later, during signal routing, this node breaks the assumption that preserved nodes can only be used by the same net pointed to by its prev pointer.

This PR allows clears this prev pointer so that this assumption is maintained.

@eddieh-xlnx eddieh-xlnx changed the base branch from master to github_actions_upload4 September 13, 2024 21:23
Base automatically changed from github_actions_upload4 to master September 13, 2024 21:47
@eddieh-xlnx eddieh-xlnx merged commit e298a18 into master Sep 20, 2024
14 checks passed
@eddieh-xlnx eddieh-xlnx deleted the rwroute_fix_unpreserve branch September 20, 2024 02:20
eddieh-xlnx added a commit that referenced this pull request Sep 21, 2024
commit 9538212
Author: eddieh-xlnx <[email protected]>
Date:   Fri Sep 20 17:01:46 2024 -0700

    [RWRoute] Cleanup static router and RouterHelper (#1059)

    * [RWRoute] Replace LightweightRouteNode with RouterHelper inner classes

    Signed-off-by: Eddie Hung <[email protected]>

    * Fix typo

    Signed-off-by: Eddie Hung <[email protected]>

    * More renaming

    Signed-off-by: Eddie Hung <[email protected]>

    * Insert sink node into visited set

    Signed-off-by: Eddie Hung <[email protected]>

    * Revert RapidWrightDCP

    Signed-off-by: Eddie Hung <[email protected]>

    * Fix broken tests

    Signed-off-by: Eddie Hung <[email protected]>

    * Try removing RouteNode.equals(Node) too

    Signed-off-by: Eddie Hung <[email protected]>

    * Remove unused RouteNode.flags

    Signed-off-by: Eddie Hung <[email protected]>

    * Remove unused RouterHelper.isInvertibleDSPBELPin()

    Signed-off-by: Eddie Hung <[email protected]>

    * Fix broken assumption with INUSE nodes

    Signed-off-by: Eddie Hung <[email protected]>

    * Cleanup, use ArrayDeque not LinkedList

    Signed-off-by: Eddie Hung <[email protected]>

    * Fix testRouteStaticNet() to avoid site pins, and fix golden values

    Signed-off-by: Eddie Hung <[email protected]>

    * Static router to check INUSE/GND/CC before push, and ...

    ... check for unused LUT outputs on pop

    Signed-off-by: Eddie Hung <[email protected]>

    * Much fewer static GND sources, fewer PIPs

    Signed-off-by: Eddie Hung <[email protected]>

    * Fix testRouteStaticNet() to avoid site pins, and fix golden values

    Signed-off-by: Eddie Hung <[email protected]>

    * Fix value

    Signed-off-by: Eddie Hung <[email protected]>

    * Remove equals() overrides

    Signed-off-by: Eddie Hung <[email protected]>

    * GlobalSignalRouting to not use NodeWithPrev

    Signed-off-by: Eddie Hung <[email protected]>

    * Remove use of RouterHelper.NodeWithDelay

    Signed-off-by: Eddie Hung <[email protected]>

    * Revert "Remove equals() overrides"

    This reverts commit 3809009.

    Signed-off-by: Eddie Hung <[email protected]>

    * Remove commented code

    Signed-off-by: Eddie Hung <[email protected]>

    * Handle case where sink node is already used

    Signed-off-by: Eddie Hung <[email protected]>

    * Revert "Remove commented code"

    This reverts commit 4af0d8e.

    Signed-off-by: Eddie Hung <[email protected]>

    * Uncomment code

    Signed-off-by: Eddie Hung <[email protected]>

    * More refactoring/opt

    Signed-off-by: Eddie Hung <[email protected]>

    * Further reduction in static sources/PIPs

    Signed-off-by: Eddie Hung <[email protected]>

    * Check for routing errors too

    Signed-off-by: Eddie Hung <[email protected]>

    * Allow terminating on routed BOUNCE/BYPASS nodes

    Signed-off-by: Eddie Hung <[email protected]>

    * Sort sinks to be routed by tile

    Signed-off-by: Eddie Hung <[email protected]>

    * Improve re-use further

    Signed-off-by: Eddie Hung <[email protected]>

    * Do not place any static sources in the queue

    Signed-off-by: Eddie Hung <[email protected]>

    * Clarity

    Signed-off-by: Eddie Hung <[email protected]>

    * Add a NodeStatus.PRESERVED, static router to ignore those for now

    FIXME: Use those nodes as a last resort, if we can see the need
    Signed-off-by: Eddie Hung <[email protected]>

    * [PartialRouter] Disable ripup in global/static routing

    Signed-off-by: Eddie Hung <[email protected]>

    * Use net.getPins()

    Signed-off-by: Eddie Hung <[email protected]>

    * Move static net preserving into RouteNodeGraph

    Signed-off-by: Eddie Hung <[email protected]>

    * Add an extra assert

    Signed-off-by: Eddie Hung <[email protected]>

    * Revert "Add a NodeStatus.PRESERVED, static router to ignore those for now"

    This reverts commit 9b49488.

    Signed-off-by: Eddie Hung <[email protected]>

    * [EDIF] Fixes rare bus renaming collision (#1065)

    * [EDIF] Fixes rare bus renaming collision

    Signed-off-by: Chris Lavin <[email protected]>

    * Work-around for both issues, adds test for rare case

    Signed-off-by: Chris Lavin <[email protected]>

    * Minimizes bus suffix usage and resolves incorrect connectivity in MultGenerator

    Signed-off-by: Chris Lavin <[email protected]>

    * Fix comment

    Signed-off-by: Chris Lavin <[email protected]>

    * Update test/src/com/xilinx/rapidwright/edif/TestEDIFNetlist.java

    Co-authored-by: eddieh-xlnx <[email protected]>
    Signed-off-by: Chris Lavin <[email protected]>

    * Fix typo

    Signed-off-by: Chris Lavin <[email protected]>

    ---------

    Signed-off-by: Chris Lavin <[email protected]>
    Co-authored-by: eddieh-xlnx <[email protected]>

    * [PartialRouter] Disable ripup in global/static routing

    Signed-off-by: Eddie Hung <[email protected]>

    * Move static net preserving into RouteNodeGraph

    Signed-off-by: Eddie Hung <[email protected]>

    * Update src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java

    Signed-off-by: eddieh-xlnx <[email protected]>

    ---------

    Signed-off-by: Eddie Hung <[email protected]>
    Signed-off-by: Chris Lavin <[email protected]>
    Signed-off-by: eddieh-xlnx <[email protected]>
    Co-authored-by: Chris Lavin <[email protected]>

commit 04e7c3c
Author: eddieh-xlnx <[email protected]>
Date:   Fri Sep 20 14:48:12 2024 -0700

    [PartialRouter] Disable ripup in global/static routing (#1067)

    * [PartialRouter] Disable ripup in global/static routing

    Signed-off-by: Eddie Hung <[email protected]>

    * Move static net preserving into RouteNodeGraph

    Signed-off-by: Eddie Hung <[email protected]>

    * Update src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java

    Signed-off-by: eddieh-xlnx <[email protected]>

    ---------

    Signed-off-by: Eddie Hung <[email protected]>
    Signed-off-by: eddieh-xlnx <[email protected]>

commit ef2a82d
Author: Chris Lavin <[email protected]>
Date:   Fri Sep 20 09:44:54 2024 -0600

    [EDIF] Fixes rare bus renaming collision (#1065)

    * [EDIF] Fixes rare bus renaming collision

    Signed-off-by: Chris Lavin <[email protected]>

    * Work-around for both issues, adds test for rare case

    Signed-off-by: Chris Lavin <[email protected]>

    * Minimizes bus suffix usage and resolves incorrect connectivity in MultGenerator

    Signed-off-by: Chris Lavin <[email protected]>

    * Fix comment

    Signed-off-by: Chris Lavin <[email protected]>

    * Update test/src/com/xilinx/rapidwright/edif/TestEDIFNetlist.java

    Co-authored-by: eddieh-xlnx <[email protected]>
    Signed-off-by: Chris Lavin <[email protected]>

    * Fix typo

    Signed-off-by: Chris Lavin <[email protected]>

    ---------

    Signed-off-by: Chris Lavin <[email protected]>
    Co-authored-by: eddieh-xlnx <[email protected]>

commit e298a18
Author: eddieh-xlnx <[email protected]>
Date:   Thu Sep 19 19:20:58 2024 -0700

    [RWRoute] Always clear prev pointer of unpreserved RouteNode-s (#1056)

    * Use upload-artifact v4 for checks

    Signed-off-by: Wenhao Lin <[email protected]>

    * Make each uploaded artifact have a unique name

    Signed-off-by: Eddie Hung <[email protected]>

    * Try again

    Signed-off-by: Eddie Hung <[email protected]>

    * [RWRoute] Always clear prev pointer of unpreserved RouteNode-s

    Signed-off-by: Eddie Hung <[email protected]>

    * Tidy

    Signed-off-by: Eddie Hung <[email protected]>

    * Apply suggestions from code review

    Signed-off-by: eddieh-xlnx <[email protected]>

    * Update src/com/xilinx/rapidwright/rwroute/PartialRouter.java

    Signed-off-by: eddieh-xlnx <[email protected]>

    ---------

    Signed-off-by: Wenhao Lin <[email protected]>
    Signed-off-by: Eddie Hung <[email protected]>
    Signed-off-by: eddieh-xlnx <[email protected]>
    Co-authored-by: Wenhao Lin <[email protected]>
eddieh-xlnx added a commit that referenced this pull request Sep 21, 2024
commit 9538212
Author: eddieh-xlnx <[email protected]>
Date:   Fri Sep 20 17:01:46 2024 -0700

    [RWRoute] Cleanup static router and RouterHelper (#1059)

    * [RWRoute] Replace LightweightRouteNode with RouterHelper inner classes

    Signed-off-by: Eddie Hung <[email protected]>

    * Fix typo

    Signed-off-by: Eddie Hung <[email protected]>

    * More renaming

    Signed-off-by: Eddie Hung <[email protected]>

    * Insert sink node into visited set

    Signed-off-by: Eddie Hung <[email protected]>

    * Revert RapidWrightDCP

    Signed-off-by: Eddie Hung <[email protected]>

    * Fix broken tests

    Signed-off-by: Eddie Hung <[email protected]>

    * Try removing RouteNode.equals(Node) too

    Signed-off-by: Eddie Hung <[email protected]>

    * Remove unused RouteNode.flags

    Signed-off-by: Eddie Hung <[email protected]>

    * Remove unused RouterHelper.isInvertibleDSPBELPin()

    Signed-off-by: Eddie Hung <[email protected]>

    * Fix broken assumption with INUSE nodes

    Signed-off-by: Eddie Hung <[email protected]>

    * Cleanup, use ArrayDeque not LinkedList

    Signed-off-by: Eddie Hung <[email protected]>

    * Fix testRouteStaticNet() to avoid site pins, and fix golden values

    Signed-off-by: Eddie Hung <[email protected]>

    * Static router to check INUSE/GND/CC before push, and ...

    ... check for unused LUT outputs on pop

    Signed-off-by: Eddie Hung <[email protected]>

    * Much fewer static GND sources, fewer PIPs

    Signed-off-by: Eddie Hung <[email protected]>

    * Fix testRouteStaticNet() to avoid site pins, and fix golden values

    Signed-off-by: Eddie Hung <[email protected]>

    * Fix value

    Signed-off-by: Eddie Hung <[email protected]>

    * Remove equals() overrides

    Signed-off-by: Eddie Hung <[email protected]>

    * GlobalSignalRouting to not use NodeWithPrev

    Signed-off-by: Eddie Hung <[email protected]>

    * Remove use of RouterHelper.NodeWithDelay

    Signed-off-by: Eddie Hung <[email protected]>

    * Revert "Remove equals() overrides"

    This reverts commit 3809009.

    Signed-off-by: Eddie Hung <[email protected]>

    * Remove commented code

    Signed-off-by: Eddie Hung <[email protected]>

    * Handle case where sink node is already used

    Signed-off-by: Eddie Hung <[email protected]>

    * Revert "Remove commented code"

    This reverts commit 4af0d8e.

    Signed-off-by: Eddie Hung <[email protected]>

    * Uncomment code

    Signed-off-by: Eddie Hung <[email protected]>

    * More refactoring/opt

    Signed-off-by: Eddie Hung <[email protected]>

    * Further reduction in static sources/PIPs

    Signed-off-by: Eddie Hung <[email protected]>

    * Check for routing errors too

    Signed-off-by: Eddie Hung <[email protected]>

    * Allow terminating on routed BOUNCE/BYPASS nodes

    Signed-off-by: Eddie Hung <[email protected]>

    * Sort sinks to be routed by tile

    Signed-off-by: Eddie Hung <[email protected]>

    * Improve re-use further

    Signed-off-by: Eddie Hung <[email protected]>

    * Do not place any static sources in the queue

    Signed-off-by: Eddie Hung <[email protected]>

    * Clarity

    Signed-off-by: Eddie Hung <[email protected]>

    * Add a NodeStatus.PRESERVED, static router to ignore those for now

    FIXME: Use those nodes as a last resort, if we can see the need
    Signed-off-by: Eddie Hung <[email protected]>

    * [PartialRouter] Disable ripup in global/static routing

    Signed-off-by: Eddie Hung <[email protected]>

    * Use net.getPins()

    Signed-off-by: Eddie Hung <[email protected]>

    * Move static net preserving into RouteNodeGraph

    Signed-off-by: Eddie Hung <[email protected]>

    * Add an extra assert

    Signed-off-by: Eddie Hung <[email protected]>

    * Revert "Add a NodeStatus.PRESERVED, static router to ignore those for now"

    This reverts commit 9b49488.

    Signed-off-by: Eddie Hung <[email protected]>

    * [EDIF] Fixes rare bus renaming collision (#1065)

    * [EDIF] Fixes rare bus renaming collision

    Signed-off-by: Chris Lavin <[email protected]>

    * Work-around for both issues, adds test for rare case

    Signed-off-by: Chris Lavin <[email protected]>

    * Minimizes bus suffix usage and resolves incorrect connectivity in MultGenerator

    Signed-off-by: Chris Lavin <[email protected]>

    * Fix comment

    Signed-off-by: Chris Lavin <[email protected]>

    * Update test/src/com/xilinx/rapidwright/edif/TestEDIFNetlist.java

    Co-authored-by: eddieh-xlnx <[email protected]>
    Signed-off-by: Chris Lavin <[email protected]>

    * Fix typo

    Signed-off-by: Chris Lavin <[email protected]>

    ---------

    Signed-off-by: Chris Lavin <[email protected]>
    Co-authored-by: eddieh-xlnx <[email protected]>

    * [PartialRouter] Disable ripup in global/static routing

    Signed-off-by: Eddie Hung <[email protected]>

    * Move static net preserving into RouteNodeGraph

    Signed-off-by: Eddie Hung <[email protected]>

    * Update src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java

    Signed-off-by: eddieh-xlnx <[email protected]>

    ---------

    Signed-off-by: Eddie Hung <[email protected]>
    Signed-off-by: Chris Lavin <[email protected]>
    Signed-off-by: eddieh-xlnx <[email protected]>
    Co-authored-by: Chris Lavin <[email protected]>

commit 04e7c3c
Author: eddieh-xlnx <[email protected]>
Date:   Fri Sep 20 14:48:12 2024 -0700

    [PartialRouter] Disable ripup in global/static routing (#1067)

    * [PartialRouter] Disable ripup in global/static routing

    Signed-off-by: Eddie Hung <[email protected]>

    * Move static net preserving into RouteNodeGraph

    Signed-off-by: Eddie Hung <[email protected]>

    * Update src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java

    Signed-off-by: eddieh-xlnx <[email protected]>

    ---------

    Signed-off-by: Eddie Hung <[email protected]>
    Signed-off-by: eddieh-xlnx <[email protected]>

commit ef2a82d
Author: Chris Lavin <[email protected]>
Date:   Fri Sep 20 09:44:54 2024 -0600

    [EDIF] Fixes rare bus renaming collision (#1065)

    * [EDIF] Fixes rare bus renaming collision

    Signed-off-by: Chris Lavin <[email protected]>

    * Work-around for both issues, adds test for rare case

    Signed-off-by: Chris Lavin <[email protected]>

    * Minimizes bus suffix usage and resolves incorrect connectivity in MultGenerator

    Signed-off-by: Chris Lavin <[email protected]>

    * Fix comment

    Signed-off-by: Chris Lavin <[email protected]>

    * Update test/src/com/xilinx/rapidwright/edif/TestEDIFNetlist.java

    Co-authored-by: eddieh-xlnx <[email protected]>
    Signed-off-by: Chris Lavin <[email protected]>

    * Fix typo

    Signed-off-by: Chris Lavin <[email protected]>

    ---------

    Signed-off-by: Chris Lavin <[email protected]>
    Co-authored-by: eddieh-xlnx <[email protected]>

commit e298a18
Author: eddieh-xlnx <[email protected]>
Date:   Thu Sep 19 19:20:58 2024 -0700

    [RWRoute] Always clear prev pointer of unpreserved RouteNode-s (#1056)

    * Use upload-artifact v4 for checks

    Signed-off-by: Wenhao Lin <[email protected]>

    * Make each uploaded artifact have a unique name

    Signed-off-by: Eddie Hung <[email protected]>

    * Try again

    Signed-off-by: Eddie Hung <[email protected]>

    * [RWRoute] Always clear prev pointer of unpreserved RouteNode-s

    Signed-off-by: Eddie Hung <[email protected]>

    * Tidy

    Signed-off-by: Eddie Hung <[email protected]>

    * Apply suggestions from code review

    Signed-off-by: eddieh-xlnx <[email protected]>

    * Update src/com/xilinx/rapidwright/rwroute/PartialRouter.java

    Signed-off-by: eddieh-xlnx <[email protected]>

    ---------

    Signed-off-by: Wenhao Lin <[email protected]>
    Signed-off-by: Eddie Hung <[email protected]>
    Signed-off-by: eddieh-xlnx <[email protected]>
    Co-authored-by: Wenhao Lin <[email protected]>

Signed-off-by: Eddie Hung <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants