Daniel Carvalho has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/37095 )

Change subject: base: Templatize SatCounter
......................................................................

base: Templatize SatCounter

Allow SatCounter to have larger unsigned types to accomodate
larger counters.

The template decision was taken because some predictors will
generate huge arrays of small counters, so smaller types will
lessen their overhead; however, isolated counters may require
any counter size.

Jira: https://gem5.atlassian.net/browse/GEM5-813

Change-Id: Ie943c553dd8a8c24c80e737783708b033ce001da
Signed-off-by: Daniel R. Carvalho <[email protected]>
---
M src/base/filters/base.hh
M src/base/sat_counter.hh
M src/base/sat_counter.test.cc
M src/cpu/pred/2bit_local.cc
M src/cpu/pred/2bit_local.hh
M src/cpu/pred/bi_mode.cc
M src/cpu/pred/bi_mode.hh
M src/cpu/pred/tournament.cc
M src/cpu/pred/tournament.hh
M src/mem/cache/prefetch/indirect_memory.hh
M src/mem/cache/prefetch/irregular_stream_buffer.hh
M src/mem/cache/prefetch/signature_path.hh
M src/mem/cache/prefetch/spatio_temporal_memory_streaming.hh
M src/mem/cache/prefetch/stride.cc
M src/mem/cache/prefetch/stride.hh
M src/mem/cache/replacement_policies/brrip_rp.hh
16 files changed, 169 insertions(+), 60 deletions(-)



diff --git a/src/base/filters/base.hh b/src/base/filters/base.hh
index 3f4fac9..583e035 100644
--- a/src/base/filters/base.hh
+++ b/src/base/filters/base.hh
@@ -47,7 +47,7 @@
     const unsigned offsetBits;

     /** The filter itself. */
-    std::vector<SatCounter> filter;
+    std::vector<SatCounter8> filter;

     /** Number of bits needed to represent the size of the filter. */
     const int sizeBits;
@@ -61,7 +61,7 @@
      */
     Base(const BloomFilterBaseParams &p)
         : SimObject(p), offsetBits(p.offset_bits),
-          filter(p.size, SatCounter(p.num_bits)),
+          filter(p.size, SatCounter8(p.num_bits)),
           sizeBits(floorLog2(p.size)), setThreshold(p.threshold)
     {
         clear();
diff --git a/src/base/sat_counter.hh b/src/base/sat_counter.hh
index d257cda..26fb671 100644
--- a/src/base/sat_counter.hh
+++ b/src/base/sat_counter.hh
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Inria
+ * Copyright (c) 2019, 2020 Inria
  * All rights reserved.
  *
  * The license below extends only to copyright in the software and shall
@@ -50,7 +50,12 @@
 /**
  * Implements an n bit saturating counter and provides methods to
  * increment, decrement, and read it.
+ *
+ * @tparam T The type of the underlying counter container.
+ *
+ * @ingroup api_sat_counter
  */
+template <class T>
 class SatCounter
 {
   public:
@@ -68,11 +73,11 @@
      *
      * @ingroup api_sat_counter
      */
-    explicit SatCounter(unsigned bits, uint8_t initial_val = 0)
-        : initialVal(initial_val), maxVal((1 << bits) - 1),
+    explicit SatCounter(unsigned bits, T initial_val = 0)
+        : initialVal(initial_val), maxVal((1ULL << bits) - 1),
           counter(initial_val)
     {
-        fatal_if(bits > 8*sizeof(uint8_t),
+        fatal_if(bits > 8*sizeof(T),
                  "Number of bits exceeds counter size");
         fatal_if(initial_val > maxVal,
                  "Saturating counter's Initial value exceeds max value.");
@@ -237,7 +242,7 @@
      * @ingroup api_sat_counter
      */
     SatCounter&
-    operator+=(const int& value)
+    operator+=(const long long& value)
     {
         if (value >= 0) {
             if (maxVal - this->counter >= value) {
@@ -257,7 +262,7 @@
      * @ingroup api_sat_counter
      */
     SatCounter&
-    operator-=(const int& value)
+    operator-=(const long long& value)
     {
         if (value >= 0) {
             if (this->counter > value) {
@@ -276,7 +281,7 @@
      *
      * @ingroup api_sat_counter
      */
-    operator uint8_t() const { return counter; }
+    operator T() const { return counter; }

     /**
      * Reset the counter to its initial value.
@@ -320,9 +325,18 @@
     }

   private:
-    uint8_t initialVal;
-    uint8_t maxVal;
-    uint8_t counter;
+    T initialVal;
+    T maxVal;
+    T counter;
 };

+/** @ingroup api_sat_counter
+ *  @{
+ */
+typedef SatCounter<uint8_t> SatCounter8;
+typedef SatCounter<uint16_t> SatCounter16;
+typedef SatCounter<uint32_t> SatCounter32;
+typedef SatCounter<uint64_t> SatCounter64;
+/** @} */
+
 #endif // __BASE_SAT_COUNTER_HH__
diff --git a/src/base/sat_counter.test.cc b/src/base/sat_counter.test.cc
index 214b015..19f792e 100644
--- a/src/base/sat_counter.test.cc
+++ b/src/base/sat_counter.test.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Inria
+ * Copyright (c) 2019, 2020 Inria
  * All rights reserved
  *
  * Redistribution and use in source and binary forms, with or without
@@ -40,7 +40,7 @@
 {
     const unsigned bits = 3;
     const unsigned max_value = (1 << bits) - 1;
-    SatCounter counter(bits);
+    SatCounter8 counter(bits);

     for (int i = 0; i < 2*max_value; i++) {
         counter++;
@@ -55,7 +55,7 @@
 TEST(SatCounterTest, MinimumValue)
 {
     const unsigned bits = 3;
-    SatCounter counter(bits);
+    SatCounter8 counter(bits);

     for (int i = 0; i < 2; i++) {
         counter--;
@@ -71,7 +71,7 @@
 {
     const unsigned bits = 3;
     const unsigned initial_value = 4;
-    SatCounter counter(bits, initial_value);
+    SatCounter8 counter(bits, initial_value);
     ASSERT_EQ(counter, initial_value);
     counter++;
     counter.reset();
@@ -85,7 +85,7 @@
 {
     const unsigned bits = 3;
     const unsigned max_value = (1 << bits) - 1;
-    SatCounter counter(bits);
+    SatCounter8 counter(bits);

     ASSERT_FALSE(counter.isSaturated());
     for (double value = 0.0; value <= max_value; value++, counter++) {
@@ -102,7 +102,7 @@
 {
     const unsigned bits = 3;
     const unsigned max_value = (1 << bits) - 1;
-    SatCounter counter(bits);
+    SatCounter8 counter(bits);
     counter++;
     ASSERT_FALSE(counter.isSaturated());

@@ -118,7 +118,7 @@
 TEST(SatCounterTest, IntComparison)
 {
     const unsigned bits = 3;
-    SatCounter counter(bits);
+    SatCounter8 counter(bits);
     int value = 0;

     ASSERT_EQ(counter++, value++);
@@ -144,11 +144,11 @@
     const unsigned bits = 3;
     const unsigned max_value = (1 << bits) - 1;
     const unsigned initial_value = 1;
-    SatCounter counter(bits, initial_value);
-    SatCounter other(bits, initial_value);
+    SatCounter8 counter(bits, initial_value);
+    SatCounter8 other(bits, initial_value);
     // The saturated shift value is just enough to saturate, since greater
     // values could generate undefined behavior
-    SatCounter saturated_counter(bits, bits);
+    SatCounter8 saturated_counter(bits, bits);
     int value = initial_value;

     // Test random shifts
@@ -201,12 +201,12 @@
 {
     const unsigned bits = 3;
     const unsigned max_value = (1 << bits) - 1;
-    SatCounter counter_pre(bits);
-    SatCounter counter_post(bits);
+    SatCounter8 counter_pre(bits);
+    SatCounter8 counter_post(bits);

     for (int i = 0; i < 2*max_value; i++) {
         counter_post++;
-        SatCounter value_pre = ++counter_pre;
+        SatCounter8 value_pre = ++counter_pre;
         ASSERT_EQ(counter_post, value_pre);
     }

@@ -215,7 +215,7 @@

     for (int i = 0; i < 2*max_value; i++) {
         counter_post--;
-        SatCounter value_pre = --counter_pre;
+        SatCounter8 value_pre = --counter_pre;
         ASSERT_EQ(counter_post, value_pre);
     }

@@ -231,16 +231,16 @@
     const unsigned bits = 3;
     const unsigned max_value = (1 << bits) - 1;
     const unsigned initial_value = 1;
-    SatCounter counter(bits, initial_value);
-    SatCounter deep_copy(1);
-    SatCounter counter_copy(2);
+    SatCounter8 counter(bits, initial_value);
+    SatCounter8 deep_copy(1);
+    SatCounter8 counter_copy(2);

     // Increase counter value so that we can check if the inner counter is
     // being copied
     counter++;

     // Copy counter using both the copy constructor and the copy assignment
-    SatCounter counter_copy_constructor(counter);
+    SatCounter8 counter_copy_constructor(counter);
     deep_copy = counter_copy = counter;
     ASSERT_EQ(counter_copy_constructor, initial_value + 1);
     ASSERT_EQ(counter_copy, initial_value + 1);
@@ -267,11 +267,11 @@
     ASSERT_EQ(deep_copy, initial_value);

     // Now check move
-    SatCounter counter_move_constructor(std::move(counter));
+    SatCounter8 counter_move_constructor(std::move(counter));
     ASSERT_EQ(counter, 0);
     ASSERT_EQ(counter_move_constructor, initial_value + 1);

-    SatCounter counter_move(bits);
+    SatCounter8 counter_move(bits);
     counter_move = std::move(counter_move_constructor);
     ASSERT_EQ(counter_move_constructor, 0);
     ASSERT_EQ(counter_move, initial_value + 1);
@@ -284,9 +284,9 @@
 {
     const unsigned bits = 3;
     const unsigned max_value = (1 << bits) - 1;
-    SatCounter counter(bits);
-    SatCounter other(bits, 2);
-    SatCounter saturated_counter(bits, max_value);
+    SatCounter8 counter(bits);
+    SatCounter8 other(bits, 2);
+    SatCounter8 saturated_counter(bits, max_value);
     int value = 0;

     // Test add-assignment for a few random values and then saturate
@@ -334,7 +334,7 @@
 {
     const unsigned bits = 3;
     const unsigned max_value = (1 << bits) - 1;
-    SatCounter counter(bits, max_value);
+    SatCounter8 counter(bits, max_value);
     int value = max_value;

     // Test add-assignment for a few negative values until zero is reached
@@ -360,3 +360,98 @@
     ASSERT_EQ(counter, value);
 }

+/** Test max and min when using SatCounter16. */
+TEST(SatCounterTest, Size16)
+{
+    const uint16_t bits_16 = 9;
+    const uint16_t max_value_16 = (1 << bits_16) - 1;
+    SatCounter16 counter_16(bits_16);
+
+    // Increasing
+    counter_16++;
+    ASSERT_EQ(counter_16, 1);
+    counter_16 <<= 1;
+    ASSERT_EQ(counter_16, 2);
+    counter_16 += 2 * max_value_16;
+    ASSERT_EQ(counter_16, max_value_16);
+    counter_16++;
+    ASSERT_EQ(counter_16, max_value_16);
+    counter_16 <<= 1;
+    ASSERT_EQ(counter_16, max_value_16);
+
+    // Decreasing
+    counter_16--;
+    ASSERT_EQ(counter_16, max_value_16 - 1);
+    counter_16 >>= 1;
+    ASSERT_EQ(counter_16, (max_value_16 - 1) >> 1);
+    counter_16 -= 2 * max_value_16;
+    ASSERT_EQ(counter_16, 0);
+    counter_16--;
+    ASSERT_EQ(counter_16, 0);
+    counter_16 >>= 1;
+    ASSERT_EQ(counter_16, 0);
+}
+
+/** Test max and min when using SatCounter32. */
+TEST(SatCounterTest, Size32)
+{
+    const uint32_t bits_32 = 17;
+    const uint32_t max_value_32 = (1 << bits_32) - 1;
+    SatCounter32 counter_32(bits_32);
+
+    // Increasing
+    counter_32++;
+    ASSERT_EQ(counter_32, 1);
+    counter_32 <<= 1;
+    ASSERT_EQ(counter_32, 2);
+    counter_32 += 2 * max_value_32;
+    ASSERT_EQ(counter_32, max_value_32);
+    counter_32++;
+    ASSERT_EQ(counter_32, max_value_32);
+    counter_32 <<= 1;
+    ASSERT_EQ(counter_32, max_value_32);
+
+    // Decreasing
+    counter_32--;
+    ASSERT_EQ(counter_32, max_value_32 - 1);
+    counter_32 >>= 1;
+    ASSERT_EQ(counter_32, (max_value_32 - 1) >> 1);
+    counter_32 -= 2 * max_value_32;
+    ASSERT_EQ(counter_32, 0);
+    counter_32--;
+    ASSERT_EQ(counter_32, 0);
+    counter_32 >>= 1;
+    ASSERT_EQ(counter_32, 0);
+}
+
+/** Test max and min when using SatCounter64. */
+TEST(SatCounterTest, Size64)
+{
+    const uint64_t bits_64 = 33;
+    const uint64_t max_value_64 = (1ULL << bits_64) - 1;
+    SatCounter64 counter_64(bits_64);
+
+    // Increasing
+    counter_64++;
+    ASSERT_EQ(counter_64, 1);
+    counter_64 <<= 1;
+    ASSERT_EQ(counter_64, 2);
+    counter_64 += max_value_64;
+    ASSERT_EQ(counter_64, max_value_64);
+    counter_64++;
+    ASSERT_EQ(counter_64, max_value_64);
+    counter_64 <<= 1;
+    ASSERT_EQ(counter_64, max_value_64);
+
+    // Decreasing
+    counter_64--;
+    ASSERT_EQ(counter_64, max_value_64 - 1);
+    counter_64 >>= 1;
+    ASSERT_EQ(counter_64, (max_value_64 - 1) >> 1);
+    counter_64 -= max_value_64;
+    ASSERT_EQ(counter_64, 0);
+    counter_64--;
+    ASSERT_EQ(counter_64, 0);
+    counter_64 >>= 1;
+    ASSERT_EQ(counter_64, 0);
+}
diff --git a/src/cpu/pred/2bit_local.cc b/src/cpu/pred/2bit_local.cc
index 5e5e54f..2e3aef9 100644
--- a/src/cpu/pred/2bit_local.cc
+++ b/src/cpu/pred/2bit_local.cc
@@ -38,7 +38,7 @@
       localPredictorSize(params.localPredictorSize),
       localCtrBits(params.localCtrBits),
       localPredictorSets(localPredictorSize / localCtrBits),
-      localCtrs(localPredictorSets, SatCounter(localCtrBits)),
+      localCtrs(localPredictorSets, SatCounter8(localCtrBits)),
       indexMask(localPredictorSets - 1)
 {
     if (!isPowerOf2(localPredictorSize)) {
diff --git a/src/cpu/pred/2bit_local.hh b/src/cpu/pred/2bit_local.hh
index 60808ca..3dddd8c 100644
--- a/src/cpu/pred/2bit_local.hh
+++ b/src/cpu/pred/2bit_local.hh
@@ -116,7 +116,7 @@
     const unsigned localPredictorSets;

     /** Array of counters that make up the local predictor. */
-    std::vector<SatCounter> localCtrs;
+    std::vector<SatCounter8> localCtrs;

     /** Mask to get index bits. */
     const unsigned indexMask;
diff --git a/src/cpu/pred/bi_mode.cc b/src/cpu/pred/bi_mode.cc
index de22e3f..37ba842 100644
--- a/src/cpu/pred/bi_mode.cc
+++ b/src/cpu/pred/bi_mode.cc
@@ -43,9 +43,9 @@
       choiceCtrBits(params.choiceCtrBits),
       globalPredictorSize(params.globalPredictorSize),
       globalCtrBits(params.globalCtrBits),
-      choiceCounters(choicePredictorSize, SatCounter(choiceCtrBits)),
-      takenCounters(globalPredictorSize, SatCounter(globalCtrBits)),
-      notTakenCounters(globalPredictorSize, SatCounter(globalCtrBits))
+      choiceCounters(choicePredictorSize, SatCounter8(choiceCtrBits)),
+      takenCounters(globalPredictorSize, SatCounter8(globalCtrBits)),
+      notTakenCounters(globalPredictorSize, SatCounter8(globalCtrBits))
 {
     if (!isPowerOf2(choicePredictorSize))
         fatal("Invalid choice predictor size.\n");
diff --git a/src/cpu/pred/bi_mode.hh b/src/cpu/pred/bi_mode.hh
index 69c698b..bf56d38 100644
--- a/src/cpu/pred/bi_mode.hh
+++ b/src/cpu/pred/bi_mode.hh
@@ -97,11 +97,11 @@
     unsigned globalHistoryMask;

     // choice predictors
-    std::vector<SatCounter> choiceCounters;
+    std::vector<SatCounter8> choiceCounters;
     // taken direction predictors
-    std::vector<SatCounter> takenCounters;
+    std::vector<SatCounter8> takenCounters;
     // not-taken direction predictors
-    std::vector<SatCounter> notTakenCounters;
+    std::vector<SatCounter8> notTakenCounters;

     unsigned choiceThreshold;
     unsigned takenThreshold;
diff --git a/src/cpu/pred/tournament.cc b/src/cpu/pred/tournament.cc
index b50b6c7..5c50fdd 100644
--- a/src/cpu/pred/tournament.cc
+++ b/src/cpu/pred/tournament.cc
@@ -47,12 +47,12 @@
     : BPredUnit(params),
       localPredictorSize(params.localPredictorSize),
       localCtrBits(params.localCtrBits),
-      localCtrs(localPredictorSize, SatCounter(localCtrBits)),
+      localCtrs(localPredictorSize, SatCounter8(localCtrBits)),
       localHistoryTableSize(params.localHistoryTableSize),
       localHistoryBits(ceilLog2(params.localPredictorSize)),
       globalPredictorSize(params.globalPredictorSize),
       globalCtrBits(params.globalCtrBits),
-      globalCtrs(globalPredictorSize, SatCounter(globalCtrBits)),
+      globalCtrs(globalPredictorSize, SatCounter8(globalCtrBits)),
       globalHistory(params.numThreads, 0),
       globalHistoryBits(
           ceilLog2(params.globalPredictorSize) >
@@ -61,7 +61,7 @@
           ceilLog2(params.choicePredictorSize)),
       choicePredictorSize(params.choicePredictorSize),
       choiceCtrBits(params.choiceCtrBits),
-      choiceCtrs(choicePredictorSize, SatCounter(choiceCtrBits))
+      choiceCtrs(choicePredictorSize, SatCounter8(choiceCtrBits))
 {
     if (!isPowerOf2(localPredictorSize)) {
         fatal("Invalid local predictor size!\n");
diff --git a/src/cpu/pred/tournament.hh b/src/cpu/pred/tournament.hh
index c109358..9a1ce6c 100644
--- a/src/cpu/pred/tournament.hh
+++ b/src/cpu/pred/tournament.hh
@@ -180,7 +180,7 @@
     unsigned localCtrBits;

     /** Local counters. */
-    std::vector<SatCounter> localCtrs;
+    std::vector<SatCounter8> localCtrs;

     /** Array of local history table entries. */
     std::vector<unsigned> localHistoryTable;
@@ -198,7 +198,7 @@
     unsigned globalCtrBits;

     /** Array of counters that make up the global predictor. */
-    std::vector<SatCounter> globalCtrs;
+    std::vector<SatCounter8> globalCtrs;

     /** Global history register. Contains as much history as specified by
      *  globalHistoryBits. Actual number of bits used is determined by
@@ -228,7 +228,7 @@
     unsigned choiceCtrBits;

     /** Array of counters that make up the choice predictor. */
-    std::vector<SatCounter> choiceCtrs;
+    std::vector<SatCounter8> choiceCtrs;

     /** Thresholds for the counter value; above the threshold is taken,
      *  equal to or below the threshold is not taken.
diff --git a/src/mem/cache/prefetch/indirect_memory.hh b/src/mem/cache/prefetch/indirect_memory.hh
index a41f56a..2c8661d 100644
--- a/src/mem/cache/prefetch/indirect_memory.hh
+++ b/src/mem/cache/prefetch/indirect_memory.hh
@@ -85,7 +85,7 @@
         /** Shift detected */
         int shift;
         /** Confidence counter of the indirect fields */
-        SatCounter indirectCounter;
+        SatCounter8 indirectCounter;
         /**
* This variable is set to indicate that there has been at least one * match with the current index value. This information is later used diff --git a/src/mem/cache/prefetch/irregular_stream_buffer.hh b/src/mem/cache/prefetch/irregular_stream_buffer.hh
index ce040d1..2ef17e2 100644
--- a/src/mem/cache/prefetch/irregular_stream_buffer.hh
+++ b/src/mem/cache/prefetch/irregular_stream_buffer.hh
@@ -70,7 +70,7 @@
     /** Address Mapping entry, holds an address and a confidence counter */
     struct AddressMapping {
         Addr address;
-        SatCounter counter;
+        SatCounter8 counter;
         AddressMapping(unsigned bits) : address(0), counter(bits)
         {}
     };
diff --git a/src/mem/cache/prefetch/signature_path.hh b/src/mem/cache/prefetch/signature_path.hh
index 8d61a5c..c6667e3 100644
--- a/src/mem/cache/prefetch/signature_path.hh
+++ b/src/mem/cache/prefetch/signature_path.hh
@@ -87,7 +87,7 @@
         /** stride in a page in blkSize increments */
         stride_t stride;
         /** Saturating counter */
-        SatCounter counter;
+        SatCounter8 counter;
         PatternStrideEntry(unsigned bits) : stride(0), counter(bits)
         {}
     };
@@ -97,7 +97,7 @@
         /** group of stides */
         std::vector<PatternStrideEntry> strideEntries;
         /** use counter, used by SPPv2 */
-        SatCounter counter;
+        SatCounter8 counter;
         PatternEntry(size_t num_strides, unsigned counter_bits)
           : TaggedEntry(), strideEntries(num_strides, counter_bits),
             counter(counter_bits)
diff --git a/src/mem/cache/prefetch/spatio_temporal_memory_streaming.hh b/src/mem/cache/prefetch/spatio_temporal_memory_streaming.hh
index 8e3b202..d63f2e2 100644
--- a/src/mem/cache/prefetch/spatio_temporal_memory_streaming.hh
+++ b/src/mem/cache/prefetch/spatio_temporal_memory_streaming.hh
@@ -76,7 +76,7 @@
         /** Sequence entry data type */
         struct SequenceEntry {
             /** 2-bit confidence counter */
-            SatCounter counter;
+            SatCounter8 counter;
             /** Offset, in cache lines, within the spatial region */
             unsigned int offset;
             /** Intearleaving position on the global access sequence */
diff --git a/src/mem/cache/prefetch/stride.cc b/src/mem/cache/prefetch/stride.cc
index 0020371..9b1bfe2 100644
--- a/src/mem/cache/prefetch/stride.cc
+++ b/src/mem/cache/prefetch/stride.cc
@@ -59,7 +59,7 @@

 namespace Prefetcher {

-Stride::StrideEntry::StrideEntry(const SatCounter& init_confidence)
+Stride::StrideEntry::StrideEntry(const SatCounter8& init_confidence)
   : TaggedEntry(), confidence(init_confidence)
 {
     invalidate();
diff --git a/src/mem/cache/prefetch/stride.hh b/src/mem/cache/prefetch/stride.hh
index 982f33e..36fc194 100644
--- a/src/mem/cache/prefetch/stride.hh
+++ b/src/mem/cache/prefetch/stride.hh
@@ -91,7 +91,7 @@
 {
   protected:
     /** Initial confidence counter value for the pc tables. */
-    const SatCounter initConfidence;
+    const SatCounter8 initConfidence;

     /** Confidence threshold for prefetch generation. */
     const double threshConf;
@@ -124,13 +124,13 @@
     /** Tagged by hashed PCs. */
     struct StrideEntry : public TaggedEntry
     {
-        StrideEntry(const SatCounter& init_confidence);
+        StrideEntry(const SatCounter8& init_confidence);

         void invalidate() override;

         Addr lastAddr;
         int stride;
-        SatCounter confidence;
+        SatCounter8 confidence;
     };
     typedef AssociativeSet<StrideEntry> PCTable;
     std::unordered_map<int, PCTable> pcTables;
diff --git a/src/mem/cache/replacement_policies/brrip_rp.hh b/src/mem/cache/replacement_policies/brrip_rp.hh
index a9ddfe4..4ed8ca5 100644
--- a/src/mem/cache/replacement_policies/brrip_rp.hh
+++ b/src/mem/cache/replacement_policies/brrip_rp.hh
@@ -72,7 +72,7 @@
          * max_RRPV-1 -> long re-rereference interval
          * max_RRPV -> distant re-rereference interval
          */
-        SatCounter rrpv;
+        SatCounter8 rrpv;

         /** Whether the entry is valid. */
         bool valid;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/37095
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: Ie943c553dd8a8c24c80e737783708b033ce001da
Gerrit-Change-Number: 37095
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <[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