@@ -176,8 +176,6 @@ std::vector<Net*> GlobalRouter::initFastRoute(int min_routing_layer,
176176void 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-
16751555void GlobalRouter::computeUserGlobalAdjustments (int min_routing_layer,
16761556 int max_routing_layer)
16771557{
0 commit comments