Skip to content

Commit 6cfbae0

Browse files
committed
gpl: fix inf bug, use microns for area, remove redundant overflow tile counter
Signed-off-by: Augusto Berndt <[email protected]>
1 parent 4a9f91c commit 6cfbae0

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

src/gpl/src/graphicsImpl.cpp

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,13 @@ void GraphicsImpl::debugForNesterovPlace(
102102
stepLength_chart_->setYAxisFormats({"%.2e", "%.2f", "%.2f"});
103103
stepLength_chart_->setYAxisMin({0.0, 0.0, 0.0});
104104

105-
routing_chart_ = gui->addChart("GPL Routing",
106-
"Iteration",
107-
{"avg RUDY",
108-
"Std area",
109-
"Overflowed Tiles",
110-
"% Overflow Tiles",
111-
"Total RUDY Overflow"});
105+
routing_chart_ = gui->addChart(
106+
"GPL Routing",
107+
"Iteration",
108+
{"avg RUDY", "Std area", "% Overflow Tiles", "Total RUDY Overflow"});
112109
routing_chart_->setXAxisFormat("%d");
113-
routing_chart_->setYAxisFormats({"%.2f", "%.2f", "%.2f", "%.2f", "%.2f"});
114-
routing_chart_->setYAxisMin({0.0, 0.0, 0.0, 0.0, 0.0});
110+
routing_chart_->setYAxisFormats({"%.2f", "%.2f", "%.2f", "%.2f"});
111+
routing_chart_->setYAxisMin({0.0, 0.0, 0.0, 0.0});
115112

116113
initHeatmap();
117114
if (inst) {
@@ -569,7 +566,8 @@ void GraphicsImpl::addIter(const int iter, const double overflow)
569566
values.push_back(
570567
static_cast<double>(nbVec_[0]->getStoredCoordiDistance()));
571568
values.push_back(static_cast<double>(nbVec_[0]->getStoredGradDistance()));
572-
values.push_back(static_cast<double>(nbVec_[0]->getNesterovInstsArea()));
569+
values.push_back(
570+
block->dbuAreaToMicrons(nbVec_[0]->getNesterovInstsArea()));
573571
} else {
574572
values.push_back(0.0);
575573
values.push_back(0.0);
@@ -583,16 +581,20 @@ void GraphicsImpl::addIter(const int iter, const double overflow)
583581
std::vector<double> values;
584582
if (!nbVec_.empty() && nbVec_[0]) {
585583
values.push_back(static_cast<double>(rb_->getRudyAverage()));
586-
values.push_back(static_cast<double>(nbVec_[0]->getNesterovInstsArea()));
587-
values.push_back(static_cast<double>(rb_->getOverflowedTilesCount()));
588-
values.push_back(static_cast<double>(rb_->getOverflowedTilesCount())
589-
/ static_cast<double>(rb_->getTotalTilesCount())
590-
* 100.0);
584+
values.push_back(
585+
block->dbuAreaToMicrons(nbVec_[0]->getNesterovInstsArea()));
586+
const double total_tiles = static_cast<double>(rb_->getTotalTilesCount());
587+
values.push_back(total_tiles > 0.0 ? (static_cast<double>(
588+
rb_->getOverflowedTilesCount())
589+
/ total_tiles * 100.0)
590+
: 0.0);
591591
values.push_back((rb_->getTotalRudyOverflow()));
592592
} else {
593593
values.push_back(0.0);
594594
values.push_back(0.0);
595595
values.push_back(0.0);
596+
values.push_back(0.0);
597+
values.push_back(0.0);
596598
}
597599
routing_chart_->addPoint(iter, values);
598600
}

0 commit comments

Comments
 (0)