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 <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41413 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -245,7 +245,8 @@ PowerState::PowerStateStats::regStats()
|
||||
// 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)
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user