base: Add operators to SatCounter
authorDaniel <odanrc@yahoo.com.br>
Sat, 13 Apr 2019 09:02:43 +0000 (11:02 +0200)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Tue, 14 May 2019 07:55:06 +0000 (07:55 +0000)
commit50a533f10134e7bc377dfdb9209b0334fd01cd24
treec92958ae7fcbe135b84ade80ffbc5fbcb94e84e4
parent5b3f91daf6891c68e978963701d792ebd63f23a7
base: Add operators to SatCounter

Add shift, add and subtract assignment operators, as well as
copy and move constructor and assignments to SatCounter, so
that it they can be used by the prefetchers.

Also add extra useful functions to calculate saturation
oercentile so that the instantiator does not need to be aware
of the counter's maximum value.

Change-Id: I61d0cb28c8375b9d2774a39011e4a0aa6fe9ccb7
Signed-off-by: Daniel <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17996
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
src/base/sat_counter.hh
src/base/sat_counter.test.cc