Skip to content

Commit 2a124f0

Browse files
committed
odb: dont overwrite db dbus if not in database
Signed-off-by: Peter Gadfort <[email protected]>
1 parent fd416f6 commit 2a124f0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/odb/src/db/dbDatabase.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,17 @@ dbIStream& operator>>(dbIStream& stream, _dbDatabase& obj)
280280
stream >> *obj.chip_net_tbl_;
281281
}
282282
if (obj.isSchema(db_schema_dbu_per_micron)) {
283-
stream >> obj.dbu_per_micron_;
283+
if (obj.isLessThanSchema(db_schema_remove_dbu_per_micron)) {
284+
// Should already have a value from dbTech, so only need to update this if
285+
// its been set.
286+
uint dbu_per_micron;
287+
stream >> dbu_per_micron;
288+
if (dbu_per_micron != 0) {
289+
obj.dbu_per_micron_ = dbu_per_micron;
290+
}
291+
} else {
292+
stream >> obj.dbu_per_micron_;
293+
}
284294
}
285295
// Set the _tech on the block & libs now they are loaded
286296
if (!obj.isSchema(db_schema_block_tech)) {

0 commit comments

Comments
 (0)