9191#include " dbSBoxItr.h"
9292#include " dbSWire.h"
9393#include " dbSWireItr.h"
94+ #include " dbScanInst.h"
95+ #include " dbScanListScanInstItr.h"
9496#include " dbTable.h"
9597#include " dbTable.hpp"
9698#include " dbTech.h"
@@ -180,6 +182,9 @@ _dbBlock::_dbBlock(_dbDatabase* db)
180182 _inst_tbl = new dbTable<_dbInst>(
181183 db, this , (GetObjTbl_t) &_dbBlock::getObjectTable, dbInstObj);
182184
185+ _scan_inst_tbl = new dbTable<_dbScanInst>(
186+ db, this , (GetObjTbl_t) &_dbBlock::getObjectTable, dbScanInstObj);
187+
183188 _module_tbl = new dbTable<_dbModule>(
184189 db, this , (GetObjTbl_t) &_dbBlock::getObjectTable, dbModuleObj);
185190
@@ -338,6 +343,8 @@ _dbBlock::_dbBlock(_dbDatabase* db)
338343
339344 _inst_iterm_itr = new dbInstITermItr (_iterm_tbl);
340345
346+ _scan_list_scan_inst_itr = new dbScanListScanInstItr (_scan_inst_tbl);
347+
341348 _box_itr = new dbBoxItr<1024 >(_box_tbl, nullptr , false );
342349
343350 _swire_itr = new dbSWireItr (_swire_tbl);
@@ -406,6 +413,7 @@ _dbBlock::~_dbBlock()
406413 delete _net_tbl;
407414 delete _inst_hdr_tbl;
408415 delete _inst_tbl;
416+ delete _scan_inst_tbl;
409417 delete _module_tbl;
410418 delete _modinst_tbl;
411419 delete _modbterm_tbl;
@@ -450,6 +458,7 @@ _dbBlock::~_dbBlock()
450458 delete _net_bterm_itr;
451459 delete _net_iterm_itr;
452460 delete _inst_iterm_itr;
461+ delete _scan_list_scan_inst_itr;
453462 delete _box_itr;
454463 delete _swire_itr;
455464 delete _sbox_itr;
@@ -738,7 +747,6 @@ dbOStream& operator<<(dbOStream& stream, const _dbBlock& block)
738747 (**cbitr)().inDbBlockStreamOutBefore (
739748 (dbBlock*) &block); // client ECO initialization - payam
740749 }
741- _dbDatabase* db = block.getImpl ()->getDatabase ();
742750 dbOStreamScope scope (stream, " dbBlock" );
743751 stream << block._def_units ;
744752 stream << block._dbu_per_micron ;
@@ -750,9 +758,7 @@ dbOStream& operator<<(dbOStream& stream, const _dbBlock& block)
750758 stream << block._corner_name_list ;
751759 stream << block._name ;
752760 stream << block._die_area ;
753- if (db->isSchema (db_schema_dbblock_blocked_regions_for_pins)) {
754- stream << block._blocked_regions_for_pins ;
755- }
761+ stream << block._blocked_regions_for_pins ;
756762 stream << block._tech ;
757763 stream << block._chip ;
758764 stream << block._bbox ;
@@ -786,22 +792,14 @@ dbOStream& operator<<(dbOStream& stream, const _dbBlock& block)
786792 stream << *block._iterm_tbl ;
787793 stream << *block._net_tbl ;
788794 stream << *block._inst_hdr_tbl ;
789- if (db->isSchema (db_schema_db_remove_hash)) {
790- stream << *block._module_tbl ;
791- stream << *block._inst_tbl ;
792- } else {
793- stream << *block._inst_tbl ;
794- stream << *block._module_tbl ;
795- }
795+ stream << *block._module_tbl ;
796+ stream << *block._inst_tbl ;
797+ stream << *block._scan_inst_tbl ;
796798 stream << *block._modinst_tbl ;
797- if (db->isSchema (db_schema_update_hierarchy)) {
798- stream << *block._modbterm_tbl ;
799- if (db->isSchema (db_schema_db_remove_hash)) {
800- stream << *block._busport_tbl ;
801- }
802- stream << *block._moditerm_tbl ;
803- stream << *block._modnet_tbl ;
804- }
799+ stream << *block._modbterm_tbl ;
800+ stream << *block._busport_tbl ;
801+ stream << *block._moditerm_tbl ;
802+ stream << *block._modnet_tbl ;
805803 stream << *block._powerdomain_tbl ;
806804 stream << *block._logicport_tbl ;
807805 stream << *block._powerswitch_tbl ;
@@ -842,18 +840,13 @@ dbOStream& operator<<(dbOStream& stream, const _dbBlock& block)
842840 stream << *block._dft_tbl ;
843841 stream << *block._marker_categories_tbl ;
844842 stream << block._marker_category_hash ;
845- if (block.getDatabase ()->isSchema (db_schema_dbblock_layers_ranges)) {
846- stream << block._min_routing_layer ;
847- stream << block._max_routing_layer ;
848- stream << block._min_layer_for_clock ;
849- stream << block._max_layer_for_clock ;
850- }
851- if (db->isSchema (db_schema_block_pin_groups)) {
852- stream << block._bterm_groups ;
853- }
854- if (db->isSchema (db_schema_bterm_top_layer_grid)) {
855- stream << block._bterm_top_layer_grid ;
856- }
843+ stream << block._min_routing_layer ;
844+ stream << block._max_routing_layer ;
845+ stream << block._min_layer_for_clock ;
846+ stream << block._max_layer_for_clock ;
847+ stream << block._bterm_groups ;
848+ stream << block._bterm_top_layer_grid ;
849+ stream << block._inst_scan_inst_map ;
857850
858851 // ---------------------------------------------------------- stream out
859852 // properties
@@ -959,6 +952,9 @@ dbIStream& operator>>(dbIStream& stream, _dbBlock& block)
959952 stream >> *block._inst_tbl ;
960953 stream >> *block._module_tbl ;
961954 }
955+ if (db->isSchema (db_schema_block_owns_scan_insts)) {
956+ stream >> *block._scan_inst_tbl ;
957+ }
962958 stream >> *block._modinst_tbl ;
963959 if (db->isSchema (db_schema_update_hierarchy)) {
964960 stream >> *block._modbterm_tbl ;
@@ -1029,6 +1025,9 @@ dbIStream& operator>>(dbIStream& stream, _dbBlock& block)
10291025 if (db->isSchema (db_schema_bterm_top_layer_grid)) {
10301026 stream >> block._bterm_top_layer_grid ;
10311027 }
1028+ if (db->isSchema (db_schema_map_insts_to_scan_insts)) {
1029+ stream >> block._inst_scan_inst_map ;
1030+ }
10321031
10331032 // ---------------------------------------------------------- stream in
10341033 // properties
0 commit comments