Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8ada7dd
cpu-o3: split microtage out of tage
Jan 6, 2026
5cfbb4f
cpu-o3: reorganize includes in microtage files for clarity
Jan 6, 2026
9469e8f
cpu-o3: enhance branch index calculation in MicroTAGE to handle edge …
Jan 6, 2026
a089f57
cpu-o3: update blockWidth calculation to handle zero blockSize
Jan 6, 2026
3fa08b4
cpu-o3: adjust MicroTAGE parameters and clean up code for clarity
Jan 8, 2026
e665826
cpu-o3: remove unused variable 'usingBasetable'
Jan 8, 2026
be0c88c
cpu-o3: MicroTAGE to remove base table and alternative prediction
Jan 9, 2026
28084ef
cpu-o3: update MicroTAGE parameters for consistency
Jan 9, 2026
e57b012
cpu-o3: remove alternative prediction logic
Jan 12, 2026
b8fc3d6
cpu-o3: refine MicroTAGE parameters and remove unused variables
Jan 13, 2026
9a98605
cpu-o3: update MicroTAGE history length parameter to 16
Jan 13, 2026
bd37c20
cpu-o3: update MicroTAGE history length parameter to 25
Jan 15, 2026
1423c44
cpu-o3: update MicroTAGE history length parameter to 37
Jan 15, 2026
194462d
cpu-o3: update MicroTAGE history length parameter to 56
Jan 15, 2026
a444778
cpu-o3: update MicroTAGE history length parameter to 32
Jan 16, 2026
3450ffd
cpu-o3: update MicroTAGE history length parameter to 20
Jan 16, 2026
c7b8871
cpu-o3: update MicroTAGE history length parameter to 18
Jan 16, 2026
60879ec
cpu-o3: modify MicroTAGE to include alternative tag history
Jan 16, 2026
4e09462
cpu-o3: enhance MicroTAGE statistics to track utage prediction accuracy
Jan 16, 2026
ae37932
cpu-o3: update MicroTAGE prediction latency to 1 cycle
Jan 16, 2026
1e17791
cpu-o3: enable update on read and adjust prediction latency
Jan 16, 2026
48a8238
cpu-o3: disable update on read for MicroTAGE predictor
Jan 16, 2026
d1b20ee
cpu-o3: update MicroTAGE prediction latency to 1 cycle
Jan 16, 2026
14c53b4
cpu-o3: add recovery for alternative tag folded history
Jan 23, 2026
38f4c13
cpu-o3:change utage delay to 0
Jan 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 27 additions & 11 deletions src/cpu/pred/BranchPredictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,16 +1063,32 @@ class BTBTAGE(TimedBaseBTBPredictor):
numDelay = 2
usingMbtbBaseEiterTage = Param.Bool(True, "Whether using MBTB basetable either TAGE ")

class MicroTAGE(BTBTAGE):
"""A smaller TAGE predictor configuration to assist uBTB"""
enableSC = Param.Bool(False, "Enable SC or not") # TODO: BTBTAGE doesn't support SC
numPredictors = 1
tableSizes = [512]
TTagBitSizes = [16]
TTagPcShifts = [1]

histLengths = [16]
numDelay = 0
class MicroTAGE(TimedBaseBTBPredictor):
"""Micro-sized BTB TAGE predictor used alongside uBTB"""
type = 'MicroTAGE'
cxx_class = 'gem5::branch_prediction::btb_pred::MicroTAGE'
cxx_header = "cpu/pred/btb/microtage.hh"

needMoreHistories = Param.Bool(True, "MicroTAGE needs more histories")
updateOnRead = Param.Bool(False,"Enable update on read, no need to save tage meta in FTQ")
# Keep vector parameters consistent with numPredictors to avoid constructor asserts.
numPredictors = Param.Unsigned(1, "Number of TAGE predictors")
tableSizes = VectorParam.Unsigned([512],"the TAGE T0~Tn length")
TTagBitSizes = VectorParam.Unsigned([16] ,"the T0~Tn entry's tag bit size")
TTagPcShifts = VectorParam.Unsigned([1] ,"when the T0~Tn entry's tag generating, PC right shift")
blockSize = Param.Unsigned(32,"tage index function uses 32B aligned block address")

histLengths = VectorParam.Unsigned([18],"the BTB TAGE T0~Tn history length")
maxHistLen = Param.Unsigned(970,"The length of history passed from DBP")
numTablesToAlloc = Param.Unsigned(1,"The number of table to allocated each time")
numWays = Param.Unsigned(2, "Number of ways per set")
baseTableSize = Param.Unsigned(256,"Base table size")
maxBranchPositions = Param.Unsigned(32,"Maximum branch positions per 64-byte block")
useAltOnNaSize = Param.Unsigned(128,"Size of the useAltOnNa table")
useAltOnNaWidth = Param.Unsigned(7,"Width of the useAltOnNa table")
numBanks = Param.Unsigned(4,"Number of banks for bank conflict simulation")
enableBankConflict = Param.Bool(False,"Enable bank conflict simulation")
numDelay = Param.Unsigned(0,"Prediction latency in cycles")

class BTBITTAGE(TimedBaseBTBPredictor):
type = 'BTBITTAGE'
Expand Down Expand Up @@ -1162,7 +1178,7 @@ class DecoupledBPUWithBTB(BranchPredictor):
numStages = Param.Unsigned(4, "Maximum number of stages in the pipeline")
ubtb = Param.UBTB(UBTB(), "UBTB predictor")
abtb = Param.AheadBTB(AheadBTB(), "ABTB predictor")
microtage = Param.BTBTAGE(MicroTAGE(), "MicroTAGE predictor to assist uBTB")
microtage = Param.MicroTAGE(MicroTAGE(), "MicroTAGE predictor to assist uBTB")
mbtb = Param.MBTB(MBTB(), "MBTB predictor")
tage = Param.BTBTAGE(BTBTAGE(), "TAGE predictor")
ittage = Param.BTBITTAGE(BTBITTAGE(), "ITTAGE predictor")
Expand Down
4 changes: 3 additions & 1 deletion src/cpu/pred/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ SimObject('BranchPredictor.py', sim_objects=[
'DecoupledStreamBPU', 'DefaultFTB', 'DecoupledBPUWithFTB',
'TimedBaseFTBPredictor', 'FTBTAGE', 'FTBRAS', 'FTBuRAS', 'FTBITTAGE',
'AheadBTB', 'MBTB', 'UBTB', 'DecoupledBPUWithBTB',
'TimedBaseBTBPredictor', 'BTBRAS', 'BTBTAGE', 'BTBITTAGE', 'BTBMGSC'], enums=["BpType"])
'TimedBaseBTBPredictor', 'BTBRAS', 'BTBTAGE', 'MicroTAGE',
'BTBITTAGE', 'BTBMGSC'], enums=["BpType"])

DebugFlag('Indirect')
Source('bpred_unit.cc')
Expand Down Expand Up @@ -101,6 +102,7 @@ Source('btb/mbtb.cc')
Source('btb/timed_base_pred.cc')
Source('btb/fetch_target_queue.cc')
Source('btb/btb_tage.cc')
Source('btb/microtage.cc')
Source('btb/btb_ittage.cc')
Source('btb/btb_mgsc.cc')
Source('btb/folded_hist.cc')
Expand Down
7 changes: 4 additions & 3 deletions src/cpu/pred/btb/decoupled_bpred.hh
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@
#include "cpu/o3/dyn_inst_ptr.hh"
#include "cpu/pred/bpred_unit.hh"
#include "cpu/pred/btb/abtb.hh"
#include "cpu/pred/btb/mbtb.hh"
#include "cpu/pred/btb/btb_ittage.hh"
#include "cpu/pred/btb/btb_mgsc.hh"
#include "cpu/pred/btb/btb_tage.hh"
#include "cpu/pred/btb/btb_ubtb.hh"
#include "cpu/pred/btb/btb_mgsc.hh"
#include "cpu/pred/btb/fetch_target_queue.hh"
#include "cpu/pred/btb/jump_ahead_predictor.hh"
#include "cpu/pred/btb/loop_buffer.hh"
#include "cpu/pred/btb/loop_predictor.hh"
#include "cpu/pred/btb/mbtb.hh"
#include "cpu/pred/btb/microtage.hh"
#include "cpu/pred/btb/ras.hh"
#include "cpu/pred/general_arch_db.hh"

Expand Down Expand Up @@ -103,7 +104,7 @@ class DecoupledBPUWithBTB : public BPredUnit
UBTB *ubtb{};
AheadBTB *abtb{};
MBTB *mbtb{};
BTBTAGE *microtage{};
MicroTAGE *microtage{};
BTBTAGE *tage{};
BTBITTAGE *ittage{};
BTBMGSC *mgsc{};
Expand Down
Loading