Skip to content

Commit ac9813c

Browse files
authored
Merge pull request The-OpenROAD-Project#3434 from The-OpenROAD-Project-staging/secure-opto-flow
Added flow support for new optimization transformns
2 parents bed22db + 07363e7 commit ac9813c

File tree

6 files changed

+54
-20
lines changed

6 files changed

+54
-20
lines changed

docs/user/FlowVariables.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ configuration file.
222222
| <a name="SKIP_INCREMENTAL_REPAIR"></a>SKIP_INCREMENTAL_REPAIR| Skip incremental repair in global route.| 0|
223223
| <a name="SKIP_LAST_GASP"></a>SKIP_LAST_GASP| Do not use last gasp optimization to fix timing violations (default: use gate last gasp).| |
224224
| <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).| |
225+
| <a name="SKIP_REPAIR_TIE_FANOUT"></a>SKIP_REPAIR_TIE_FANOUT| Skip repair_tie_fanout at floorplan step.| |
225226
| <a name="SKIP_REPORT_METRICS"></a>SKIP_REPORT_METRICS| If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds.| |
227+
| <a name="SKIP_VT_SWAP"></a>SKIP_VT_SWAP| Do not perform VT swap to improve QoR (default: do VT swap).| |
226228
| <a name="SLEW_MARGIN"></a>SLEW_MARGIN| Specifies a slew margin when fixing max slew violations. This option allows you to overfix.| |
227229
| <a name="SWAP_ARITH_OPERATORS"></a>SWAP_ARITH_OPERATORS| Improve timing QoR by swapping ALU and MULT arithmetic operators.| |
228230
| <a name="SYNTH_ARGS"></a>SYNTH_ARGS| Optional synthesis variables for yosys.| |
@@ -236,6 +238,7 @@ configuration file.
236238
| <a name="SYNTH_MEMORY_MAX_BITS"></a>SYNTH_MEMORY_MAX_BITS| Maximum number of bits for memory synthesis.| 4096|
237239
| <a name="SYNTH_MINIMUM_KEEP_SIZE"></a>SYNTH_MINIMUM_KEEP_SIZE| For hierarchical synthesis, we keep modules of larger area than given by this variable and flatten smaller modules. The area unit used is the size of a basic nand2 gate from the platform's standard cell library. The default value is platform specific.| 0|
238240
| <a name="SYNTH_NETLIST_FILES"></a>SYNTH_NETLIST_FILES| Skips synthesis and uses the supplied netlist files. If the netlist files contains duplicate modules, which can happen when using hierarchical synthesis on indvidual netlist files and combining here, subsequent modules are silently ignored and only the first module is used.| |
241+
| <a name="SYNTH_OPT_HIER"></a>SYNTH_OPT_HIER| Optimize constants across hierarchical boundaries.| |
239242
| <a name="SYNTH_RETIME_MODULES"></a>SYNTH_RETIME_MODULES| List of modules to apply retiming to. These modules must not get dissolved and as such they should either be the top module or be included in SYNTH_KEEP_MODULES. This is an experimental option and may cause adverse effects.| |
240243
| <a name="SYNTH_WRAPPED_OPERATORS"></a>SYNTH_WRAPPED_OPERATORS| Synthesize multiple architectural options for each arithmetic operator in the design. These options are available for switching among in later stages of the flow.| |
241244
| <a name="TAPCELL_TCL"></a>TAPCELL_TCL| Path to Endcap and Welltie cells file.| |
@@ -273,6 +276,7 @@ configuration file.
273276
- [SYNTH_MEMORY_MAX_BITS](#SYNTH_MEMORY_MAX_BITS)
274277
- [SYNTH_MINIMUM_KEEP_SIZE](#SYNTH_MINIMUM_KEEP_SIZE)
275278
- [SYNTH_NETLIST_FILES](#SYNTH_NETLIST_FILES)
279+
- [SYNTH_OPT_HIER](#SYNTH_OPT_HIER)
276280
- [SYNTH_RETIME_MODULES](#SYNTH_RETIME_MODULES)
277281
- [SYNTH_WRAPPED_OPERATORS](#SYNTH_WRAPPED_OPERATORS)
278282
- [TIEHI_CELL_AND_PORT](#TIEHI_CELL_AND_PORT)
@@ -332,7 +336,9 @@ configuration file.
332336
- [SKIP_GATE_CLONING](#SKIP_GATE_CLONING)
333337
- [SKIP_LAST_GASP](#SKIP_LAST_GASP)
334338
- [SKIP_PIN_SWAP](#SKIP_PIN_SWAP)
339+
- [SKIP_REPAIR_TIE_FANOUT](#SKIP_REPAIR_TIE_FANOUT)
335340
- [SKIP_REPORT_METRICS](#SKIP_REPORT_METRICS)
341+
- [SKIP_VT_SWAP](#SKIP_VT_SWAP)
336342
- [SWAP_ARITH_OPERATORS](#SWAP_ARITH_OPERATORS)
337343
- [SYNTH_WRAPPED_OPERATORS](#SYNTH_WRAPPED_OPERATORS)
338344
- [TAPCELL_TCL](#TAPCELL_TCL)
@@ -387,6 +393,7 @@ configuration file.
387393
- [SKIP_LAST_GASP](#SKIP_LAST_GASP)
388394
- [SKIP_PIN_SWAP](#SKIP_PIN_SWAP)
389395
- [SKIP_REPORT_METRICS](#SKIP_REPORT_METRICS)
396+
- [SKIP_VT_SWAP](#SKIP_VT_SWAP)
390397
- [SWAP_ARITH_OPERATORS](#SWAP_ARITH_OPERATORS)
391398
- [SYNTH_WRAPPED_OPERATORS](#SYNTH_WRAPPED_OPERATORS)
392399
- [TNS_END_PERCENT](#TNS_END_PERCENT)
@@ -410,6 +417,7 @@ configuration file.
410417
- [SKIP_LAST_GASP](#SKIP_LAST_GASP)
411418
- [SKIP_PIN_SWAP](#SKIP_PIN_SWAP)
412419
- [SKIP_REPORT_METRICS](#SKIP_REPORT_METRICS)
420+
- [SKIP_VT_SWAP](#SKIP_VT_SWAP)
413421
- [SWAP_ARITH_OPERATORS](#SWAP_ARITH_OPERATORS)
414422
- [SYNTH_WRAPPED_OPERATORS](#SYNTH_WRAPPED_OPERATORS)
415423
- [TNS_END_PERCENT](#TNS_END_PERCENT)

flow/scripts/floorplan.tcl

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -95,21 +95,23 @@ if { [env_var_exists_and_non_empty MAKE_TRACKS] } {
9595

9696
source_env_var_if_exists FOOTPRINT_TCL
9797

98-
# This needs to come before any call to remove_buffers. You could have one
99-
# tie driving multiple buffers that drive multiple outputs.
100-
# Repair tie lo fanout
101-
puts "Repair tie lo fanout..."
102-
set tielo_cell_name [lindex $::env(TIELO_CELL_AND_PORT) 0]
103-
set tielo_lib_name [get_name [get_property [lindex [get_lib_cell $tielo_cell_name] 0] library]]
104-
set tielo_pin $tielo_lib_name/$tielo_cell_name/[lindex $::env(TIELO_CELL_AND_PORT) 1]
105-
repair_tie_fanout -separation $::env(TIE_SEPARATION) $tielo_pin
106-
107-
# Repair tie hi fanout
108-
puts "Repair tie hi fanout..."
109-
set tiehi_cell_name [lindex $::env(TIEHI_CELL_AND_PORT) 0]
110-
set tiehi_lib_name [get_name [get_property [lindex [get_lib_cell $tiehi_cell_name] 0] library]]
111-
set tiehi_pin $tiehi_lib_name/$tiehi_cell_name/[lindex $::env(TIEHI_CELL_AND_PORT) 1]
112-
repair_tie_fanout -separation $::env(TIE_SEPARATION) $tiehi_pin
98+
if { ![env_var_equal SKIP_REPAIR_TIE_FANOUT 1] } {
99+
# This needs to come before any call to remove_buffers. You could have one
100+
# tie driving multiple buffers that drive multiple outputs.
101+
# Repair tie lo fanout
102+
puts "Repair tie lo fanout..."
103+
set tielo_cell_name [lindex $::env(TIELO_CELL_AND_PORT) 0]
104+
set tielo_lib_name [get_name [get_property [lindex [get_lib_cell $tielo_cell_name] 0] library]]
105+
set tielo_pin $tielo_lib_name/$tielo_cell_name/[lindex $::env(TIELO_CELL_AND_PORT) 1]
106+
repair_tie_fanout -separation $::env(TIE_SEPARATION) $tielo_pin
107+
108+
# Repair tie hi fanout
109+
puts "Repair tie hi fanout..."
110+
set tiehi_cell_name [lindex $::env(TIEHI_CELL_AND_PORT) 0]
111+
set tiehi_lib_name [get_name [get_property [lindex [get_lib_cell $tiehi_cell_name] 0] library]]
112+
set tiehi_pin $tiehi_lib_name/$tiehi_cell_name/[lindex $::env(TIEHI_CELL_AND_PORT) 1]
113+
repair_tie_fanout -separation $::env(TIE_SEPARATION) $tiehi_pin
114+
}
113115

114116
if { [env_var_exists_and_non_empty SWAP_ARITH_OPERATORS] } {
115117
estimate_parasitics -placement
@@ -121,7 +123,7 @@ if { [env_var_equals REMOVE_ABC_BUFFERS 1] } {
121123
remove_buffers
122124
} else {
123125
# Skip clone & split
124-
set ::env(SETUP_MOVE_SEQUENCE) "unbuffer,sizeup,swap,buffer"
126+
set ::env(SETUP_MOVE_SEQUENCE) "unbuffer,sizeup,swap,buffer,vt_swap"
125127
set ::env(SKIP_LAST_GASP) 1
126128
repair_timing_helper -setup
127129
}

flow/scripts/synth.tcl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ if { [env_var_exists_and_non_empty SYNTH_OPERATIONS_ARGS] } {
2828
set synth_full_args [concat $synth_full_args \
2929
"-extra-map $::env(FLOW_HOME)/platforms/common/lcu_kogge_stone.v"]
3030
}
31+
if { [env_var_exists_and_non_empty SYNTH_OPT_HIER] } {
32+
set synth_full_args [concat $synth_full_args -hieropt]
33+
}
3134

3235
if { ![env_var_equals SYNTH_HIERARCHICAL 1] } {
3336
# Perform standard coarse-level synthesis script, flatten right away
@@ -39,7 +42,8 @@ if { ![env_var_equals SYNTH_HIERARCHICAL 1] } {
3942

4043
if { [env_var_exists_and_non_empty SYNTH_MINIMUM_KEEP_SIZE] } {
4144
set ungroup_threshold $::env(SYNTH_MINIMUM_KEEP_SIZE)
42-
puts "Keep modules above estimated size of $ungroup_threshold gate equivalents"
45+
puts "Keep modules above estimated size of " \
46+
"$ungroup_threshold gate equivalents"
4347

4448
convert_liberty_areas
4549
keep_hierarchy -min_cost $ungroup_threshold
@@ -130,7 +134,8 @@ if { ![env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] } {
130134
delete {t:$specify*}
131135
}
132136

133-
# Splitting nets resolves unwanted compound assign statements in netlist (assign {..} = {..})
137+
# Splitting nets resolves unwanted compound assign statements in
138+
# netlist (assign {..} = {..})
134139
splitnets
135140

136141
# Remove unused cells and wires
@@ -149,7 +154,8 @@ tee -o $::env(REPORTS_DIR)/synth_check.txt check
149154

150155
tee -o $::env(REPORTS_DIR)/synth_stat.txt stat {*}$stat_libs
151156

152-
# check the design is composed exclusively of target cells, and check for other problems
157+
# check the design is composed exclusively of target cells, and
158+
# check for other problems
153159
if { ![env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] } {
154160
check -assert -mapped
155161
} else {

flow/scripts/util.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ proc repair_timing_helper { args } {
2525
append_env_var additional_args SKIP_GATE_CLONING -skip_gate_cloning 0
2626
append_env_var additional_args SKIP_BUFFER_REMOVAL -skip_buffer_removal 0
2727
append_env_var additional_args SKIP_LAST_GASP -skip_last_gasp 0
28+
append_env_var additional_args SKIP_VT_SWAP -skip_vt_swap 0
2829
append_env_var additional_args MATCH_CELL_FOOTPRINT -match_cell_footprint 0
2930
log_cmd repair_timing {*}$additional_args
3031
}

flow/scripts/variables.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,13 @@ SKIP_PIN_SWAP:
573573
- cts
574574
- floorplan
575575
- grt
576+
SKIP_VT_SWAP:
577+
description: >
578+
Do not perform VT swap to improve QoR (default: do VT swap).
579+
stages:
580+
- cts
581+
- floorplan
582+
- grt
576583
REMOVE_CELLS_FOR_EQY:
577584
description: >
578585
String patterns directly passed to write_verilog -remove_cells <> for
@@ -585,6 +592,11 @@ SKIP_CTS_REPAIR_TIMING:
585592
architectural exploration or when getting CI up and running.
586593
stages:
587594
- cts
595+
SKIP_REPAIR_TIE_FANOUT:
596+
description: >
597+
Skip repair_tie_fanout at floorplan step.
598+
stages:
599+
- floorplan
588600
MIN_ROUTING_LAYER:
589601
description: |
590602
The lowest metal layer name to be used in routing.
@@ -732,6 +744,11 @@ SYNTH_HIER_SEPARATOR:
732744
description: |
733745
Separator used for the synthesis flatten stage.
734746
default: .
747+
SYNTH_OPT_HIER:
748+
description: |
749+
Optimize constants across hierarchical boundaries.
750+
stages:
751+
- synth
735752
VERILOG_TOP_PARAMS:
736753
description: |
737754
Apply toplevel params (if exist).

tools/OpenROAD

Submodule OpenROAD updated 236 files

0 commit comments

Comments
 (0)