@@ -4665,6 +4665,85 @@ Descriptor::Property DbScanInstDescriptor::getScanPinProperty(
46654665
46664666// ////////////////////////////////////////////////
46674667
4668+ DbScanListDescriptor::DbScanListDescriptor (odb::dbDatabase* db)
4669+ : BaseDbDescriptor<odb::dbScanList>(db)
4670+ {
4671+ }
4672+
4673+ std::string DbScanListDescriptor::getName (std::any object) const
4674+ {
4675+ return " Scan List" ;
4676+ }
4677+
4678+ std::string DbScanListDescriptor::getTypeName () const
4679+ {
4680+ return " Scan List" ;
4681+ }
4682+
4683+ bool DbScanListDescriptor::getBBox (std::any object, odb::Rect& bbox) const
4684+ {
4685+ auto scan_list = getObject (object);
4686+ bbox.mergeInit ();
4687+
4688+ bool has_placed_insts = false ;
4689+ for (odb::dbScanInst* scan_inst : scan_list->getScanInsts ()) {
4690+ odb::dbInst* inst = scan_inst->getInst ();
4691+ if (inst->getPlacementStatus ().isPlaced ()) {
4692+ has_placed_insts = true ;
4693+ bbox.merge (inst->getBBox ()->getBox ());
4694+ }
4695+ }
4696+
4697+ return has_placed_insts;
4698+ }
4699+
4700+ void DbScanListDescriptor::highlight (std::any object, Painter& painter) const
4701+ {
4702+ auto scan_list = getObject (object);
4703+
4704+ for (odb::dbScanInst* scan_inst : scan_list->getScanInsts ()) {
4705+ odb::dbInst* inst = scan_inst->getInst ();
4706+ if (inst->getPlacementStatus ().isPlaced ()) {
4707+ auto * inst_descriptor = Gui::get ()->getDescriptor <odb::dbInst*>();
4708+ inst_descriptor->highlight (scan_inst->getInst (), painter);
4709+ }
4710+ }
4711+ }
4712+
4713+ bool DbScanListDescriptor::getAllObjects (SelectionSet& objects) const
4714+ {
4715+ auto * block = db_->getChip ()->getBlock ();
4716+ auto * db_dft = block->getDft ();
4717+
4718+ for (auto * scan_chain : db_dft->getScanChains ()) {
4719+ for (auto * scan_partition : scan_chain->getScanPartitions ()) {
4720+ for (auto * scan_list : scan_partition->getScanLists ()) {
4721+ objects.insert (makeSelected (scan_list));
4722+ }
4723+ }
4724+ }
4725+
4726+ return true ;
4727+ }
4728+
4729+ Descriptor::Properties DbScanListDescriptor::getDBProperties (
4730+ odb::dbScanList* scan_list) const
4731+ {
4732+ Properties props;
4733+
4734+ auto gui = Gui::get ();
4735+
4736+ SelectionSet scan_insts;
4737+ for (odb::dbScanInst* scan_inst : scan_list->getScanInsts ()) {
4738+ scan_insts.insert (gui->makeSelected (scan_inst));
4739+ }
4740+ props.push_back ({" Scan Insts" , scan_insts});
4741+
4742+ return props;
4743+ }
4744+
4745+ // ////////////////////////////////////////////////
4746+
46684747DbBoxDescriptor::DbBoxDescriptor (odb::dbDatabase* db)
46694748 : BaseDbDescriptor<odb::dbBox>(db)
46704749{
0 commit comments