Skip to content

Comments

grt: infinite resources for testing purpose#9500

Merged
eder-matheus merged 20 commits intoThe-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:grt-infinite-resources
Feb 24, 2026
Merged

grt: infinite resources for testing purpose#9500
eder-matheus merged 20 commits intoThe-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:grt-infinite-resources

Conversation

@openroad-ci
Copy link
Collaborator

Global route flag to enable "infinite" capacity for testing purpose

Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
…oject-private/OpenROAD into grt-infinite-resources
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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
  1. Define tunable parameters as named constants instead of using hardcoded magic numbers.

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
Signed-off-by: Jonas Gava <jfgava@precisioninno.com>
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@jfgava jfgava requested a review from eder-matheus February 22, 2026 20:00
| `-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. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Member

@eder-matheus eder-matheus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll approve it now, but will merge after the update on the README. Also, merge the latest master to bypass the CI issues.

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@eder-matheus eder-matheus merged commit 0aa5e62 into The-OpenROAD-Project:master Feb 24, 2026
13 checks passed
@openroad-ci openroad-ci deleted the grt-infinite-resources branch February 24, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants