You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Jamie Munro 3b1bf67c1d Removed ignored files 2 years ago
Traces Fixed GShare (well it wasn't really broken), implemented 'Predetermined' and 'Predetermined Global' profile-based prediction methods, created python script to run all strategies on all traces and collected results into spreadsheet. 2 years ago
AlwaysTaken.cpp Reimplemented counter with char and made all longs unsigned 2 years ago
AlwaysTaken.h Reimplemented counter with char and made all longs unsigned 2 years ago
BranchSim.cpp Fixed GShare (well it wasn't really broken), implemented 'Predetermined' and 'Predetermined Global' profile-based prediction methods, created python script to run all strategies on all traces and collected results into spreadsheet. 2 years ago
BranchTrace.cpp Reimplemented counter with char and made all longs unsigned 2 years ago
BranchTrace.h Reimplemented counter with char and made all longs unsigned 2 years ago
GShare.cpp Fixed GShare (well it wasn't really broken), implemented 'Predetermined' and 'Predetermined Global' profile-based prediction methods, created python script to run all strategies on all traces and collected results into spreadsheet. 2 years ago
GShare.h Reimplemented counter with char and made all longs unsigned 2 years ago
GlobalHistory.cpp Reimplemented counter with char and made all longs unsigned 2 years ago
GlobalHistory.h Reimplemented counter with char and made all longs unsigned 2 years ago
Predetermined.cpp Fixed GShare (well it wasn't really broken), implemented 'Predetermined' and 'Predetermined Global' profile-based prediction methods, created python script to run all strategies on all traces and collected results into spreadsheet. 2 years ago
Predetermined.h Fixed GShare (well it wasn't really broken), implemented 'Predetermined' and 'Predetermined Global' profile-based prediction methods, created python script to run all strategies on all traces and collected results into spreadsheet. 2 years ago
PredeterminedGlobal.cpp Fixed GShare (well it wasn't really broken), implemented 'Predetermined' and 'Predetermined Global' profile-based prediction methods, created python script to run all strategies on all traces and collected results into spreadsheet. 2 years ago
PredeterminedGlobal.h Fixed GShare (well it wasn't really broken), implemented 'Predetermined' and 'Predetermined Global' profile-based prediction methods, created python script to run all strategies on all traces and collected results into spreadsheet. 2 years ago
PredictionTable.cpp Reimplemented counter with char and made all longs unsigned 2 years ago
PredictionTable.h Fixed GShare (well it wasn't really broken), implemented 'Predetermined' and 'Predetermined Global' profile-based prediction methods, created python script to run all strategies on all traces and collected results into spreadsheet. 2 years ago
Predictor.cpp Fixed GShare (well it wasn't really broken), implemented 'Predetermined' and 'Predetermined Global' profile-based prediction methods, created python script to run all strategies on all traces and collected results into spreadsheet. 2 years ago
Predictor.h Reimplemented counter with char and made all longs unsigned 2 years ago
Profiler1.cpp Added Profiler SecectionProfiler back in as mentioned in report 2 years ago
Profiler1.h Added Profiler SecectionProfiler back in as mentioned in report 2 years ago
README.md README changes 2 years ago
Result.cpp Foundational simulation architecture and 'always taken' strategy implemented 2 years ago
Result.h Added verbose and writeToFile options 2 years ago
SectionProfile.cpp Added Profiler SecectionProfiler back in as mentioned in report 2 years ago
SectionProfile.h Added Profiler SecectionProfiler back in as mentioned in report 2 years ago
TwoBit.cpp Reimplemented counter with char and made all longs unsigned 2 years ago
TwoBit.h Fixed GShare (well it wasn't really broken), implemented 'Predetermined' and 'Predetermined Global' profile-based prediction methods, created python script to run all strategies on all traces and collected results into spreadsheet. 2 years ago
batch_sim.py Fixed GShare (well it wasn't really broken), implemented 'Predetermined' and 'Predetermined Global' profile-based prediction methods, created python script to run all strategies on all traces and collected results into spreadsheet. 2 years ago
results.csv Fixed GShare (well it wasn't really broken), implemented 'Predetermined' and 'Predetermined Global' profile-based prediction methods, created python script to run all strategies on all traces and collected results into spreadsheet. 2 years ago
results.xlsx Excel formatted results 2 years ago

README.md

Branch Prediction Simulator

CS4202 - Computer Architecture: Practical 1

Build

g++ BranchSim.cpp BranchTrace.cpp Result.cpp Predictor.cpp AlwaysTaken.cpp PredictionTable.cpp TwoBit.cpp GlobalHistory.cpp GShare.cpp Predetermined.cpp PredeterminedGlobal.cpp -o branchsim

chmod +x branchsim

chmod only needed for unix systems.

Run

./branchsim A Traces/yes.out

Replace 'A' with your desired prediction strategy (see usage message below).
Replace 'Traces/yes.out' with your branch trace file.

Usage

Run without any arguments to see usage message:

USAGE: branchsim [predicition strategy] [trace file] [OPTIONS]

Prediction statgies:
A               Always Taken
S[size]         Standard 2-bit predictor with table size [size] (e.g. S512)
G[size]         gshare with table size [size] (e.g. G1024)
P[size]         Predetermined (profile-based) with table size [size] (e.g. P2048)
PG[size]        Predetermined Global (profile-based) with table size [size] (e.g. PG4096)

OPTIONS:
-v              Verbose output
-o [file]       output prediction trace to [file]

Licence

(c) 2022 Jamie Munro, All Rights Reserved.