From d77b7c50d6436a9850b509470418f37dc12e3370 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Fri, 12 Jul 2024 11:23:35 -0700 Subject: [PATCH 01/17] [RWRoute] Adjust base costs Signed-off-by: Eddie Hung --- .../xilinx/rapidwright/rwroute/RouteNode.java | 51 +++++++------------ .../rapidwright/rwroute/TestRWRoute.java | 38 +++++++------- 2 files changed, 38 insertions(+), 51 deletions(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNode.java b/src/com/xilinx/rapidwright/rwroute/RouteNode.java index 42c380d35..f022a7e1e 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNode.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNode.java @@ -144,19 +144,8 @@ protected void setChildren(RuntimeTracker setChildrenTimer) { } private void setBaseCost() { - baseCost = 0.4f; + baseCost = 0.2f; switch (type) { - case LAGUNA_I: - // Make all approaches to SLLs zero-cost to encourage exploration - // Assigning a base cost of zero would normally break congestion resolution - // (since RWroute.getNodeCost() would return zero) but doing it here should be - // okay because this node only leads to a SLL which will have a non-zero base cost - baseCost = 0.0f; - break; - case SUPER_LONG_LINE: - assert(length == RouteNodeGraph.SUPER_LONG_LINE_LENGTH_IN_TILES); - baseCost = 0.3f * length; - break; case WIRE: // NOTE: IntentCode is device-dependent IntentCode ic = getIntentCode(); @@ -173,46 +162,44 @@ private void setBaseCost() { assert(length <= 1); break; case NODE_SINGLE: - assert(length <= 2); - if (length == 2) baseCost *= length; + if (length != 0) { + baseCost = 0.6f; + } break; case NODE_DOUBLE: - if (endTileXCoordinate != getTile().getTileXCoordinate()) { - assert(length <= 2); - // Typically, length = 1 (since tile X is not equal) - // In US, have seen length = 2, e.g. VU440's INT_X171Y827/EE2_E_BEG7. - if (length == 2) baseCost *= length; + if (endTileXCoordinate == getTile().getTileXCoordinate()) { + // (NN|SS)_[EW]_BEG[0-7] + baseCost = 1.2f; } else { - // Typically, length = 2 except for horizontal U-turns (length = 0) - // or vertical U-turns (length = 1). - // In US, have seen length = 3, e.g. VU440's INT_X171Y827/NN2_E_BEG7. - assert(length <= 3); + // (EE|WW)_[EW]_BEG[0-7] + assert(length <= 1); + baseCost = 0.6f; } break; case NODE_HQUAD: - assert (length != 0 || getAllDownhillNodes().isEmpty()); - baseCost = 0.35f * length; + baseCost = 0.7f; break; case NODE_VQUAD: - // In case of U-turn nodes - if (length != 0) baseCost = 0.15f * length;// VQUADs have length 4 and 5 + baseCost = 1.4f; break; case NODE_HLONG: - assert (length != 0 || getAllDownhillNodes().isEmpty()); - baseCost = 0.15f * length;// HLONGs have length 6 and 7 + baseCost = 0.8f; break; case NODE_VLONG: - baseCost = 0.7f; + baseCost = 1.6f; break; default: throw new RuntimeException(ic.toString()); } break; + case SUPER_LONG_LINE: + assert(length == RouteNodeGraph.SUPER_LONG_LINE_LENGTH_IN_TILES); + baseCost = 16f; + break; case PINFEED_I: case PINBOUNCE: - break; case PINFEED_O: - baseCost = 1f; + case LAGUNA_I: break; default: throw new RuntimeException(type.toString()); diff --git a/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java b/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java index aeefccf1a..a78597227 100644 --- a/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java +++ b/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java @@ -272,37 +272,37 @@ void testSingleConnectionHelper(String partName, @CsvSource({ // One SLR crossing // (Too) Close - "SLICE_X9Y299,SLICE_X9Y300,500", // On Laguna column - "SLICE_X9Y300,SLICE_X9Y299,300", - "SLICE_X0Y299,SLICE_X0Y300,400", // Far from Laguna column - "SLICE_X0Y300,SLICE_X0Y299,100", - "SLICE_X53Y299,SLICE_X53Y300,200", // Equidistant from two Laguna columns - "SLICE_X53Y300,SLICE_X53Y299,700", + "SLICE_X9Y299,SLICE_X9Y300,400", // On Laguna column + "SLICE_X9Y300,SLICE_X9Y299,400", + "SLICE_X0Y299,SLICE_X0Y300,600", // Far from Laguna column + "SLICE_X0Y300,SLICE_X0Y299,600", + "SLICE_X53Y299,SLICE_X53Y300,500", // Equidistant from two Laguna columns + "SLICE_X53Y300,SLICE_X53Y299,600", // Perfect "SLICE_X9Y241,SLICE_X9Y300,200", "SLICE_X9Y300,SLICE_X9Y241,100", - "SLICE_X9Y358,SLICE_X9Y299,100", + "SLICE_X9Y358,SLICE_X9Y299,200", "SLICE_X9Y299,SLICE_X9Y358,200", - "SLICE_X53Y241,SLICE_X69Y300,500", - "SLICE_X53Y358,SLICE_X69Y299,500", + "SLICE_X53Y241,SLICE_X69Y300,300", + "SLICE_X53Y358,SLICE_X69Y299,200", // Far - "SLICE_X9Y240,SLICE_X9Y359,100", // On Laguna + "SLICE_X9Y240,SLICE_X9Y359,200", // On Laguna "SLICE_X9Y359,SLICE_X9Y240,200", - "SLICE_X162Y240,SLICE_X162Y430,200", - "SLICE_X162Y430,SLICE_X162Y240,300", + "SLICE_X162Y240,SLICE_X162Y430,700", + "SLICE_X162Y430,SLICE_X162Y240,200", "SLICE_X0Y240,SLICE_X12Y430,400", // Far from Laguna "SLICE_X0Y430,SLICE_X12Y240,200", // Two SLR crossings - "SLICE_X162Y299,SLICE_X162Y599,200", - "SLICE_X162Y599,SLICE_X162Y299,100", + "SLICE_X162Y299,SLICE_X162Y599,800", + "SLICE_X162Y599,SLICE_X162Y299,700", // Three SLR crossings - "SLICE_X79Y0,SLICE_X79Y899,200", // Straight up: next to Laguna column - "SLICE_X0Y0,SLICE_X0Y899,600", // Straight up: far from Laguna column - "SLICE_X168Y0,SLICE_X168Y899,400", // Straight up: far from Laguna column - "SLICE_X9Y0,SLICE_X162Y899,1000", // Up and right - "SLICE_X168Y162,SLICE_X9Y899,800", // Up and left + "SLICE_X79Y0,SLICE_X79Y899,500", // Straight up: next to Laguna column + "SLICE_X0Y0,SLICE_X0Y899,800", // Straight up: far from Laguna column + "SLICE_X168Y0,SLICE_X168Y899,300", // Straight up: far from Laguna column + "SLICE_X9Y0,SLICE_X162Y899,600", // Up and right + "SLICE_X168Y162,SLICE_X9Y899,600", // Up and left }) public void testSLRCrossingNonTimingDriven(String srcSiteName, String dstSiteName, long nodesPoppedLimit) { testSingleConnectionHelper(Device.AWS_F1, srcSiteName, "AQ", dstSiteName, "A1", nodesPoppedLimit); From 721550e2348ff7892d085cb1647c3ca026599a14 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Fri, 12 Jul 2024 14:02:11 -0700 Subject: [PATCH 02/17] Fruther tweaking Signed-off-by: Eddie Hung --- .../xilinx/rapidwright/rwroute/RouteNode.java | 18 +++++----- .../rapidwright/rwroute/TestRWRoute.java | 36 +++++++++---------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNode.java b/src/com/xilinx/rapidwright/rwroute/RouteNode.java index f022a7e1e..91629514f 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNode.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNode.java @@ -144,7 +144,7 @@ protected void setChildren(RuntimeTracker setChildrenTimer) { } private void setBaseCost() { - baseCost = 0.2f; + baseCost = 0.1f; switch (type) { case WIRE: // NOTE: IntentCode is device-dependent @@ -163,30 +163,30 @@ private void setBaseCost() { break; case NODE_SINGLE: if (length != 0) { - baseCost = 0.6f; + baseCost = 0.8f; } break; case NODE_DOUBLE: if (endTileXCoordinate == getTile().getTileXCoordinate()) { - // (NN|SS)_[EW]_BEG[0-7] + // (NN|SS)2_[EW]_BEG[0-7] baseCost = 1.2f; } else { - // (EE|WW)_[EW]_BEG[0-7] + // (EE|WW)2_[EW]_BEG[0-7] assert(length <= 1); - baseCost = 0.6f; + baseCost = 0.8f; } break; case NODE_HQUAD: - baseCost = 0.7f; + baseCost = 0.6f; break; case NODE_VQUAD: - baseCost = 1.4f; + baseCost = 1.0f; break; case NODE_HLONG: - baseCost = 0.8f; + baseCost = 0.5f; break; case NODE_VLONG: - baseCost = 1.6f; + baseCost = 0.8f; break; default: throw new RuntimeException(ic.toString()); diff --git a/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java b/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java index a78597227..64a0edd67 100644 --- a/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java +++ b/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java @@ -272,37 +272,37 @@ void testSingleConnectionHelper(String partName, @CsvSource({ // One SLR crossing // (Too) Close - "SLICE_X9Y299,SLICE_X9Y300,400", // On Laguna column - "SLICE_X9Y300,SLICE_X9Y299,400", - "SLICE_X0Y299,SLICE_X0Y300,600", // Far from Laguna column - "SLICE_X0Y300,SLICE_X0Y299,600", - "SLICE_X53Y299,SLICE_X53Y300,500", // Equidistant from two Laguna columns - "SLICE_X53Y300,SLICE_X53Y299,600", + "SLICE_X9Y299,SLICE_X9Y300,300", // On Laguna column + "SLICE_X9Y300,SLICE_X9Y299,100", + "SLICE_X0Y299,SLICE_X0Y300,300", // Far from Laguna column + "SLICE_X0Y300,SLICE_X0Y299,300", + "SLICE_X53Y299,SLICE_X53Y300,100", // Equidistant from two Laguna columns + "SLICE_X53Y300,SLICE_X53Y299,100", // Perfect "SLICE_X9Y241,SLICE_X9Y300,200", "SLICE_X9Y300,SLICE_X9Y241,100", - "SLICE_X9Y358,SLICE_X9Y299,200", + "SLICE_X9Y358,SLICE_X9Y299,100", "SLICE_X9Y299,SLICE_X9Y358,200", - "SLICE_X53Y241,SLICE_X69Y300,300", - "SLICE_X53Y358,SLICE_X69Y299,200", + "SLICE_X53Y241,SLICE_X69Y300,200", + "SLICE_X53Y358,SLICE_X69Y299,100", // Far - "SLICE_X9Y240,SLICE_X9Y359,200", // On Laguna + "SLICE_X9Y240,SLICE_X9Y359,100", // On Laguna "SLICE_X9Y359,SLICE_X9Y240,200", - "SLICE_X162Y240,SLICE_X162Y430,700", + "SLICE_X162Y240,SLICE_X162Y430,200", "SLICE_X162Y430,SLICE_X162Y240,200", - "SLICE_X0Y240,SLICE_X12Y430,400", // Far from Laguna + "SLICE_X0Y240,SLICE_X12Y430,200", // Far from Laguna "SLICE_X0Y430,SLICE_X12Y240,200", // Two SLR crossings - "SLICE_X162Y299,SLICE_X162Y599,800", - "SLICE_X162Y599,SLICE_X162Y299,700", + "SLICE_X162Y299,SLICE_X162Y599,400", + "SLICE_X162Y599,SLICE_X162Y299,300", // Three SLR crossings - "SLICE_X79Y0,SLICE_X79Y899,500", // Straight up: next to Laguna column - "SLICE_X0Y0,SLICE_X0Y899,800", // Straight up: far from Laguna column + "SLICE_X79Y0,SLICE_X79Y899,300", // Straight up: next to Laguna column + "SLICE_X0Y0,SLICE_X0Y899,300", // Straight up: far from Laguna column "SLICE_X168Y0,SLICE_X168Y899,300", // Straight up: far from Laguna column - "SLICE_X9Y0,SLICE_X162Y899,600", // Up and right - "SLICE_X168Y162,SLICE_X9Y899,600", // Up and left + "SLICE_X9Y0,SLICE_X162Y899,400", // Up and right + "SLICE_X168Y162,SLICE_X9Y899,400", // Up and left }) public void testSLRCrossingNonTimingDriven(String srcSiteName, String dstSiteName, long nodesPoppedLimit) { testSingleConnectionHelper(Device.AWS_F1, srcSiteName, "AQ", dstSiteName, "A1", nodesPoppedLimit); From 14c470a0fc1c3071621c46085623bef4feb2d7d3 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Fri, 12 Jul 2024 14:26:27 -0700 Subject: [PATCH 03/17] Remove assertion that fails on xcku040 Signed-off-by: Eddie Hung --- src/com/xilinx/rapidwright/rwroute/RouteNode.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNode.java b/src/com/xilinx/rapidwright/rwroute/RouteNode.java index 91629514f..e00d0c983 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNode.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNode.java @@ -172,7 +172,6 @@ private void setBaseCost() { baseCost = 1.2f; } else { // (EE|WW)2_[EW]_BEG[0-7] - assert(length <= 1); baseCost = 0.8f; } break; From 47cd53debb0f9f50d525a19688d1a8885b59d72d Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Fri, 12 Jul 2024 15:35:11 -0700 Subject: [PATCH 04/17] mprove RouteNodeGraph.isAccessible() for cross-SLR Signed-off-by: Eddie Hung --- src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java b/src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java index f66cd5167..cdd3cfa07 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java @@ -560,8 +560,9 @@ public boolean isAccessible(RouteNode childRnode, Connection connection) { } int childX = childTile.getTileXCoordinate(); - if (connection.isCrossSLR() && nextLagunaColumn[childX] == childX) { - // Connection crosses SLR and this is a Laguna column + if (connection.getSinkRnode().getSLRIndex() != childRnode.getSLRIndex() && + nextLagunaColumn[childX] == childX) { + // Connection needs to cross SLRs and this is a Laguna column return true; } From 3dfc9b694dbc871d62d877732ce0b8f4db228c78 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Fri, 12 Jul 2024 15:37:20 -0700 Subject: [PATCH 05/17] More tweaking Signed-off-by: Eddie Hung --- .../xilinx/rapidwright/rwroute/RouteNode.java | 12 ++++----- .../rapidwright/rwroute/TestRWRoute.java | 26 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNode.java b/src/com/xilinx/rapidwright/rwroute/RouteNode.java index e00d0c983..da986833e 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNode.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNode.java @@ -144,7 +144,7 @@ protected void setChildren(RuntimeTracker setChildrenTimer) { } private void setBaseCost() { - baseCost = 0.1f; + baseCost = 0.2f; switch (type) { case WIRE: // NOTE: IntentCode is device-dependent @@ -163,26 +163,26 @@ private void setBaseCost() { break; case NODE_SINGLE: if (length != 0) { - baseCost = 0.8f; + baseCost = 1.0f; } break; case NODE_DOUBLE: if (endTileXCoordinate == getTile().getTileXCoordinate()) { // (NN|SS)2_[EW]_BEG[0-7] - baseCost = 1.2f; + baseCost = 1.25f; } else { // (EE|WW)2_[EW]_BEG[0-7] - baseCost = 0.8f; + baseCost = 1.0f; } break; case NODE_HQUAD: - baseCost = 0.6f; + baseCost = 0.8f; break; case NODE_VQUAD: baseCost = 1.0f; break; case NODE_HLONG: - baseCost = 0.5f; + baseCost = 0.7f; break; case NODE_VLONG: baseCost = 0.8f; diff --git a/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java b/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java index 64a0edd67..b0cee41a3 100644 --- a/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java +++ b/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java @@ -273,35 +273,35 @@ void testSingleConnectionHelper(String partName, // One SLR crossing // (Too) Close "SLICE_X9Y299,SLICE_X9Y300,300", // On Laguna column - "SLICE_X9Y300,SLICE_X9Y299,100", - "SLICE_X0Y299,SLICE_X0Y300,300", // Far from Laguna column - "SLICE_X0Y300,SLICE_X0Y299,300", - "SLICE_X53Y299,SLICE_X53Y300,100", // Equidistant from two Laguna columns - "SLICE_X53Y300,SLICE_X53Y299,100", + "SLICE_X9Y300,SLICE_X9Y299,200", + "SLICE_X0Y299,SLICE_X0Y300,200", // Far from Laguna column + "SLICE_X0Y300,SLICE_X0Y299,400", + "SLICE_X53Y299,SLICE_X53Y300,300", // Equidistant from two Laguna columns + "SLICE_X53Y300,SLICE_X53Y299,300", // Perfect "SLICE_X9Y241,SLICE_X9Y300,200", "SLICE_X9Y300,SLICE_X9Y241,100", "SLICE_X9Y358,SLICE_X9Y299,100", "SLICE_X9Y299,SLICE_X9Y358,200", - "SLICE_X53Y241,SLICE_X69Y300,200", - "SLICE_X53Y358,SLICE_X69Y299,100", + "SLICE_X53Y241,SLICE_X69Y300,400", + "SLICE_X53Y358,SLICE_X69Y299,300", // Far "SLICE_X9Y240,SLICE_X9Y359,100", // On Laguna "SLICE_X9Y359,SLICE_X9Y240,200", - "SLICE_X162Y240,SLICE_X162Y430,200", - "SLICE_X162Y430,SLICE_X162Y240,200", + "SLICE_X162Y240,SLICE_X162Y430,400", + "SLICE_X162Y430,SLICE_X162Y240,100", "SLICE_X0Y240,SLICE_X12Y430,200", // Far from Laguna "SLICE_X0Y430,SLICE_X12Y240,200", // Two SLR crossings "SLICE_X162Y299,SLICE_X162Y599,400", - "SLICE_X162Y599,SLICE_X162Y299,300", + "SLICE_X162Y599,SLICE_X162Y299,500", // Three SLR crossings "SLICE_X79Y0,SLICE_X79Y899,300", // Straight up: next to Laguna column - "SLICE_X0Y0,SLICE_X0Y899,300", // Straight up: far from Laguna column - "SLICE_X168Y0,SLICE_X168Y899,300", // Straight up: far from Laguna column - "SLICE_X9Y0,SLICE_X162Y899,400", // Up and right + "SLICE_X0Y0,SLICE_X0Y899,500", // Straight up: far from Laguna column + "SLICE_X168Y0,SLICE_X168Y899,400", // Straight up: far from Laguna column + "SLICE_X9Y0,SLICE_X162Y899,400", // Up and right "SLICE_X168Y162,SLICE_X9Y899,400", // Up and left }) public void testSLRCrossingNonTimingDriven(String srcSiteName, String dstSiteName, long nodesPoppedLimit) { From 86055927d120db382ca89cba8f21052e56de3b2e Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Mon, 15 Jul 2024 14:16:39 -0700 Subject: [PATCH 06/17] More tweaking Signed-off-by: Eddie Hung --- .../xilinx/rapidwright/rwroute/RouteNode.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNode.java b/src/com/xilinx/rapidwright/rwroute/RouteNode.java index da986833e..971920b32 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNode.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNode.java @@ -144,7 +144,7 @@ protected void setChildren(RuntimeTracker setChildrenTimer) { } private void setBaseCost() { - baseCost = 0.2f; + baseCost = 0.4f; switch (type) { case WIRE: // NOTE: IntentCode is device-dependent @@ -163,29 +163,29 @@ private void setBaseCost() { break; case NODE_SINGLE: if (length != 0) { - baseCost = 1.0f; + baseCost = 0.8f; // >=0.2 penalty } break; case NODE_DOUBLE: - if (endTileXCoordinate == getTile().getTileXCoordinate()) { - // (NN|SS)2_[EW]_BEG[0-7] - baseCost = 1.25f; - } else { + if (endTileXCoordinate != getTile().getTileXCoordinate()) { // (EE|WW)2_[EW]_BEG[0-7] - baseCost = 1.0f; + baseCost = 0.7f; // >=0.1 penalty + } else { + // (NN|SS)2_[EW]_BEG[0-7] + baseCost = 1.3f; // >=0.1 penalty } break; case NODE_HQUAD: - baseCost = 0.8f; + baseCost = 0.6f/ 1.5f; // >=0.6 discount (/1.5 for bias cost) break; case NODE_VQUAD: - baseCost = 1.0f; + baseCost = 1.8f/ 1.5f; // >=0.6 discount (/1.5 for bias cost) break; case NODE_HLONG: - baseCost = 0.7f; + baseCost = 1.0f/ 1.5f; // >=1.0 discount (/1.5 for bias cost) break; case NODE_VLONG: - baseCost = 0.8f; + baseCost = 6.2f/ 1.5f; // >=1.0 discount (/1.5 for bias cost) break; default: throw new RuntimeException(ic.toString()); @@ -193,12 +193,14 @@ private void setBaseCost() { break; case SUPER_LONG_LINE: assert(length == RouteNodeGraph.SUPER_LONG_LINE_LENGTH_IN_TILES); - baseCost = 16f; + baseCost = 32f / 1.5f; // 4.0 discount + break; + case LAGUNA_I: + baseCost = 0f; break; case PINFEED_I: case PINBOUNCE: case PINFEED_O: - case LAGUNA_I: break; default: throw new RuntimeException(type.toString()); From 0176fd1b40109af754a0e19f35a9cf623fe9fe6a Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Mon, 15 Jul 2024 14:32:10 -0700 Subject: [PATCH 07/17] More tweaking Signed-off-by: Eddie Hung --- .../xilinx/rapidwright/rwroute/RouteNode.java | 6 ++-- .../rapidwright/rwroute/TestRWRoute.java | 32 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNode.java b/src/com/xilinx/rapidwright/rwroute/RouteNode.java index 971920b32..038867bb1 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNode.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNode.java @@ -163,16 +163,16 @@ private void setBaseCost() { break; case NODE_SINGLE: if (length != 0) { - baseCost = 0.8f; // >=0.2 penalty + baseCost = 0.9f; // >=0.1 penalty } break; case NODE_DOUBLE: if (endTileXCoordinate != getTile().getTileXCoordinate()) { // (EE|WW)2_[EW]_BEG[0-7] - baseCost = 0.7f; // >=0.1 penalty + baseCost = 0.6f; // ~ neutral } else { // (NN|SS)2_[EW]_BEG[0-7] - baseCost = 1.3f; // >=0.1 penalty + baseCost = 1.2f; // ~ neutral } break; case NODE_HQUAD: diff --git a/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java b/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java index b0cee41a3..a494578c9 100644 --- a/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java +++ b/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java @@ -272,37 +272,37 @@ void testSingleConnectionHelper(String partName, @CsvSource({ // One SLR crossing // (Too) Close - "SLICE_X9Y299,SLICE_X9Y300,300", // On Laguna column - "SLICE_X9Y300,SLICE_X9Y299,200", + "SLICE_X9Y299,SLICE_X9Y300,200", // On Laguna column + "SLICE_X9Y300,SLICE_X9Y299,300", "SLICE_X0Y299,SLICE_X0Y300,200", // Far from Laguna column "SLICE_X0Y300,SLICE_X0Y299,400", "SLICE_X53Y299,SLICE_X53Y300,300", // Equidistant from two Laguna columns - "SLICE_X53Y300,SLICE_X53Y299,300", + "SLICE_X53Y300,SLICE_X53Y299,200", // Perfect "SLICE_X9Y241,SLICE_X9Y300,200", - "SLICE_X9Y300,SLICE_X9Y241,100", - "SLICE_X9Y358,SLICE_X9Y299,100", + "SLICE_X9Y300,SLICE_X9Y241,300", + "SLICE_X9Y358,SLICE_X9Y299,300", "SLICE_X9Y299,SLICE_X9Y358,200", - "SLICE_X53Y241,SLICE_X69Y300,400", + "SLICE_X53Y241,SLICE_X69Y300,300", "SLICE_X53Y358,SLICE_X69Y299,300", // Far - "SLICE_X9Y240,SLICE_X9Y359,100", // On Laguna - "SLICE_X9Y359,SLICE_X9Y240,200", - "SLICE_X162Y240,SLICE_X162Y430,400", + "SLICE_X9Y240,SLICE_X9Y359,200", // On Laguna + "SLICE_X9Y359,SLICE_X9Y240,100", + "SLICE_X162Y240,SLICE_X162Y430,200", "SLICE_X162Y430,SLICE_X162Y240,100", - "SLICE_X0Y240,SLICE_X12Y430,200", // Far from Laguna + "SLICE_X0Y240,SLICE_X12Y430,300", // Far from Laguna "SLICE_X0Y430,SLICE_X12Y240,200", // Two SLR crossings - "SLICE_X162Y299,SLICE_X162Y599,400", - "SLICE_X162Y599,SLICE_X162Y299,500", + "SLICE_X162Y299,SLICE_X162Y599,200", + "SLICE_X162Y599,SLICE_X162Y299,200", // Three SLR crossings "SLICE_X79Y0,SLICE_X79Y899,300", // Straight up: next to Laguna column - "SLICE_X0Y0,SLICE_X0Y899,500", // Straight up: far from Laguna column - "SLICE_X168Y0,SLICE_X168Y899,400", // Straight up: far from Laguna column - "SLICE_X9Y0,SLICE_X162Y899,400", // Up and right - "SLICE_X168Y162,SLICE_X9Y899,400", // Up and left + "SLICE_X0Y0,SLICE_X0Y899,300", // Straight up: far from Laguna column + "SLICE_X168Y0,SLICE_X168Y899,300", // Straight up: far from Laguna column + "SLICE_X9Y0,SLICE_X162Y899,300", // Up and right + "SLICE_X168Y162,SLICE_X9Y899,200", // Up and left }) public void testSLRCrossingNonTimingDriven(String srcSiteName, String dstSiteName, long nodesPoppedLimit) { testSingleConnectionHelper(Device.AWS_F1, srcSiteName, "AQ", dstSiteName, "A1", nodesPoppedLimit); From 50f11b9b5da4112b4ffc1ba39aef9c269e60c1d6 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Tue, 16 Jul 2024 11:28:37 -0700 Subject: [PATCH 08/17] More tweaking Signed-off-by: Eddie Hung --- .../xilinx/rapidwright/rwroute/RouteNode.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNode.java b/src/com/xilinx/rapidwright/rwroute/RouteNode.java index 038867bb1..4361b6d3e 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNode.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNode.java @@ -163,29 +163,29 @@ private void setBaseCost() { break; case NODE_SINGLE: if (length != 0) { - baseCost = 0.9f; // >=0.1 penalty + baseCost = 0.6f; // ~ neutral } break; case NODE_DOUBLE: if (endTileXCoordinate != getTile().getTileXCoordinate()) { // (EE|WW)2_[EW]_BEG[0-7] - baseCost = 0.6f; // ~ neutral + baseCost = 0.4f; // >=0.2 discount } else { // (NN|SS)2_[EW]_BEG[0-7] - baseCost = 1.2f; // ~ neutral + baseCost = 1.0f; // >=0.2 discount } break; case NODE_HQUAD: - baseCost = 0.6f/ 1.5f; // >=0.6 discount (/1.5 for bias cost) + baseCost = 0.6f; // >=0.6 discount break; case NODE_VQUAD: - baseCost = 1.8f/ 1.5f; // >=0.6 discount (/1.5 for bias cost) + baseCost = 1.8f; // >=0.6 discount break; case NODE_HLONG: - baseCost = 1.0f/ 1.5f; // >=1.0 discount (/1.5 for bias cost) + baseCost = 2.6f; // >=1.0 discount break; case NODE_VLONG: - baseCost = 6.2f/ 1.5f; // >=1.0 discount (/1.5 for bias cost) + baseCost = 6.2f; // >=1.0 discount break; default: throw new RuntimeException(ic.toString()); @@ -193,7 +193,7 @@ private void setBaseCost() { break; case SUPER_LONG_LINE: assert(length == RouteNodeGraph.SUPER_LONG_LINE_LENGTH_IN_TILES); - baseCost = 32f / 1.5f; // 4.0 discount + baseCost = 32f; // 4.0 discount break; case LAGUNA_I: baseCost = 0f; From 4b64d2211c23806281e4aa99c0ec28b249c1099b Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Tue, 16 Jul 2024 11:28:58 -0700 Subject: [PATCH 09/17] Only explore accessible nodes if in Laguna column when not in sink SLR Signed-off-by: Eddie Hung --- src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java b/src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java index cdd3cfa07..e0846cc35 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNodeGraph.java @@ -560,10 +560,9 @@ public boolean isAccessible(RouteNode childRnode, Connection connection) { } int childX = childTile.getTileXCoordinate(); - if (connection.getSinkRnode().getSLRIndex() != childRnode.getSLRIndex() && - nextLagunaColumn[childX] == childX) { - // Connection needs to cross SLRs and this is a Laguna column - return true; + if (connection.getSinkRnode().getSLRIndex() != childRnode.getSLRIndex()) { + // Only accessible if connection needs to cross SLRs and this is a Laguna column + return nextLagunaColumn[childX] == childX; } Tile sinkTile = connection.getSinkRnode().getTile(); From 3c3b345ade92686b66878aeeb8e26a736d52ada6 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Tue, 16 Jul 2024 12:04:54 -0700 Subject: [PATCH 10/17] More discounts Signed-off-by: Eddie Hung --- src/com/xilinx/rapidwright/rwroute/RouteNode.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNode.java b/src/com/xilinx/rapidwright/rwroute/RouteNode.java index 4361b6d3e..eee96086d 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNode.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNode.java @@ -169,23 +169,23 @@ private void setBaseCost() { case NODE_DOUBLE: if (endTileXCoordinate != getTile().getTileXCoordinate()) { // (EE|WW)2_[EW]_BEG[0-7] - baseCost = 0.4f; // >=0.2 discount + baseCost = 0.2f; // >=0.4 discount } else { // (NN|SS)2_[EW]_BEG[0-7] - baseCost = 1.0f; // >=0.2 discount + baseCost = 0.8f; // >=0.4 discount } break; case NODE_HQUAD: - baseCost = 0.6f; // >=0.6 discount + baseCost = 0.4f; // >=0.8 discount break; case NODE_VQUAD: - baseCost = 1.8f; // >=0.6 discount + baseCost = 1.6f; // >=0.8 discount break; case NODE_HLONG: - baseCost = 2.6f; // >=1.0 discount + baseCost = 2.4f; // >=1.2 discount break; case NODE_VLONG: - baseCost = 6.2f; // >=1.0 discount + baseCost = 6.0f; // >=1.2 discount break; default: throw new RuntimeException(ic.toString()); From 1042fe52349b76f1f062b4d9acd223737834a60e Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Wed, 17 Jul 2024 12:46:17 -0700 Subject: [PATCH 11/17] More tweaking Signed-off-by: Eddie Hung --- .../xilinx/rapidwright/rwroute/RWRoute.java | 1 + .../xilinx/rapidwright/rwroute/RouteNode.java | 23 +++++++++------- .../rapidwright/rwroute/TestRWRoute.java | 27 ++++++++++--------- 3 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RWRoute.java b/src/com/xilinx/rapidwright/rwroute/RWRoute.java index e729c452a..da5ac3448 100644 --- a/src/com/xilinx/rapidwright/rwroute/RWRoute.java +++ b/src/com/xilinx/rapidwright/rwroute/RWRoute.java @@ -1911,6 +1911,7 @@ private float getNodeCost(RouteNode rnode, Connection connection, int countSameS // CRoute paper states that the bias factor cannot be more than half of the wire cost // (it may exceed this here because we may not be using the minimum-sized bounding box) float biasCost = rnode.getBaseCost() * Math.min(distToCenter * net.getBiasFactor(), 0.5f); + biasCost = 0; return rnode.getBaseCost() * rnode.getHistoricalCongestionCost() * presentCongestionCost / sharingFactor + biasCost; } diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNode.java b/src/com/xilinx/rapidwright/rwroute/RouteNode.java index eee96086d..7555f22ef 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNode.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNode.java @@ -163,45 +163,50 @@ private void setBaseCost() { break; case NODE_SINGLE: if (length != 0) { - baseCost = 0.6f; // ~ neutral + baseCost = 0.6f + 0.2f; } break; case NODE_DOUBLE: if (endTileXCoordinate != getTile().getTileXCoordinate()) { // (EE|WW)2_[EW]_BEG[0-7] - baseCost = 0.2f; // >=0.4 discount + baseCost = 0.6f + 0.2f; } else { // (NN|SS)2_[EW]_BEG[0-7] - baseCost = 0.8f; // >=0.4 discount + baseCost = 1.2f + 0.1f; } break; case NODE_HQUAD: - baseCost = 0.4f; // >=0.8 discount + baseCost = 1.2f - 0.6f; break; case NODE_VQUAD: - baseCost = 1.6f; // >=0.8 discount + baseCost = 2.4f - 1.2f; break; case NODE_HLONG: - baseCost = 2.4f; // >=1.2 discount + baseCost = 2.0f - 1.8f; break; case NODE_VLONG: - baseCost = 6.0f; // >=1.2 discount + baseCost = 7.2f - 3.6f; break; default: throw new RuntimeException(ic.toString()); } + assert(baseCost > 0.0f); break; case SUPER_LONG_LINE: assert(length == RouteNodeGraph.SUPER_LONG_LINE_LENGTH_IN_TILES); - baseCost = 32f; // 4.0 discount + baseCost = 36f - 4f; break; case LAGUNA_I: baseCost = 0f; break; case PINFEED_I: - case PINBOUNCE: case PINFEED_O: break; + case PINBOUNCE: + if (length != 0) { + baseCost = 0.6f + 0.2f; + } + break; default: throw new RuntimeException(type.toString()); } diff --git a/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java b/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java index a494578c9..856e3967e 100644 --- a/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java +++ b/test/src/com/xilinx/rapidwright/rwroute/TestRWRoute.java @@ -272,36 +272,37 @@ void testSingleConnectionHelper(String partName, @CsvSource({ // One SLR crossing // (Too) Close - "SLICE_X9Y299,SLICE_X9Y300,200", // On Laguna column + "SLICE_X9Y299,SLICE_X9Y300,300", // On Laguna column "SLICE_X9Y300,SLICE_X9Y299,300", - "SLICE_X0Y299,SLICE_X0Y300,200", // Far from Laguna column - "SLICE_X0Y300,SLICE_X0Y299,400", + "SLICE_X0Y299,SLICE_X0Y300,300", // Far from Laguna column + "SLICE_X0Y300,SLICE_X0Y299,200", "SLICE_X53Y299,SLICE_X53Y300,300", // Equidistant from two Laguna columns "SLICE_X53Y300,SLICE_X53Y299,200", + // Perfect "SLICE_X9Y241,SLICE_X9Y300,200", - "SLICE_X9Y300,SLICE_X9Y241,300", - "SLICE_X9Y358,SLICE_X9Y299,300", + "SLICE_X9Y300,SLICE_X9Y241,100", + "SLICE_X9Y358,SLICE_X9Y299,200", "SLICE_X9Y299,SLICE_X9Y358,200", "SLICE_X53Y241,SLICE_X69Y300,300", - "SLICE_X53Y358,SLICE_X69Y299,300", + "SLICE_X53Y358,SLICE_X69Y299,600", // Far - "SLICE_X9Y240,SLICE_X9Y359,200", // On Laguna + "SLICE_X9Y240,SLICE_X9Y359,100", // On Laguna "SLICE_X9Y359,SLICE_X9Y240,100", "SLICE_X162Y240,SLICE_X162Y430,200", "SLICE_X162Y430,SLICE_X162Y240,100", - "SLICE_X0Y240,SLICE_X12Y430,300", // Far from Laguna + "SLICE_X0Y240,SLICE_X12Y430,400", // Far from Laguna "SLICE_X0Y430,SLICE_X12Y240,200", // Two SLR crossings "SLICE_X162Y299,SLICE_X162Y599,200", - "SLICE_X162Y599,SLICE_X162Y299,200", + "SLICE_X162Y599,SLICE_X162Y299,300", // Three SLR crossings - "SLICE_X79Y0,SLICE_X79Y899,300", // Straight up: next to Laguna column - "SLICE_X0Y0,SLICE_X0Y899,300", // Straight up: far from Laguna column - "SLICE_X168Y0,SLICE_X168Y899,300", // Straight up: far from Laguna column - "SLICE_X9Y0,SLICE_X162Y899,300", // Up and right + "SLICE_X79Y0,SLICE_X79Y899,200", // Straight up: next to Laguna column + "SLICE_X0Y0,SLICE_X0Y899,200", // Straight up: far from Laguna column + "SLICE_X168Y0,SLICE_X168Y899,200", // Straight up: far from Laguna column + "SLICE_X9Y0,SLICE_X162Y899,200", // Up and right "SLICE_X168Y162,SLICE_X9Y899,200", // Up and left }) public void testSLRCrossingNonTimingDriven(String srcSiteName, String dstSiteName, long nodesPoppedLimit) { From c26e099386bd4b131bb546e1b43254b0e044704d Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Wed, 17 Jul 2024 13:02:10 -0700 Subject: [PATCH 12/17] Cleanup Signed-off-by: Eddie Hung --- .../xilinx/rapidwright/rwroute/RouteNode.java | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNode.java b/src/com/xilinx/rapidwright/rwroute/RouteNode.java index 7555f22ef..73c500f30 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNode.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNode.java @@ -146,6 +146,18 @@ protected void setChildren(RuntimeTracker setChildrenTimer) { private void setBaseCost() { baseCost = 0.4f; switch (type) { + case LAGUNA_I: + assert(length == 0); + // Make all approaches to SLLs zero-cost to encourage exploration + // Assigning a base cost of zero would normally break congestion resolution + // (since RWroute.getNodeCost() would return zero) but doing it here should be + // okay because this node only leads to a SLL which will have a non-zero base cost + baseCost = 0.0f; + break; + case SUPER_LONG_LINE: + assert(length == RouteNodeGraph.SUPER_LONG_LINE_LENGTH_IN_TILES); + baseCost = 36f - 4f; + break; case WIRE: // NOTE: IntentCode is device-dependent IntentCode ic = getIntentCode(); @@ -160,14 +172,17 @@ private void setBaseCost() { case NODE_LOCAL: case INTENT_DEFAULT: assert(length <= 1); - break; + // Fall through case NODE_SINGLE: if (length != 0) { + // NODE_SINGLE could be length == 2, e.g. INT/WW1_W_BEG7 which + // feeds-through to the tile above baseCost = 0.6f + 0.2f; } break; case NODE_DOUBLE: if (endTileXCoordinate != getTile().getTileXCoordinate()) { + assert(length == 1); // (EE|WW)2_[EW]_BEG[0-7] baseCost = 0.6f + 0.2f; } else { @@ -192,21 +207,15 @@ private void setBaseCost() { } assert(baseCost > 0.0f); break; - case SUPER_LONG_LINE: - assert(length == RouteNodeGraph.SUPER_LONG_LINE_LENGTH_IN_TILES); - baseCost = 36f - 4f; - break; - case LAGUNA_I: - baseCost = 0f; - break; - case PINFEED_I: - case PINFEED_O: - break; case PINBOUNCE: if (length != 0) { - baseCost = 0.6f + 0.2f; + assert(length == 1); + baseCost = 0.6f + 0.2f; // Same cost as NODE_SINGLE } break; + case PINFEED_I: + case PINFEED_O: + break; default: throw new RuntimeException(type.toString()); } From d69dd486817e853888f04bb7006d38cb7f87a2a9 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Wed, 17 Jul 2024 15:45:19 -0700 Subject: [PATCH 13/17] SINGLE/DOUBLEs to get small discounts Signed-off-by: Eddie Hung --- .../xilinx/rapidwright/rwroute/RouteNode.java | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNode.java b/src/com/xilinx/rapidwright/rwroute/RouteNode.java index 73c500f30..e99ad3b94 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNode.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNode.java @@ -172,22 +172,22 @@ private void setBaseCost() { case NODE_LOCAL: case INTENT_DEFAULT: assert(length <= 1); - // Fall through + break; case NODE_SINGLE: if (length != 0) { // NODE_SINGLE could be length == 2, e.g. INT/WW1_W_BEG7 which // feeds-through to the tile above - baseCost = 0.6f + 0.2f; + baseCost = 0.6f - 0.1f; } break; case NODE_DOUBLE: if (endTileXCoordinate != getTile().getTileXCoordinate()) { assert(length == 1); // (EE|WW)2_[EW]_BEG[0-7] - baseCost = 0.6f + 0.2f; + baseCost = 0.6f - 0.1f; } else { // (NN|SS)2_[EW]_BEG[0-7] - baseCost = 1.2f + 0.1f; + baseCost = 1.2f - 0.2f; } break; case NODE_HQUAD: @@ -200,20 +200,15 @@ private void setBaseCost() { baseCost = 2.0f - 1.8f; break; case NODE_VLONG: - baseCost = 7.2f - 3.6f; + baseCost = 7.2f - 3.2f; break; default: throw new RuntimeException(ic.toString()); } assert(baseCost > 0.0f); break; - case PINBOUNCE: - if (length != 0) { - assert(length == 1); - baseCost = 0.6f + 0.2f; // Same cost as NODE_SINGLE - } - break; case PINFEED_I: + case PINBOUNCE: case PINFEED_O: break; default: From b14d45612af9a24c98fec48f61f249fc3f95a1cd Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Wed, 17 Jul 2024 21:11:10 -0700 Subject: [PATCH 14/17] Increase base cost of length==1 locals/pinbounces Signed-off-by: Eddie Hung --- src/com/xilinx/rapidwright/rwroute/RouteNode.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNode.java b/src/com/xilinx/rapidwright/rwroute/RouteNode.java index e99ad3b94..3970e451b 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNode.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNode.java @@ -171,7 +171,11 @@ private void setBaseCost() { break; case NODE_LOCAL: case INTENT_DEFAULT: - assert(length <= 1); + if (length != 0) { + assert(length == 1); + baseCost = 0.6f; // 0.8 if staying in same tile + // 0.0 if towards target + } break; case NODE_SINGLE: if (length != 0) { @@ -207,8 +211,13 @@ private void setBaseCost() { } assert(baseCost > 0.0f); break; - case PINFEED_I: case PINBOUNCE: + if (length != 0) { + assert(length == 1); + baseCost = 0.6f; + } + break; + case PINFEED_I: case PINFEED_O: break; default: From 6aa39a6a7b0c63d33b22cbf9365a4505a3285c5c Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Thu, 18 Jul 2024 11:51:35 -0700 Subject: [PATCH 15/17] Fix HLONG Signed-off-by: Eddie Hung --- src/com/xilinx/rapidwright/rwroute/RouteNode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNode.java b/src/com/xilinx/rapidwright/rwroute/RouteNode.java index 3970e451b..a7cb766db 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNode.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNode.java @@ -201,7 +201,7 @@ private void setBaseCost() { baseCost = 2.4f - 1.2f; break; case NODE_HLONG: - baseCost = 2.0f - 1.8f; + baseCost = 3.6f - 1.8f; break; case NODE_VLONG: baseCost = 7.2f - 3.2f; From 54195254c62c1c291c4fde4464237bdb14e2ddb2 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Thu, 18 Jul 2024 11:56:54 -0700 Subject: [PATCH 16/17] Fix VLONG too Signed-off-by: Eddie Hung --- src/com/xilinx/rapidwright/rwroute/RouteNode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNode.java b/src/com/xilinx/rapidwright/rwroute/RouteNode.java index a7cb766db..d96e75700 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNode.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNode.java @@ -204,7 +204,7 @@ private void setBaseCost() { baseCost = 3.6f - 1.8f; break; case NODE_VLONG: - baseCost = 7.2f - 3.2f; + baseCost = 7.2f - 3.6f; break; default: throw new RuntimeException(ic.toString()); From e1792964e3db69e929229eee4251192efd463fd4 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Thu, 18 Jul 2024 12:40:22 -0700 Subject: [PATCH 17/17] Try this Signed-off-by: Eddie Hung --- src/com/xilinx/rapidwright/rwroute/RouteNode.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/com/xilinx/rapidwright/rwroute/RouteNode.java b/src/com/xilinx/rapidwright/rwroute/RouteNode.java index d96e75700..d45c42527 100644 --- a/src/com/xilinx/rapidwright/rwroute/RouteNode.java +++ b/src/com/xilinx/rapidwright/rwroute/RouteNode.java @@ -191,20 +191,20 @@ private void setBaseCost() { baseCost = 0.6f - 0.1f; } else { // (NN|SS)2_[EW]_BEG[0-7] - baseCost = 1.2f - 0.2f; + baseCost = 1.2f - 0.2f; // VSINGLE (-0.1) + 0.4 + VSINGLE (-0.1) + 0.4 = +0.6 -> -0.2 (-0.8) } break; case NODE_HQUAD: - baseCost = 1.2f - 0.6f; + baseCost = 1.2f - 0.2f; // HDOUBLE (-0.1) + 0.4 + HDOUBLE (-0.1) + 0.4 = +0.6 -> -0.2 (-0.8) break; case NODE_VQUAD: - baseCost = 2.4f - 1.2f; + baseCost = 2.4f - 1.2f; // VDOUBLE (-0.2) + 0.4 + VDOUBLE (-0.2) + 0.4 = +0.4 -> -1.2 (-1.6) break; case NODE_HLONG: - baseCost = 3.6f - 1.8f; + baseCost = 3.6f - 2.0f; // HQUAD (-0.6) + 0.4 + HQUAD (-0.6) + 0.4 = -0.4 -> -2.0 (-1.6) break; case NODE_VLONG: - baseCost = 7.2f - 3.6f; + baseCost = 7.2f - 4.8f; // VQUAD (-1.2) + 0.4 + VQUAD (-1.2) + 0.4 = -1.6 -> -4.8 (-3.2) break; default: throw new RuntimeException(ic.toString());