Giacomo Travaglini has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/41413 )

Change subject: sim: Fix initialization of ticksClkGated distribution
......................................................................

sim: Fix initialization of ticksClkGated distribution

The third init argument is the bucket size. This should be evaluated
according to the following formula:

bucket size = (max - min + 1.0) / #buckets

Current initialization is taking into considering the minimum value (and
the +1 offset)

Change-Id: Ie4b8dd7e26d3db60288ab1715ff1b7f0f4fe419e
Signed-off-by: Giacomo Travaglini <[email protected]>
---
M src/sim/power_state.cc
1 file changed, 2 insertions(+), 1 deletion(-)



diff --git a/src/sim/power_state.cc b/src/sim/power_state.cc
index a12e247..8281d2f 100644
--- a/src/sim/power_state.cc
+++ b/src/sim/power_state.cc
@@ -245,7 +245,8 @@
     // Each sample is time in ticks
     unsigned num_bins = std::max(p.clk_gate_bins, 10U);
     ticksClkGated
-        .init(p.clk_gate_min, p.clk_gate_max, (p.clk_gate_max / num_bins))
+        .init(p.clk_gate_min, p.clk_gate_max,
+            (p.clk_gate_max - p.clk_gate_min + 1.0) / num_bins)
         .flags(pdf | nozero | nonan)
         ;


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/41413
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ie4b8dd7e26d3db60288ab1715ff1b7f0f4fe419e
Gerrit-Change-Number: 41413
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to