Skip to content

Commit

Permalink
dbSta: correct dbNetwork::parent for the non-hier case
Browse files Browse the repository at this point in the history
It was returning the dbModule parent mod instance of the top instance
even when hierarchy was off.

Fixes The-OpenROAD-Project/OpenROAD-flow-scripts#2485

Signed-off-by: Matt Liberty <[email protected]>
  • Loading branch information
maliberty committed Oct 21, 2024
1 parent 9ca8405 commit 8211bd8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dbSta/src/dbNetwork.cc
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,9 @@ Instance* dbNetwork::parent(const Instance* instance) const
if (instance == top_instance_) {
return nullptr;
}
if (!hasHierarchy()) {
return top_instance_;
}
dbInst* db_inst;
dbModInst* mod_inst;
staToDb(instance, db_inst, mod_inst);
Expand Down

0 comments on commit 8211bd8

Please sign in to comment.