File tree Expand file tree Collapse file tree 1 file changed +10
-16
lines changed
src/grt/src/fastroute/src Expand file tree Collapse file tree 1 file changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -2011,24 +2011,18 @@ std::vector<int> FastRouteCore::getOriginalResources()
20112011 bool is_horizontal
20122012 = layer_directions_[l] == odb::dbTechLayerDir::HORIZONTAL;
20132013 if (is_horizontal) {
2014- if (!regular_y_) {
2015- original_resources[l] += (v_capacity_3D_[l] + h_capacity_3D_[l])
2016- * (y_grid_) * (x_grid_ - 1 );
2017- original_resources[l] += (last_col_v_capacity_3D_[l] * y_grid_)
2018- + (last_row_h_capacity_3D_[l] * x_grid_);
2019- } else {
2020- original_resources[l]
2021- += (v_capacity_3D_[l] + h_capacity_3D_[l]) * (y_grid_) * (x_grid_);
2014+ for (int i = 0 ; i < y_grid_; i++) {
2015+ for (int j = 0 ; j < x_grid_ - 1 ; j++) {
2016+ original_resources[l]
2017+ += h_edges_3D_[l][i][j].cap + h_edges_3D_[l][i][j].red ;
2018+ }
20222019 }
20232020 } else {
2024- if (!regular_x_) {
2025- original_resources[l] += (v_capacity_3D_[l] + h_capacity_3D_[l])
2026- * (y_grid_ - 1 ) * (x_grid_);
2027- original_resources[l] += (last_col_v_capacity_3D_[l] * y_grid_)
2028- + (last_row_h_capacity_3D_[l] * x_grid_);
2029- } else {
2030- original_resources[l]
2031- += (v_capacity_3D_[l] + h_capacity_3D_[l]) * (y_grid_) * (x_grid_);
2021+ for (int i = 0 ; i < y_grid_ - 1 ; i++) {
2022+ for (int j = 0 ; j < x_grid_; j++) {
2023+ original_resources[l]
2024+ += v_edges_3D_[l][i][j].cap + v_edges_3D_[l][i][j].red ;
2025+ }
20322026 }
20332027 }
20342028 }
You can’t perform that action at this time.
0 commit comments