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

[NetTools] Add check for net driving clock sinks #1117

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/com/xilinx/rapidwright/design/NetTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,18 @@ public static List<NodeTree> 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;
eddieh-xlnx marked this conversation as resolved.
Show resolved Hide resolved
}
return false;
}
}
3 changes: 2 additions & 1 deletion src/com/xilinx/rapidwright/design/tools/RelocationTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
Loading