BranchPredictor.py (13420:5cb2b90e1cb5) BranchPredictor.py (13432:6ce67b7e6e44)
1# Copyright (c) 2012 Mark D. Hill and David A. Wood
2# Copyright (c) 2015 The University of Wisconsin
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 15 unchanged lines hidden (view full) ---

24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28# Authors: Nilay Vaish and Dibakar Gope
29
30from m5.SimObject import SimObject
31from m5.params import *
1# Copyright (c) 2012 Mark D. Hill and David A. Wood
2# Copyright (c) 2015 The University of Wisconsin
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 15 unchanged lines hidden (view full) ---

24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28# Authors: Nilay Vaish and Dibakar Gope
29
30from m5.SimObject import SimObject
31from m5.params import *
32from m5.proxy import *
32
33class BranchPredictor(SimObject):
34 type = 'BranchPredictor'
35 cxx_class = 'BPredUnit'
36 cxx_header = "cpu/pred/bpred_unit.hh"
37 abstract = True
38
33
34class BranchPredictor(SimObject):
35 type = 'BranchPredictor'
36 cxx_class = 'BPredUnit'
37 cxx_header = "cpu/pred/bpred_unit.hh"
38 abstract = True
39
39 numThreads = Param.Unsigned(1, "Number of threads")
40 numThreads = Param.Unsigned(Parent.numThreads, "Number of threads")
40 BTBEntries = Param.Unsigned(4096, "Number of BTB entries")
41 BTBTagSize = Param.Unsigned(16, "Size of the BTB tags, in bits")
42 RASSize = Param.Unsigned(16, "RAS size")
43 instShiftAmt = Param.Unsigned(2, "Number of bits to shift instructions by")
44
45 useIndirect = Param.Bool(True, "Use indirect branch predictor")
46 indirectHashGHR = Param.Bool(True, "Hash branch predictor GHR")
47 indirectHashTargets = Param.Bool(True, "Hash path history targets")

--- 60 unchanged lines hidden ---
41 BTBEntries = Param.Unsigned(4096, "Number of BTB entries")
42 BTBTagSize = Param.Unsigned(16, "Size of the BTB tags, in bits")
43 RASSize = Param.Unsigned(16, "RAS size")
44 instShiftAmt = Param.Unsigned(2, "Number of bits to shift instructions by")
45
46 useIndirect = Param.Bool(True, "Use indirect branch predictor")
47 indirectHashGHR = Param.Bool(True, "Hash branch predictor GHR")
48 indirectHashTargets = Param.Bool(True, "Hash path history targets")

--- 60 unchanged lines hidden ---