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

[CUFR] CUFR and PartialCUFR to default to --hus #1111

Merged
merged 1 commit into from
Nov 23, 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
28 changes: 27 additions & 1 deletion src/com/xilinx/rapidwright/rwroute/CUFR.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,28 @@ protected void routeIndirectConnections(Collection<Connection> connections) {
}

/**
* Routes a {@link Design} instance.
* Routes a design in the full timing-driven routing mode using CUFR.
* @param design The {@link Design} instance to be routed.
*/
public static Design routeDesignFullTimingDriven(Design design) {
return routeDesignWithUserDefinedArguments(design, new String[] {
"--hus"
});
}

/**
* Routes a design in the full non-timing-driven routing mode using CUFR.
* @param design The {@link Design} instance to be routed.
*/
public static Design routeDesignFullNonTimingDriven(Design design) {
return routeDesignWithUserDefinedArguments(design, new String[] {
"--hus",
"--nonTimingDriven"
});
}

/**
* Routes a {@link Design} instance using CUFR.
* @param design The {@link Design} instance to be routed.
* @param args An array of string arguments, can be null.
* If null, the design will be routed in the full timing-driven routing mode with default a {@link RWRouteConfig} instance.
Expand All @@ -174,6 +195,11 @@ public static Design routeDesignWithUserDefinedArguments(Design design, String[]
// Instantiates a RWRouteConfig Object and parses the arguments.
// Uses the default configuration if basic usage only.
RWRouteConfig config = new RWRouteConfig(args);

if (!config.isHus()) {
System.err.println("WARNING: Hybrid Updating Strategy (HUS) is not enabled.");
}

return routeDesign(design, new CUFR(design, config));
}

Expand Down
51 changes: 51 additions & 0 deletions src/com/xilinx/rapidwright/rwroute/PartialCUFR.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,53 @@ protected void printRoutingStatistics() {
super.printRoutingStatistics();
}

/**
* Routes a design in the partial non-timing-driven routing mode.
* @param design The {@link Design} instance to be routed.
* @param pinsToRoute Collection of {@link SitePinInst}-s to be routed. If null, route all unrouted pins in the design.
*/
public static Design routeDesignPartialNonTimingDriven(Design design, Collection<SitePinInst> pinsToRoute) {
boolean softPreserve = false;
return routeDesignPartialNonTimingDriven(design, pinsToRoute, softPreserve);
}

/**
* Routes a design in the partial non-timing-driven routing mode using CUFR.
* @param design The {@link Design} instance to be routed.
* @param pinsToRoute Collection of {@link SitePinInst}-s to be routed. If null, route all unrouted pins in the design.
* @param softPreserve Allow routed nets to be unrouted and subsequently rerouted in order to improve routability.
*/
public static Design routeDesignPartialNonTimingDriven(Design design, Collection<SitePinInst> pinsToRoute, boolean softPreserve) {
return routeDesignWithUserDefinedArguments(design, new String[] {
"--hus",
"--fixBoundingBox",
// use U-turn nodes and no masking of nodes cross RCLK
// Pros: maximum routability
// Con: might result in delay optimism and a slight increase in runtime
"--useUTurnNodes",
"--nonTimingDriven",
"--verbose"},
pinsToRoute, softPreserve);
}

/**
* Routes a design in the partial timing-driven routing mode using CUFR.
* @param design The {@link Design} instance to be routed.
* @param pinsToRoute Collection of {@link SitePinInst}-s to be routed. If null, route all unrouted pins in the design.
* @param softPreserve Allow routed nets to be unrouted and subsequently rerouted in order to improve routability.
*/
public static Design routeDesignPartialTimingDriven(Design design, Collection<SitePinInst> pinsToRoute, boolean softPreserve) {
return routeDesignWithUserDefinedArguments(design, new String[] {
"--hus",
"--fixBoundingBox",
// use U-turn nodes and no masking of nodes cross RCLK
// Pros: maximum routability
// Con: might result in delay optimism and a slight increase in runtime
"--useUTurnNodes",
"--verbose"},
pinsToRoute, softPreserve);
}

/**
* Partially routes a {@link Design} instance; specifically, all nets with no routing PIPs already present.
* @param design The {@link Design} instance to be routed.
Expand Down Expand Up @@ -194,6 +241,10 @@ public static Design routeDesignWithUserDefinedArguments(Design design,
System.out.println("WARNING: Masking nodes across RCLK for partial routing could result in routability problems.");
}

if (!config.isHus()) {
System.err.println("WARNING: Hybrid Updating Strategy (HUS) is not enabled.");
}

return routeDesign(design, new PartialCUFR(design, config, pinsToRoute, softPreserve));
}

Expand Down
Loading