@@ -204,8 +204,8 @@ NetRouteMap CUGR::getRoutes()
204204 routing_tree, [&](const std::shared_ptr<GRTreeNode>& node) {
205205 for (const auto & child : node->children ) {
206206 if (node->getLayerIdx () == child->getLayerIdx ()) {
207- auto [min_x, max_x] = std::minmax (node->x , child->x );
208- auto [min_y, max_y] = std::minmax (node->y , child->y );
207+ auto [min_x, max_x] = std::minmax ({ node->x () , child->x ()} );
208+ auto [min_y, max_y] = std::minmax ({ node->y () , child->y ()} );
209209 GSegment segment (
210210 grid_graph_->getGridline (0 , min_x) + half_gcell_size,
211211 grid_graph_->getGridline (1 , min_y) + half_gcell_size,
@@ -223,11 +223,11 @@ NetRouteMap CUGR::getRoutes()
223223 for (int layer_idx = bottom_layer; layer_idx < top_layer;
224224 layer_idx++) {
225225 GSegment segment (
226- grid_graph_->getGridline (0 , node->x ) + half_gcell_size,
227- grid_graph_->getGridline (1 , node->y ) + half_gcell_size,
226+ grid_graph_->getGridline (0 , node->x () ) + half_gcell_size,
227+ grid_graph_->getGridline (1 , node->y () ) + half_gcell_size,
228228 layer_idx + 1 ,
229- grid_graph_->getGridline (0 , node->x ) + half_gcell_size,
230- grid_graph_->getGridline (1 , node->y ) + half_gcell_size,
229+ grid_graph_->getGridline (0 , node->x () ) + half_gcell_size,
230+ grid_graph_->getGridline (1 , node->y () ) + half_gcell_size,
231231 layer_idx + 2 ,
232232 true );
233233 route.push_back (segment);
@@ -266,18 +266,18 @@ void CUGR::getGuides(const GRNet* net,
266266 for (const auto & child : node->children ) {
267267 if (node->getLayerIdx () == child->getLayerIdx ()) {
268268 guides.emplace_back (node->getLayerIdx (),
269- BoxT (std::min (node->x , child->x ),
270- std::min (node->y , child->y ),
271- std::max (node->x , child->x ),
272- std::max (node->y , child->y )));
269+ BoxT (std::min (node->x () , child->x () ),
270+ std::min (node->y () , child->y () ),
271+ std::max (node->x () , child->x () ),
272+ std::max (node->y () , child->y () )));
273273 } else {
274274 int maxLayerIndex
275275 = std::max (node->getLayerIdx (), child->getLayerIdx ());
276276 for (int layerIdx
277277 = std::min (node->getLayerIdx (), child->getLayerIdx ());
278278 layerIdx <= maxLayerIndex;
279279 layerIdx++) {
280- guides.emplace_back (layerIdx, BoxT (node->x , node->y ));
280+ guides.emplace_back (layerIdx, BoxT (node->x () , node->y () ));
281281 }
282282 }
283283 }
@@ -287,18 +287,18 @@ void CUGR::getGuides(const GRNet* net,
287287 double resource = std::numeric_limits<double >::max ();
288288 unsigned direction = grid_graph_->getLayerDirection (point.getLayerIdx ());
289289 if (point[direction] + 1 < grid_graph_->getSize (direction)) {
290- resource
291- = std::min ( resource,
292- grid_graph_->getEdge (point.getLayerIdx (), point.x , point.y )
293- .getResource ());
290+ resource = std::min (
291+ resource,
292+ grid_graph_->getEdge (point.getLayerIdx (), point.x () , point.y () )
293+ .getResource ());
294294 }
295295 if (point[direction] > 0 ) {
296296 GRPoint lower = point;
297297 lower[direction] -= 1 ;
298- resource
299- = std::min ( resource,
300- grid_graph_->getEdge (lower.getLayerIdx (), point.x , point.y )
301- .getResource ());
298+ resource = std::min (
299+ resource,
300+ grid_graph_->getEdge (lower.getLayerIdx (), point.x () , point.y () )
301+ .getResource ());
302302 }
303303 return resource;
304304 };
@@ -309,7 +309,7 @@ void CUGR::getGuides(const GRNet* net,
309309 for (auto & gpt : gpts) {
310310 if (gpt.getLayerIdx () < constants_.min_routing_layer ) {
311311 int padding = 0 ;
312- if (getSpareResource ({constants_.min_routing_layer , gpt.x , gpt.y })
312+ if (getSpareResource ({constants_.min_routing_layer , gpt.x () , gpt.y () })
313313 < constants_.pin_patch_threshold ) {
314314 padding = constants_.pin_patch_padding ;
315315 }
@@ -318,10 +318,11 @@ void CUGR::getGuides(const GRNet* net,
318318 layerIdx++) {
319319 guides.emplace_back (
320320 layerIdx,
321- BoxT (std::max (gpt.x - padding, 0 ),
322- std::max (gpt.y - padding, 0 ),
323- std::min (gpt.x + padding, (int ) grid_graph_->getSize (0 ) - 1 ),
324- std::min (gpt.y + padding,
321+ BoxT (std::max (gpt.x () - padding, 0 ),
322+ std::max (gpt.y () - padding, 0 ),
323+ std::min (gpt.x () + padding,
324+ (int ) grid_graph_->getSize (0 ) - 1 ),
325+ std::min (gpt.y () + padding,
325326 (int ) grid_graph_->getSize (1 ) - 1 )));
326327 area_of_pin_patches_ += (guides.back ().second .x .range () + 1 )
327328 * (guides.back ().second .y .range () + 1 );
@@ -354,8 +355,9 @@ void CUGR::getGuides(const GRNet* net,
354355 || layerIndex >= grid_graph_->getNumLayers ()) {
355356 continue ;
356357 }
357- if (getSpareResource ({layerIndex, point.x , point.y }) >= 1.0 ) {
358- guides.emplace_back (layerIndex, BoxT (point.x , point.y ));
358+ if (getSpareResource ({layerIndex, point.x (), point.y ()})
359+ >= 1.0 ) {
360+ guides.emplace_back (layerIndex, BoxT (point.x (), point.y ()));
359361 area_of_wire_patches_ += 1 ;
360362 patched = true ;
361363 }
0 commit comments