Skip to content

Commit 13f8e52

Browse files
committed
grt: update set_global_routing_layer_adjustment to allow increasing capacity with negative adjustment values
Signed-off-by: Eder Monteiro <[email protected]>
1 parent d4e1785 commit 13f8e52

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/grt/src/GlobalRouter.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,6 +1618,7 @@ void GlobalRouter::computeUserLayerAdjustments(int max_routing_layer)
16181618
odb::dbTechLayer* tech_layer = db_->getTech()->findRoutingLayer(layer);
16191619
float adjustment = tech_layer->getLayerAdjustment();
16201620
if (adjustment != 0) {
1621+
const bool is_reduce = adjustment > 0;
16211622
if (horizontal_capacities_[layer - 1] != 0) {
16221623
int new_cap = hor_capacities[layer - 1] * (1 - adjustment);
16231624
grid_->setHorizontalCapacity(new_cap, layer - 1);
@@ -1632,7 +1633,7 @@ void GlobalRouter::computeUserLayerAdjustments(int max_routing_layer)
16321633
? std::max(new_h_capacity, 1)
16331634
: new_h_capacity;
16341635
fastroute_->addAdjustment(
1635-
x - 1, y - 1, x, y - 1, layer, new_h_capacity, true);
1636+
x - 1, y - 1, x, y - 1, layer, new_h_capacity, is_reduce);
16361637
}
16371638
}
16381639
}
@@ -1651,7 +1652,7 @@ void GlobalRouter::computeUserLayerAdjustments(int max_routing_layer)
16511652
? std::max(new_v_capacity, 1)
16521653
: new_v_capacity;
16531654
fastroute_->addAdjustment(
1654-
x - 1, y - 1, x - 1, y, layer, new_v_capacity, true);
1655+
x - 1, y - 1, x - 1, y, layer, new_v_capacity, is_reduce);
16551656
}
16561657
}
16571658
}

src/grt/src/GlobalRouter.tcl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ proc set_global_routing_layer_adjustment { args } {
1212
lassign $args layer adj
1313

1414
if { $layer == "*" } {
15-
sta::check_positive_float "adjustment" $adj
15+
sta::check_float "adjustment" $adj
1616
grt::set_capacity_adjustment $adj
1717
} elseif { [regexp -all {([^-]+)-([^ ]+)} $layer] } {
1818
lassign [grt::parse_layer_range "set_global_routing_layer_adjustment" \
1919
$layer] first_layer last_layer
2020
for { set l $first_layer } { $l <= $last_layer } { incr l } {
2121
grt::check_routing_layer $l
22-
sta::check_positive_float "adjustment" $adj
22+
sta::check_float "adjustment" $adj
2323

2424
grt::add_layer_adjustment $l $adj
2525
}
2626
} else {
2727
set layer_idx [grt::parse_layer_name $layer]
2828
grt::check_routing_layer $layer_idx
29-
sta::check_positive_float "adjustment" $adj
29+
sta::check_float "adjustment" $adj
3030

3131
grt::add_layer_adjustment $layer_idx $adj
3232
}

0 commit comments

Comments
 (0)