From 9c9454a63584d3addf1c272e4151950ffa1b6133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Sun, 14 Jun 2026 19:38:30 +0200 Subject: [PATCH 1/2] flow: log_cmd the unlogged synth and load steps for timing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The synth_odb step runs load_design and the PRE/POST SYNTH step-tcl hooks, and load.tcl runs read_verilog, without wrapping them in log_cmd. Their wall time is therefore not attributed in the per-command timing log, leaving a gap when accounting for where the synth step spends its time. link_design, read_sdc, eliminate_dead_logic, write_db and write_sdc already log themselves; wrap the remaining ops to match. No behaviour change. Signed-off-by: Øyvind Harboe Co-Authored-By: Claude Opus 4.8 (1M context) --- flow/scripts/load.tcl | 2 +- flow/scripts/synth_odb.tcl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flow/scripts/load.tcl b/flow/scripts/load.tcl index 6d946198d9..61c8f25590 100644 --- a/flow/scripts/load.tcl +++ b/flow/scripts/load.tcl @@ -23,7 +23,7 @@ proc load_design { design_file sdc_file } { read_lef $lef } } - read_verilog $::env(RESULTS_DIR)/$design_file + log_cmd read_verilog $::env(RESULTS_DIR)/$design_file log_cmd link_design {*}[hier_options] $::env(DESIGN_NAME) } elseif { $ext == ".odb" } { log_cmd read_db {*}[hier_options] $::env(RESULTS_DIR)/$design_file diff --git a/flow/scripts/synth_odb.tcl b/flow/scripts/synth_odb.tcl index 63bdc98cda..61fd6eb079 100644 --- a/flow/scripts/synth_odb.tcl +++ b/flow/scripts/synth_odb.tcl @@ -1,8 +1,8 @@ utl::set_metrics_stage "synth__{}" source $::env(SCRIPTS_DIR)/load.tcl erase_non_stage_variables synth -load_design 1_2_yosys.v 1_2_yosys.sdc -source_step_tcl PRE SYNTH +log_cmd load_design 1_2_yosys.v 1_2_yosys.sdc +log_cmd source_step_tcl PRE SYNTH # Eliminate dead logic before writing the synthesis odb so that # 1_synth.odb already reflects the live design. @@ -27,7 +27,7 @@ log_cmd eliminate_dead_logic report_design_area report_design_area_metrics -source_step_tcl POST SYNTH +log_cmd source_step_tcl POST SYNTH orfs_write_db $::env(RESULTS_DIR)/1_synth.odb # Canonicalize 1_synth.sdc. The original SDC_FILE provided by # the user could have dependencies, such as sourcing util.tcl, From e9ee6f9e28c3ab93a20f92ae609d2487617e0c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Sun, 14 Jun 2026 20:48:59 +0200 Subject: [PATCH 2/2] flow: log_cmd read_lef inside load_design, not the whole proc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per review, wrapping load_design and source_step_tcl in log_cmd double-logs: source_step_tcl already log_cmd's its source via source_env_var_if_exists, and load_design's other internals (read_verilog, link_design, read_sdc) are already wrapped. The only unlogged ops are the read_lef calls in load_design. Wrap those directly and revert the synth_odb.tcl wraps; the net change is read_lef/read_verilog logging only. Co-Authored-By: Claude Opus 4.8 (1M context) Signed-off-by: Øyvind Harboe --- flow/scripts/load.tcl | 6 +++--- flow/scripts/synth_odb.tcl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/flow/scripts/load.tcl b/flow/scripts/load.tcl index 61c8f25590..dc41ebbbbe 100644 --- a/flow/scripts/load.tcl +++ b/flow/scripts/load.tcl @@ -16,11 +16,11 @@ proc load_design { design_file sdc_file } { # Read design files set ext [file extension $design_file] if { $ext == ".v" } { - 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 } } log_cmd read_verilog $::env(RESULTS_DIR)/$design_file diff --git a/flow/scripts/synth_odb.tcl b/flow/scripts/synth_odb.tcl index 61fd6eb079..63bdc98cda 100644 --- a/flow/scripts/synth_odb.tcl +++ b/flow/scripts/synth_odb.tcl @@ -1,8 +1,8 @@ utl::set_metrics_stage "synth__{}" source $::env(SCRIPTS_DIR)/load.tcl erase_non_stage_variables synth -log_cmd load_design 1_2_yosys.v 1_2_yosys.sdc -log_cmd source_step_tcl PRE SYNTH +load_design 1_2_yosys.v 1_2_yosys.sdc +source_step_tcl PRE SYNTH # Eliminate dead logic before writing the synthesis odb so that # 1_synth.odb already reflects the live design. @@ -27,7 +27,7 @@ log_cmd eliminate_dead_logic report_design_area report_design_area_metrics -log_cmd source_step_tcl POST SYNTH +source_step_tcl POST SYNTH orfs_write_db $::env(RESULTS_DIR)/1_synth.odb # Canonicalize 1_synth.sdc. The original SDC_FILE provided by # the user could have dependencies, such as sourcing util.tcl,