Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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 @@ -24,6 +24,7 @@ global_route
[-congestion_report_iter_step steps]
[-grid_origin {x y}]
[-critical_nets_percentage percent]
[-skip_large_fanout_nets fanout]
[-allow_congestion]
[-verbose]
[-start_incremental]
Expand All @@ -42,6 +43,7 @@ global_route
| `-congestion_report_iter_step` | Set the number of iterations to report. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. |
| `-grid_origin` | Set the (x, y) origin of the routing grid in DBU. For example, `-grid_origin {1 1}` corresponds to the die (0, 0) + 1 DBU in each x--, y- direction. |
| `-critical_nets_percentage` | Set the percentage of nets with the worst slack value that are considered timing critical, having preference over other nets during congestion iterations (e.g. `-critical_nets_percentage 30`). The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. |
| `-skip_large_fanout_nets` | Skips routing for nets with a fanout higher than the specified limit. Nets exceeding this pin count threshold will be ignored by the global router. The default value is `-1`, and the allowed values are integers `[0, MAX_INT]`. |
| `-allow_congestion` | Allow global routing results to be generated with remaining congestion. The default is false. |
| `-verbose` | This flag enables the full reporting of the global routing. |
| `-start_incremental` | This flag initializes the GRT listener to get the net modified. The default is false. |
Expand Down
5 changes: 5 additions & 0 deletions src/grt/include/grt/GlobalRouter.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ class GlobalRouter
void setResistanceAware(bool resistance_aware);
void setMacroExtension(int macro_extension);
void setUseCUGR(bool use_cugr) { use_cugr_ = use_cugr; };
void setSkipLargeFanoutNets(int skip_large_fanout)
{
skip_large_fanout_ = skip_large_fanout;
};

// flow functions
void readGuides(const char* file_name);
Expand Down Expand Up @@ -495,6 +499,7 @@ class GlobalRouter
int total_diodes_count_;
bool is_congested_{false};
bool use_cugr_{false};
int skip_large_fanout_{-1};

// Region adjustment variables
std::vector<RegionAdjustment> region_adjustments_;
Expand Down
3 changes: 3 additions & 0 deletions src/grt/src/GlobalRouter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3744,6 +3744,9 @@ std::vector<Net*> GlobalRouter::findNets(bool init_clock_nets)
}
std::vector<Net*> clk_nets;
for (odb::dbNet* db_net : db_nets) {
if (skip_large_fanout_ > 0 && db_net->getTermCount() > skip_large_fanout_) {
continue;
}
Net* net = addNet(db_net);
// add clock nets not connected to a leaf first
if (net) {
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 @@ -146,6 +146,12 @@ set_use_cugr(bool use_cugr)
getGlobalRouter()->setUseCUGR(use_cugr);
}

void
set_skip_large_fanout(int skip_large_fanout)
{
getGlobalRouter()->setSkipLargeFanoutNets(skip_large_fanout);
}

void
global_route(bool start_incremental, bool end_incremental)
{
Expand Down
10 changes: 9 additions & 1 deletion src/grt/src/GlobalRouter.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ sta::define_cmd_args "global_route" {[-guide_file out_file] \
[-congestion_report_iter_step steps] \
[-grid_origin origin] \
[-critical_nets_percentage percent] \
[-skip_large_fanout_nets fanout] \
[-allow_congestion] \
[-verbose] \
[-start_incremental] \
Expand All @@ -157,7 +158,8 @@ sta::define_cmd_args "global_route" {[-guide_file out_file] \
proc global_route { args } {
sta::parse_key_args "global_route" args \
keys {-guide_file -congestion_iterations -congestion_report_file \
-grid_origin -critical_nets_percentage -congestion_report_iter_step
-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}
Expand Down Expand Up @@ -214,6 +216,12 @@ proc global_route { args } {

grt::set_use_cugr [info exists flags(-use_cugr)]

if { [info exists keys(-skip_large_fanout_nets)] } {
set fanout $keys(-skip_large_fanout_nets)
sta::check_positive_integer "-skip_large_fanout_nets" $fanout
grt::set_skip_large_fanout $fanout
}

set allow_congestion [info exists flags(-allow_congestion)]
grt::set_allow_congestion $allow_congestion

Expand Down
1 change: 1 addition & 0 deletions src/grt/test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ TESTS = [
"set_nets_to_route1",
"silence",
"single_row",
"skip_large_fanout1",
"soft_ndr_4w_6s",
"top_level_term1",
"top_level_term2",
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 @@ -76,6 +76,7 @@ or_integration_tests(
set_nets_to_route1
silence
single_row
skip_large_fanout1
soft_ndr_4w_6s
top_level_term1
top_level_term2
Expand Down
Loading