A branch predictor simulator in C++ that tests 6 different types of branch predictors.
This project is a branch prediction simulator. The predictor reads a text file as a command line argument and returns the results on the command line as well as in a text file “output.txt.”
Note: This project is for reference only. Any code used must be adequately acknowleged.
To run the program with the included Makefile:
To compile without running:
make
To run with the included test file:
make run
To run after compiling with any test file:
./predictor file.txt
To run the compare script after compiling and running:
./compare output.txt expected_output.txt
Each line in output represents the respective predictor results.
I had troubles with the tournament predictor giving me the wrong answer when using the gshare helper and bimodal saturating helper. However, I got it working by writing one (very large and very space-inefficient) function that does everything the tournament predictor needs. I think I will continue to look into this issue for a brief period of time before pushing this project to the back burner, so to speak.