From 80a6b079b2aed36da45bc57cc24cdf277b5ecbe3 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Fri, 15 Nov 2024 00:21:55 -0800 Subject: [PATCH] Call deferred preserveNet even if no static routing Signed-off-by: Eddie Hung --- .../xilinx/rapidwright/rwroute/RWRoute.java | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RWRoute.java b/src/com/xilinx/rapidwright/rwroute/RWRoute.java index 7985fe084..ced3640a9 100644 --- a/src/com/xilinx/rapidwright/rwroute/RWRoute.java +++ b/src/com/xilinx/rapidwright/rwroute/RWRoute.java @@ -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 gndPins = staticNetAndRoutingTargets.get(gndNet); - if (gndPins != null) { - boolean invertGndToVccForLutInputs = config.isInvertGndToVccForLutInputs(); - Set 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 gndPins = staticNetAndRoutingTargets.get(gndNet); + if (gndPins != null) { + boolean invertGndToVccForLutInputs = config.isInvertGndToVccForLutInputs(); + Set newVccPins = RouterHelper.invertPossibleGndPinsToVccPins(design, gndPins, invertGndToVccForLutInputs); + if (!newVccPins.isEmpty()) { + gndPins.removeAll(newVccPins); + staticNetAndRoutingTargets.computeIfAbsent(vccNet, (net) -> new ArrayList<>()) + .addAll(newVccPins); + } } } @@ -568,6 +569,10 @@ protected void routeStaticNets() { preserveNet(staticNet, false); } + if (noStaticRouting) { + return; + } + for (Map.Entry> e : staticNetAndRoutingTargets.entrySet()) { Net staticNet = e.getKey(); List pins = e.getValue();