Skip to content

Commit 0b487c7

Browse files
committed
synth: respect deferring flattening pass
1 parent 1bc8d6b commit 0b487c7

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

flow/scripts/synth.tcl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ if {[env_var_exists_and_non_empty SYNTH_KEEP_MODULES]} {
1717
}
1818
}
1919

20+
set flatten_hier_separator .
2021
if {[env_var_exists_and_non_empty SYNTH_HIER_SEPARATOR]} {
21-
flatten -separator $::env(SYNTH_HIER_SEPARATOR)
22+
set flatten_hier_separator $::env(SYNTH_HIER_SEPARATOR)
2223
}
2324

2425
set synth_full_args $::env(SYNTH_ARGS)
@@ -30,7 +31,7 @@ if {[env_var_exists_and_non_empty SYNTH_OPERATIONS_ARGS]} {
3031

3132
if {![env_var_equals SYNTH_HIERARCHICAL 1]} {
3233
# Perform standard coarse-level synthesis script, flatten right away
33-
# (-flatten part of $synth_args per default)
34+
flatten -separator $flatten_hier_separator
3435
synth -run :fine {*}$synth_full_args
3536
} else {
3637
# Perform standard coarse-level synthesis script,
@@ -47,7 +48,9 @@ if {![env_var_equals SYNTH_HIERARCHICAL 1]} {
4748
keep_hierarchy
4849
}
4950

50-
# Re-run coarse-level script, this time do pass -flatten
51+
flatten -separator $flatten_hier_separator
52+
53+
# Re-run coarse-level script
5154
synth -run coarse:fine {*}$synth_full_args
5255
}
5356

0 commit comments

Comments
 (0)