-
Notifications
You must be signed in to change notification settings - Fork 865
grt: replace logger report with logger info and fix asserts in CUGR #9945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -137,12 +137,17 @@ void CUGR::updateOverflowNets(std::vector<int>& net_indices) | |||||
| net_indices.push_back(net->getIndex()); | ||||||
| } | ||||||
| } | ||||||
| logger_->report("Nets with overflow: {}.", net_indices.size()); | ||||||
| const int num_nets = gr_nets_.size(); | ||||||
| logger_->info(utl::GRT, | ||||||
| 1258, | ||||||
| "{} / {} nets have overflow.", | ||||||
| netIndices.size(), | ||||||
| num_nets); | ||||||
| } | ||||||
|
|
||||||
| void CUGR::patternRoute(std::vector<int>& net_indices) | ||||||
| { | ||||||
| logger_->report("Stage 1: Pattern routing."); | ||||||
| logger_->info(utl::GRT, 1259, "Stage 1: pattern routing."); | ||||||
|
|
||||||
| if (critical_nets_percentage_ != 0) { | ||||||
| setInitialNetSlacks(); | ||||||
|
|
@@ -172,7 +177,8 @@ void CUGR::patternRouteWithDetours(std::vector<int>& net_indices) | |||||
| if (net_indices.empty()) { | ||||||
| return; | ||||||
| } | ||||||
| logger_->report("Stage 2: Pattern routing with detours."); | ||||||
| logger_->info( | ||||||
| utl::GRT, 1260, "Stage 2: pattern routing with possible detours."); | ||||||
|
|
||||||
| if (critical_nets_percentage_ != 0) { | ||||||
| calculatePartialSlack(); | ||||||
|
|
@@ -206,7 +212,8 @@ void CUGR::mazeRoute(std::vector<int>& net_indices) | |||||
| if (net_indices.empty()) { | ||||||
| return; | ||||||
| } | ||||||
| logger_->report("Stage 3: Maze routing on sparsified graph."); | ||||||
| logger_->info( | ||||||
| utl::GRT, 1261, "Stage 3: maze routing on sparsified routing graph."); | ||||||
|
|
||||||
| if (critical_nets_percentage_ != 0) { | ||||||
| calculatePartialSlack(); | ||||||
|
|
@@ -219,19 +226,16 @@ void CUGR::mazeRoute(std::vector<int>& net_indices) | |||||
| grid_graph_->extractWireCostView(wire_cost_view); | ||||||
| sortNetIndices(net_indices); | ||||||
| SparseGrid grid(10, 10, 0, 0); | ||||||
| for (const int net_index : net_indices) { | ||||||
| GRNet* net = gr_nets_[net_index].get(); | ||||||
| if (net->getNumPins() < 2) { | ||||||
| continue; | ||||||
| } | ||||||
| MazeRoute maze_route(net, grid_graph_.get(), logger_); | ||||||
| maze_route.constructSparsifiedGraph(wire_cost_view, grid); | ||||||
| maze_route.run(); | ||||||
| std::shared_ptr<SteinerTreeNode> tree = maze_route.getSteinerTree(); | ||||||
| for (const int netIndex : netIndices) { | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: use of undeclared identifier 'netIndices'; did you mean 'net_indices'? [clang-diagnostic-error]
Suggested change
Additional contextsrc/grt/src/cugr/src/CUGR.cpp:209: 'net_indices' declared here void CUGR::mazeRoute(std::vector<int>& net_indices)
^ |
||||||
| GRNet* net = gr_nets_[netIndex].get(); | ||||||
| MazeRoute mazeRoute(net, grid_graph_.get(), logger_); | ||||||
| mazeRoute.constructSparsifiedGraph(wireCostView, grid); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: use of undeclared identifier 'wireCostView'; did you mean 'wire_cost_view'? [clang-diagnostic-error]
Suggested change
Additional contextsrc/grt/src/cugr/src/CUGR.cpp:224: 'wire_cost_view' declared here GridGraphView<CostT> wire_cost_view;
^ |
||||||
| mazeRoute.run(); | ||||||
| std::shared_ptr<SteinerTreeNode> tree = mazeRoute.getSteinerTree(); | ||||||
| if (tree == nullptr) { | ||||||
| logger_->error(GRT, | ||||||
| 610, | ||||||
| "Failed to generate Steiner tree for net {}.", | ||||||
| logger_->error(utl::GRT, | ||||||
| 1270, | ||||||
| "Steiner tree is null for net {} during maze routing.", | ||||||
| net->getName()); | ||||||
| } | ||||||
|
|
||||||
|
|
@@ -294,10 +298,14 @@ void CUGR::write(const std::string& guide_file) | |||||
| } | ||||||
| ss << ")\n"; | ||||||
| } | ||||||
| logger_->report("Total area of pin access patches: {}.", | ||||||
| area_of_pin_patches_); | ||||||
| logger_->report("Total area of wire segment patches: {}.", | ||||||
| area_of_wire_patches_); | ||||||
| logger_->info(utl::GRT, | ||||||
| 1262, | ||||||
| "Total area of pin access patches: {}.", | ||||||
| area_of_pin_patches_); | ||||||
| logger_->info(utl::GRT, | ||||||
| 1263, | ||||||
| "Total area of wire segment patches: {}.", | ||||||
| area_of_wire_patches_); | ||||||
| std::ofstream fout(guide_file); | ||||||
| fout << ss.str(); | ||||||
| fout.close(); | ||||||
|
|
@@ -424,10 +432,11 @@ void CUGR::getGuides(const GRNet* net, | |||||
|
|
||||||
| // 1. Pin access patches | ||||||
| if (constants_.min_routing_layer + 1 >= grid_graph_->getNumLayers()) { | ||||||
| logger_->error(GRT, | ||||||
| 611, | ||||||
| "Min routing layer {} exceeds available layers.", | ||||||
| constants_.min_routing_layer); | ||||||
| logger_->error(utl::GRT, | ||||||
| 1271, | ||||||
| "Min routing layer {} exceeds number of layers {}.", | ||||||
| constants_.min_routing_layer, | ||||||
| grid_graph_->getNumLayers()); | ||||||
| } | ||||||
| for (auto& gpts : net->getPinAccessPoints()) { | ||||||
| for (auto& gpt : gpts) { | ||||||
|
|
@@ -499,7 +508,7 @@ void CUGR::getGuides(const GRNet* net, | |||||
|
|
||||||
| void CUGR::printStatistics() const | ||||||
| { | ||||||
| logger_->report("Routing statistics"); | ||||||
| logger_->info(utl::GRT, 1264, "Routing statistics:"); | ||||||
|
|
||||||
| // wire length and via count | ||||||
| uint64_t wire_length = 0; | ||||||
|
|
@@ -559,12 +568,15 @@ void CUGR::printStatistics() const | |||||
| } | ||||||
| } | ||||||
|
|
||||||
| logger_->report("Wire length: {}", | ||||||
| wire_length / grid_graph_->getM2Pitch()); | ||||||
| logger_->report("Total via count: {}", via_count); | ||||||
| logger_->report("Total wire overflow: {}", (int) overflow); | ||||||
| logger_->report("Min resource: {}", min_resource); | ||||||
| logger_->report("Bottleneck: {}", bottleneck); | ||||||
| logger_->info(utl::GRT, | ||||||
| 1265, | ||||||
| "Wire length (metric): {}.", | ||||||
| wireLength / grid_graph_->getM2Pitch()); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: use of undeclared identifier 'wireLength'; did you mean 'wire_length'? [clang-diagnostic-error]
Suggested change
Additional contextsrc/grt/src/cugr/src/CUGR.cpp:513: 'wire_length' declared here uint64_t wire_length = 0;
^ |
||||||
| logger_->info(utl::GRT, 1266, "Total via count: {}.", viaCount); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: use of undeclared identifier 'viaCount'; did you mean 'via_count'? [clang-diagnostic-error]
Suggested change
Additional contextsrc/grt/src/cugr/src/CUGR.cpp:514: 'via_count' declared here int via_count = 0;
^ |
||||||
| logger_->info(utl::GRT, 1267, "Total wire overflow: {}.", (int) overflow); | ||||||
|
|
||||||
| logger_->info(utl::GRT, 1268, "Min resource: {}.", minResource); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: use of undeclared identifier 'minResource'; did you mean 'min_resource'? [clang-diagnostic-error]
Suggested change
Additional contextsrc/grt/src/cugr/src/CUGR.cpp:546: 'min_resource' declared here CapacityT min_resource = std::numeric_limits<CapacityT>::max();
^ |
||||||
| logger_->info(utl::GRT, 1269, "Bottleneck: {}.", bottleneck); | ||||||
| } | ||||||
|
|
||||||
| void CUGR::updateDbCongestion() | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: use of undeclared identifier 'netIndices'; did you mean 'net_indices'? [clang-diagnostic-error]
Additional context
src/grt/src/cugr/src/CUGR.cpp:130: 'net_indices' declared here