From b9cdb4f6b40931237a196ba129f658612b9c5753 Mon Sep 17 00:00:00 2001 From: Jakob Wenzel Date: Thu, 25 Apr 2024 19:03:48 +0200 Subject: [PATCH] BlockPlacer2: Fix off by one error in selecting module instance to move (#987) Signed-off-by: Jakob Wenzel --- .../xilinx/rapidwright/placer/blockplacer/BlockPlacer2.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/xilinx/rapidwright/placer/blockplacer/BlockPlacer2.java b/src/com/xilinx/rapidwright/placer/blockplacer/BlockPlacer2.java index d88e6bf8b..05a22c7a7 100644 --- a/src/com/xilinx/rapidwright/placer/blockplacer/BlockPlacer2.java +++ b/src/com/xilinx/rapidwright/placer/blockplacer/BlockPlacer2.java @@ -566,8 +566,8 @@ private void temperatureStep(int maxInnerIteration) { for (int inner_iterate = 0; inner_iterate< maxInnerIteration; inner_iterate++) { //for (int inner_iterate = 0; inner_iterate< (10*rangeLimit); inner_iterate++) { //for (int inner_iterate = 0; inner_iterate< (dev.getColumns()*dev.getRows()); inner_iterate++) { - //ModuleInstT selectedHD = hardMacros.get(rand.nextInt(hardMacros.size()-1)); - ModuleInstT selectedHD = weighted.get(rand.nextInt(weighted.size()-1)); + //ModuleInstT selectedHD = hardMacros.get(rand.nextInt(hardMacros.size())); + ModuleInstT selectedHD = weighted.get(rand.nextInt(weighted.size())); if (PARANOID) {