diff --git a/scripts/tcl_commands/synthesis.tcl b/scripts/tcl_commands/synthesis.tcl index 88a32cf81..257e4b6d7 100755 --- a/scripts/tcl_commands/synthesis.tcl +++ b/scripts/tcl_commands/synthesis.tcl @@ -326,7 +326,7 @@ proc run_verilator {} { lappend arg_list {*}$defines puts_info "Running linter (Verilator) (log: [relpath . $log])..." - try_exec verilator \ + catch_exec verilator \ -Wall \ --lint-only \ --Wno-DECLFILENAME \ @@ -335,7 +335,7 @@ proc run_verilator {} { set timing_errors [exec bash -c "grep -i 'Error-NEEDTIMINGOPT' $log || true"] if { $timing_errors ne "" } { - set msg "Timing constructs found in the RTL. Please remove them or wrap them around an ifdef. It heavily unrecommended to rely on timing constructs for synthesis." + set msg "Timing constructs found in the RTL. Please remove them or add a preprocessor guard. It is heavily discouraged to rely on timing constructs in synthesis." if { $::env(QUIT_ON_LINTER_ERRORS) } { puts_err $msg throw_error diff --git a/scripts/utils/utils.tcl b/scripts/utils/utils.tcl index 5ec7d7d7c..592367946 100755 --- a/scripts/utils/utils.tcl +++ b/scripts/utils/utils.tcl @@ -197,13 +197,16 @@ proc set_and_log {var val} { close $global_cfg_file } -proc try_exec {args} { - # puts_info "Executing \"$args\"\n" +proc catch_exec {args} { if { ! [catch { set cmd_log_file [open $::env(RUN_DIR)/cmds.log a+] } ]} { set timestamp [clock format [clock seconds]] puts $cmd_log_file "$timestamp - Executing \"$args\"\n" close $cmd_log_file } + catch {eval exec $args} +} + +proc try_exec {args} { set exit_code [catch {eval exec $args} error_msg] if { $exit_code } { set tool [string range $args 0 [string first " " $args]]