grt: infinite resources for testing purpose#9500
Conversation
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…ROAD into grt-infinite-resources
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…ROAD into grt-infinite-resources
…ROAD into grt-infinite-resources
…oject-private/OpenROAD into grt-infinite-resources
…ROAD into grt-infinite-resources
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…ROAD into grt-infinite-resources
There was a problem hiding this comment.
Code Review
The pull request introduces an -infinite_cap flag for testing purposes, which is a useful addition for debugging congestion-related issues. The implementation correctly integrates the flag into the Tcl interface and the core routing logic. However, there are opportunities to improve the efficiency of the capacity setting logic and to avoid magic numbers. Specifically, the value used for "infinite" capacity (1000) might be too small for very large designs, and the geometric capacity calculations are still performed even when the infinite capacity flag is enabled.
src/grt/src/GlobalRouter.cpp
Outdated
| int x_grids = grid_->getXGrids(); | ||
| int y_grids = grid_->getYGrids(); | ||
| const int BIG_INT = std::numeric_limits<int>::max(); | ||
| const int16_t big_cap = 1000; |
There was a problem hiding this comment.
The value 1000 is a magic number and might not be large enough to represent "infinite" capacity in designs with very high track density (e.g., where a GCell could physically accommodate more than 1000 tracks). Using a value that is too small could lead to unexpected congestion even when this flag is enabled. Consider using the maximum value for the underlying data type (int16_t).
const int16_t big_cap = std::numeric_limits<int16_t>::max();References
- Define tunable parameters as named constants instead of using hardcoded magic numbers.
src/grt/src/GlobalRouter.cpp
Outdated
| int min_cap = BIG_INT; | ||
| for (int y = 1; y <= y_grids; y++) { | ||
| for (int x = 1; x < x_grids; x++) { | ||
| const int cap = inside_layer_range ? computeGCellCapacity(x - 1, |
There was a problem hiding this comment.
When infinite_capacity_ is enabled, the call to computeGCellCapacity is unnecessary as its result is ignored in favor of big_cap. Since this function performs geometric calculations and is called inside a nested loop over all GCells and layers, avoiding it can improve performance. This applies to both the horizontal and vertical capacity loops.
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…ROAD into grt-infinite-resources
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
src/grt/README.md
Outdated
| | `-end_incremental` | This flag run incremental GRT with the nets modified. The default is false. | | ||
| | `-use_cugr` | This flag run GRT using CUGR as the router solver. NOTE: this is not ready for production. | | ||
| | `-resistance_aware` | This flag enables resistance-aware layer assignment and 3D routing. NOTE: this is not ready for production. | | ||
| | `-infinite_cap` | Enables "infinite" gcell capacity for testing purpose. | |
There was a problem hiding this comment.
Please add a NOTE: this is not recommended for production flows., to reinforce that this is only for testing.
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
eder-matheus
left a comment
There was a problem hiding this comment.
I'll approve it now, but will merge after the update on the README. Also, merge the latest master to bypass the CI issues.
|
clang-tidy review says "All clean, LGTM! 👍" |
…ROAD into grt-infinite-resources
|
clang-tidy review says "All clean, LGTM! 👍" |
Global route flag to enable "infinite" capacity for testing purpose