From 8ac65c3ddad27679f5360f25ade4e52603fc2edc Mon Sep 17 00:00:00 2001 From: James Cherry Date: Tue, 11 Feb 2025 22:04:14 -0700 Subject: [PATCH] power NaN from missing clocks resolves #189 Signed-off-by: James Cherry --- power/Power.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/power/Power.cc b/power/Power.cc index d944408e..cd564c3f 100644 --- a/power/Power.cc +++ b/power/Power.cc @@ -664,7 +664,9 @@ Power::ensureActivities() // unless it has been set by command. if (input_activity_.density() == 0.0) { float min_period = clockMinPeriod(); - float density = 0.1 / (min_period != 0.0 ? min_period : 0.0); + float density = 0.1 / (min_period != 0.0 + ? min_period + : units_->timeUnit()->scale()); input_activity_.set(density, 0.5, PwrActivityOrigin::input); } ActivitySrchPred activity_srch_pred(this);