Skip to content

Commit 48e6afe

Browse files
authored
Merge pull request The-OpenROAD-Project#3601 from Pinata-Consulting/variables-add-defaults
variables: add default values
2 parents 478daba + 22c8d14 commit 48e6afe

File tree

14 files changed

+84
-23
lines changed

14 files changed

+84
-23
lines changed

docs/user/FlowVariables.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,14 @@ configuration file.
100100
| <a name="ADDITIONAL_GDS"></a>ADDITIONAL_GDS| Hardened macro GDS files listed here.| |
101101
| <a name="ADDITIONAL_LEFS"></a>ADDITIONAL_LEFS| Hardened macro LEF view files listed here. The LEF information of the macros is immutable and used throughout all stages. Stored in the .odb file.| |
102102
| <a name="ADDITIONAL_LIBS"></a>ADDITIONAL_LIBS| Hardened macro library files listed here. The library information is immutable and used throughout all stages. Not stored in the .odb file.| |
103+
| <a name="BALANCE_ROWS"></a>BALANCE_ROWS| Balance rows during placement.| 0|
103104
| <a name="BLOCKS"></a>BLOCKS| Blocks used as hard macros in a hierarchical flow. Do note that you have to specify block-specific inputs file in the directory mentioned by Makefile.| |
104105
| <a name="CAP_MARGIN"></a>CAP_MARGIN| Specifies a capacitance margin when fixing max capacitance violations. This option allows you to overfix.| |
105106
| <a name="CDL_FILES"></a>CDL_FILES| Insert additional Circuit Description Language (`.cdl`) netlist files.| |
106107
| <a name="CELL_PAD_IN_SITES_DETAIL_PLACEMENT"></a>CELL_PAD_IN_SITES_DETAIL_PLACEMENT| Cell padding on both sides in site widths to ease routability in detail placement.| 0|
107108
| <a name="CELL_PAD_IN_SITES_GLOBAL_PLACEMENT"></a>CELL_PAD_IN_SITES_GLOBAL_PLACEMENT| Cell padding on both sides in site widths to ease routability during global placement.| 0|
108109
| <a name="CLKGATE_MAP_FILE"></a>CLKGATE_MAP_FILE| List of cells for gating clock treated as a black box by Yosys.| |
110+
| <a name="CLUSTER_FLOPS"></a>CLUSTER_FLOPS| Minimum number of flip-flops per sink cluster.| 0|
109111
| <a name="CORE_AREA"></a>CORE_AREA| The core area specified as a list of lower-left and upper-right corners in microns (X1 Y1 X2 Y2).| |
110112
| <a name="CORE_ASPECT_RATIO"></a>CORE_ASPECT_RATIO| The core aspect ratio (height / width). This value is ignored if `CORE_UTILIZATION` is undefined.| 1.0|
111113
| <a name="CORE_MARGIN"></a>CORE_MARGIN| The margin between the core area and die area, specified in microns. Allowed values are either one value for all margins or a set of four values, one for each margin. The order of the four values are: `{bottom top left right}`. This variable is ignored if `CORE_UTILIZATION` is undefined.| 1.0|
@@ -118,13 +120,15 @@ configuration file.
118120
| <a name="CTS_CLUSTER_SIZE"></a>CTS_CLUSTER_SIZE| Maximum number of sinks per cluster.| |
119121
| <a name="CTS_LIB_NAME"></a>CTS_LIB_NAME| Name of the Liberty library to use in selecting the clock buffers.| |
120122
| <a name="CTS_SNAPSHOT"></a>CTS_SNAPSHOT| Creates ODB/SDC files prior to clock net and setup/hold repair.| |
123+
| <a name="CTS_SNAPSHOTS"></a>CTS_SNAPSHOTS| Create ODB/SDC files at different stages of CTS.| 0|
121124
| <a name="DESIGN_NAME"></a>DESIGN_NAME| The name of the top-level module of the design.| |
122125
| <a name="DESIGN_NICKNAME"></a>DESIGN_NICKNAME| DESIGN_NICKNAME just changes the directory name that ORFS outputs to be DESIGN_NICKNAME instead of DESIGN_NAME in case DESIGN_NAME is unwieldy or conflicts with a different design.| |
123126
| <a name="DETAILED_METRICS"></a>DETAILED_METRICS| If set, then calls report_metrics prior to repair operations in the CTS and global route stages| 0|
124127
| <a name="DETAILED_ROUTE_ARGS"></a>DETAILED_ROUTE_ARGS| Add additional arguments for debugging purposes during detail route.| |
125128
| <a name="DETAILED_ROUTE_END_ITERATION"></a>DETAILED_ROUTE_END_ITERATION| Maximum number of iterations.| 64|
126129
| <a name="DFF_LIB_FILES"></a>DFF_LIB_FILES| Technology mapping liberty files for flip-flops.| |
127130
| <a name="DIE_AREA"></a>DIE_AREA| The die area specified as a list of lower-left and upper-right corners in microns (X1 Y1 X2 Y2).| |
131+
| <a name="DONT_BUFFER_PORTS"></a>DONT_BUFFER_PORTS| Do not buffer input/output ports during floorplanning.| 0|
128132
| <a name="DONT_USE_CELLS"></a>DONT_USE_CELLS| Dont use cells eases pin access in detailed routing.| |
129133
| <a name="DPO_MAX_DISPLACEMENT"></a>DPO_MAX_DISPLACEMENT| Specifies how far an instance can be moved when optimizing.| 5 1|
130134
| <a name="EARLY_SIZING_CAP_RATIO"></a>EARLY_SIZING_CAP_RATIO| Ratio between the input pin capacitance and the output pin load during initial gate sizing.| |
@@ -182,7 +186,7 @@ configuration file.
182186
| <a name="PWR_NETS_VOLTAGES"></a>PWR_NETS_VOLTAGES| Used for IR Drop calculation.| |
183187
| <a name="RCX_RULES"></a>RCX_RULES| RC Extraction rules file path.| |
184188
| <a name="RECOVER_POWER"></a>RECOVER_POWER| Specifies how many percent of paths with positive slacks can be slowed for power savings [0-100].| 0|
185-
| <a name="REMOVE_ABC_BUFFERS"></a>REMOVE_ABC_BUFFERS (deprecated)| Remove abc buffers from the netlist. If timing repair in floorplanning is taking too long, use a SETUP/HOLD_SLACK_MARGIN to terminate timing repair early instead of using REMOVE_ABC_BUFFERS or set SKIP_LAST_GASP=1.| |
189+
| <a name="REMOVE_ABC_BUFFERS"></a>REMOVE_ABC_BUFFERS (deprecated)| Remove abc buffers from the netlist. If timing repair in floorplanning is taking too long, use a SETUP/HOLD_SLACK_MARGIN to terminate timing repair early instead of using REMOVE_ABC_BUFFERS or set SKIP_LAST_GASP=1.| 0|
186190
| <a name="REMOVE_CELLS_FOR_EQY"></a>REMOVE_CELLS_FOR_EQY| String patterns directly passed to write_verilog -remove_cells <> for equivalence checks.| |
187191
| <a name="REPAIR_PDN_VIA_LAYER"></a>REPAIR_PDN_VIA_LAYER| Remove power grid vias which generate DRC violations after detailed routing.| |
188192
| <a name="REPORT_CLOCK_SKEW"></a>REPORT_CLOCK_SKEW| Report clock skew as part of reporting metrics, starting at CTS, before which there is no clock skew. This metric can be quite time-consuming, so it can be useful to disable.| 1|
@@ -216,22 +220,25 @@ configuration file.
216220
| <a name="SETUP_REPAIR_SEQUENCE"></a>SETUP_REPAIR_SEQUENCE| Specifies the sequence of moves to do in repair_timing -setup. This should be a string of move keywords separated by commas such as the default when not used: "unbuffer,sizedown,sizeup,swap,buffer,clone,split".| |
217221
| <a name="SETUP_SLACK_MARGIN"></a>SETUP_SLACK_MARGIN| Specifies a time margin for the slack when fixing setup violations. This option allows you to overfix or underfix(negative value, terminate retiming before 0 or positive slack). See HOLD_SLACK_MARGIN for more details.| 0|
218222
| <a name="SET_RC_TCL"></a>SET_RC_TCL| Metal & Via RC definition file path.| |
223+
| <a name="SKIP_ANTENNA_REPAIR"></a>SKIP_ANTENNA_REPAIR| Skips antenna repair entirely.| 0|
224+
| <a name="SKIP_ANTENNA_REPAIR_POST_DRT"></a>SKIP_ANTENNA_REPAIR_POST_DRT| Skips antenna repair post-detailed routing.| 0|
225+
| <a name="SKIP_ANTENNA_REPAIR_PRE_GRT"></a>SKIP_ANTENNA_REPAIR_PRE_GRT| Skips antenna repair pre-global routing.| 0|
219226
| <a name="SKIP_CRIT_VT_SWAP"></a>SKIP_CRIT_VT_SWAP| Do not perform VT swap on critical cells to improve QoR (default: do critical VT swap). This is an additional VT swap on critical cells that remain near the end of setup fixing. If SKIP_VT_SWAP is set to 1, this also disables critical cell VT swap.| |
220-
| <a name="SKIP_CTS_REPAIR_TIMING"></a>SKIP_CTS_REPAIR_TIMING| Skipping CTS repair, which can take a long time, can be useful in architectural exploration or when getting CI up and running.| |
227+
| <a name="SKIP_CTS_REPAIR_TIMING"></a>SKIP_CTS_REPAIR_TIMING| Skipping CTS repair, which can take a long time, can be useful in architectural exploration or when getting CI up and running.| 0|
221228
| <a name="SKIP_DETAILED_ROUTE"></a>SKIP_DETAILED_ROUTE| Skips detailed route.| 0|
222229
| <a name="SKIP_GATE_CLONING"></a>SKIP_GATE_CLONING| Do not use gate cloning transform to fix timing violations (default: use gate cloning).| |
223230
| <a name="SKIP_INCREMENTAL_REPAIR"></a>SKIP_INCREMENTAL_REPAIR| Skip incremental repair in global route.| 0|
224231
| <a name="SKIP_LAST_GASP"></a>SKIP_LAST_GASP| Do not use last gasp optimization to fix timing violations (default: use gate last gasp).| |
225232
| <a name="SKIP_PIN_SWAP"></a>SKIP_PIN_SWAP| Do not use pin swapping as a transform to fix timing violations (default: use pin swapping).| |
226-
| <a name="SKIP_REPAIR_TIE_FANOUT"></a>SKIP_REPAIR_TIE_FANOUT| Skip repair_tie_fanout at floorplan step.| |
227-
| <a name="SKIP_REPORT_METRICS"></a>SKIP_REPORT_METRICS| If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds.| |
233+
| <a name="SKIP_REPAIR_TIE_FANOUT"></a>SKIP_REPAIR_TIE_FANOUT| Skip repair_tie_fanout at floorplan step.| 0|
234+
| <a name="SKIP_REPORT_METRICS"></a>SKIP_REPORT_METRICS| If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds.| 0|
228235
| <a name="SKIP_VT_SWAP"></a>SKIP_VT_SWAP| Do not perform VT swap to improve QoR (default: do VT swap).| |
229236
| <a name="SLEW_MARGIN"></a>SLEW_MARGIN| Specifies a slew margin when fixing max slew violations. This option allows you to overfix.| |
230237
| <a name="SWAP_ARITH_OPERATORS"></a>SWAP_ARITH_OPERATORS| Improve timing QoR by swapping ALU and MULT arithmetic operators.| |
231238
| <a name="SYNTH_ARGS"></a>SYNTH_ARGS| Optional synthesis variables for yosys.| |
232239
| <a name="SYNTH_BLACKBOXES"></a>SYNTH_BLACKBOXES| List of cells treated as a black box by Yosys. With Bazel, this can be used to run synthesis in parallel for the large modules of the design.| |
233240
| <a name="SYNTH_CANONICALIZE_TCL"></a>SYNTH_CANONICALIZE_TCL| Specifies a Tcl script with commands to run as part of the synth canonicalize step.| |
234-
| <a name="SYNTH_GUT"></a>SYNTH_GUT| Load design and remove all internal logic before doing synthesis. This is useful when creating a mock .lef abstract that has a smaller area than the amount of logic would allow. bazel-orfs uses this to mock SRAMs, for instance.| |
241+
| <a name="SYNTH_GUT"></a>SYNTH_GUT| Load design and remove all internal logic before doing synthesis. This is useful when creating a mock .lef abstract that has a smaller area than the amount of logic would allow. bazel-orfs uses this to mock SRAMs, for instance.| 0|
235242
| <a name="SYNTH_HDL_FRONTEND"></a>SYNTH_HDL_FRONTEND| Select an alternative language frontend to ingest the design. Available option is "slang". If the variable is empty, design is read with the Yosys read_verilog command.| |
236243
| <a name="SYNTH_HIERARCHICAL"></a>SYNTH_HIERARCHICAL| Enable to Synthesis hierarchically, otherwise considered flat synthesis.| 0|
237244
| <a name="SYNTH_HIER_SEPARATOR"></a>SYNTH_HIER_SEPARATOR| Separator used for the synthesis flatten stage.| .|
@@ -355,8 +362,11 @@ configuration file.
355362

356363
## place variables
357364

365+
- [BALANCE_ROWS](#BALANCE_ROWS)
358366
- [CELL_PAD_IN_SITES_DETAIL_PLACEMENT](#CELL_PAD_IN_SITES_DETAIL_PLACEMENT)
359367
- [CELL_PAD_IN_SITES_GLOBAL_PLACEMENT](#CELL_PAD_IN_SITES_GLOBAL_PLACEMENT)
368+
- [CLUSTER_FLOPS](#CLUSTER_FLOPS)
369+
- [DONT_BUFFER_PORTS](#DONT_BUFFER_PORTS)
360370
- [EARLY_SIZING_CAP_RATIO](#EARLY_SIZING_CAP_RATIO)
361371
- [FLOORPLAN_DEF](#FLOORPLAN_DEF)
362372
- [GPL_ROUTABILITY_DRIVEN](#GPL_ROUTABILITY_DRIVEN)
@@ -383,6 +393,7 @@ configuration file.
383393
- [CTS_CLUSTER_SIZE](#CTS_CLUSTER_SIZE)
384394
- [CTS_LIB_NAME](#CTS_LIB_NAME)
385395
- [CTS_SNAPSHOT](#CTS_SNAPSHOT)
396+
- [CTS_SNAPSHOTS](#CTS_SNAPSHOTS)
386397
- [DETAILED_METRICS](#DETAILED_METRICS)
387398
- [EQUIVALENCE_CHECK](#EQUIVALENCE_CHECK)
388399
- [HOLD_SLACK_MARGIN](#HOLD_SLACK_MARGIN)
@@ -415,6 +426,8 @@ configuration file.
415426
- [ROUTING_LAYER_ADJUSTMENT](#ROUTING_LAYER_ADJUSTMENT)
416427
- [SETUP_REPAIR_SEQUENCE](#SETUP_REPAIR_SEQUENCE)
417428
- [SETUP_SLACK_MARGIN](#SETUP_SLACK_MARGIN)
429+
- [SKIP_ANTENNA_REPAIR](#SKIP_ANTENNA_REPAIR)
430+
- [SKIP_ANTENNA_REPAIR_PRE_GRT](#SKIP_ANTENNA_REPAIR_PRE_GRT)
418431
- [SKIP_CRIT_VT_SWAP](#SKIP_CRIT_VT_SWAP)
419432
- [SKIP_GATE_CLONING](#SKIP_GATE_CLONING)
420433
- [SKIP_INCREMENTAL_REPAIR](#SKIP_INCREMENTAL_REPAIR)
@@ -435,6 +448,7 @@ configuration file.
435448
- [MIN_ROUTING_LAYER](#MIN_ROUTING_LAYER)
436449
- [REPORT_CLOCK_SKEW](#REPORT_CLOCK_SKEW)
437450
- [ROUTING_LAYER_ADJUSTMENT](#ROUTING_LAYER_ADJUSTMENT)
451+
- [SKIP_ANTENNA_REPAIR_POST_DRT](#SKIP_ANTENNA_REPAIR_POST_DRT)
438452
- [SKIP_DETAILED_ROUTE](#SKIP_DETAILED_ROUTE)
439453
- [SKIP_REPORT_METRICS](#SKIP_REPORT_METRICS)
440454

flow/scripts/cts.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ detailed_placement
4747

4848
estimate_parasitics -placement
4949

50-
if { [env_var_equals CTS_SNAPSHOTS 1] } {
50+
if { $::env(CTS_SNAPSHOTS) } {
5151
save_progress 4_1_pre_repair_hold_setup
5252
}
5353

54-
if { ![env_var_equals SKIP_CTS_REPAIR_TIMING 1] } {
54+
if { !$::env(SKIP_CTS_REPAIR_TIMING) } {
5555
if { $::env(EQUIVALENCE_CHECK) } {
5656
write_eqy_verilog 4_before_rsz.v
5757
}

flow/scripts/density_fill.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ source $::env(SCRIPTS_DIR)/load.tcl
22
erase_non_stage_variables final
33
load_design 5_route.odb 5_route.sdc
44

5-
if { [env_var_equals USE_FILL 1] } {
5+
if { $::env(USE_FILL) } {
66
set_propagated_clock [all_clocks]
77
density_fill -rules $::env(FILL_CONFIG)
88
# The .v file is just for debugging purposes, not a result of

flow/scripts/detail_place.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ source $::env(PLATFORM_DIR)/setRC.tcl
77

88
proc do_dpl { } {
99
# Only for use with hybrid rows
10-
if { [env_var_equals BALANCE_ROWS 1] } {
10+
if { $::env(BALANCE_ROWS) } {
1111
balance_row_usage
1212
}
1313

@@ -16,7 +16,7 @@ proc do_dpl { } {
1616
-right $::env(CELL_PAD_IN_SITES_DETAIL_PLACEMENT)
1717
detailed_placement
1818

19-
if { [env_var_equals ENABLE_DPO 1] } {
19+
if { $::env(ENABLE_DPO) } {
2020
if { [env_var_exists_and_non_empty DPO_MAX_DISPLACEMENT] } {
2121
improve_placement -max_displacement $::env(DPO_MAX_DISPLACEMENT)
2222
} else {

flow/scripts/detail_route.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if { ![grt::have_routes] } {
66
in DRC viewer to view congestion"
77
}
88

9-
if { [env_var_equals SKIP_DETAILED_ROUTE 1] } {
9+
if { $::env(SKIP_DETAILED_ROUTE) } {
1010
write_db $::env(RESULTS_DIR)/5_2_route.odb
1111
exit
1212
}
@@ -53,7 +53,7 @@ set all_args [concat [list \
5353
log_cmd detailed_route {*}$all_args
5454

5555
if {
56-
![env_var_equals SKIP_ANTENNA_REPAIR_POST_DRT 1] &&
56+
!$::env(SKIP_ANTENNA_REPAIR_POST_DRT) &&
5757
[env_var_exists_and_non_empty MAX_REPAIR_ANTENNAS_ITER_DRT]
5858
} {
5959
set repair_antennas_iters 1

flow/scripts/final_report.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ write_verilog $::env(RESULTS_DIR)/6_final.v \
2121
# Run extraction and STA
2222
if {
2323
[env_var_exists_and_non_empty RCX_RULES]
24-
&& [env_var_equals SKIP_DETAILED_ROUTE 0]
24+
&& !$::env(SKIP_DETAILED_ROUTE)
2525
} {
2626
# RCX section
2727
define_process_corner -ext_model_index 0 X

flow/scripts/floorplan.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ if { [env_var_exists_and_non_empty FASTROUTE_TCL] } {
111111

112112
source_env_var_if_exists FOOTPRINT_TCL
113113

114-
if { ![env_var_equals SKIP_REPAIR_TIE_FANOUT 1] } {
114+
if { !$::env(SKIP_REPAIR_TIE_FANOUT) } {
115115
# This needs to come before any call to remove_buffers. You could have one
116116
# tie driving multiple buffers that drive multiple outputs.
117117
# Repair tie lo fanout
@@ -134,7 +134,7 @@ if { [env_var_exists_and_non_empty SWAP_ARITH_OPERATORS] } {
134134
replace_arith_modules
135135
}
136136

137-
if { [env_var_equals REMOVE_ABC_BUFFERS 1] } {
137+
if { $::env(REMOVE_ABC_BUFFERS) } {
138138
# remove buffers inserted by yosys/abc
139139
remove_buffers
140140
} else {

flow/scripts/global_place.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if { $::env(GPL_TIMING_DRIVEN) } {
1414
# to not buffer IO ports, set environment variable
1515
# DONT_BUFFER_PORT = 1
1616
if { ![env_var_exists_and_non_empty FOOTPRINT] } {
17-
if { ![env_var_equals DONT_BUFFER_PORTS 1] } {
17+
if { !$::env(DONT_BUFFER_PORTS) } {
1818
puts "Perform port buffering..."
1919
buffer_ports
2020
}
@@ -52,7 +52,7 @@ if { $result != 0 } {
5252

5353
estimate_parasitics -placement
5454

55-
if { [env_var_equals CLUSTER_FLOPS 1] } {
55+
if { $::env(CLUSTER_FLOPS) } {
5656
cluster_flops
5757
estimate_parasitics -placement
5858
}

flow/scripts/global_route.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ proc global_route_helper { } {
9191
-congestion_report_file $::env(REPORTS_DIR)/congestion_post_recover_power.rpt
9292

9393
if {
94-
![env_var_equals SKIP_ANTENNA_REPAIR 1] &&
94+
!$::env(SKIP_ANTENNA_REPAIR) &&
9595
[env_var_exists_and_non_empty MAX_REPAIR_ANTENNAS_ITER_GRT]
9696
} {
9797
puts "Repair antennas..."

flow/scripts/open.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ if { [ord::openroad_gui_compiled] } {
6262
"OpenROAD - $::env(PLATFORM)/$::env(DESIGN_NICKNAME)/$::env(FLOW_VARIANT) - ${db_basename}"
6363
}
6464

65-
if { [env_var_equals GUI_TIMING 1] } {
65+
if { $::env(GUI_TIMING) } {
6666
puts "GUI_TIMING=1 reading timing, takes a little while for large designs..."
6767
read_timing $input_file
6868
if { [gui::enabled] } {

0 commit comments

Comments
 (0)