summaryrefslogtreecommitdiff
path: root/src/mem/cache/prefetch/Prefetcher.py
diff options
context:
space:
mode:
authorDaniel <odanrc@yahoo.com.br>2019-04-11 08:37:56 +0200
committerDaniel Carvalho <odanrc@yahoo.com.br>2019-05-14 07:55:06 +0000
commitc1bd27907d9404ba0803495d8eb5c9ad8513f09f (patch)
treea8447ce260a1a810a53c00eeeea6c42af06f9596 /src/mem/cache/prefetch/Prefetcher.py
parent50a533f10134e7bc377dfdb9209b0334fd01cd24 (diff)
downloadgem5-c1bd27907d9404ba0803495d8eb5c9ad8513f09f.tar.xz
mem-cache: Use SatCounter for prefetchers
Many prefetchers re-implement saturating counters with ints. Make them use SatCounters instead. Added missing operators and constructors to SatCounter for that to be possible and their respective tests. Change-Id: I36f10c89c27c9b3d1bf461e9ea546920f6ebb888 Signed-off-by: Daniel <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17995 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Javier Bueno Hedo <javier.bueno@metempsy.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/mem/cache/prefetch/Prefetcher.py')
-rw-r--r--src/mem/cache/prefetch/Prefetcher.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mem/cache/prefetch/Prefetcher.py b/src/mem/cache/prefetch/Prefetcher.py
index aaa140887..b933b4953 100644
--- a/src/mem/cache/prefetch/Prefetcher.py
+++ b/src/mem/cache/prefetch/Prefetcher.py
@@ -156,8 +156,8 @@ class IndirectMemoryPrefetcher(QueuedPrefetcher):
pt_table_replacement_policy = Param.BaseReplacementPolicy(LRURP(),
"Replacement policy of the pattern table")
max_prefetch_distance = Param.Unsigned(16, "Maximum prefetch distance")
- max_indirect_counter_value = Param.Unsigned(8,
- "Maximum value of the indirect counter")
+ num_indirect_counter_bits = Param.Unsigned(3,
+ "Number of bits of the indirect counter")
ipd_table_entries = Param.MemorySize("4",
"Number of entries of the Indirect Pattern Detector")
ipd_table_assoc = Param.Unsigned(4,
@@ -197,7 +197,8 @@ class SignaturePathPrefetcher(QueuedPrefetcher):
signature_table_replacement_policy = Param.BaseReplacementPolicy(LRURP(),
"Replacement policy of the signature table")
- max_counter_value = Param.UInt8(7, "Maximum pattern counter value")
+ num_counter_bits = Param.UInt8(3,
+ "Number of bits of the saturating counters")
pattern_table_entries = Param.MemorySize("4096",
"Number of entries of the pattern table")
pattern_table_assoc = Param.Unsigned(1,
@@ -225,7 +226,7 @@ class SignaturePathPrefetcherV2(SignaturePathPrefetcher):
signature_table_assoc = 1
pattern_table_entries = "512"
pattern_table_assoc = 1
- max_counter_value = 15
+ num_counter_bits = 4
prefetch_confidence_threshold = 0.25
lookahead_confidence_threshold = 0.25
@@ -318,8 +319,8 @@ class IrregularStreamBufferPrefetcher(QueuedPrefetcher):
cxx_class = "IrregularStreamBufferPrefetcher"
cxx_header = "mem/cache/prefetch/irregular_stream_buffer.hh"
- max_counter_value = Param.Unsigned(3,
- "Maximum value of the confidence counter")
+ num_counter_bits = Param.Unsigned(2,
+ "Number of bits of the confidence counter")
chunk_size = Param.Unsigned(256,
"Maximum number of addresses in a temporal stream")
degree = Param.Unsigned(4, "Number of prefetches to generate")