cpu: Restructure BTB
- A new abstract BTB class is created to enable different BTB implementations. The new BTB class gets its own parameter and stats. - An enum is added to differentiate branch instruction types. This enum is used to enhance statistics and BPU management. - The existing BTB is moved into `simple_btb` as default. - An additional function is added to store the static instruction in the BTB. This function is used for the decoupled front-end. - Update configs to match new BTB parameters. Change-Id: I99b29a19a1b57e59ea2b188ed7d62a8b79426529 Signed-off-by: David Schall <david.schall@ed.ac.uk>
This commit is contained in:
@@ -1679,7 +1679,13 @@ class HPI_MMU(ArmMMU):
|
||||
dtb = ArmTLB(entry_type="data", size=256)
|
||||
|
||||
|
||||
class HPI_BTB(SimpleBTB):
|
||||
numEntries = 128
|
||||
tagBits = 18
|
||||
|
||||
|
||||
class HPI_BP(TournamentBP):
|
||||
btb = HPI_BTB()
|
||||
localPredictorSize = 64
|
||||
localCtrBits = 2
|
||||
localHistoryTableSize = 64
|
||||
@@ -1687,8 +1693,6 @@ class HPI_BP(TournamentBP):
|
||||
globalCtrBits = 2
|
||||
choicePredictorSize = 1024
|
||||
choiceCtrBits = 2
|
||||
BTBEntries = 128
|
||||
BTBTagSize = 18
|
||||
RASSize = 8
|
||||
instShiftAmt = 2
|
||||
|
||||
|
||||
@@ -107,14 +107,18 @@ class O3_ARM_v7a_FUP(FUPool):
|
||||
]
|
||||
|
||||
|
||||
class O3_ARM_v7a_BTB(SimpleBTB):
|
||||
numEntries = 2048
|
||||
tagBits = 18
|
||||
|
||||
|
||||
# Bi-Mode Branch Predictor
|
||||
class O3_ARM_v7a_BP(BiModeBP):
|
||||
btb = O3_ARM_v7a_BTB()
|
||||
globalPredictorSize = 8192
|
||||
globalCtrBits = 2
|
||||
choicePredictorSize = 8192
|
||||
choiceCtrBits = 2
|
||||
BTBEntries = 2048
|
||||
BTBTagSize = 18
|
||||
RASSize = 16
|
||||
instShiftAmt = 2
|
||||
|
||||
|
||||
@@ -104,14 +104,18 @@ class ex5_big_FUP(FUPool):
|
||||
]
|
||||
|
||||
|
||||
class ex5_big_BTB(SimpleBTB):
|
||||
numEntries = 4096
|
||||
tagBits = 18
|
||||
|
||||
|
||||
# Bi-Mode Branch Predictor
|
||||
class ex5_big_BP(BiModeBP):
|
||||
btb = ex5_big_BTB()
|
||||
globalPredictorSize = 4096
|
||||
globalCtrBits = 2
|
||||
choicePredictorSize = 1024
|
||||
choiceCtrBits = 3
|
||||
BTBEntries = 4096
|
||||
BTBTagSize = 18
|
||||
RASSize = 48
|
||||
instShiftAmt = 2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user