Skip to content

Commit

Permalink
Merge pull request #5703 from eder-matheus/grt_fix
Browse files Browse the repository at this point in the history
grt: fix handle of obstructions in single gcells
  • Loading branch information
eder-matheus authored Dec 31, 2024
2 parents 7a5bb34 + 06e5f6f commit 7fb347f
Show file tree
Hide file tree
Showing 57 changed files with 21,208 additions and 16,902 deletions.
8 changes: 4 additions & 4 deletions src/gpl/test/simple01-rd.ok
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@
[INFO GPL-0064] TotalRouteOverflowV2: 0.0000
[INFO GPL-0065] OverflowTileCnt2: 0
[INFO GPL-0066] 0.5%RC: 1.0000
[INFO GPL-0067] 1.0%RC: 0.9867
[INFO GPL-0068] 2.0%RC: 0.9123
[INFO GPL-0069] 5.0%RC: 0.7671
[INFO GPL-0067] 1.0%RC: 0.9481
[INFO GPL-0068] 2.0%RC: 0.8667
[INFO GPL-0069] 5.0%RC: 0.7277
[INFO GPL-0070] 0.5rcK: 1.00
[INFO GPL-0071] 1.0rcK: 1.00
[INFO GPL-0072] 2.0rcK: 0.00
[INFO GPL-0073] 5.0rcK: 0.00
[INFO GPL-0074] FinalRC: 0.99333334
[INFO GPL-0074] FinalRC: 0.97407407
[INFO GPL-0077] FinalRC lower than targetRC(1.2500), 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/simple02-rd.ok
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@
[INFO GPL-0064] TotalRouteOverflowV2: 0.0000
[INFO GPL-0065] OverflowTileCnt2: 0
[INFO GPL-0066] 0.5%RC: 1.0000
[INFO GPL-0067] 1.0%RC: 0.9867
[INFO GPL-0068] 2.0%RC: 0.9123
[INFO GPL-0069] 5.0%RC: 0.7671
[INFO GPL-0067] 1.0%RC: 0.9481
[INFO GPL-0068] 2.0%RC: 0.8667
[INFO GPL-0069] 5.0%RC: 0.7277
[INFO GPL-0070] 0.5rcK: 1.00
[INFO GPL-0071] 1.0rcK: 1.00
[INFO GPL-0072] 2.0rcK: 0.00
[INFO GPL-0073] 5.0rcK: 0.00
[INFO GPL-0074] FinalRC: 0.99333334
[INFO GPL-0074] FinalRC: 0.97407407
[INFO GPL-0077] FinalRC lower than targetRC(1.0000), 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.0000
[INFO GPL-0082] OverflowTileCnt: 0
[INFO GPL-0083] 0.5%RC: 0.4881
[INFO GPL-0084] 1.0%RC: 0.4571
[INFO GPL-0085] 2.0%RC: 0.4332
[INFO GPL-0086] 5.0%RC: 0.3959
[INFO GPL-0087] FinalRC: 0.4726291
[INFO GPL-0084] 1.0%RC: 0.4751
[INFO GPL-0085] 2.0%RC: 0.4543
[INFO GPL-0086] 5.0%RC: 0.4248
[INFO GPL-0087] FinalRC: 0.4816316
[INFO GPL-0077] FinalRC lower than targetRC(1.2500), 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.0000
[INFO GPL-0082] OverflowTileCnt: 0
[INFO GPL-0083] 0.5%RC: 0.4881
[INFO GPL-0084] 1.0%RC: 0.4571
[INFO GPL-0085] 2.0%RC: 0.4332
[INFO GPL-0086] 5.0%RC: 0.3959
[INFO GPL-0087] FinalRC: 0.4726291
[INFO GPL-0084] 1.0%RC: 0.4751
[INFO GPL-0085] 2.0%RC: 0.4543
[INFO GPL-0086] 5.0%RC: 0.4248
[INFO GPL-0087] FinalRC: 0.4816316
[INFO GPL-0077] FinalRC lower than targetRC(0.6700), 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 @@ -1715,13 +1715,28 @@ void GlobalRouter::applyObstructionAdjustment(const odb::Rect& obstruction,
layer_capacity,
is_macro);

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);
}
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 4280 84.78%
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 4280 65 1.52% 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 21670 157 0.72% 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 4280 84.78%
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 4280 66 1.54% 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 21670 157 0.72% 0 / 0 / 0

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

0 comments on commit 7fb347f

Please sign in to comment.