Skip to content

Commit bdb26b6

Browse files
authored
Merge pull request #7986 from gudeh/gpl-consider-debug-group
gpl: include the consideration of debug group,
2 parents 529f6ee + 45f016e commit bdb26b6

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

src/gpl/src/placerBase.cpp

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,10 +1015,24 @@ void PlacerBase::init()
10151015
continue;
10161016
}
10171017

1018-
if (inst->dbInst() && inst->dbInst()->getGroup() != group_) {
1018+
odb::dbInst* db_inst = inst->dbInst();
1019+
if (!db_inst) {
10191020
continue;
10201021
}
10211022

1023+
odb::dbGroup* db_inst_group = db_inst->getGroup();
1024+
if (group_ == nullptr) {
1025+
if (db_inst_group
1026+
&& db_inst_group->getType() != odb::dbGroupType::VISUAL_DEBUG) {
1027+
continue;
1028+
}
1029+
} else {
1030+
if (!db_inst_group || db_inst_group != group_
1031+
|| db_inst_group->getType() == odb::dbGroupType::VISUAL_DEBUG) {
1032+
continue;
1033+
}
1034+
}
1035+
10221036
if (inst->isFixed()) {
10231037
// Check whether fixed instance is
10241038
// within the corearea
@@ -1196,9 +1210,23 @@ void PlacerBase::initInstsForUnusableSites()
11961210
if (!inst->isFixed()) {
11971211
continue;
11981212
}
1199-
if (inst->dbInst() && inst->dbInst()->getGroup() != group_) {
1213+
odb::dbInst* db_inst = inst->dbInst();
1214+
if (!db_inst) {
12001215
continue;
12011216
}
1217+
1218+
odb::dbGroup* db_inst_group = db_inst->getGroup();
1219+
if (group_ == nullptr) {
1220+
if (db_inst_group
1221+
&& db_inst_group->getType() != odb::dbGroupType::VISUAL_DEBUG) {
1222+
continue;
1223+
}
1224+
} else {
1225+
if (!db_inst_group || db_inst_group != group_
1226+
|| db_inst_group->getType() == odb::dbGroupType::VISUAL_DEBUG) {
1227+
continue;
1228+
}
1229+
}
12021230
std::pair<int, int> pairX = getMinMaxIdx(
12031231
inst->lx(), inst->ux(), die_.coreLx(), siteSizeX_, 0, siteCountX);
12041232
std::pair<int, int> pairY = getMinMaxIdx(

0 commit comments

Comments
 (0)