@@ -285,25 +285,70 @@ void IRSolver::reportUnconnectedNodes() const
285285 tool_category, net_->getName ().c_str ());
286286
287287 if (!results.unconnected_nodes .empty ()) {
288+ if (logger_->debugCheck (utl::PSM, " reportnodes" , 1 )) {
289+ odb::dbMarkerCategory* category
290+ = odb::dbMarkerCategory::create (net_category, " Unconnected node" );
291+ for (auto * node : results.unconnected_nodes ) {
292+ logger_->warn (utl::PSM,
293+ 42 ,
294+ " Unconnected node on net {} at location ({:4.3f}um, "
295+ " {:4.3f}um), layer: {}." ,
296+ net_->getName (),
297+ node->getPoint ().getX () / dbu,
298+ node->getPoint ().getY () / dbu,
299+ node->getLayer ()->getName ());
300+
301+ odb::dbMarker* marker = odb::dbMarker::create (category);
302+ if (marker == nullptr ) {
303+ continue ;
304+ }
305+ marker->addSource (net_);
306+ marker->setTechLayer (node->getLayer ());
307+ marker->addShape (node->getPoint ());
308+ }
309+ }
310+ std::map<odb::dbTechLayer*, IRNetwork::ShapeTree> shapes;
288311 odb::dbMarkerCategory* category
289- = odb::dbMarkerCategory::create (net_category, " Unconnected node" );
290- for (auto * node : results.unconnected_nodes ) {
291- logger_->warn (utl::PSM,
292- 38 ,
293- " Unconnected node on net {} at location ({:4.3f}um, "
294- " {:4.3f}um), layer: {}." ,
295- net_->getName (),
296- node->getPoint ().getX () / dbu,
297- node->getPoint ().getY () / dbu,
298- node->getLayer ()->getName ());
312+ = odb::dbMarkerCategory::create (net_category, " Unconnected shape" );
299313
300- odb::dbMarker* marker = odb::dbMarker::create (category);
301- if (marker == nullptr ) {
302- continue ;
314+ std::set<const Shape*> reported_shapes;
315+ for (auto * node : results.unconnected_nodes ) {
316+ if (shapes.find (node->getLayer ()) == shapes.end ()) {
317+ // get tree is not found
318+ shapes[node->getLayer ()] = network_->getShapeTree (node->getLayer ());
319+ }
320+ const auto & layer_shapes = shapes[node->getLayer ()];
321+ for (auto itr = layer_shapes.qbegin (
322+ boost::geometry::index::intersects (node->getPoint ()));
323+ itr != layer_shapes.qend ();
324+ itr++) {
325+ const Shape* shape = *itr;
326+
327+ if (reported_shapes.find (shape) != reported_shapes.end ()) {
328+ continue ;
329+ }
330+ reported_shapes.insert (shape);
331+
332+ const odb::Rect rect = shape->getShape ();
333+ logger_->warn (utl::PSM,
334+ 38 ,
335+ " Unconnected shape on net {} at ({:4.3f}um, "
336+ " {:4.3f}um) - ({:4.3f}um, {:4.3f}um), layer: {}." ,
337+ net_->getName (),
338+ rect.xMin () / dbu,
339+ rect.yMin () / dbu,
340+ rect.xMax () / dbu,
341+ rect.yMax () / dbu,
342+ shape->getLayer ()->getName ());
343+
344+ odb::dbMarker* marker = odb::dbMarker::create (category);
345+ if (marker == nullptr ) {
346+ break ;
347+ }
348+ marker->addSource (net_);
349+ marker->setTechLayer (shape->getLayer ());
350+ marker->addShape (rect);
303351 }
304- marker->addSource (net_);
305- marker->setTechLayer (node->getLayer ());
306- marker->addShape (node->getPoint ());
307352 }
308353 }
309354
0 commit comments