Skip to content

Commit 0509bde

Browse files
committed
grt: remove redundant capacity adjustments
Signed-off-by: Eder Monteiro <[email protected]>
1 parent 71906a3 commit 0509bde

40 files changed

+5544
-5589
lines changed

src/grt/include/grt/GlobalRouter.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,6 @@ class GlobalRouter
339339
std::map<int, std::vector<odb::Rect>>& layer_obs_map);
340340
void adjustTileSet(const TileSet& tiles_to_reduce,
341341
odb::dbTechLayer* tech_layer);
342-
void computeGridAdjustments(int min_routing_layer, int max_routing_layer);
343-
void computeTrackAdjustments(int min_routing_layer, int max_routing_layer);
344342
void computeUserGlobalAdjustments(int min_routing_layer,
345343
int max_routing_layer);
346344
void computeUserLayerAdjustments(int min_routing_layer,

src/grt/src/GlobalRouter.cpp

Lines changed: 0 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,6 @@ std::vector<Net*> GlobalRouter::initFastRoute(int min_routing_layer,
176176
void GlobalRouter::applyAdjustments(int min_routing_layer,
177177
int max_routing_layer)
178178
{
179-
computeGridAdjustments(min_routing_layer, max_routing_layer);
180-
computeTrackAdjustments(min_routing_layer, max_routing_layer);
181179
computeObstructionsAdjustments();
182180
std::vector<int> track_space = grid_->getTrackPitches();
183181
fastroute_->initBlockedIntervals(track_space);
@@ -1554,124 +1552,6 @@ void GlobalRouter::adjustTileSet(const TileSet& tiles_to_reduce,
15541552
}
15551553
}
15561554

1557-
void GlobalRouter::computeGridAdjustments(int min_routing_layer,
1558-
int max_routing_layer)
1559-
{
1560-
const odb::Rect& die_area = grid_->getGridArea();
1561-
odb::Point upper_die_bounds(die_area.dx(), die_area.dy());
1562-
int h_space;
1563-
int v_space;
1564-
1565-
int x_grids = grid_->getXGrids();
1566-
int y_grids = grid_->getYGrids();
1567-
1568-
odb::Point upper_grid_bounds(x_grids * grid_->getTileSize(),
1569-
y_grids * grid_->getTileSize());
1570-
int x_extra = upper_die_bounds.x() - upper_grid_bounds.x();
1571-
int y_extra = upper_die_bounds.y() - upper_grid_bounds.y();
1572-
1573-
for (auto const& [level, routing_layer] : routing_layers_) {
1574-
h_space = 0;
1575-
v_space = 0;
1576-
1577-
if (level < min_routing_layer
1578-
|| (level > max_routing_layer && max_routing_layer > 0)) {
1579-
continue;
1580-
}
1581-
1582-
int new_v_capacity = 0;
1583-
int new_h_capacity = 0;
1584-
1585-
if (routing_layer->getDirection() == odb::dbTechLayerDir::HORIZONTAL) {
1586-
h_space = grid_->getTrackPitches()[level - 1];
1587-
new_h_capacity = std::floor((grid_->getTileSize() + y_extra) / h_space);
1588-
} else if (routing_layer->getDirection() == odb::dbTechLayerDir::VERTICAL) {
1589-
v_space = grid_->getTrackPitches()[level - 1];
1590-
new_v_capacity = std::floor((grid_->getTileSize() + x_extra) / v_space);
1591-
} else {
1592-
logger_->error(GRT, 71, "Layer spacing not found.");
1593-
}
1594-
1595-
int num_adjustments = y_grids - 1 + x_grids - 1;
1596-
fastroute_->setNumAdjustments(num_adjustments);
1597-
1598-
if (!grid_->isPerfectRegularX()) {
1599-
fastroute_->setLastColVCapacity(new_v_capacity, level - 1);
1600-
for (int i = 1; i < y_grids + 1; i++) {
1601-
fastroute_->addAdjustment(
1602-
x_grids - 1, i - 1, x_grids - 1, i, level, new_v_capacity, false);
1603-
}
1604-
}
1605-
if (!grid_->isPerfectRegularY()) {
1606-
fastroute_->setLastRowHCapacity(new_h_capacity, level - 1);
1607-
for (int i = 1; i < x_grids + 1; i++) {
1608-
fastroute_->addAdjustment(
1609-
i - 1, y_grids - 1, i, y_grids - 1, level, new_h_capacity, false);
1610-
}
1611-
}
1612-
}
1613-
}
1614-
1615-
/*
1616-
* Remove any routing capacity between the die boundary and the first and last
1617-
* routing tracks on each layer.
1618-
*/
1619-
void GlobalRouter::computeTrackAdjustments(int min_routing_layer,
1620-
int max_routing_layer)
1621-
{
1622-
for (auto const& [level, layer] : routing_layers_) {
1623-
if (level < min_routing_layer
1624-
|| (level > max_routing_layer && max_routing_layer > 0)) {
1625-
continue;
1626-
}
1627-
1628-
const RoutingTracks routing_tracks = getRoutingTracksByIndex(level);
1629-
const int track_location = routing_tracks.getLocation();
1630-
const int track_space = routing_tracks.getUsePitch();
1631-
const int num_tracks = routing_tracks.getNumTracks();
1632-
const int final_track_location
1633-
= track_location + (track_space * (num_tracks - 1));
1634-
1635-
if (num_tracks == 0) {
1636-
continue;
1637-
}
1638-
1639-
if (layer->getDirection() == odb::dbTechLayerDir::HORIZONTAL) {
1640-
/* bottom most obstruction */
1641-
const int yh = track_location - track_space;
1642-
if (yh > grid_->getYMin()) {
1643-
odb::Rect init_track_obs(
1644-
grid_->getXMin(), grid_->getYMin(), grid_->getXMax(), yh);
1645-
applyObstructionAdjustment(init_track_obs, layer);
1646-
}
1647-
1648-
/* top most obstruction */
1649-
const int yl = final_track_location + track_space;
1650-
if (yl < grid_->getYMax()) {
1651-
odb::Rect final_track_obs(
1652-
grid_->getXMin(), yl, grid_->getXMax(), grid_->getYMax());
1653-
applyObstructionAdjustment(final_track_obs, layer);
1654-
}
1655-
} else {
1656-
/* left most obstruction */
1657-
const int xh = track_location - track_space;
1658-
if (xh > grid_->getXMin()) {
1659-
const odb::Rect init_track_obs(
1660-
grid_->getXMin(), grid_->getYMin(), xh, grid_->getYMax());
1661-
applyObstructionAdjustment(init_track_obs, layer);
1662-
}
1663-
1664-
/* right most obstruction */
1665-
const int xl = final_track_location + track_space;
1666-
if (xl < grid_->getXMax()) {
1667-
const odb::Rect final_track_obs(
1668-
xl, grid_->getYMin(), grid_->getXMax(), grid_->getYMax());
1669-
applyObstructionAdjustment(final_track_obs, layer);
1670-
}
1671-
}
1672-
}
1673-
}
1674-
16751555
void GlobalRouter::computeUserGlobalAdjustments(int min_routing_layer,
16761556
int max_routing_layer)
16771557
{

src/grt/src/fastroute/src/FastRoute.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,14 +2016,14 @@ std::vector<int> FastRouteCore::getOriginalResources()
20162016
for (int i = 0; i < y_grid_; i++) {
20172017
for (int j = 0; j < x_grid_ - 1; j++) {
20182018
original_resources[l]
2019-
+= h_edges_3D_[l][i][j].cap + h_edges_3D_[l][i][j].red;
2019+
+= h_edges_3D_[l][i][j].real_cap;
20202020
}
20212021
}
20222022
} else {
20232023
for (int i = 0; i < y_grid_ - 1; i++) {
20242024
for (int j = 0; j < x_grid_; j++) {
20252025
original_resources[l]
2026-
+= v_edges_3D_[l][i][j].cap + v_edges_3D_[l][i][j].red;
2026+
+= v_edges_3D_[l][i][j].real_cap;
20272027
}
20282028
}
20292029
}

src/grt/test/clock_route.ok

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
Layer Direction Resources Resources Reduction (%)
2626
---------------------------------------------------------------
2727
li1 Vertical 0 0 0.00%
28-
met1 Horizontal 28009 4310 84.61%
28+
met1 Horizontal 27480 4310 84.32%
2929
met2 Vertical 21571 5772 73.24%
3030
met3 Horizontal 14023 6808 51.45%
3131
met4 Vertical 10804 5032 53.42%

src/grt/test/clock_route_alpha.ok

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
Layer Direction Resources Resources Reduction (%)
2626
---------------------------------------------------------------
2727
li1 Vertical 0 0 0.00%
28-
met1 Horizontal 28009 4310 84.61%
28+
met1 Horizontal 27480 4310 84.32%
2929
met2 Vertical 21571 5772 73.24%
3030
met3 Horizontal 14023 6808 51.45%
3131
met4 Vertical 10804 5032 53.42%

src/grt/test/congestion5.ok

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,29 +42,30 @@ metal10 Vertical 2961 0 100.00%
4242

4343
[INFO GRT-0101] Running extra iterations to remove overflow.
4444
[INFO GRT-0103] Extra Run for hard benchmark.
45-
[INFO GRT-0197] Via related to pin nodes: 2787
46-
[INFO GRT-0198] Via related Steiner nodes: 75
45+
[WARNING GRT-0230] Congestion iterations cannot increase overflow, reached the maximum number of times the total overflow can be increased.
46+
[INFO GRT-0197] Via related to pin nodes: 2791
47+
[INFO GRT-0198] Via related Steiner nodes: 82
4748
[INFO GRT-0199] Via filling finished.
48-
[INFO GRT-0111] Final number of vias: 4389
49-
[INFO GRT-0112] Final usage 3D: 18165
49+
[INFO GRT-0111] Final number of vias: 4327
50+
[INFO GRT-0112] Final usage 3D: 18001
5051

5152
[INFO GRT-0096] Final congestion report:
5253
Layer Resource Demand Usage (%) Max H / Max V / Total Overflow
5354
---------------------------------------------------------------------------------------
5455
metal1 0 0 0.00% 0 / 0 / 0
55-
metal2 6721 3366 50.08% 1 / 3 / 418
56-
metal3 0 1623 0.00% 6 / 0 / 1623
56+
metal2 6721 3378 50.26% 2 / 5 / 412
57+
metal3 0 1638 0.00% 6 / 1 / 1638
5758
metal4 0 0 0.00% 0 / 0 / 0
58-
metal5 0 9 0.00% 1 / 0 / 9
59+
metal5 0 4 0.00% 1 / 0 / 4
5960
metal6 0 0 0.00% 0 / 0 / 0
6061
metal7 0 0 0.00% 0 / 0 / 0
6162
metal8 0 0 0.00% 0 / 0 / 0
6263
metal9 0 0 0.00% 0 / 0 / 0
6364
metal10 0 0 0.00% 0 / 0 / 0
6465
---------------------------------------------------------------------------------------
65-
Total 6721 4998 74.36% 8 / 3 / 2050
66+
Total 6721 5020 74.69% 9 / 6 / 2054
6667

67-
[INFO GRT-0018] Total wirelength: 15166 um
68+
[INFO GRT-0018] Total wirelength: 15050 um
6869
[INFO GRT-0014] Routed nets: 563
6970
[ERROR GRT-0116] Global routing finished with congestion. Check the congestion regions in the DRC Viewer.
7071
GRT-0116

src/grt/test/critical_nets_percentage.ok

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
Layer Direction Resources Resources Reduction (%)
2727
---------------------------------------------------------------
2828
li1 Vertical 0 0 0.00%
29-
met1 Horizontal 32440 4457 86.26%
29+
met1 Horizontal 28717 4476 84.41%
3030
met2 Vertical 25000 3360 86.56%
3131
met3 Horizontal 16240 1720 89.41%
3232
met4 Vertical 12480 1680 86.54%
@@ -44,13 +44,13 @@ met5 Horizontal 3600 1640 54.44%
4444
Layer Resource Demand Usage (%) Max H / Max V / Total Overflow
4545
---------------------------------------------------------------------------------------
4646
li1 0 0 0.00% 0 / 0 / 0
47-
met1 4457 779 17.48% 0 / 0 / 0
47+
met1 4476 779 17.40% 0 / 0 / 0
4848
met2 3360 903 26.88% 0 / 0 / 0
4949
met3 1720 384 22.33% 0 / 0 / 0
5050
met4 1680 210 12.50% 0 / 0 / 0
5151
met5 1640 146 8.90% 0 / 0 / 0
5252
---------------------------------------------------------------------------------------
53-
Total 12857 2422 18.84% 0 / 0 / 0
53+
Total 12876 2422 18.81% 0 / 0 / 0
5454

5555
[INFO GRT-0018] Total wirelength: 25394 um
5656
[INFO GRT-0014] Routed nets: 348

src/grt/test/est_rc1.ok

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
Layer Direction Resources Resources Reduction (%)
2929
---------------------------------------------------------------
3030
metal1 Horizontal 0 0 0.00%
31-
metal2 Vertical 24769 24722 0.19%
31+
metal2 Vertical 24769 24769 0.00%
3232
metal3 Horizontal 33120 33120 0.00%
33-
metal4 Vertical 16826 16779 0.28%
33+
metal4 Vertical 16826 16826 0.00%
3434
metal5 Horizontal 16560 16560 0.00%
35-
metal6 Vertical 16826 16779 0.28%
35+
metal6 Vertical 16826 16826 0.00%
3636
metal7 Horizontal 5796 5796 0.00%
37-
metal8 Vertical 5922 5875 0.79%
37+
metal8 Vertical 5922 5922 0.00%
3838
metal9 Horizontal 2898 2898 0.00%
3939
metal10 Vertical 2961 2961 0.00%
4040
---------------------------------------------------------------
@@ -49,17 +49,17 @@ metal10 Vertical 2961 2961 0.00%
4949
Layer Resource Demand Usage (%) Max H / Max V / Total Overflow
5050
---------------------------------------------------------------------------------------
5151
metal1 0 0 0.00% 0 / 0 / 0
52-
metal2 24722 1588 6.42% 0 / 0 / 0
52+
metal2 24769 1588 6.41% 0 / 0 / 0
5353
metal3 33120 1651 4.98% 0 / 0 / 0
54-
metal4 16779 70 0.42% 0 / 0 / 0
54+
metal4 16826 70 0.42% 0 / 0 / 0
5555
metal5 16560 62 0.37% 0 / 0 / 0
56-
metal6 16779 68 0.41% 0 / 0 / 0
56+
metal6 16826 68 0.40% 0 / 0 / 0
5757
metal7 5796 0 0.00% 0 / 0 / 0
58-
metal8 5875 0 0.00% 0 / 0 / 0
58+
metal8 5922 0 0.00% 0 / 0 / 0
5959
metal9 2898 0 0.00% 0 / 0 / 0
6060
metal10 2961 0 0.00% 0 / 0 / 0
6161
---------------------------------------------------------------------------------------
62-
Total 125490 3439 2.74% 0 / 0 / 0
62+
Total 125678 3439 2.74% 0 / 0 / 0
6363

6464
[INFO GRT-0018] Total wirelength: 10258 um
6565
[INFO GRT-0014] Routed nets: 563

src/grt/test/gcd.ok

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
Routing Original Derated Resource
2929
Layer Direction Resources Resources Reduction (%)
3030
---------------------------------------------------------------
31-
metal1 Horizontal 33120 25751 22.25%
32-
metal2 Vertical 24769 24722 0.19%
31+
metal1 Horizontal 25751 25751 0.00%
32+
metal2 Vertical 24769 24769 0.00%
3333
metal3 Horizontal 33120 33120 0.00%
34-
metal4 Vertical 16826 16779 0.28%
34+
metal4 Vertical 16826 16826 0.00%
3535
metal5 Horizontal 16560 16560 0.00%
36-
metal6 Vertical 16826 16779 0.28%
36+
metal6 Vertical 16826 16826 0.00%
3737
metal7 Horizontal 5796 5796 0.00%
38-
metal8 Vertical 5922 5875 0.79%
38+
metal8 Vertical 5922 5922 0.00%
3939
metal9 Horizontal 2898 2898 0.00%
4040
metal10 Vertical 2961 2961 0.00%
4141
---------------------------------------------------------------
@@ -50,17 +50,17 @@ metal10 Vertical 2961 2961 0.00%
5050
Layer Resource Demand Usage (%) Max H / Max V / Total Overflow
5151
---------------------------------------------------------------------------------------
5252
metal1 25751 725 2.82% 0 / 0 / 0
53-
metal2 24722 1600 6.47% 0 / 0 / 0
53+
metal2 24769 1600 6.46% 0 / 0 / 0
5454
metal3 33120 980 2.96% 0 / 0 / 0
55-
metal4 16779 48 0.29% 0 / 0 / 0
55+
metal4 16826 48 0.29% 0 / 0 / 0
5656
metal5 16560 41 0.25% 0 / 0 / 0
57-
metal6 16779 64 0.38% 0 / 0 / 0
57+
metal6 16826 64 0.38% 0 / 0 / 0
5858
metal7 5796 0 0.00% 0 / 0 / 0
59-
metal8 5875 0 0.00% 0 / 0 / 0
59+
metal8 5922 0 0.00% 0 / 0 / 0
6060
metal9 2898 0 0.00% 0 / 0 / 0
6161
metal10 2961 0 0.00% 0 / 0 / 0
6262
---------------------------------------------------------------------------------------
63-
Total 151241 3458 2.29% 0 / 0 / 0
63+
Total 151429 3458 2.28% 0 / 0 / 0
6464

6565
[INFO GRT-0018] Total wirelength: 10367 um
6666
[INFO GRT-0014] Routed nets: 563

src/grt/test/gcd_flute.ok

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
Routing Original Derated Resource
2929
Layer Direction Resources Resources Reduction (%)
3030
---------------------------------------------------------------
31-
metal1 Horizontal 33120 25751 22.25%
32-
metal2 Vertical 24769 24722 0.19%
31+
metal1 Horizontal 25751 25751 0.00%
32+
metal2 Vertical 24769 24769 0.00%
3333
metal3 Horizontal 33120 33120 0.00%
34-
metal4 Vertical 16826 16779 0.28%
34+
metal4 Vertical 16826 16826 0.00%
3535
metal5 Horizontal 16560 16560 0.00%
36-
metal6 Vertical 16826 16779 0.28%
36+
metal6 Vertical 16826 16826 0.00%
3737
metal7 Horizontal 5796 5796 0.00%
38-
metal8 Vertical 5922 5875 0.79%
38+
metal8 Vertical 5922 5922 0.00%
3939
metal9 Horizontal 2898 2898 0.00%
4040
metal10 Vertical 2961 2961 0.00%
4141
---------------------------------------------------------------
@@ -50,17 +50,17 @@ metal10 Vertical 2961 2961 0.00%
5050
Layer Resource Demand Usage (%) Max H / Max V / Total Overflow
5151
---------------------------------------------------------------------------------------
5252
metal1 25751 727 2.82% 0 / 0 / 0
53-
metal2 24722 1591 6.44% 0 / 0 / 0
53+
metal2 24769 1591 6.42% 0 / 0 / 0
5454
metal3 33120 977 2.95% 0 / 0 / 0
55-
metal4 16779 53 0.32% 0 / 0 / 0
55+
metal4 16826 53 0.31% 0 / 0 / 0
5656
metal5 16560 46 0.28% 0 / 0 / 0
57-
metal6 16779 63 0.38% 0 / 0 / 0
57+
metal6 16826 63 0.37% 0 / 0 / 0
5858
metal7 5796 0 0.00% 0 / 0 / 0
59-
metal8 5875 0 0.00% 0 / 0 / 0
59+
metal8 5922 0 0.00% 0 / 0 / 0
6060
metal9 2898 0 0.00% 0 / 0 / 0
6161
metal10 2961 0 0.00% 0 / 0 / 0
6262
---------------------------------------------------------------------------------------
63-
Total 151241 3457 2.29% 0 / 0 / 0
63+
Total 151429 3457 2.28% 0 / 0 / 0
6464

6565
[INFO GRT-0018] Total wirelength: 10388 um
6666
[INFO GRT-0014] Routed nets: 563

0 commit comments

Comments
 (0)