Skip to content

Commit 5ab21b6

Browse files
committed
gui: fix crash when loading hierarchical database
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent ca8e864 commit 5ab21b6

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

flow/scripts/load.tcl

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,6 @@ 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-
195
proc load_design { design_file sdc_file } {
206
source_env_var_if_exists PLATFORM_TCL
217

@@ -32,9 +18,9 @@ proc load_design { design_file sdc_file } {
3218
}
3319
}
3420
read_verilog $::env(RESULTS_DIR)/$design_file
35-
link_design {*}[hier_options] $::env(DESIGN_NAME)
21+
log_cmd link_design {*}[hier_options] $::env(DESIGN_NAME)
3622
} elseif { $ext == ".odb" } {
37-
read_db {*}[hier_options] $::env(RESULTS_DIR)/$design_file
23+
log_cmd read_db {*}[hier_options] $::env(RESULTS_DIR)/$design_file
3824
} else {
3925
error "Unrecognized input file $design_file"
4026
}

flow/scripts/open.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if { [env_var_exists_and_non_empty DEF_FILE] } {
1616
log_cmd read_def $input_file
1717
} else {
1818
set input_file $::env(ODB_FILE)
19-
log_cmd read_db $input_file
19+
log_cmd read_db {*}[hier_options] $input_file
2020
}
2121

2222
proc read_timing { input_file } {

flow/scripts/util.tcl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,17 @@ proc source_env_var_if_exists { env_var } {
186186
log_cmd source $::env($env_var)
187187
}
188188
}
189+
190+
# Feature toggle for now, eventually the -hier option
191+
# will be default and this code will be deleted.
192+
proc hier_options { } {
193+
if {
194+
[env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] ||
195+
[env_var_exists_and_non_empty SWAP_ARITH_OPERATORS] ||
196+
[env_var_equals OPENROAD_HIERARCHICAL 1]
197+
} {
198+
return "-hier"
199+
} else {
200+
return ""
201+
}
202+
}

0 commit comments

Comments
 (0)