Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/user/FlowVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ configuration file.
| <a name="SKIP_LAST_GASP"></a>SKIP_LAST_GASP| Do not use last gasp optimization to fix timing violations (default: use gate last gasp).| |
| <a name="SKIP_PIN_SWAP"></a>SKIP_PIN_SWAP| Do not use pin swapping as a transform to fix timing violations (default: use pin swapping).| |
| <a name="SKIP_REPAIR_TIE_FANOUT"></a>SKIP_REPAIR_TIE_FANOUT| Skip repair_tie_fanout at floorplan step.| 0|
| <a name="SKIP_REPORT_METRICS"></a>SKIP_REPORT_METRICS| If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds.| 0|
| <a name="SKIP_REPORT_METRICS"></a>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/<stage>_*.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|
| <a name="SKIP_VT_SWAP"></a>SKIP_VT_SWAP| Do not perform VT swap to improve QoR (default: do VT swap).| |
| <a name="SLEW_MARGIN"></a>SLEW_MARGIN| Specifies a slew margin when fixing max slew violations. This option allows you to overfix.| |
| <a name="SWAP_ARITH_OPERATORS"></a>SWAP_ARITH_OPERATORS| Improve timing QoR by swapping ALU and MULT arithmetic operators.| 0|
Expand Down
30 changes: 17 additions & 13 deletions flow/scripts/report_metrics.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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

Expand All @@ -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) } {
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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]
Expand All @@ -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]
Expand Down Expand Up @@ -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
}

Expand All @@ -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
}
2 changes: 1 addition & 1 deletion flow/scripts/variables.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions flow/scripts/variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/<stage>_*.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
Expand Down