Skip to content

Commit 55591cb

Browse files
authored
Merge pull request The-OpenROAD-Project#9281 from The-OpenROAD-Project-staging/fix-res_aware_coverity_scan
grt: fix uninitialized detour penalty variable
2 parents 2809969 + 402a565 commit 55591cb

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/grt/src/fastroute/src/FastRoute.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ FastRouteCore::FastRouteCore(odb::dbDatabase* db,
6565
logger_(log),
6666
stt_builder_(stt_builder),
6767
sta_(sta),
68-
debug_(new DebugSetting())
68+
debug_(new DebugSetting()),
69+
detour_penalty_(0)
6970
{
7071
}
7172

src/grt/src/fastroute/src/maze3D.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -714,12 +714,15 @@ void FastRouteCore::mazeRouteMSMDOrder3D(int expand,
714714
}
715715
}
716716

717+
const int kLowDetourPenalty = 5;
718+
const int kHighDetourPenalty = 15;
719+
717720
if (enable_resistance_aware_) {
718-
// More flexible during repair stages
719-
const int kDetourPenalty = is_incremental_grt_ ? 5 : 15;
720721
updateSlacks();
721722
netpinOrderInc();
722-
setDetourPenalty(kDetourPenalty);
723+
// More flexible during repair stages
724+
setDetourPenalty(is_incremental_grt_ ? kLowDetourPenalty
725+
: kHighDetourPenalty);
723726
}
724727

725728
const int endIND = tree_order_pv_.size() * 0.9;

0 commit comments

Comments
 (0)