summaryrefslogtreecommitdiff
path: root/src/cpu/pred/ltage.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/pred/ltage.hh')
-rw-r--r--src/cpu/pred/ltage.hh19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/cpu/pred/ltage.hh b/src/cpu/pred/ltage.hh
index a810fb5fd..2119156b7 100644
--- a/src/cpu/pred/ltage.hh
+++ b/src/cpu/pred/ltage.hh
@@ -135,7 +135,7 @@ class LTAGE: public BPredUnit
int altBank;
int altBankIndex;
int bimodalIndex;
- int loopTag;
+ uint16_t loopTag;
uint16_t currentIter;
bool tagePred;
@@ -238,6 +238,15 @@ class LTAGE: public BPredUnit
void ctrUpdate(int8_t & ctr, bool taken, int nbits);
/**
+ * Updates an unsigned counter based on up/down parameter
+ * @param ctr Reference to counter to update.
+ * @param up Boolean indicating if the counter is incremented/decremented
+ * If true it is incremented, if false it is decremented
+ * @param nbits Counter width.
+ */
+ void unsignedCtrUpdate(uint8_t & ctr, bool up, unsigned nbits);
+
+ /**
* Get a branch prediction from the bimodal
* predictor.
* @param pc The unshifted branch PC.
@@ -355,6 +364,14 @@ class LTAGE: public BPredUnit
const unsigned minHist;
const unsigned maxHist;
const unsigned minTagWidth;
+ const unsigned loopTableAgeBits;
+ const unsigned loopTableConfidenceBits;
+ const unsigned loopTableTagBits;
+ const unsigned loopTableIterBits;
+
+ const uint8_t confidenceThreshold;
+ const uint16_t loopTagMask;
+ const uint16_t loopNumIterMask;
std::vector<bool> btablePrediction;
std::vector<bool> btableHysteresis;