@@ -1004,7 +1004,7 @@ void IOPlacer::findSections(int begin,
10041004 n_sec.used_slots = 0 ;
10051005 n_sec.edge = edge;
10061006
1007- sections.push_back (n_sec);
1007+ sections.push_back (std::move ( n_sec) );
10081008 begin = ++end_slot;
10091009 }
10101010}
@@ -3023,14 +3023,16 @@ void IOPlacer::filterObstructedSlotsForTopLayer()
30233023
30243024 // check for slots that go beyond the die boundary
30253025 odb::Rect die_area = getBlock ()->getDieArea ();
3026- for (auto & slot : top_layer_slots_) {
3027- odb::Point& point = slot.pos ;
3028- if (point.x () - top_grid_->pin_width / 2 < die_area.xMin ()
3029- || point.y () - top_grid_->pin_height / 2 < die_area.yMin ()
3030- || point.x () + top_grid_->pin_width / 2 > die_area.xMax ()
3031- || point.y () + top_grid_->pin_height / 2 > die_area.yMax ()) {
3032- // mark slot as blocked since it extends beyond the die area
3033- slot.blocked = true ;
3026+ if (top_grid_ != nullptr ) {
3027+ for (auto & slot : top_layer_slots_) {
3028+ odb::Point& point = slot.pos ;
3029+ if (point.x () - top_grid_->pin_width / 2 < die_area.xMin ()
3030+ || point.y () - top_grid_->pin_height / 2 < die_area.yMin ()
3031+ || point.x () + top_grid_->pin_width / 2 > die_area.xMax ()
3032+ || point.y () + top_grid_->pin_height / 2 > die_area.yMax ()) {
3033+ // mark slot as blocked since it extends beyond the die area
3034+ slot.blocked = true ;
3035+ }
30343036 }
30353037 }
30363038
@@ -3102,7 +3104,7 @@ std::vector<Section> IOPlacer::findSectionsForTopLayer(const odb::Rect& region)
31023104 n_sec.used_slots = 0 ;
31033105 n_sec.edge = Edge::invalid;
31043106
3105- sections.push_back (n_sec);
3107+ sections.push_back (std::move ( n_sec) );
31063108 edge_begin = ++end_slot;
31073109 }
31083110 }
0 commit comments