Skip to content

Commit ca8e864

Browse files
committed
variables: add OPENROAD_HIERARCHICAL
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent bbf9569 commit ca8e864

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

docs/user/FlowVariables.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ configuration file.
168168
| <a name="MAX_ROUTING_LAYER"></a>MAX_ROUTING_LAYER| The highest metal layer name to be used in routing.| |
169169
| <a name="MIN_BUF_CELL_AND_PORTS"></a>MIN_BUF_CELL_AND_PORTS| Used to insert a buffer cell to pass through wires. Used in synthesis.| |
170170
| <a name="MIN_ROUTING_LAYER"></a>MIN_ROUTING_LAYER| The lowest metal layer name to be used in routing.| |
171+
| <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|
171172
| <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.| |
172173
| <a name="PLACE_DENSITY"></a>PLACE_DENSITY| The desired average placement density of cells: 1.0 = dense, 0.0 = widely spread. The intended effort is also communicated by this parameter. Use a low value for faster builds and higher value for better quality of results. If a too low value is used, the placer will not be able to place all cells and a recommended minimum placement density can be found in the logs. A too high value can lead to excessive runtimes, even timeouts and subtle failures in the flow after placement, such as in CTS or global routing when timing repair fails. The default is platform specific.| |
173174
| <a name="PLACE_DENSITY_LB_ADDON"></a>PLACE_DENSITY_LB_ADDON| Check the lower boundary of the PLACE_DENSITY and add PLACE_DENSITY_LB_ADDON if it exists.| |
@@ -483,6 +484,7 @@ configuration file.
483484
- [KLAYOUT_TECH_FILE](#KLAYOUT_TECH_FILE)
484485
- [LIB_FILES](#LIB_FILES)
485486
- [MACRO_EXTENSION](#MACRO_EXTENSION)
487+
- [OPENROAD_HIERARCHICAL](#OPENROAD_HIERARCHICAL)
486488
- [PLATFORM](#PLATFORM)
487489
- [PLATFORM_TCL](#PLATFORM_TCL)
488490
- [PROCESS](#PROCESS)

flow/scripts/load.tcl

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@ source $::env(SCRIPTS_DIR)/util.tcl
22

33
source $::env(SCRIPTS_DIR)/report_metrics.tcl
44

5+
# Feature toggle for now, eventually the -hier option
6+
# will be default and this code will be deleted.
7+
proc hier_options { } {
8+
if {
9+
[env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] ||
10+
[env_var_exists_and_non_empty SWAP_ARITH_OPERATORS] ||
11+
[env_var_equals OPENROAD_HIERARCHICAL 1]
12+
} {
13+
return "-hier"
14+
} else {
15+
return ""
16+
}
17+
}
18+
519
proc load_design { design_file sdc_file } {
620
source_env_var_if_exists PLATFORM_TCL
721

@@ -18,23 +32,9 @@ proc load_design { design_file sdc_file } {
1832
}
1933
}
2034
read_verilog $::env(RESULTS_DIR)/$design_file
21-
if {
22-
[env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] ||
23-
[env_var_exists_and_non_empty SWAP_ARITH_OPERATORS]
24-
} {
25-
link_design -hier $::env(DESIGN_NAME)
26-
} else {
27-
link_design $::env(DESIGN_NAME)
28-
}
35+
link_design {*}[hier_options] $::env(DESIGN_NAME)
2936
} elseif { $ext == ".odb" } {
30-
if {
31-
[env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] ||
32-
[env_var_exists_and_non_empty SWAP_ARITH_OPERATORS]
33-
} {
34-
read_db -hier $::env(RESULTS_DIR)/$design_file
35-
} else {
36-
read_db $::env(RESULTS_DIR)/$design_file
37-
}
37+
read_db {*}[hier_options] $::env(RESULTS_DIR)/$design_file
3838
} else {
3939
error "Unrecognized input file $design_file"
4040
}

flow/scripts/variables.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,3 +1039,9 @@ MAX_REPAIR_ANTENNAS_ITER_GRT:
10391039
antennas will run.
10401040
stages:
10411041
- grt
1042+
OPENROAD_HIERARCHICAL:
1043+
description: >
1044+
Feature toggle to enable to run OpenROAD in hierarchical mode,
1045+
otherwise considered flat. Will eventually be the default and
1046+
this option will be retired.
1047+
default: 0

0 commit comments

Comments
 (0)