Skip to content

Commit f199aff

Browse files
committed
synth: fix operator swapping check that hierarchical is enabled
Separation of concerns: require OPENROAD_HIERARCHICAL to be set, but don't set it implicitly. This fixes suprising potential w.r.t. e.g SYNTH_ variables not being set outside of the synthesis stage Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent e601537 commit f199aff

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎flow/scripts/util.tcl‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,13 @@ proc source_env_var_if_exists { env_var } {
196196
# will be default and this code will be deleted.
197197
proc hier_options { } {
198198
if {
199-
[env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] ||
200-
[env_var_exists_and_non_empty SWAP_ARITH_OPERATORS] ||
201-
$::env(OPENROAD_HIERARCHICAL)
199+
([env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] ||
200+
[env_var_exists_and_non_empty SWAP_ARITH_OPERATORS]) &&
201+
!$::env(OPENROAD_HIERARCHICAL)
202202
} {
203+
error "SYNTH_WRAPPED_OPERATORS or SWAP_ARITH_OPERATORS require OPENROAD_HIERARCHICAL to be set."
204+
}
205+
if { $::env(OPENROAD_HIERARCHICAL) } {
203206
return "-hier"
204207
} else {
205208
return ""

0 commit comments

Comments
 (0)