Branch Prediction Competition
Click here for an 8MB tar file that contains the
infrastructure for the branch prediction competition. Browse the contents
of the infrastructure here.
This software is in a state of change, so check frequently for updates.
Contest Rules
Here are some rules:
- Your code must work within the infrastructure without changing any of the C++ code in the infrastructure except for my_predictor.h. You may modify the Makefile to compile in your files, but you may not add extra library invocations in the compilation. Of the provided C++ code, you may only modify my_predictor.h, and you may of course add additional C++ files to implement your predictor(s). Your code must be C++.
- The total hardware budget of your predictor may not exceed 256KB. That is, the sum of all the memory used by the predictors and chooser should be more than 262,144 bytes. Only the storage that would actually be required by an implementation of your algorithm must be counted. You may count only the bits used by your algorithm and not the bits used in C++. For example, if you have a counter that you know will never exceed values in [-64,+63] then that counter counts as only 6 bits even if you represent it in a 32 bit integer. Your writeup must show how your predictor satisfies this constraint.
- Your code may not perform any input or output.
- Do not assume the existence of any library code that is not part of the C++ language.
- The code for your predictor, not including comments and white space, may not exceed 50,000 characters.
- Each predictor must implement one main algorithm. It may not combine more than one branch predicion algorithm, but it may use some optimizations.
- You may use code you find on the Internet, but if you do so, you must cite this code in your writeup and in comments in your code. Turning in someone else's code without citing it is considered plagiarism.
- Code you find on the Internet might implement a hybrid predictor already. For example, TAGE-SC-L is a hybrid of TAGE, perceptron, and a loop predictor. Since you are to implement a hybrid predictor, you would have to factor out an individual algorithm from this code to form one predictor.
- Each predictor should be coded in a separate file, and the code for the chooser should also be in a separate file. Thus, you would have at least three files.
Your predictor will be evaluated on a set of traces that have not been
distributed. That is, you will design your predictor with the distributed
traces on this web site, but a different set will be used to rank the
traces and determine the winner. This is to avoid having your algorithm
be tuned too precisely to a given set of traces so that it will be a more
general branch predictor.
What to Turn In
Turn in your code as a file named src.tar.gz that unpacks into the src
directory. That is, you should compress your src directory with "tar -cvzf
src.tar.gz src" and turn in the resulting file. Turn it in through Canvas by
the due date announced. Your code will be evaluated with this script that will be in the cbp2-infrastructure-v3
directory. Try this script out on linux.cse.tamu.edu to see if it
works. If it doesn't work with that script on that machine, then it won't work
when we grade it. (We may use different traces than the ones provided in the infrastructure.)
Your code must be well-commented. It must compile cleanly under Linux with
g++ version 4.8.5. It must run without errors. It is recommended that you
consult with the professor or TA to make sure your code will work well before
the deadline. Late projects will not be accepted for any reason.
Your writeup will be graded according to the following standards: : it must be
a conference-quality paper describing how your predictor works in your own
words, with references to the relevant literature (at least 3 citations).
Turn in your writeup as a PDF file through Canvas.
The Winner
The student or group with the most accurate predictor will receive a "valuable prize"
to be determined later. The winner will be announced in class.