From 510a87ff9a358e5dc8a0100eea34820e70e49c4f Mon Sep 17 00:00:00 2001 From: Chris Lavin Date: Mon, 2 Dec 2024 16:38:51 -0700 Subject: [PATCH] Remove reliance on gap routing test (#1117) Signed-off-by: Chris Lavin --- src/com/xilinx/rapidwright/design/NetTools.java | 14 ++++++++++++++ .../rapidwright/design/tools/RelocationTools.java | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/com/xilinx/rapidwright/design/NetTools.java b/src/com/xilinx/rapidwright/design/NetTools.java index 827a6d18e..8b8658780 100644 --- a/src/com/xilinx/rapidwright/design/NetTools.java +++ b/src/com/xilinx/rapidwright/design/NetTools.java @@ -144,4 +144,18 @@ public static List getNodeTrees(Net net) { return subtrees; } + + /** + * Checks if the provided net drives a clock site pin input. + * + * @param net The net to examine. + * @return True if the net has a site pin clock input, false otherwise. + */ + public static boolean hasClockSinks(Net net) { + for (SitePinInst sink : net.getPins()) { + if (sink.isOutPin()) continue; + if (sink.getName().contains("CLK")) return true; + } + return false; + } } diff --git a/src/com/xilinx/rapidwright/design/tools/RelocationTools.java b/src/com/xilinx/rapidwright/design/tools/RelocationTools.java index 93db9e7bc..9ac37c335 100644 --- a/src/com/xilinx/rapidwright/design/tools/RelocationTools.java +++ b/src/com/xilinx/rapidwright/design/tools/RelocationTools.java @@ -39,6 +39,7 @@ import com.xilinx.rapidwright.design.DesignTools; import com.xilinx.rapidwright.design.Module; import com.xilinx.rapidwright.design.Net; +import com.xilinx.rapidwright.design.NetTools; import com.xilinx.rapidwright.design.SiteInst; import com.xilinx.rapidwright.design.SitePinInst; import com.xilinx.rapidwright.design.blocks.PBlock; @@ -284,7 +285,7 @@ public static boolean relocate(Design design, } } - boolean isClockNet = n.isClockNet() || n.hasGapRouting(); + boolean isClockNet = n.isClockNet() || NetTools.hasClockSinks(n); n.getPIPs().removeIf((sp) -> { Tile st = sp.getTile(); Tile dt = st.getTileXYNeighbor(tileColOffset, tileRowOffset);