From 596f2f87f6db37b3ec86008fbf5c5beab534dccb Mon Sep 17 00:00:00 2001 From: Eder Monteiro Date: Wed, 6 Nov 2024 11:22:06 -0300 Subject: [PATCH 1/4] grt: update warn message with net information Signed-off-by: Eder Monteiro --- src/grt/src/MakeWireParasitics.cpp | 13 ++++++++++--- src/grt/src/MakeWireParasitics.h | 2 ++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/grt/src/MakeWireParasitics.cpp b/src/grt/src/MakeWireParasitics.cpp index 0b1e00c2ee3..fddb71ea2c6 100644 --- a/src/grt/src/MakeWireParasitics.cpp +++ b/src/grt/src/MakeWireParasitics.cpp @@ -106,7 +106,8 @@ void MakeWireParasitics::estimateParasitcs(odb::dbNet* net, = parasitics_->makeParasiticNetwork(sta_net, false, analysis_point); makeRouteParasitics( net, route, sta_net, corner, analysis_point, parasitic, node_map); - makeParasiticsToPins(pins, node_map, corner, analysis_point, parasitic); + makeParasiticsToPins( + pins, net, node_map, corner, analysis_point, parasitic); if (spef_writer) { spef_writer->writeNet(corner, sta_net, parasitic); @@ -256,19 +257,21 @@ void MakeWireParasitics::makeRouteParasitics( void MakeWireParasitics::makeParasiticsToPins( std::vector& pins, + odb::dbNet* net, NodeRoutePtMap& node_map, sta::Corner* corner, sta::ParasiticAnalysisPt* analysis_point, sta::Parasitic* parasitic) { for (Pin& pin : pins) { - makeParasiticsToPin(pin, node_map, corner, analysis_point, parasitic); + makeParasiticsToPin(pin, net, node_map, corner, analysis_point, parasitic); } } // Make parasitics for the wire from the pin to the grid location of the pin. void MakeWireParasitics::makeParasiticsToPin( Pin& pin, + odb::dbNet* net, NodeRoutePtMap& node_map, sta::Corner* corner, sta::ParasiticAnalysisPt* analysis_point, @@ -342,7 +345,11 @@ void MakeWireParasitics::makeParasiticsToPin( parasitic, resistor_id_++, res + via_res, pin_node, grid_node); parasitics_->incrCap(grid_node, cap / 2.0); } else { - logger_->warn(GRT, 26, "Missing route to pin {}.", pin.getName()); + logger_->warn(GRT, + 26, + "Missing route to pin {} in net {}.", + pin.getName(), + net->getName()); } } diff --git a/src/grt/src/MakeWireParasitics.h b/src/grt/src/MakeWireParasitics.h index bf3b5ecdab9..35813ebb017 100644 --- a/src/grt/src/MakeWireParasitics.h +++ b/src/grt/src/MakeWireParasitics.h @@ -110,11 +110,13 @@ class MakeWireParasitics : public AbstractMakeWireParasitics sta::Parasitic* parasitic, sta::Net* net) const; void makeParasiticsToPins(std::vector& pins, + odb::dbNet* net, NodeRoutePtMap& node_map, sta::Corner* corner, sta::ParasiticAnalysisPt* analysis_point, sta::Parasitic* parasitic); void makeParasiticsToPin(Pin& pin, + odb::dbNet* net, NodeRoutePtMap& node_map, sta::Corner* corner, sta::ParasiticAnalysisPt* analysis_point, From 239318f59aedd8e3b8df690faf97240ad7ec7643 Mon Sep 17 00:00:00 2001 From: Eder Monteiro Date: Thu, 7 Nov 2024 17:57:02 -0300 Subject: [PATCH 2/4] grt: don't use APs when loading guides from odb Signed-off-by: Eder Monteiro --- src/grt/include/grt/GlobalRouter.h | 2 +- src/grt/src/GlobalRouter.cpp | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/grt/include/grt/GlobalRouter.h b/src/grt/include/grt/GlobalRouter.h index bcf9a6cfb3d..47b15ef7f81 100644 --- a/src/grt/include/grt/GlobalRouter.h +++ b/src/grt/include/grt/GlobalRouter.h @@ -492,7 +492,7 @@ class GlobalRouter : public ant::GlobalRouteSource int macro_extension_; bool initialized_; int total_diodes_count_; - bool incremental_; + bool skip_drt_aps_; // Region adjustment variables std::vector region_adjustments_; diff --git a/src/grt/src/GlobalRouter.cpp b/src/grt/src/GlobalRouter.cpp index 3a4a44ab5af..93b7930c61f 100644 --- a/src/grt/src/GlobalRouter.cpp +++ b/src/grt/src/GlobalRouter.cpp @@ -98,7 +98,7 @@ GlobalRouter::GlobalRouter() macro_extension_(0), initialized_(false), total_diodes_count_(0), - incremental_(false), + skip_drt_aps_(false), verbose_(false), seed_(0), caps_perturbation_percentage_(0), @@ -286,7 +286,7 @@ void GlobalRouter::globalRoute(bool save_guides, } grouter_cbk_ = new GRouteDbCbk(this); grouter_cbk_->addOwner(block_); - incremental_ = true; + skip_drt_aps_ = true; } else { try { if (end_incremental) { @@ -294,7 +294,7 @@ void GlobalRouter::globalRoute(bool save_guides, grouter_cbk_->removeOwner(); delete grouter_cbk_; grouter_cbk_ = nullptr; - incremental_ = false; + skip_drt_aps_ = false; } else { clear(); block_ = db_->getChip()->getBlock(); @@ -913,9 +913,9 @@ std::vector GlobalRouter::findOnGridPositions( // temporarily ignore odb access points when incremental changes // are made, in order to avoid getting invalid APs - // TODO: remove the !incremental_ flag and update APs incrementally in odb + // TODO: remove the !skip_drt_aps_ flag and update APs incrementally in odb has_access_points - = findPinAccessPointPositions(pin, ap_positions) && !incremental_; + = findPinAccessPointPositions(pin, ap_positions) && !skip_drt_aps_; std::vector positions_on_grid; @@ -2078,6 +2078,7 @@ void GlobalRouter::loadGuidesFromDB() if (!routes_.empty()) { return; } + skip_drt_aps_ = true; initGridAndNets(); for (odb::dbNet* net : block_->getNets()) { for (odb::dbGuide* guide : net->getGuides()) { From f3ff4387ee0b6042aadb067d2505845cfd038e9a Mon Sep 17 00:00:00 2001 From: Eder Monteiro Date: Thu, 7 Nov 2024 18:18:10 -0300 Subject: [PATCH 3/4] grt: add TODO comment Signed-off-by: Eder Monteiro --- src/grt/include/grt/GlobalRouter.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/grt/include/grt/GlobalRouter.h b/src/grt/include/grt/GlobalRouter.h index 47b15ef7f81..c15d97eb8cc 100644 --- a/src/grt/include/grt/GlobalRouter.h +++ b/src/grt/include/grt/GlobalRouter.h @@ -492,6 +492,7 @@ class GlobalRouter : public ant::GlobalRouteSource int macro_extension_; bool initialized_; int total_diodes_count_; + // TODO: remove this flag after support incremental updates on DRT PA bool skip_drt_aps_; // Region adjustment variables From 3582fa5195f713b01ede0728b659e467a3c896e7 Mon Sep 17 00:00:00 2001 From: Eder Monteiro Date: Thu, 7 Nov 2024 18:36:18 -0300 Subject: [PATCH 4/4] grt: clang-tidy Signed-off-by: Eder Monteiro --- src/grt/include/grt/GlobalRouter.h | 2 +- src/grt/src/GlobalRouter.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/grt/include/grt/GlobalRouter.h b/src/grt/include/grt/GlobalRouter.h index c15d97eb8cc..0454f5decf6 100644 --- a/src/grt/include/grt/GlobalRouter.h +++ b/src/grt/include/grt/GlobalRouter.h @@ -493,7 +493,7 @@ class GlobalRouter : public ant::GlobalRouteSource bool initialized_; int total_diodes_count_; // TODO: remove this flag after support incremental updates on DRT PA - bool skip_drt_aps_; + bool skip_drt_aps_{false}; // Region adjustment variables std::vector region_adjustments_; diff --git a/src/grt/src/GlobalRouter.cpp b/src/grt/src/GlobalRouter.cpp index 93b7930c61f..4dd533b25cc 100644 --- a/src/grt/src/GlobalRouter.cpp +++ b/src/grt/src/GlobalRouter.cpp @@ -98,7 +98,6 @@ GlobalRouter::GlobalRouter() macro_extension_(0), initialized_(false), total_diodes_count_(0), - skip_drt_aps_(false), verbose_(false), seed_(0), caps_perturbation_percentage_(0),