Skip to content

Commit

Permalink
Merge pull request The-OpenROAD-Project#5944 from andyfox-rushc/arian…
Browse files Browse the repository at this point in the history
…e136_regr

Fix for ariane136 regression
  • Loading branch information
maliberty authored Oct 14, 2024
2 parents 7ca4d6d + ac88f6f commit e6735ce
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions src/dbSta/src/dbNetwork.cc
Original file line number Diff line number Diff line change
Expand Up @@ -843,33 +843,27 @@ Instance* dbNetwork::parent(const Instance* instance) const
if (instance == top_instance_) {
return nullptr;
}

dbInst* db_inst;
dbModInst* mod_inst;
staToDb(instance, db_inst, mod_inst);
if (mod_inst) {
auto parent_module = mod_inst->getParent();
if (parent_module) {
if (auto parent_inst = parent_module->getModInst()) {
if (parent_inst) {
return dbToSta(parent_inst);
}
auto parent_inst = parent_module->getModInst();
if (parent_inst) {
return dbToSta(parent_inst);
}
}
}
if (hierarchy_) {
if (db_inst) {
auto parent_module = db_inst->getModule();
if (parent_module) {
if (auto parent_inst = parent_module->getModInst()) {
if (parent_inst) {
return dbToSta(parent_inst);
}
}
if (db_inst) {
auto parent_module = db_inst->getModule();
if (parent_module) {
auto parent_inst = parent_module->getModInst();
if (parent_inst) {
return dbToSta(parent_inst);
}
}
}

return top_instance_;
}

Expand Down

0 comments on commit e6735ce

Please sign in to comment.