diff --git a/src/com/xilinx/rapidwright/rwroute/GlobalSignalRouting.java b/src/com/xilinx/rapidwright/rwroute/GlobalSignalRouting.java index a4e48fa08..730af8850 100644 --- a/src/com/xilinx/rapidwright/rwroute/GlobalSignalRouting.java +++ b/src/com/xilinx/rapidwright/rwroute/GlobalSignalRouting.java @@ -196,30 +196,16 @@ private static Map> getListOfNodesFromRoutes(Device device, M */ public static void symmetricClkRouting(Net clk, Device device, Function getNodeStatus) { if (device.getSeries() != Series.Versal) { - boolean debug = true; List clockRegions = getClockRegionsOfNet(clk); ClockRegion centroid = findCentroid(clk, device); - if (debug) { - System.out.println("centroid CR: " + centroid); - } - List upClockRegions = new ArrayList<>(); List downClockRegions = new ArrayList<>(); // divides clock regions into two groups divideClockRegions(clockRegions, centroid, upClockRegions, downClockRegions); RouteNode clkRoutingLine = UltraScaleClockRouting.routeBUFGToNearestRoutingTrack(clk);// first HROUTE - - if (debug) { - System.out.println("clkRoutingLine: " + clkRoutingLine); - } - RouteNode centroidHRouteNode = UltraScaleClockRouting.routeToCentroid(clk, clkRoutingLine, centroid, true, true); - - if (debug) { - System.out.println("centroidHRouteNode: " + centroidHRouteNode); - } RouteNode vrouteUp = null; RouteNode vrouteDown; @@ -227,16 +213,9 @@ public static void symmetricClkRouting(Net clk, Device device, Function upDownDistLines = new ArrayList<>(); if (aboveCentroid != null) { List upLines = UltraScaleClockRouting.routeToHorizontalDistributionLines(clk, vrouteUp, upClockRegions, false, getNodeStatus); @@ -363,53 +342,31 @@ public static Map> getLCBPinMappings(List startNodes = new ArrayList<>(); - - if (intNode.getIntentCode() == IntentCode.NODE_IMUX) { - // This node drives a LUT input pin. Vivado reaches this pin in pattern: - // NODE_GLOBAL_LEAF -> NODE_CLE_CNODE -> NODE_INODE -> NODE_IMUX - // Need to go one more step to let prevPrev be a NODE_GLOBAL_LEAF node. - - // And, it seems that each NODE_INODE node is driven by only one NODE_CLE_CNODE node, - // but not each NODE_CLE_CNODE node can find a uphill NODE_GLOBAL_LEAF node, - // thus here I add all NODE_INODE nodes to ensure that we can find candidates. - Tile intTile = intNode.getTile(); - for (Node uphill: intNode.getAllUphillNodes()) { - if (uphill.getIntentCode() == IntentCode.NODE_INODE && uphill.getTile() == intTile) { - startNodes.add(uphill); - } + + outer: for (Node prev : intNode.getAllUphillNodes()) { + NodeStatus prevNodeStatus = getNodeStatus.apply(prev); + if (prevNodeStatus == NodeStatus.UNAVAILABLE) { + continue; } - } else { - assert(intNode.getIntentCode() == IntentCode.NODE_CLE_CTRL || intNode.getIntentCode() == IntentCode.NODE_INTF_CTRL); - startNodes.add(intNode); - } - outer: for (Node startNode: startNodes) { - for (Node prev : startNode.getAllUphillNodes()) { - NodeStatus prevNodeStatus = getNodeStatus.apply(prev); - if (prevNodeStatus == NodeStatus.UNAVAILABLE) { + for (Node prevPrev : prev.getAllUphillNodes()) { + if (prevPrev.getIntentCode() != IntentCode.NODE_GLOBAL_LEAF) { continue; } - - for (Node prevPrev : prev.getAllUphillNodes()) { - if (prevPrev.getIntentCode() != IntentCode.NODE_GLOBAL_LEAF) { - continue; - } - - NodeStatus prevPrevNodeStatus = getNodeStatus.apply(prevPrev); - if (prevPrevNodeStatus == NodeStatus.UNAVAILABLE) { - continue; - } - - if (usedLcbs.contains(prevPrev) || prevPrevNodeStatus == NodeStatus.INUSE) { - lcbCandidates.clear(); - lcbCandidates.add(prevPrev); - break outer; - } - - assert(prevPrevNodeStatus == NodeStatus.AVAILABLE); + + NodeStatus prevPrevNodeStatus = getNodeStatus.apply(prevPrev); + if (prevPrevNodeStatus == NodeStatus.UNAVAILABLE) { + continue; + } + + if (usedLcbs.contains(prevPrev) || prevPrevNodeStatus == NodeStatus.INUSE) { + lcbCandidates.clear(); lcbCandidates.add(prevPrev); + break outer; } + + assert(prevPrevNodeStatus == NodeStatus.AVAILABLE); + lcbCandidates.add(prevPrev); } }