From c6c263e345c1d4caed7ac2bf6c7c9f6126b177ce Mon Sep 17 00:00:00 2001 From: James Cherry Date: Tue, 3 Nov 2020 11:44:47 -0800 Subject: [PATCH] power more NaNsense --- search/Power.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/search/Power.cc b/search/Power.cc index 90fc760e..57d3ca18 100644 --- a/search/Power.cc +++ b/search/Power.cc @@ -814,7 +814,8 @@ Power::findOutputInternalPower(const Pin *to_pin, float weight = 0.0; if (duty_sum_iter != pg_duty_sum.end()) { float duty_sum = duty_sum_iter->second; - weight = duty / duty_sum; + if (duty_sum != 0.0) + weight = duty / duty_sum; } float port_internal = weight * energy * to_activity.activity(); debugPrint9(debug_, "power", 2, "%3s -> %-3s %6s %.2f %.2f %.2f %9.2e %9.2e %s\n",