1616#include " dbBlock.h"
1717#include " dbBox.h"
1818#include " dbChip.h"
19+ #include " dbChipBump.h"
20+ #include " dbChipRegion.h"
1921#include " dbCommon.h"
2022#include " dbCore.h"
2123#include " dbDatabase.h"
@@ -125,6 +127,8 @@ _dbInst::_dbInst(_dbDatabase*, const _dbInst& i)
125127 region_prev_(i.region_prev_),
126128 module_prev_(i.module_prev_),
127129 hierarchy_(i.hierarchy_),
130+ chip_region_(i.chip_region_),
131+ bump_(i.bump_),
128132 iterms_(i.iterms_),
129133 halo_(i.halo_),
130134 pin_access_idx_(i.pin_access_idx_)
@@ -161,6 +165,8 @@ dbOStream& operator<<(dbOStream& stream, const _dbInst& inst)
161165 stream << inst.region_prev_ ;
162166 stream << inst.module_prev_ ;
163167 stream << inst.hierarchy_ ;
168+ stream << inst.chip_region_ ;
169+ stream << inst.bump_ ;
164170 stream << inst.iterms_ ;
165171 stream << inst.halo_ ;
166172 stream << inst.pin_access_idx_ ;
@@ -187,6 +193,10 @@ dbIStream& operator>>(dbIStream& stream, _dbInst& inst)
187193 stream >> inst.region_prev_ ;
188194 stream >> inst.module_prev_ ;
189195 stream >> inst.hierarchy_ ;
196+ if (inst.getDatabase ()->isSchema (kSchemaInstBump )) {
197+ stream >> inst.chip_region_ ;
198+ stream >> inst.bump_ ;
199+ }
190200 stream >> inst.iterms_ ;
191201 stream >> inst.halo_ ;
192202 stream >> inst.pin_access_idx_ ;
@@ -300,6 +310,14 @@ bool _dbInst::operator==(const _dbInst& rhs) const
300310 return false ;
301311 }
302312
313+ if (chip_region_ != rhs.chip_region_ ) {
314+ return false ;
315+ }
316+
317+ if (bump_ != rhs.bump_ ) {
318+ return false ;
319+ }
320+
303321 if (iterms_ != rhs.iterms_ ) {
304322 return false ;
305323 }
@@ -1292,6 +1310,18 @@ uint32_t dbInst::getPinAccessIdx() const
12921310 return inst->pin_access_idx_ ;
12931311}
12941312
1313+ dbChipBump* dbInst::getChipBump () const
1314+ {
1315+ _dbInst* inst = (_dbInst*) this ;
1316+ if (inst->bump_ == 0 ) {
1317+ return nullptr ;
1318+ }
1319+ _dbChip* chip = (_dbChip*) getBlock ()->getChip ();
1320+ _dbChipRegion* chip_region
1321+ = (_dbChipRegion*) chip->chip_region_tbl_ ->getPtr (inst->chip_region_ );
1322+ return (dbChipBump*) chip_region->chip_bump_tbl_ ->getPtr (inst->bump_ );
1323+ }
1324+
12951325dbInst* dbInst::create (dbBlock* block,
12961326 dbMaster* master,
12971327 const char * name,
@@ -1492,6 +1522,13 @@ void dbInst::destroy(dbInst* inst_)
14921522 " Attempt to destroy dont_touch instance {}" ,
14931523 inst->name_ );
14941524 }
1525+ if (inst->bump_ .isValid ()) {
1526+ inst->getLogger ()->error (
1527+ utl::ODB ,
1528+ 546 ,
1529+ " Cannot destroy instance {} with an associated chip bump" ,
1530+ inst->name_ );
1531+ }
14951532
14961533 dbScanInst* scan_inst = inst_->getScanInst ();
14971534 if (scan_inst) {
0 commit comments