Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
41b7b93
grt: infinite capacity command for testing purpose
jfgava Dec 12, 2025
a9468dd
grt: update readme with -infinite_cap
jfgava Dec 12, 2025
1478b08
grt: fix clang format
jfgava Dec 15, 2025
e16e39c
Merge branch 'master' of github.com:The-OpenROAD-Project-private/Open…
jfgava Dec 15, 2025
04fd9ff
grt: initialize some variables with false
jfgava Dec 15, 2025
38fc843
grt: unit test for the infinite_cap feature
jfgava Dec 15, 2025
c1f032d
Merge branch 'master' of github.com:The-OpenROAD-Project-private/Open…
jfgava Dec 17, 2025
a0697dd
Merge branch 'master' of github.com:The-OpenROAD-Project-private/Open…
jfgava Dec 19, 2025
553ecd4
Merge branch 'rsz-improved-slew-fixing' of github.com:The-OpenROAD-Pr…
jfgava Dec 19, 2025
14c9cf8
Merge branch 'master' of github.com:The-OpenROAD-Project-private/Open…
jfgava Jan 28, 2026
90ad1a0
grt: init variables properly
jfgava Jan 28, 2026
c5d9e2f
update OR
jfgava Feb 18, 2026
8b67fa0
Merge branch 'master' of github.com:The-OpenROAD-Project-private/Open…
jfgava Feb 19, 2026
390fe8a
grt: enhance infinite cap implementation
jfgava Feb 20, 2026
44d1c28
Merge branch 'master' of github.com:The-OpenROAD-Project-private/Open…
jfgava Feb 20, 2026
6cab8a4
grt: update infinite cap test
jfgava Feb 20, 2026
ed38e8c
grt: fix nested conditional operators
jfgava Feb 20, 2026
31b8d31
grt: fix missing variable assignment
jfgava Feb 20, 2026
ac08e0d
grt: add infinite_cap note in README
jfgava Feb 23, 2026
bd2eea0
Merge branch 'master' of github.com:The-OpenROAD-Project-private/Open…
jfgava Feb 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/grt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ global_route
[-end_incremental]
[-use_cugr]
[-resistance_aware]
[-infinite_cap]
```

#### Options
Expand All @@ -50,6 +51,7 @@ global_route
| `-end_incremental` | This flag run incremental GRT with the nets modified. The default is false. |
| `-use_cugr` | This flag run GRT using CUGR as the router solver. NOTE: this is not ready for production. |
| `-resistance_aware` | This flag enables resistance-aware layer assignment and 3D routing. NOTE: this is not ready for production. |
| `-infinite_cap` | Enables "infinite" gcell capacity for testing purpose. NOTE: this is not recommended for production flows. |

### Set Routing Layers

Expand Down
5 changes: 4 additions & 1 deletion src/grt/include/grt/GlobalRouter.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ class GlobalRouter
skip_large_fanout_ = skip_large_fanout;
};

void setInfiniteCapacity(bool infinite_capacity);

// flow functions
void readGuides(const char* file_name);
void loadGuidesFromDB();
Expand Down Expand Up @@ -513,7 +515,7 @@ class GlobalRouter
std::vector<RoutingTracks> routing_tracks_;

// Flow variables
bool is_incremental_;
bool infinite_capacity_;
float adjustment_;
int congestion_iterations_{50};
int congestion_report_iter_step_;
Expand Down Expand Up @@ -563,6 +565,7 @@ class GlobalRouter

// incremental grt
GRouteDbCbk* grouter_cbk_;
bool is_incremental_;

friend class IncrementalGRoute;
friend class GRouteDbCbk;
Expand Down
48 changes: 28 additions & 20 deletions src/grt/src/GlobalRouter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ GlobalRouter::GlobalRouter(utl::Logger* logger,
grid_origin_(0, 0),
groute_renderer_(nullptr),
grid_(new Grid),
is_incremental_(false),
infinite_capacity_(false),
adjustment_(0.0),
congestion_report_iter_step_(0),
allow_congestion_(false),
Expand All @@ -101,7 +101,8 @@ GlobalRouter::GlobalRouter(utl::Logger* logger,
heatmap_(nullptr),
heatmap_rudy_(nullptr),
congestion_file_name_(nullptr),
grouter_cbk_(nullptr)
grouter_cbk_(nullptr),
is_incremental_(false)
{
fastroute_
= new FastRouteCore(db_, logger_, callback_handler_, stt_builder_, sta_);
Expand Down Expand Up @@ -734,6 +735,8 @@ void GlobalRouter::setCapacities(int min_routing_layer, int max_routing_layer)
fastroute_->initEdges();
int x_grids = grid_->getXGrids();
int y_grids = grid_->getYGrids();
const int kBigInt = std::numeric_limits<int>::max();
const int16_t kBigCap = std::numeric_limits<int16_t>::max() / 10;
Comment thread
eder-matheus marked this conversation as resolved.
Resolved

for (int layer = 1; layer <= grid_->getNumLayers(); layer++) {
odb::dbTechLayer* tech_layer = db_->getTech()->findRoutingLayer(layer);
Expand All @@ -748,44 +751,49 @@ void GlobalRouter::setCapacities(int min_routing_layer, int max_routing_layer)
= tech_layer->getDirection() == odb::dbTechLayerDir::HORIZONTAL;

if (tech_layer->getDirection() == odb::dbTechLayerDir::HORIZONTAL) {
int min_cap = std::numeric_limits<int>::max();
int min_cap = kBigInt;
for (int y = 1; y <= y_grids; y++) {
for (int x = 1; x < x_grids; x++) {
const int cap = inside_layer_range ? computeGCellCapacity(x - 1,
y - 1,
track_init,
track_pitch,
track_count,
horizontal)
: 0;
int cap = 0;
if (infinite_capacity_) {
cap = kBigCap;
} else if (inside_layer_range) {
cap = computeGCellCapacity(
x - 1, y - 1, track_init, track_pitch, track_count, horizontal);
}
Comment thread
eder-matheus marked this conversation as resolved.
Resolved
min_cap = std::min(min_cap, cap);
fastroute_->setEdgeCapacity(x - 1, y - 1, x, y - 1, layer, cap);
}
}
min_cap = min_cap == std::numeric_limits<int>::max() ? 0 : min_cap;
min_cap = min_cap == kBigInt ? 0 : min_cap;
fastroute_->addHCapacity(min_cap, layer);
} else {
int min_cap = std::numeric_limits<int>::max();
int min_cap = kBigInt;
for (int x = 1; x <= x_grids; x++) {
for (int y = 1; y < y_grids; y++) {
const int cap = inside_layer_range ? computeGCellCapacity(x - 1,
y - 1,
track_init,
track_pitch,
track_count,
horizontal)
: 0;
int cap = 0;
if (infinite_capacity_) {
cap = kBigCap;
} else if (inside_layer_range) {
cap = computeGCellCapacity(
x - 1, y - 1, track_init, track_pitch, track_count, horizontal);
}
min_cap = std::min(min_cap, cap);
fastroute_->setEdgeCapacity(x - 1, y - 1, x - 1, y, layer, cap);
}
}
min_cap = min_cap == std::numeric_limits<int>::max() ? 0 : min_cap;
min_cap = min_cap == kBigInt ? 0 : min_cap;
fastroute_->addVCapacity(min_cap, layer);
}
}
fastroute_->initLowerBoundCapacities();
}

void GlobalRouter::setInfiniteCapacity(bool infinite_capacity)
{
infinite_capacity_ = infinite_capacity;
}

int GlobalRouter::computeGCellCapacity(const int x,
const int y,
const int track_init,
Expand Down
6 changes: 6 additions & 0 deletions src/grt/src/GlobalRouter.i
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ set_skip_large_fanout(int skip_large_fanout)
getGlobalRouter()->setSkipLargeFanoutNets(skip_large_fanout);
}

void
set_infinite_cap(bool infinite_capacity)
{
getGlobalRouter()->setInfiniteCapacity(infinite_capacity);
}

void start_incremental()
{
getGlobalRouter()->startIncremental();
Expand Down
10 changes: 7 additions & 3 deletions src/grt/src/GlobalRouter.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ sta::define_cmd_args "global_route" {[-guide_file out_file] \
[-start_incremental] \
[-end_incremental] \
[-use_cugr] \
[-resistance_aware]
[-resistance_aware] \
[-infinite_cap]
}

proc global_route { args } {
Expand All @@ -161,8 +162,8 @@ proc global_route { args } {
-grid_origin -critical_nets_percentage -congestion_report_iter_step\
-skip_large_fanout_nets
} \
flags {-allow_congestion -resistance_aware -verbose -start_incremental -end_incremental \
-use_cugr}
flags {-allow_congestion -resistance_aware -infinite_cap -verbose -start_incremental \
-end_incremental -use_cugr}

sta::check_argc_eq0 "global_route" $args

Expand Down Expand Up @@ -228,6 +229,9 @@ proc global_route { args } {
set resistance_aware [info exists flags(-resistance_aware)]
grt::set_resistance_aware $resistance_aware

set infinite_cap [info exists flags(-infinite_cap)]
grt::set_infinite_cap $infinite_cap

set start_incremental [info exists flags(-start_incremental)]
set end_incremental [info exists flags(-end_incremental)]

Expand Down
1 change: 1 addition & 0 deletions src/grt/test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ TESTS = [
"gcd_cugr",
"gcd_flute",
"increase_capacity1",
"infinite_cap",
"inst_pin_out_of_die",
"invalid_pin_placement",
"invalid_routing_layer",
Expand Down
1 change: 1 addition & 0 deletions src/grt/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ or_integration_tests(
gcd_cugr
gcd_flute
increase_capacity1
infinite_cap
inst_pin_out_of_die
invalid_pin_placement
invalid_routing_layer
Expand Down
65 changes: 65 additions & 0 deletions src/grt/test/infinite_cap.ok
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells
[INFO ODB-0128] Design: gcd
[INFO ODB-0130] Created 54 pins.
[INFO ODB-0131] Created 676 components and 2850 component-terminals.
[INFO ODB-0133] Created 579 nets and 1498 connections.
[INFO GRT-0020] Min routing layer: metal2
[INFO GRT-0021] Max routing layer: metal10
[INFO GRT-0022] Global adjustment: 0%
[INFO GRT-0023] Grid origin: (0, 0)
[INFO GRT-0088] Layer metal1 Track-Pitch = 0.1400 line-2-Via Pitch: 0.1350
[INFO GRT-0088] Layer metal2 Track-Pitch = 0.1900 line-2-Via Pitch: 0.1400
[INFO GRT-0088] Layer metal3 Track-Pitch = 0.1400 line-2-Via Pitch: 0.1400
[INFO GRT-0088] Layer metal4 Track-Pitch = 0.2800 line-2-Via Pitch: 0.2800
[INFO GRT-0088] Layer metal5 Track-Pitch = 0.2800 line-2-Via Pitch: 0.2800
[INFO GRT-0088] Layer metal6 Track-Pitch = 0.2800 line-2-Via Pitch: 0.2800
[INFO GRT-0088] Layer metal7 Track-Pitch = 0.8000 line-2-Via Pitch: 0.8000
[INFO GRT-0088] Layer metal8 Track-Pitch = 0.8000 line-2-Via Pitch: 0.8000
[INFO GRT-0088] Layer metal9 Track-Pitch = 1.6000 line-2-Via Pitch: 1.6000
[INFO GRT-0088] Layer metal10 Track-Pitch = 1.6000 line-2-Via Pitch: 1.6000
[INFO GRT-0003] Macros: 0
[INFO GRT-0004] Blockages: 0
[INFO GRT-0019] Found 0 clock nets.
[INFO GRT-0001] Minimum degree: 2
[INFO GRT-0002] Maximum degree: 36

[INFO GRT-0053] Routing resources analysis:
Routing Original Derated Resource
Layer Direction Resources Resources Reduction (%)
---------------------------------------------------------------
metal1 Horizontal 3898440 3898440 0.00%
metal2 Vertical 3898440 3898440 0.00%
metal3 Horizontal 3898440 3898440 0.00%
metal4 Vertical 3898440 3898440 0.00%
metal5 Horizontal 3898440 3898440 0.00%
metal6 Vertical 3898440 3898440 0.00%
metal7 Horizontal 3898440 3898440 0.00%
metal8 Vertical 3898440 3898440 0.00%
metal9 Horizontal 3898440 3898440 0.00%
metal10 Vertical 3898440 3898440 0.00%
---------------------------------------------------------------

[INFO GRT-0197] Via related to pin nodes: 2686
[INFO GRT-0198] Via related Steiner nodes: 44
[INFO GRT-0199] Via filling finished.
[INFO GRT-0111] Final number of vias: 3505
[INFO GRT-0112] Final usage 3D: 13039

[INFO GRT-0096] Final congestion report:
Layer Resource Demand Usage (%) Max H / Max V / Total Overflow
---------------------------------------------------------------------------------------
metal1 3898440 0 0.00% 0 / 0 / 0
metal2 3898440 1172 0.03% 0 / 0 / 0
metal3 3898440 1212 0.03% 0 / 0 / 0
metal4 3898440 41 0.00% 0 / 0 / 0
metal5 3898440 51 0.00% 0 / 0 / 0
metal6 3898440 48 0.00% 0 / 0 / 0
metal7 3898440 0 0.00% 0 / 0 / 0
metal8 3898440 0 0.00% 0 / 0 / 0
metal9 3898440 0 0.00% 0 / 0 / 0
metal10 3898440 0 0.00% 0 / 0 / 0
---------------------------------------------------------------------------------------
Total 38984400 2524 0.01% 0 / 0 / 0

[INFO GRT-0018] Total wirelength: 10767 um
[INFO GRT-0014] Routed nets: 563
8 changes: 8 additions & 0 deletions src/grt/test/infinite_cap.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source "helpers.tcl"
read_lef "Nangate45/Nangate45.lef"
read_liberty Nangate45/Nangate45_typ.lib
read_def "gcd.def"

set_routing_layers -signal metal2-metal10

global_route -infinite_cap -verbose