Repository navigation
Conversation
…dy demand Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
There was a problem hiding this comment.
Code Review
This pull request updates the RUDY congestion estimation to correctly handle zero-area nets (where terminals are aligned horizontally or vertically on a line) instead of skipping them. It calculates the demand for these line nets using a length-based ratio rather than an area-based ratio. Additionally, comprehensive unit tests have been added to TestGlobalRouter.cpp to verify the wire area distribution for line and rectangular nets, ensuring that a line net behaves as the limit of an infinitely thin rectangle. There are no review comments, and I have no feedback to provide.
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
| @@ -134,9 +135,16 @@ class Rudy | |||
| if (!net_rect.overlaps(tile_box)) { | |||
There was a problem hiding this comment.
- src/grt/include/grt/Rudy.h:135 bug: a line net that lies exactly on a tile boundary still gets zero demand. odb::Rect::overlaps() uses strict comparisons. For a horizontal line at y == tile.yMin(), the tile above fails tile.ylo < net.yhi and the tile below fails tile.yhi > net.ylo. Both tiles skip the net, so it is dropped silently, which is the bug this PR is meant to fix. The same happens for a vertical line on a column boundary, and for a line on the grid's top or right edge. Suggestion: for is_line, use intersects() plus a half-open rule so each line goes to exactly one row or column (e.g. tile.ylo <= y < tile.yhi, with the last row taking y == grid.yMax). Using intersects() alone would count the line in both
With the fix, RUDY assigns a line net on a tile boundary to the tile above or to the right. That's the same floor-division rule grt uses to place pins in gcells (Grid::getPositionOnGrid), and intersects lets the net add its demand to that tile. Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
| / static_cast<float>(tile_box.area()); | ||
| const odb::Rect intersect = net_rect.intersect(tile_box); | ||
| const auto tile_area = static_cast<float>(tile_box.area()); | ||
| if (is_line) { |
There was a problem hiding this comment.
Wouldn't it be easier to set the net_rect's minimum height or width to wire_width_ at the beginning of this method?
Then this if would be unnecessary, the result would be the same, and I think that the code would be cleaner.
There was a problem hiding this comment.
Following @LucasYuki's suggestion, a net whose bounding box is narrower than wire_width_ in x or y is now treated as at least wire_width_ wide in that direction, instead of using its actual, near-zero, dimension.
I see this as a bug fix, RUDY should use wire_width_ for adding demand!
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
AI review summary
|
- Nets starting past the last full tile got an out-of-range start index. Clamp it to the last tile. - Line nets on the die edge were grown outside the die. Move them back inside. Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
|
I included your suggested fix @jhkim-pii, here is the before and after images: |
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
|
@maliberty tests are passing. I just restarted another secure-CI to reassess the QoR impact |
| ,"DRT::max_slew_slack" : "-56.72679662704468" | ||
| ,"DRT::max_capacitance_slack" : "-65.76353516509255" |
There was a problem hiding this comment.
Is it OK that we loosened the test limits so much?







Summary
Currently RUDY does not increase demand for nets which are perfectly aligned. Such as when its pins have all the same x or y (dbNet::getTermBBox returns zero area for such nets).
Now we add demand to the tile based on the RUDY calculated wire width and its overlap with the tile.
Toy example with 4 IO pins and RUDY heatmap:
Before, and after:

Type of Change
Impact
Minor. Metrics within chance level.



Verification
./etc/Build.sh).