Skip to content

Commit

Permalink
RouteNodeGraph.allowRoutethru() to ignore NODE_PINFEED targets
Browse files Browse the repository at this point in the history
Signed-off-by: Eddie Hung <[email protected]>
  • Loading branch information
eddieh-xlnx committed Oct 23, 2024
1 parent ab908c2 commit d9927c2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/com/xilinx/rapidwright/rwroute/RouteNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ private void setBaseCost() {
case PINFEED_O:
// Only setBaseCost() is called on creation; getBaseCost() should
// never be called
assert(getLength() == 0);
assert(getLength() == 0 ||
(getLength() <= 3 && (getIntentCode() == IntentCode.NODE_INTF2 || getIntentCode() == IntentCode.NODE_INTF4)));
break;
default:
throw new RuntimeException(getType().toString());
Expand Down
14 changes: 13 additions & 1 deletion src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ public class RouteNodeGraph {
protected final static int MAX_OCCUPANCY = 256;
protected final float[] presentCongestionCosts;

protected final boolean isVersal;

protected static int getTileCount(Design design) {
Device device = design.getDevice();
return device.getColumns() * device.getRows();
Expand Down Expand Up @@ -289,6 +291,7 @@ public RouteNodeGraph(Design design, RWRouteConfig config) {
}

presentCongestionCosts = new float[MAX_OCCUPANCY];
isVersal = series == Series.Versal;
}

public void initialize() {
Expand Down Expand Up @@ -353,7 +356,7 @@ public void preserve(Net net, List<SitePinInst> pins) {
String pinName = pin.getName();
char lutLetter = pinName.charAt(0);
String otherPinName = null;
String otherPinNameSuffix = design.getSeries() == Series.Versal ? "Q" : "MUX";
String otherPinNameSuffix = isVersal ? "Q" : "MUX";
if (pinName.endsWith(otherPinNameSuffix)) {
otherPinName = lutLetter + "_O";
} else if (pinName.endsWith("_O")) {
Expand Down Expand Up @@ -653,6 +656,15 @@ protected boolean allowRoutethru(Node head, Node tail) {
return false;
}

if (tail.getIntentCode() == IntentCode.NODE_PINFEED) {
assert(isVersal);
assert(head.getIntentCode() == IntentCode.NODE_IMUX ||
head.getIntentCode() == IntentCode.NODE_PINBOUNCE ||
head.getIntentCode() == IntentCode.NODE_CLE_CTRL ||
head.getIntentCode() == IntentCode.NODE_INTF_CTRL);
return false;
}

// Should not get to this point unless LUT routethru-s are enabled
assert(lutRoutethru);

Expand Down

0 comments on commit d9927c2

Please sign in to comment.