cpu: simple: Add support for using branch predictors
This changesets adds branch predictor support to the
BaseSimpleCPU. The simple CPUs normally don't need a branch predictor,
however, there are at least two cases where it can be desirable:
1) A simple CPU can be used to warm the branch predictor of an O3
CPU before switching to the slower O3 model.
2) The simple CPU can be used as a quick way of evaluating/debugging
new branch predictors since it exposes branch predictor
statistics.
Limitations:
* Since the simple CPU doesn't speculate, only one instruction will
be active in the branch predictor at a time (i.e., the branch
predictor will never see speculative branches).
* The outcome of a branch prediction does not affect the performance
of the simple CPU.
This commit is contained in:
@@ -30,6 +30,7 @@ from m5.defines import buildEnv
|
||||
from m5.params import *
|
||||
from BaseCPU import BaseCPU
|
||||
from DummyChecker import DummyChecker
|
||||
from BranchPredictor import BranchPredictor
|
||||
|
||||
class BaseSimpleCPU(BaseCPU):
|
||||
type = 'BaseSimpleCPU'
|
||||
@@ -46,3 +47,5 @@ class BaseSimpleCPU(BaseCPU):
|
||||
else:
|
||||
print "ERROR: Checker only supported under ARM ISA!"
|
||||
exit(1)
|
||||
|
||||
branchPred = Param.BranchPredictor(NULL, "Branch Predictor")
|
||||
|
||||
Reference in New Issue
Block a user