@@ -1015,12 +1015,24 @@ void PlacerBase::init()
10151015 continue ;
10161016 }
10171017
1018- if ((inst->dbInst () && inst->dbInst ()->getGroup () != group_)
1019- && inst->dbInst ()->getGroup ()->getType ()
1020- != odb::dbGroupType::VISUAL_DEBUG) {
1018+ odb::dbInst* db_inst = inst->dbInst ();
1019+ if (!db_inst) {
10211020 continue ;
10221021 }
10231022
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+
10241036 if (inst->isFixed ()) {
10251037 // Check whether fixed instance is
10261038 // within the corearea
@@ -1198,11 +1210,23 @@ void PlacerBase::initInstsForUnusableSites()
11981210 if (!inst->isFixed ()) {
11991211 continue ;
12001212 }
1201- if ((inst->dbInst () && inst->dbInst ()->getGroup () != group_)
1202- && inst->dbInst ()->getGroup ()->getType ()
1203- != odb::dbGroupType::VISUAL_DEBUG) {
1213+ odb::dbInst* db_inst = inst->dbInst ();
1214+ if (!db_inst) {
12041215 continue ;
12051216 }
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+ }
12061230 std::pair<int , int > pairX = getMinMaxIdx (
12071231 inst->lx (), inst->ux (), die_.coreLx (), siteSizeX_, 0 , siteCountX);
12081232 std::pair<int , int > pairY = getMinMaxIdx (
0 commit comments