Skip to content

Commit fccb5de

Browse files
committed
grt: fix crash
Signed-off-by: Eder Monteiro <[email protected]>
1 parent 4c75167 commit fccb5de

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/grt/src/GlobalRouter.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4784,6 +4784,10 @@ void GlobalRouter::reportNetLayerWirelengths(odb::dbNet* db_net,
47844784
void GlobalRouter::reportLayerWireLengths(bool global_route,
47854785
bool detailed_route)
47864786
{
4787+
if (block_ == nullptr) {
4788+
block_ = db_->getChip()->getBlock();
4789+
}
4790+
47874791
if (global_route) {
47884792
logger_->info(GRT, 278, "Global route wire length by layer:");
47894793
std::vector<int64_t> lengths(db_->getTech()->getRoutingLayerCount() + 1);
@@ -4847,7 +4851,7 @@ void GlobalRouter::reportLayerWireLengths(bool global_route,
48474851
for (size_t i = 0; i < lengths.size(); i++) {
48484852
int64_t length = lengths[i];
48494853
if (length > 0) {
4850-
odb::dbTechLayer* layer = routing_layers_[i];
4854+
odb::dbTechLayer* layer = db_->getTech()->findRoutingLayer(i);
48514855
logger_->report("{} {}um {}%",
48524856
layer->getName(),
48534857
block_->dbuToMicrons(length),

0 commit comments

Comments
 (0)