Infrastructure for Branch Prediction Competition

This is the infrastructure for the branch prediction competition. There are three directories: The csh script run runs the predict program on traces in a directory. Compile the predict program by changing to the src directory and typing make. Then run the program on all the traces by changing to the top-level cbp2 directory and typing run traces.

Writing Your Branch Predictor Simulator

Write your code in my_predictor.h, replacing the simple gshare predictor that comes with this infrastructure.

The code in my_predictor.h defines two classes:

The Traces

Each of the distributed trace files represents the branches encountered during the execution of 100 million instructions from the corresponding benchmark. The traces include branches executed during the execution of benchmark code, library code, and system activity such as page faults. After the traces are generated, they are compressed with a crazy scheme I came up with one day when I was procrastinating from doing "real" work. Then they are compressed with bzip2. The compression scheme is lossless; the traces sent to your predictor are bit-for-bit identical to the traces collected from the running benchmarks.

System Requirements

This infrastructure has been tested on x86 hardware running Fedora Core 4 and Debian 3.1 operating systems as well as the Cygwin environment on Microsoft Windows XP, SPARC hardware running SunOS 5.8, and PowerPC hardware running MacOS X. The code should compile with no modifications with g++ >= 2.95.2. The program requires about 8MB plus whatever your branch predictor requires. On a Pentium D 2.8 GHz system the run script with the unmodified my_predictor.h takes about one minute run.

This infrastructure uses a few commands that are present on most Unix systems. If the pathnames for bzip2 and/or gzip on your system are different from those in trace.h then please customize them.

Disclaimer and Feedback

This is a preliminary version of the infrastructure that has been subjected to testing by several graduate students. I do not claim that it is free of bugs. "Use the Source, Luke." I welcome your comments. Please send them to: djimenez@cs.rutgers.edu.

This page was written by Daniel A. Jiménez.