Giacomo Travaglini has submitted this change. (
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 not taking into considering the minimum value
(and the +1 offset)
Change-Id: Ie4b8dd7e26d3db60288ab1715ff1b7f0f4fe419e
Signed-off-by: Giacomo Travaglini <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41413
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/sim/power_state.cc
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
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: 3
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Anouk Van Laer <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s