Skip to content

Commit

Permalink
Minor RWRoute and UltraScaleClockRouting fixes (#829)
Browse files Browse the repository at this point in the history
* [UltraScaleClockRouting] Disallow ability VROUTE -> HROUTE

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

* [RWRoute] saveRouting() to detect invalid backtracking

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

---------

Signed-off-by: Eddie Hung <[email protected]>
  • Loading branch information
eddieh-xlnx authored Sep 20, 2023
1 parent fbac35d commit 95c7a51
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/com/xilinx/rapidwright/router/UltraScaleClockRouting.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ public static RouteNode routeToCentroid(Net clk, RouteNode startingRouteNode, Cl
for (Wire w : curr.getWireConnections()) {
RouteNode parent = curr.getParent();
if (parent != null) {
if (parent.getIntentCode() == IntentCode.NODE_GLOBAL_VROUTE &&
w.getIntentCode() == IntentCode.NODE_GLOBAL_HROUTE) {
// Disallow ability to go from VROUTE back to HROUTE
continue;
}
if (w.getIntentCode() == IntentCode.NODE_GLOBAL_VDISTR &&
curr.getIntentCode() == IntentCode.NODE_GLOBAL_VROUTE &&
parent.getIntentCode() == IntentCode.NODE_GLOBAL_VROUTE &&
Expand Down
6 changes: 5 additions & 1 deletion src/com/xilinx/rapidwright/rwroute/RWRoute.java
Original file line number Diff line number Diff line change
Expand Up @@ -1414,11 +1414,15 @@ private boolean saveRouting(Connection connection, RouteNode rnode) {

RouteNode sourceRnode = rnodes.get(rnodes.size()-1);
if (!sourceRnode.equals(connection.getSourceRnode())) {
if (!sourceRnode.equals(connection.getAltSourceRnode())) {
// Didn't backtrack to alternate source either -- invalid routing
return false;
}

// Used source node is different to the one set on the connection
Net net = connection.getNetWrapper().getNet();

// Update connection's source SPI
assert(sourceRnode.equals(connection.getAltSourceRnode()));
if (connection.getSource() == net.getSource()) {
// Swap to alternate source
connection.setSource(net.getAlternateSource());
Expand Down

0 comments on commit 95c7a51

Please sign in to comment.