Skip to content

Commit a4045d9

Browse files
committed
grt: improve verbose report
Signed-off-by: Jonas Gava <[email protected]>
1 parent 3784d8d commit a4045d9

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

src/grt/src/GlobalRouter.cpp

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3246,6 +3246,7 @@ float GlobalRouter::estimatePathResistance(odb::dbITerm* pin1,
32463246
std::vector<PinGridLocation> pin_locs = getPinGridPositions(db_net);
32473247
PinGridLocation* start_loc = nullptr;
32483248
PinGridLocation* end_loc = nullptr;
3249+
odb::dbTech* tech = db_->getTech();
32493250

32503251
for (auto& loc : pin_locs) {
32513252
if (loc.iterm == pin1) {
@@ -3331,8 +3332,8 @@ float GlobalRouter::estimatePathResistance(odb::dbITerm* pin1,
33313332
if (verbose) {
33323333
logger_->report("Via resistance: {} - From {} to {} at ({}, {})",
33333334
getViaResistance(prev.layer(), curr.layer()),
3334-
curr.layer(),
3335-
prev.layer(),
3335+
tech->findRoutingLayer(curr.layer())->getConstName(),
3336+
tech->findRoutingLayer(prev.layer())->getConstName(),
33363337
curr.x(),
33373338
curr.y());
33383339
}
@@ -3348,7 +3349,7 @@ float GlobalRouter::estimatePathResistance(odb::dbITerm* pin1,
33483349
prev.y(),
33493350
curr.x(),
33503351
curr.y(),
3351-
curr.layer());
3352+
tech->findRoutingLayer(curr.layer())->getConstName());
33523353
}
33533354
}
33543355
curr = prev;
@@ -3373,6 +3374,7 @@ float GlobalRouter::estimatePathResistance(odb::dbITerm* pin1,
33733374
std::vector<PinGridLocation> pin_locs = getPinGridPositions(db_net);
33743375
PinGridLocation* start_loc = nullptr;
33753376
PinGridLocation* end_loc = nullptr;
3377+
odb::dbTech* tech = db_->getTech();
33763378

33773379
for (auto& loc : pin_locs) {
33783380
if (loc.iterm == pin1) {
@@ -3517,10 +3519,11 @@ float GlobalRouter::estimatePathResistance(odb::dbITerm* pin1,
35173519
total_resistance
35183520
+= getViaResistance(start_loc->conn_layer, start_layer_id);
35193521
if (verbose) {
3520-
logger_->report("Via resistance (Start): {} - From Layer {} to {}",
3521-
getViaResistance(start_loc->conn_layer, start_layer_id),
3522-
start_loc->conn_layer,
3523-
start_layer_id);
3522+
logger_->report(
3523+
"Via resistance (Start): {} - From Layer {} to {}",
3524+
getViaResistance(start_loc->conn_layer, start_layer_id),
3525+
tech->findRoutingLayer(start_loc->conn_layer)->getConstName(),
3526+
tech->findRoutingLayer(start_layer_id)->getConstName());
35243527
}
35253528
}
35263529

@@ -3533,8 +3536,8 @@ float GlobalRouter::estimatePathResistance(odb::dbITerm* pin1,
35333536
if (verbose) {
35343537
logger_->report("Via resistance (Corner): {} - Between {} and {}",
35353538
user_via_res,
3536-
h_layer->getName(),
3537-
v_layer->getName());
3539+
h_layer->getConstName(),
3540+
v_layer->getConstName());
35383541
}
35393542
}
35403543
}
@@ -3549,7 +3552,7 @@ float GlobalRouter::estimatePathResistance(odb::dbITerm* pin1,
35493552
p0.y(),
35503553
p1.x(),
35513554
p1.y(),
3552-
mapped_layer);
3555+
tech->findRoutingLayer(mapped_layer)->getConstName());
35533556
}
35543557

35553558
// End via
@@ -3558,10 +3561,11 @@ float GlobalRouter::estimatePathResistance(odb::dbITerm* pin1,
35583561
: v_layer->getRoutingLevel();
35593562
total_resistance += getViaResistance(end_loc->conn_layer, end_layer_id);
35603563
if (verbose) {
3561-
logger_->report("Via resistance (End): {} - From Layer {} to {}",
3562-
getViaResistance(end_loc->conn_layer, end_layer_id),
3563-
end_loc->conn_layer,
3564-
end_layer_id);
3564+
logger_->report(
3565+
"Via resistance (End): {} - From Layer {} to {}",
3566+
getViaResistance(end_loc->conn_layer, end_layer_id),
3567+
tech->findRoutingLayer(end_loc->conn_layer)->getConstName(),
3568+
tech->findRoutingLayer(end_layer_id)->getConstName());
35653569
}
35663570
}
35673571
}

0 commit comments

Comments
 (0)