Skip to content

Commit dda94a7

Browse files
committed
odb:
1) Add error when trying to destroy instance that has an associated scan instance; 2) Add schema for the inst->scan inst map. Signed-off-by: Arthur Koucher <[email protected]>
1 parent b84a15c commit dda94a7

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

src/odb/src/db/dbBlock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ dbIStream& operator>>(dbIStream& stream, _dbBlock& block)
10251025
if (db->isSchema(db_schema_bterm_top_layer_grid)) {
10261026
stream >> block._bterm_top_layer_grid;
10271027
}
1028-
if (db->isSchema(db_schema_block_owns_scan_insts)) {
1028+
if (db->isSchema(db_schema_map_insts_to_scan_insts)) {
10291029
stream >> block._inst_scan_inst_map;
10301030
}
10311031

src/odb/src/db/dbDatabase.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,14 @@ namespace odb {
4343
const uint db_schema_major = 0; // Not used...
4444
const uint db_schema_initial = 57;
4545

46-
const uint db_schema_minor = 110; // Current revision number
46+
const uint db_schema_minor = 111; // Current revision number
4747

48+
// Revision where the map which associates instances to their
49+
// scan version was added
50+
const uint db_schema_map_insts_to_scan_insts = 111;
51+
52+
// Revision where the ownership of the scan insts was changed
53+
// from the its scan list to the block
4854
const uint db_schema_block_owns_scan_insts = 110;
4955

5056
// Revision where is_connect_to_term_ flag was added to dbGuide

src/odb/src/db/dbInst.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,6 +1428,15 @@ void dbInst::destroy(dbInst* inst_)
14281428
inst->_name);
14291429
}
14301430

1431+
dbScanInst* scan_inst = inst_->getScanInst();
1432+
if (scan_inst) {
1433+
inst->getLogger()->error(
1434+
utl::ODB,
1435+
505,
1436+
"Attempt to destroy instance {} with an associated scan inst.",
1437+
inst->_name);
1438+
}
1439+
14311440
uint i;
14321441
uint n = inst->_iterms.size();
14331442

0 commit comments

Comments
 (0)