@@ -4665,6 +4665,83 @@ 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+ for (odb::dbScanInst* scan_inst : scan_list->getScanInsts ()) {
4689+ odb::dbInst* inst = scan_inst->getInst ();
4690+ if (inst->getPlacementStatus ().isPlaced ()) {
4691+ bbox.merge (inst->getBBox ()->getBox ());
4692+ }
4693+ }
4694+
4695+ return !bbox.isInverted ();
4696+ }
4697+
4698+ void DbScanListDescriptor::highlight (std::any object, Painter& painter) const
4699+ {
4700+ auto scan_list = getObject (object);
4701+
4702+ for (odb::dbScanInst* scan_inst : scan_list->getScanInsts ()) {
4703+ odb::dbInst* inst = scan_inst->getInst ();
4704+ if (inst->getPlacementStatus ().isPlaced ()) {
4705+ auto * inst_descriptor = Gui::get ()->getDescriptor <odb::dbInst*>();
4706+ inst_descriptor->highlight (scan_inst->getInst (), painter);
4707+ }
4708+ }
4709+ }
4710+
4711+ bool DbScanListDescriptor::getAllObjects (SelectionSet& objects) const
4712+ {
4713+ auto * block = db_->getChip ()->getBlock ();
4714+ auto * db_dft = block->getDft ();
4715+
4716+ for (auto * scan_chain : db_dft->getScanChains ()) {
4717+ for (auto * scan_partition : scan_chain->getScanPartitions ()) {
4718+ for (auto * scan_list : scan_partition->getScanLists ()) {
4719+ objects.insert (makeSelected (scan_list));
4720+ }
4721+ }
4722+ }
4723+
4724+ return true ;
4725+ }
4726+
4727+ Descriptor::Properties DbScanListDescriptor::getDBProperties (
4728+ odb::dbScanList* scan_list) const
4729+ {
4730+ Properties props;
4731+
4732+ auto gui = Gui::get ();
4733+
4734+ SelectionSet scan_insts;
4735+ for (odb::dbScanInst* scan_inst : scan_list->getScanInsts ()) {
4736+ scan_insts.insert (gui->makeSelected (scan_inst));
4737+ }
4738+ props.push_back ({" Scan Insts" , scan_insts});
4739+
4740+ return props;
4741+ }
4742+
4743+ // ////////////////////////////////////////////////
4744+
46684745DbBoxDescriptor::DbBoxDescriptor (odb::dbDatabase* db)
46694746 : BaseDbDescriptor<odb::dbBox>(db)
46704747{
0 commit comments