summaryrefslogtreecommitdiff
path: root/src/cpu/pred/BranchPredictor.py
diff options
context:
space:
mode:
authorMitch Hayenga <mitch.hayenga@arm.com>2016-04-05 11:48:37 -0500
committerMitch Hayenga <mitch.hayenga@arm.com>2016-04-05 11:48:37 -0500
commit0fd4bb7f12d8a633f3ff0abe61d4f3a78bca6f84 (patch)
tree865cfc3eb0943a21eea8c07676cfd4ce458d34c2 /src/cpu/pred/BranchPredictor.py
parent3f6874cb295695a225fca6825bfe24a4b97641fd (diff)
downloadgem5-0fd4bb7f12d8a633f3ff0abe61d4f3a78bca6f84.tar.xz
cpu: Add an indirect branch target predictor
This patch adds a configurable indirect branch predictor that can be indexed by a combination of GHR and path history hashes. Implements the functionality described in: "Target prediction for indirect jumps" by Chang, Hao, and Patt http://dl.acm.org/citation.cfm?id=264209 This is a re-spin of fb9d142 after the revert (bd1c6789).
Diffstat (limited to 'src/cpu/pred/BranchPredictor.py')
-rw-r--r--src/cpu/pred/BranchPredictor.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cpu/pred/BranchPredictor.py b/src/cpu/pred/BranchPredictor.py
index 5c52fb65e..2d7d0d0e2 100644
--- a/src/cpu/pred/BranchPredictor.py
+++ b/src/cpu/pred/BranchPredictor.py
@@ -42,6 +42,16 @@ class BranchPredictor(SimObject):
RASSize = Param.Unsigned(16, "RAS size")
instShiftAmt = Param.Unsigned(2, "Number of bits to shift instructions by")
+ useIndirect = Param.Bool(True, "Use indirect branch predictor")
+ indirectHashGHR = Param.Bool(True, "Hash branch predictor GHR")
+ indirectHashTargets = Param.Bool(True, "Hash path history targets")
+ indirectSets = Param.Unsigned(256, "Cache sets for indirect predictor")
+ indirectWays = Param.Unsigned(2, "Ways for indirect predictor")
+ indirectTagSize = Param.Unsigned(16, "Indirect target cache tag bits")
+ indirectPathLength = Param.Unsigned(3,
+ "Previous indirect targets to use for path history")
+
+
class LocalBP(BranchPredictor):
type = 'LocalBP'