Skip to content
Open
Show file tree
Hide file tree
Changes from all 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 docs/user/FlowVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ configuration file.
| <a name="MIN_ROUTING_LAYER"></a>MIN_ROUTING_LAYER| The lowest metal layer name to be used in routing.| |
| <a name="NUM_CORES"></a>NUM_CORES| Passed to `openroad -threads $(NUM_CORES)`, defaults to numbers of cores in system as determined by system specific code in Makefile, `nproc` is tried first. OpenROAD does not limit itself to this number of cores across OpenROAD running instances, which can lead to overprovisioning in contexts such as bazel-orfs where there could be many routing, or place jobs running at the same time.| |
| <a name="OPENROAD_HIERARCHICAL"></a>OPENROAD_HIERARCHICAL| Feature toggle to enable to run OpenROAD in hierarchical mode, otherwise considered flat. Will eventually be the default and this option will be retired.| 0|
| <a name="OPT_POST_GRT_WNS"></a>OPT_POST_GRT_WNS| Optimize WNS after global routing by additional repair_timing that uses VT swap and wire rerouting only to minimize placement and routing disturbance| 1|
| <a name="OR_K"></a>OR_K| Passed as -or_k to detailed routing.| |
| <a name="OR_SEED"></a>OR_SEED| Passed as -or_seed to detailed routing.| |
| <a name="PDN_TCL"></a>PDN_TCL| File path which has a set of power grid policies used by pdn to be applied to the design, such as layers to use, stripe width and spacing to generate the actual metal straps.| |
Expand Down Expand Up @@ -543,6 +544,7 @@ configuration file.
- [MAX_REPAIR_TIMING_ITER](#MAX_REPAIR_TIMING_ITER)
- [MAX_ROUTING_LAYER](#MAX_ROUTING_LAYER)
- [MIN_ROUTING_LAYER](#MIN_ROUTING_LAYER)
- [OPT_POST_GRT_WNS](#OPT_POST_GRT_WNS)
- [POST_GLOBAL_ROUTE_TCL](#POST_GLOBAL_ROUTE_TCL)
- [PRE_GLOBAL_ROUTE_TCL](#PRE_GLOBAL_ROUTE_TCL)
- [REPORT_CLOCK_SKEW](#REPORT_CLOCK_SKEW)
Expand Down
36 changes: 30 additions & 6 deletions flow/scripts/global_route.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,29 @@ proc global_route_helper { } {
report_metrics 5 "global route post repair timing"
}

if { $::env(OPT_POST_GRT_WNS) } {
log_cmd global_route -start_incremental
log_cmd detailed_placement {*}$dpl_args
check_placement -verbose
# Route only the modified net by DPL
log_cmd global_route -end_incremental {*}$res_aware \
-congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_timing_opt_wns.rpt

set repair_timing_args \
[list -setup -sequence "vt_swap reroute" -skip_last_gasp -repair_tns 0 -verbose]
if { [env_var_exists_and_non_empty MATCH_CELL_FOOTPRINT] } {
lappend repair_timing_args -match_cell_footprint
Comment on lines +100 to +101

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor MATCH_CELL_FOOTPRINT=0

Because defaults.py exports JSON defaults, MATCH_CELL_FOOTPRINT is present as the non-empty string 0 in normal flows that do not enable it. This condition therefore always appends -match_cell_footprint for the new post-GRT WNS repair pass, unlike repair_timing_helper/recover_power_helper which only add the flag when the variable equals 1; on libraries where useful VT swaps do not share a footprint, the default pass will be more constrained than requested and can miss the intended WNS improvement.

Useful? React with 👍 / 👎.

}
if { $::env(SETUP_SLACK_MARGIN) != 0 } {
lappend repair_timing_args -setup_margin $::env(SETUP_SLACK_MARGIN)
}
repair_timing {*}$repair_timing_args

if { $::env(DETAILED_METRICS) } {
report_metrics 5 "global route post repair timing_opt_wns"
}
}
Comment thread
precisionmoon marked this conversation as resolved.

# Running DPL to fix overlapped instances
# Run to get modified net by DPL
log_cmd global_route -start_incremental
Expand All @@ -97,12 +120,13 @@ proc global_route_helper { } {
-congestion_report_file $::env(REPORTS_DIR)/congestion_post_repair_timing.rpt
}


log_cmd global_route -start_incremental
recover_power_helper
# Route the modified nets by rsz journal restore
log_cmd global_route -end_incremental {*}$res_aware \
-congestion_report_file $::env(REPORTS_DIR)/congestion_post_recover_power.rpt
if { !$::env(OPT_POST_GRT_WNS) } {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep RECOVER_POWER active with WNS optimization

With OPT_POST_GRT_WNS defaulting to 1, this guard skips recover_power_helper in the default flow, so existing designs that set RECOVER_POWER (for example flow/designs/gf55/aes/config.mk and flow/designs/asap7/jpeg_lvt/config.mk) silently lose the post-global-route power recovery stage that previously ran whenever RECOVER_POWER was nonzero. The new WNS pass should not make the user-requested power recovery unreachable unless that incompatibility is explicitly handled.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@precisionmoon this could be a cause of wns improvement as we know recover_power can sometimes damage it. We should fix this and retest.

log_cmd global_route -start_incremental
recover_power_helper
# Route the modified nets by rsz journal restore
log_cmd global_route -end_incremental {*}$res_aware \
-congestion_report_file $::env(REPORTS_DIR)/congestion_post_recover_power.rpt
}

if {
!$::env(SKIP_ANTENNA_REPAIR) &&
Expand Down
7 changes: 7 additions & 0 deletions flow/scripts/variables.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions flow/scripts/variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ ifeq ($(origin ABC_CLOCK_PERIOD_IN_PS), undefined)
endif
endif

export OPT_POST_GRT_WNS ?= 1

.PHONY: vars
vars:
mkdir -p $(OBJECTS_DIR)
Expand Down
7 changes: 7 additions & 0 deletions flow/scripts/variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1617,3 +1617,10 @@ CDL_FILE:
for generating Circuit Description Language output.
stages:
- final
OPT_POST_GRT_WNS:
default: 1
description: >
Optimize WNS after global routing by additional repair_timing that uses
VT swap and wire rerouting only to minimize placement and routing disturbance
stages:
- grt
2 changes: 1 addition & 1 deletion tools/OpenROAD
Submodule OpenROAD updated 143 files