Skip to content

Commit c73ce44

Browse files
committed
gpl: add veritcal makers to the chart on TD & RD iterations
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
1 parent a62b810 commit c73ce44

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

src/gpl/src/graphics.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,18 @@ void Graphics::addIter(const int iter)
400400
chart_->addPoint(iter, block->dbuToMicrons(nbc_->getHpwl()));
401401
}
402402

403+
void Graphics::addTimingDrivenIter(const int iter)
404+
{
405+
chart_->addVerticalMarker(iter, gui::Painter::kTurquoise);
406+
}
407+
408+
void Graphics::addRoutabilityIter(const int iter, const bool revert)
409+
{
410+
gui::Painter::Color color
411+
= revert ? gui::Painter::kRed : gui::Painter::kGreen;
412+
chart_->addVerticalMarker(iter, color);
413+
}
414+
403415
void Graphics::cellPlot(bool pause)
404416
{
405417
gui::Gui::get()->redraw();

src/gpl/src/graphics.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ class Graphics : public gui::Renderer, public gui::HeatMapDataSource
5656

5757
// Update the chart for the current iter
5858
void addIter(int iter);
59+
void addTimingDrivenIter(int iter);
60+
void addRoutabilityIter(int iter, bool revert);
5961

6062
// Draw the MBFF mapping
6163
void mbffMapping(const LineSegs& segs);

src/gpl/src/nesterovPlace.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,10 @@ int NesterovPlace::doNesterovPlace(int start_iter)
521521
// update db's instance location from current density coordinates
522522
updateDb();
523523

524+
if (graphics_) {
525+
graphics_->addTimingDrivenIter(iter);
526+
}
527+
524528
if (graphics_ && npVars_.debug_generate_images) {
525529
graphics_->saveLabeledImage(
526530
fmt::format("{}/timing_{:05d}_0.png", timing_driven_dir, iter),
@@ -815,6 +819,10 @@ int NesterovPlace::doNesterovPlace(int start_iter)
815819
is_routability_need_ = result.first;
816820
bool isRevertInitNeeded = result.second;
817821

822+
if (graphics_) {
823+
graphics_->addRoutabilityIter(iter, isRevertInitNeeded);
824+
}
825+
818826
// if routability is needed
819827
if (is_routability_need_ || isRevertInitNeeded) {
820828
// revert back the current density penality

0 commit comments

Comments
 (0)