Skip to content

Commit b7fa57d

Browse files
authored
Merge pull request #3084 from Pinata-Consulting/open-logging
open: better logging
2 parents 71f1e09 + e54a1ad commit b7fa57d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

flow/scripts/open.tcl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ proc read_timing {input_file} {
4141
if {$design_stage >= 6 && [file exist $::env(RESULTS_DIR)/6_final.spef]} {
4242
log_cmd read_spef $::env(RESULTS_DIR)/6_final.spef
4343
} elseif {$design_stage >= 5} {
44-
if { [grt::have_routes] } {
44+
if { [log_cmd grt::have_routes] } {
4545
log_cmd estimate_parasitics -global_routing
4646
} else {
4747
puts "No global routing results available, skipping estimate_parasitics"
@@ -51,10 +51,8 @@ proc read_timing {input_file} {
5151
log_cmd estimate_parasitics -placement
5252
}
5353

54-
puts -nonewline "Populating timing paths..."
5554
# Warm up OpenSTA, so clicking on timing related buttons reacts faster
56-
set _tmp [find_timing_paths]
57-
puts "OK"
55+
set _tmp [log_cmd find_timing_paths]
5856
}
5957

6058
if {[ord::openroad_gui_compiled]} {

flow/scripts/util.tcl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ proc log_cmd {cmd args} {
33
set log_cmd "$cmd[join [lmap arg $args {format " %s" [expr {[string match {* *} $arg] ? "\"$arg\"" : "$arg"}]}] ""]"
44
puts $log_cmd
55
set start [clock seconds]
6-
uplevel 1 [list $cmd {*}$args]
6+
set result [uplevel 1 [list $cmd {*}$args]]
77
set time [expr {[clock seconds] - $start}]
88
if {$time >= 5} {
99
# Ideally we'd use a single line, but the command can output text
1010
# and we don't want to mix it with the log, so output the time it took afterwards.
1111
puts "Took $time seconds: $log_cmd"
1212
}
13+
return $result
1314
}
1415

1516
proc fast_route {} {

0 commit comments

Comments
 (0)