An environment for testing and comparing branch predictors. Uses the ChampSim CPU simulator, written in C++, with the IPC1 benchmarks.
Team members:
- Tejas Oberoi
- David Lee
- Sahil Chowdhury
- John Jennings
-
Set up a GitHub personal access token.
- Go to https://github.com/settings/tokens/new.
- Under "Expiration", select any duration that lasts through the project deadline (you will always be able to revoke the token later).
- Under "Select scopes", check only the box marked "repo".
- Click "Generate token".
- Save the token somewhere accessible; you will enter it every time git asks for a password.
-
Install
jq
, a utility that the testing script uses to edit JSON configuration files:
ssh linux.cs
curl -s https://webinstall.dev/jq | bash
If prompted, enter:
source ~/.config/envman/PATH.env
- Clone the repository:
git clone --recurse-submodules https://github.com/JohnEdwardJennings/cs429h-final.git cs429h-final
Enter your personal access token when prompted for a password.
- Resolve ChampSim's dependencies:
cd ChampSim
git submodule update --init
vcpkg/bootstrap-vcpkg.sh
vcpkg/vcpkg install
cd ..
- Copy the benchmarks (these files are too large for GitHub):
- Go to https://drive.google.com/file/d/1qs8t8-YWc7lLoYbjbH_d3lf1xdoYBznf/view?pli=1.
- Click "Download". Google Drive will display a warning about the file being too large to scan for viruses; click "Download anyway".
- Run the following commands, substituting your downloads folder for
<Downloads>
and your UTCS username for<your-csid>
. Thescp
command must execute from your machine, hence exiting and re-entering the SSH connection.
exit
cd <Downloads>
scp ipc1_public.tar.gz <your-csid>@linux.cs.utexas.edu:cs429h-final
ssh linux.cs
cd cs429h-final
tar xvzf ipc1_public.tar.gz -C ./
rm ipc1_public.tar.gz
mkdir branch-predictors/<branch-predictor-name>
cp interface.txt branch-predictors/<branch-predictor-name>/<filename>.cc
vim branch-predictors/<branch-predictor-name>/<filename>.cc
- Substitute desired strings for
<branch-predictor-name>
and<filename>
in the commands above (to be safe, stick to alphanumeric characters and hyphens). - Implement the methods to create a fully functional branch predictor!
. bptest
The output for each test will appear in the file out/<branch-predictor-name>_<test_name>
.
To run only a specific branch predictor:
. bptest <branch-predictor-name>
To run against spec, enter the Champsim directory, do
./build.sh TAGE-SC-L lru 1
(you may replace TAGE-SC-L with the type of branch predictor).
On a separate terminal, ssh into the darmok server, and run the script
./run_spec2006.sh TAGE-SC-L lru
which will submit results to the cluster. The results will appear in the output directory in Champsim.