diff --git a/docs/user/FlowVariables.md b/docs/user/FlowVariables.md index b1339b4928..1f35aa3ab8 100644 --- a/docs/user/FlowVariables.md +++ b/docs/user/FlowVariables.md @@ -293,7 +293,7 @@ configuration file. | SKIP_LAST_GASP| Do not use last gasp optimization to fix timing violations (default: use gate last gasp).| | | SKIP_PIN_SWAP| Do not use pin swapping as a transform to fix timing violations (default: use pin swapping).| | | SKIP_REPAIR_TIE_FANOUT| Skip repair_tie_fanout at floorplan step.| 0| -| SKIP_REPORT_METRICS| If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds.| 0| +| SKIP_REPORT_METRICS| If set to 1, report_metrics writes only the metrics that cost no analysis: design area, instance counts and utilization. Timing, power, clock skew, the max slew/cap/fanout checks and the `reports/_*.rpt` text reports are skipped; they need a timing update and a power analysis at every stage that calls it. The counters the tools record as they run (placement, legalization, routing, repair, warnings) are written either way.| 0| | SKIP_VT_SWAP| Do not perform VT swap to improve QoR (default: do VT swap).| | | SLEW_MARGIN| Specifies a slew margin when fixing max slew violations. This option allows you to overfix.| | | SWAP_ARITH_OPERATORS| Improve timing QoR by swapping ALU and MULT arithmetic operators.| 0| diff --git a/flow/scripts/report_metrics.tcl b/flow/scripts/report_metrics.tcl index ed6f2ec6ef..907be2f794 100644 --- a/flow/scripts/report_metrics.tcl +++ b/flow/scripts/report_metrics.tcl @@ -31,6 +31,7 @@ proc get_power_file_scope_args { } { } proc report_metrics { stage when { include_erc true } { include_clock_skew true } } { + report_design_area_metrics if { $::env(SKIP_REPORT_METRICS) } { return } @@ -41,7 +42,7 @@ proc report_metrics { stage when { include_erc true } { include_clock_skew true report_puts "\n==========================================================================" report_puts "$when report_tns" report_puts "--------------------------------------------------------------------------" - report_tns >> $filename + log_cmd report_tns >> $filename report_tns_metric report_tns_metric -hold @@ -60,7 +61,7 @@ proc report_metrics { stage when { include_erc true } { include_clock_skew true report_puts "\n==========================================================================" report_puts "$when report_clock_min_period" report_puts "--------------------------------------------------------------------------" - report_clock_min_period -include_port_paths >> $filename + log_cmd report_clock_min_period -include_port_paths >> $filename report_fmax_metric if { $include_clock_skew && $::env(REPORT_CLOCK_SKEW) } { @@ -94,9 +95,9 @@ proc report_metrics { stage when { include_erc true } { include_clock_skew true report_puts "\n==========================================================================" report_puts "$when report_check_types -max_slew -max_cap -max_fanout -violators" report_puts "--------------------------------------------------------------------------" - report_check_types -max_slew -max_capacitance -max_fanout -violators >> $filename + log_cmd report_check_types -max_slew -max_capacitance -max_fanout -violators >> $filename - report_erc_metrics + log_cmd report_erc_metrics report_puts "\n==========================================================================" report_puts "$when max_slew_check_slack" @@ -187,16 +188,18 @@ proc report_metrics { stage when { include_erc true } { include_clock_skew true report_puts "\n==========================================================================" report_puts "$when report_checks -path_delay max reg to reg" report_puts "--------------------------------------------------------------------------" - report_checks -path_delay max -from [all_registers] -to [all_registers] \ - -format full_clock_expanded >> $filename + log_cmd eval { report_checks -path_delay max -from [all_registers] -to [all_registers] \ + -format full_clock_expanded >> $filename } report_puts "\n==========================================================================" report_puts "$when report_checks -path_delay min reg to reg" report_puts "--------------------------------------------------------------------------" - report_checks -path_delay min -from [all_registers] -to [all_registers] \ - -format full_clock_expanded >> $filename + log_cmd eval { report_checks -path_delay min -from [all_registers] -to [all_registers] \ + -format full_clock_expanded >> $filename } set inp_to_reg_critical_path \ - [lindex [find_timing_paths -path_delay max -from [all_inputs] -to [all_registers]] 0] + [lindex [log_cmd eval { + find_timing_paths -path_delay max -from [all_inputs] -to [all_registers] + }] 0] if { $inp_to_reg_critical_path != "" } { set target_clock_latency_max \ [sta::format_time [$inp_to_reg_critical_path target_clk_delay] 4] @@ -206,7 +209,9 @@ proc report_metrics { stage when { include_erc true } { include_clock_skew true set inp_to_reg_critical_path [lindex \ - [find_timing_paths -path_delay min -from [all_inputs] -to [all_registers]] 0] + [log_cmd eval { + find_timing_paths -path_delay min -from [all_inputs] -to [all_registers] + }] 0] if { $inp_to_reg_critical_path != "" } { set target_clock_latency_min \ [sta::format_time [$inp_to_reg_critical_path target_clk_delay] 4] @@ -270,12 +275,12 @@ proc report_metrics { stage when { include_erc true } { include_clock_skew true if { [env_var_exists_and_non_empty CORNERS] } { foreach corner $::env(CORNERS) { report_puts "Corner: $corner" - report_power -corner $corner >> $filename + log_cmd report_power -corner $corner >> $filename report_power_metric -corner $corner } unset corner } else { - report_power >> $filename + log_cmd report_power >> $filename report_power_metric } @@ -284,5 +289,4 @@ proc report_metrics { stage when { include_erc true } { include_clock_skew true puts "$when report_design_area" puts "--------------------------------------------------------------------------" report_design_area - report_design_area_metrics } diff --git a/flow/scripts/variables.json b/flow/scripts/variables.json index 50c1517476..e8f1ec5093 100644 --- a/flow/scripts/variables.json +++ b/flow/scripts/variables.json @@ -1272,7 +1272,7 @@ }, "SKIP_REPORT_METRICS": { "default": 0, - "description": "If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds.\n", + "description": "If set to 1, report_metrics writes only the metrics that cost no analysis: design area, instance counts and utilization. Timing, power, clock skew, the max slew/cap/fanout checks and the `reports/_*.rpt` text reports are skipped; they need a timing update and a power analysis at every stage that calls it. The counters the tools record as they run (placement, legalization, routing, repair, warnings) are written either way.\n", "stages": [ "synth", "floorplan", diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml index 2cd82356fd..8c0bb4b288 100644 --- a/flow/scripts/variables.yaml +++ b/flow/scripts/variables.yaml @@ -128,8 +128,13 @@ REPORT_ENDPOINT_SLACK: default: 0 SKIP_REPORT_METRICS: description: > - If set to 1, then metrics, report_metrics does nothing. Useful to speed up - builds. + If set to 1, report_metrics writes only the metrics that cost no + analysis: design area, instance counts and utilization. Timing, power, + clock skew, the max slew/cap/fanout checks and the + `reports/_*.rpt` text reports are skipped; they need a timing + update and a power analysis at every stage that calls it. The + counters the tools record as they run (placement, legalization, + routing, repair, warnings) are written either way. stages: - synth - floorplan