Skip to content
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

grt: fix handle of obstructions in single gcells #5703

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
165fd8b
grt: update ok files
eder-matheus Sep 6, 2024
ae9a8a9
grt: apply interval of obstructions to single gcells
eder-matheus Sep 6, 2024
b5f20b1
gpl: update ok files
eder-matheus Sep 7, 2024
f906305
test: update metrics limits
eder-matheus Sep 7, 2024
693cfae
grt: avoid going out of bounds in edges
eder-matheus Sep 9, 2024
3ca8219
grt: undo changes in FastRoute.cpp
eder-matheus Sep 9, 2024
7ce8b01
grt: update applyObstructionAdjustment to handle obstructions inside …
eder-matheus Sep 9, 2024
c2244a0
Merge branch 'master' of https://github.com/The-OpenROAD-Project-priv…
eder-matheus Sep 9, 2024
29db51a
grt: remove unneeded changes
eder-matheus Sep 10, 2024
94f682e
Merge branch 'master' of https://github.com/The-OpenROAD-Project-priv…
eder-matheus Sep 10, 2024
2884a4f
Merge branch 'master' into grt_fix
eder-matheus Sep 12, 2024
4b4155e
grt: extend obstructions to adjacent grid points
eder-matheus Sep 12, 2024
d127a07
grt: remove redundant call for clearNetRoute
eder-matheus Sep 12, 2024
a50a04c
Merge branch 'master' into grt_fix
eder-matheus Sep 13, 2024
54d0bcf
Merge branch 'master' into grt_fix
eder-matheus Sep 14, 2024
71cbe11
Merge branch 'master' into grt_fix
eder-matheus Sep 16, 2024
3dc2153
Revert "grt: extend obstructions to adjacent grid points"
eder-matheus Sep 16, 2024
eb58f73
grt: update ok files
eder-matheus Sep 16, 2024
ba4f0ec
test: update metrics limits
eder-matheus Sep 16, 2024
fb99068
gpl: update ok files
eder-matheus Sep 16, 2024
4ffbace
Merge branch 'master' into grt_fix
eder-matheus Sep 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/gpl/test/simple01-rd.ok
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@
[INFO GPL-0063] TotalRouteOverflowH2: 0.0
[INFO GPL-0064] TotalRouteOverflowV2: 0.0
[INFO GPL-0065] OverflowTileCnt2: 0
[INFO GPL-0066] 0.5%RC: 1.0
[INFO GPL-0067] 1.0%RC: 0.9866666674613953
[INFO GPL-0068] 2.0%RC: 0.9122807069828636
[INFO GPL-0069] 5.0%RC: 0.7670922127175839
[INFO GPL-0066] 0.5%RC: 0.9636363744735718
[INFO GPL-0067] 1.0%RC: 0.9000000059604645
[INFO GPL-0068] 2.0%RC: 0.8259259363015493
[INFO GPL-0069] 5.0%RC: 0.695714303038337
[INFO GPL-0070] 0.5rcK: 1.0
[INFO GPL-0071] 1.0rcK: 1.0
[INFO GPL-0072] 2.0rcK: 0.0
[INFO GPL-0073] 5.0rcK: 0.0
[INFO GPL-0074] FinalRC: 0.99333334
[INFO GPL-0074] FinalRC: 0.9318182
[INFO GPL-0077] FinalRC lower than targetRC(1.25), routability not needed.
[NesterovSolve] Iter: 290 overflow: 0.267 HPWL: 4778698
[NesterovSolve] Iter: 300 overflow: 0.233 HPWL: 4810713
Expand Down
10 changes: 5 additions & 5 deletions src/gpl/test/simple02-rd.ok
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@
[INFO GPL-0063] TotalRouteOverflowH2: 0.0
[INFO GPL-0064] TotalRouteOverflowV2: 0.0
[INFO GPL-0065] OverflowTileCnt2: 0
[INFO GPL-0066] 0.5%RC: 1.0
[INFO GPL-0067] 1.0%RC: 0.9866666674613953
[INFO GPL-0068] 2.0%RC: 0.9122807069828636
[INFO GPL-0069] 5.0%RC: 0.7670922127175839
[INFO GPL-0066] 0.5%RC: 0.9636363744735718
[INFO GPL-0067] 1.0%RC: 0.9000000059604645
[INFO GPL-0068] 2.0%RC: 0.8259259363015493
[INFO GPL-0069] 5.0%RC: 0.695714303038337
[INFO GPL-0070] 0.5rcK: 1.0
[INFO GPL-0071] 1.0rcK: 1.0
[INFO GPL-0072] 2.0rcK: 0.0
[INFO GPL-0073] 5.0rcK: 0.0
[INFO GPL-0074] FinalRC: 0.99333334
[INFO GPL-0074] FinalRC: 0.9318182
[INFO GPL-0077] FinalRC lower than targetRC(1.0), routability not needed.
[NesterovSolve] Iter: 290 overflow: 0.267 HPWL: 4778698
[NesterovSolve] Iter: 300 overflow: 0.233 HPWL: 4810713
Expand Down
8 changes: 4 additions & 4 deletions src/gpl/test/simple03-rd.ok
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@
[INFO GPL-0081] TotalRouteOverflow: 0.0
[INFO GPL-0082] OverflowTileCnt: 0
[INFO GPL-0083] 0.5%RC: 0.48812615871429443
[INFO GPL-0084] 1.0%RC: 0.4571320414543152
[INFO GPL-0085] 2.0%RC: 0.4332096576690674
[INFO GPL-0086] 5.0%RC: 0.39594786167144774
[INFO GPL-0087] FinalRC: 0.4726291
[INFO GPL-0084] 1.0%RC: 0.47513705492019653
[INFO GPL-0085] 2.0%RC: 0.4542953372001648
[INFO GPL-0086] 5.0%RC: 0.42579205334186554
[INFO GPL-0087] FinalRC: 0.4816316
[INFO GPL-0077] FinalRC lower than targetRC(1.25), routability not needed.
[NesterovSolve] Iter: 290 overflow: 0.267 HPWL: 4778698
[NesterovSolve] Iter: 300 overflow: 0.233 HPWL: 4810713
Expand Down
8 changes: 4 additions & 4 deletions src/gpl/test/simple04-rd.ok
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@
[INFO GPL-0081] TotalRouteOverflow: 0.0
[INFO GPL-0082] OverflowTileCnt: 0
[INFO GPL-0083] 0.5%RC: 0.48812615871429443
[INFO GPL-0084] 1.0%RC: 0.4571320414543152
[INFO GPL-0085] 2.0%RC: 0.4332096576690674
[INFO GPL-0086] 5.0%RC: 0.39594786167144774
[INFO GPL-0087] FinalRC: 0.4726291
[INFO GPL-0084] 1.0%RC: 0.47513705492019653
[INFO GPL-0085] 2.0%RC: 0.4542953372001648
[INFO GPL-0086] 5.0%RC: 0.42579205334186554
[INFO GPL-0087] FinalRC: 0.4816316
[INFO GPL-0077] FinalRC lower than targetRC(0.67), routability not needed.
[NesterovSolve] Iter: 290 overflow: 0.267 HPWL: 4778698
[NesterovSolve] Iter: 300 overflow: 0.233 HPWL: 4810713
Expand Down
15 changes: 15 additions & 0 deletions src/grt/src/GlobalRouter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1610,13 +1610,28 @@ void GlobalRouter::applyObstructionAdjustment(const odb::Rect& obstruction,
false,
tech_layer->getDirection());

int grid_limit = vertical ? grid_->getYGrids() : grid_->getXGrids();
if (!vertical) {
// if obstruction is inside a single gcell, block the edge between current
// gcell and the adjacent gcell
if (first_tile.getX() == last_tile.getX()
&& last_tile.getX() + 1 < grid_limit) {
int last_tile_x = last_tile.getX() + 1;
last_tile.setX(last_tile_x);
}
Comment on lines +1610 to +1616
Copy link
Member

Choose a reason for hiding this comment

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

I think generally not just for first_tile.getX() == last_tile.getX():

last_tile.setX(last_tile.getX() + 1);
first_tile.setX(first_tile.getX() - 1);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've tried this approach, but it is too agressive. A bunch of designs failed with high congestion. We are probably blocking pin access for macro pins and instance pins that are above layer 1.

My understanding is that blocking to the right/top is enought because the way FastRoute algorithm works, creating the edges in these two directions. Also, the test case used to validate this update is showing the correct congestion in layer 1 and we don't have guides in this layer anymore.

fastroute_->addHorizontalAdjustments(first_tile,
last_tile,
layer,
first_tile_reduce_interval,
last_tile_reduce_interval);
} else {
// if obstruction is inside a single gcell, block the edge between current
// gcell and the adjacent gcell
if (first_tile.getY() == last_tile.getY()
&& last_tile.getY() + 1 < grid_limit) {
int last_tile_y = last_tile.getY() + 1;
last_tile.setY(last_tile_y);
}
fastroute_->addVerticalAdjustments(first_tile,
last_tile,
layer,
Expand Down
6 changes: 3 additions & 3 deletions src/grt/test/clock_route.ok
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
Layer Direction Resources Resources Reduction (%)
---------------------------------------------------------------
li1 Vertical 0 0 0.00%
met1 Horizontal 28120 4315 84.66%
met1 Horizontal 28120 4239 84.93%
met2 Vertical 22154 5772 73.95%
met3 Horizontal 13338 5809 56.45%
met4 Vertical 8968 4366 51.32%
Expand All @@ -44,13 +44,13 @@ met5 Horizontal 2964 1443 51.32%
Layer Resource Demand Usage (%) Max H / Max V / Total Overflow
---------------------------------------------------------------------------------------
li1 0 0 0.00% 0 / 0 / 0
met1 4315 65 1.51% 0 / 0 / 0
met1 4239 65 1.53% 0 / 0 / 0
met2 5772 57 0.99% 0 / 0 / 0
met3 5809 23 0.40% 0 / 0 / 0
met4 4366 12 0.27% 0 / 0 / 0
met5 1443 0 0.00% 0 / 0 / 0
---------------------------------------------------------------------------------------
Total 21705 157 0.72% 0 / 0 / 0
Total 21629 157 0.73% 0 / 0 / 0

[INFO GRT-0018] Total wirelength: 1692 um
[INFO GRT-0014] Routed nets: 15
Expand Down
6 changes: 3 additions & 3 deletions src/grt/test/clock_route_alpha.ok
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
Layer Direction Resources Resources Reduction (%)
---------------------------------------------------------------
li1 Vertical 0 0 0.00%
met1 Horizontal 28120 4315 84.66%
met1 Horizontal 28120 4239 84.93%
met2 Vertical 22154 5772 73.95%
met3 Horizontal 13338 5809 56.45%
met4 Vertical 8968 4366 51.32%
Expand All @@ -44,13 +44,13 @@ met5 Horizontal 2964 1443 51.32%
Layer Resource Demand Usage (%) Max H / Max V / Total Overflow
---------------------------------------------------------------------------------------
li1 0 0 0.00% 0 / 0 / 0
met1 4315 66 1.53% 0 / 0 / 0
met1 4239 66 1.56% 0 / 0 / 0
met2 5772 56 0.97% 0 / 0 / 0
met3 5809 23 0.40% 0 / 0 / 0
met4 4366 12 0.27% 0 / 0 / 0
met5 1443 0 0.00% 0 / 0 / 0
---------------------------------------------------------------------------------------
Total 21705 157 0.72% 0 / 0 / 0
Total 21629 157 0.73% 0 / 0 / 0

[INFO GRT-0018] Total wirelength: 1684 um
[INFO GRT-0014] Routed nets: 15
Expand Down
Loading
Loading