Skip to content

Commit

Permalink
Call deferred preserveNet even if no static routing
Browse files Browse the repository at this point in the history
Signed-off-by: Eddie Hung <[email protected]>
  • Loading branch information
eddieh-xlnx committed Nov 15, 2024
1 parent baf1f37 commit 80a6b07
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions src/com/xilinx/rapidwright/rwroute/RWRoute.java
Original file line number Diff line number Diff line change
Expand Up @@ -530,19 +530,20 @@ protected void addStaticNetRoutingTargets(Net staticNet) {
* Routes static nets.
*/
protected void routeStaticNets() {
if (staticNetAndRoutingTargets.isEmpty())
return;

Net vccNet = design.getVccNet();
Net gndNet = design.getGndNet();
List<SitePinInst> gndPins = staticNetAndRoutingTargets.get(gndNet);
if (gndPins != null) {
boolean invertGndToVccForLutInputs = config.isInvertGndToVccForLutInputs();
Set<SitePinInst> newVccPins = RouterHelper.invertPossibleGndPinsToVccPins(design, gndPins, invertGndToVccForLutInputs);
if (!newVccPins.isEmpty()) {
gndPins.removeAll(newVccPins);
staticNetAndRoutingTargets.computeIfAbsent(vccNet, (net) -> new ArrayList<>())
.addAll(newVccPins);

boolean noStaticRouting = staticNetAndRoutingTargets.isEmpty();
if (!noStaticRouting) {
List<SitePinInst> gndPins = staticNetAndRoutingTargets.get(gndNet);
if (gndPins != null) {
boolean invertGndToVccForLutInputs = config.isInvertGndToVccForLutInputs();
Set<SitePinInst> newVccPins = RouterHelper.invertPossibleGndPinsToVccPins(design, gndPins, invertGndToVccForLutInputs);
if (!newVccPins.isEmpty()) {
gndPins.removeAll(newVccPins);
staticNetAndRoutingTargets.computeIfAbsent(vccNet, (net) -> new ArrayList<>())
.addAll(newVccPins);
}
}
}

Expand All @@ -568,6 +569,10 @@ protected void routeStaticNets() {
preserveNet(staticNet, false);
}

if (noStaticRouting) {
return;
}

for (Map.Entry<Net,List<SitePinInst>> e : staticNetAndRoutingTargets.entrySet()) {
Net staticNet = e.getKey();
List<SitePinInst> pins = e.getValue();
Expand Down

0 comments on commit 80a6b07

Please sign in to comment.