Skip to content

Commit 180459b

Browse files
authored
Merge pull request #4042 from Vi-shub/report-metrics-div-zero
[Flow] Fix potential division-by-zero crash in report_metrics.tcl
2 parents 51ad123 + 88613cf commit 180459b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

flow/scripts/report_metrics.tcl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,11 @@ proc report_metrics { stage when { include_erc true } { include_clock_skew true
224224
report_puts "\n=========================================================================="
225225
report_puts "$when slack div critical path delay"
226226
report_puts "--------------------------------------------------------------------------"
227-
report_puts "[format "%4f" [expr $path_slack / $path_delay * 100]]"
227+
if { $path_delay != 0.0 } {
228+
report_puts "[format "%4f" [expr $path_slack / $path_delay * 100]]"
229+
} else {
230+
report_puts "N/A (0 delay)"
231+
}
228232
}
229233

230234
report_puts "\n=========================================================================="

0 commit comments

Comments
 (0)