Skip to content

Commit d592699

Browse files
committed
grt: resolve CUGR review comments
Signed-off-by: rafaelmoresco <[email protected]>
1 parent 542132a commit d592699

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/grt/src/cugr/src/GridGraph.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,8 @@ bool GridGraph::findODBAccessPoints(
372372
AccessPointSet& selected_access_points) const
373373
{
374374
std::vector<odb::dbAccessPoint*> access_points;
375-
int amount_per_x = design_->getDieRegion().hx() / x_size_;
376-
int amount_per_y = design_->getDieRegion().hy() / y_size_;
375+
const int amount_per_x = design_->getDieRegion().hx() / x_size_;
376+
const int amount_per_y = design_->getDieRegion().hy() / y_size_;
377377
odb::dbNet* db_net = net->getDbNet();
378378
if (db_net->getBTermCount() != 0) {
379379
for (odb::dbBTerm* bterms : db_net->getBTerms()) {
@@ -434,9 +434,8 @@ AccessPointSet GridGraph::selectAccessPoints(const GRNet* net) const
434434
selected_access_points.reserve(net->getNumPins());
435435
const auto& boundingBox = net->getBoundingBox();
436436
const PointT netCenter(boundingBox.cx(), boundingBox.cy());
437-
if (findODBAccessPoints(net, selected_access_points)) {
438-
// Skips calculations if DRT already created APs in ODB
439-
} else {
437+
// Skips calculations if DRT already created APs in ODB
438+
if (!findODBAccessPoints(net, selected_access_points)) {
440439
for (const std::vector<GRPoint>& accessPoints : net->getPinAccessPoints()) {
441440
std::pair<int, int> bestAccessDist = {0, std::numeric_limits<int>::max()};
442441
int bestIndex = -1;
@@ -479,7 +478,7 @@ AccessPointSet GridGraph::selectAccessPoints(const GRNet* net) const
479478
}
480479

481480
const PointT selectedPoint = accessPoints[bestIndex];
482-
const AccessPoint ap{selectedPoint, {}};
481+
const AccessPoint ap{.point = selectedPoint, .layers = {}};
483482
auto it = selected_access_points.emplace(ap).first;
484483
IntervalT& fixedLayerInterval = it->layers;
485484
for (const auto& point : accessPoints) {

0 commit comments

Comments
 (0)