Skip to content

Commit 28ec610

Browse files
committed
Fix some multi-chip issues.
dbChip::destroy: the dbDatabase's stored main chip ID should not be cleared when the chip being destroyed is not the main chip. dbSta::postReadDef: reading a DEF for a chip that isn't the main chip should not update which block STA considers the main block. Signed-off-by: Sean Luchen <[email protected]>
1 parent 8b193f4 commit 28ec610

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/dbSta/src/dbSta.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ void dbSta::postReadLef(dbTech* tech, dbLib* library)
284284

285285
void dbSta::postReadDef(dbBlock* block)
286286
{
287-
if (!block->getParent()) {
287+
// If this is the top block of the main chip:
288+
if (!block->getParent() && block->getChip() == block->getDb()->getChip()) {
288289
db_network_->readDefAfter(block);
289290
db_cbk_->addOwner(block);
290291
db_cbk_->setNetwork(db_network_);

src/odb/src/db/dbChip.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,7 @@ void dbChip::destroy(dbChip* chip_)
662662
dbProperty::destroyProperties(chip);
663663
db->chip_hash_.remove(chip);
664664
db->chip_tbl_->destroy(chip);
665-
db->_chip = 0;
666665
}
667666
// User Code End dbChipPublicMethods
668667
} // namespace odb
669-
// Generator Code End Cpp
668+
// Generator Code End Cpp

0 commit comments

Comments
 (0)