grt: replace assert with logger error in CUGR maze route#9870
Conversation
Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request replaces assert calls with logger_->error for better error reporting, which is a good improvement. I've found one potential issue in mazeRoute where using logger_->error could lead to an inconsistent program state. I've suggested using logger_->warn and continuing to the next net to make the router more robust. The other changes look good.
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
|
@eder-matheus Kindly review it .Thnaks in advance. |
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
eder-matheus
left a comment
There was a problem hiding this comment.
Jenkins is failing on multiple CUGR tests. Investigate why it's happening.
| sortNetIndices(net_indices); | ||
| for (const int net_index : net_indices) { | ||
| if (gr_nets_[net_index]->getNumPins() < 2) { | ||
| continue; |
There was a problem hiding this comment.
Why removing the continue here? If this check isn't relevant, you can just remove the if. But I think they are actually relevant, so restore them.
Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
|
||
| auto& routing_tree = net->getRoutingTree(); | ||
| if (!routing_tree) { | ||
| continue; |
There was a problem hiding this comment.
Restore continue or explain why removing it.
| for (int layer = 0; layer < grid_graph_->getNumLayers(); layer++) { | ||
| odb::dbTechLayer* db_layer = db_tech->findRoutingLayer(layer + 1); | ||
| if (db_layer == nullptr) { | ||
| continue; |
There was a problem hiding this comment.
Restore continue or explain why removing it.
Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
@eder-matheus All |
Fixes #9869
Replaces raw
assertstatements insrc/grt/src/cugr/src/CUGR.cppwith properlogger_->error()calls following OpenROAD conventions.assert(tree != nullptr)is replaced with logger error GRT 610 andassert(constants_.min_routing_layer + 1 < grid_graph_->getNumLayers())is replaced with logger error GRT 611. Removed unused#include <cassert>. Raw asserts crash silently in release builds whilelogger_->error()provides proper error reporting consistent with the rest of the codebase.