diff --git a/flow/scripts/open.tcl b/flow/scripts/open.tcl index 4ef30068e4..0873afab98 100644 --- a/flow/scripts/open.tcl +++ b/flow/scripts/open.tcl @@ -5,18 +5,18 @@ source $::env(SCRIPTS_DIR)/read_liberty.tcl # Read def if {[env_var_exists_and_non_empty DEF_FILE]} { # Read lef - read_lef $::env(TECH_LEF) - read_lef $::env(SC_LEF) + log_cmd read_lef $::env(TECH_LEF) + log_cmd read_lef $::env(SC_LEF) if {[env_var_exists_and_non_empty ADDITIONAL_LEFS]} { foreach lef $::env(ADDITIONAL_LEFS) { - read_lef $lef + log_cmd read_lef $lef } } set input_file $::env(DEF_FILE) - read_def $input_file + log_cmd read_def $input_file } else { set input_file $::env(ODB_FILE) - read_db $input_file + log_cmd read_db $input_file } proc read_timing {input_file} { @@ -27,7 +27,7 @@ proc read_timing {input_file} { if {$sdc_file == ""} { set sdc_file $::env(SDC_FILE) } - read_sdc $sdc_file + log_cmd read_sdc $sdc_file if [file exists $::env(PLATFORM_DIR)/derate.tcl] { source $::env(PLATFORM_DIR)/derate.tcl } diff --git a/flow/scripts/util.tcl b/flow/scripts/util.tcl index 1438b8ea07..ec6c2f6a34 100644 --- a/flow/scripts/util.tcl +++ b/flow/scripts/util.tcl @@ -1,7 +1,13 @@ proc log_cmd {cmd args} { # log the command, escape arguments with spaces - puts "$cmd [join [lmap arg $args {expr {[string match {* *} $arg] ? "\"$arg\"" : $arg}}] " "]" + puts -nonewline "$cmd[join [lmap arg $args {expr {[string match {* *} $arg] ? " \"$arg\"" : " $arg"}}] ""]" + set start [clock seconds] $cmd {*}$args + set time [expr {[clock seconds] - $start}] + if {$time >= 5} { + puts -nonewline " ($time seconds)" + } + puts "" } proc fast_route {} {