Java Fast Path-Based Neural Branch Predictor
The following Java files simulate the fast path-nased neural branch
predictor described in my MICRO 2003 paper. The driver program accepts a
sequence of traces as 4-byte binary integers where the high bit represents
the branch outcome and the lower 31 bits represent the branch address.
The driver program assumes that there are 17 million traces, one million
each from the 17 SPEC integer benchmarks used in the paper. These traces
are not what were used for the paper; they are very small samples
of the enormous numbers of branches generated by these benchmarks.
To run the driver, download all the Java files and the gzip'ed traces,
then type the following (assuming some sort of Unix):
javac driver.java
gzip -dc traces.gz | java driver
Here are the files:
- branch_predictor.java
This file contains declarations for an abstract branch predictor class.
- branch_update.java This
file contains declarations for an abstract branch update class, necessary
to pass information from the prediction phase to the update phase.
- fpbnp.java This file contains
the code for the fast path-based neural predictor.
- driver.java This file contains
the driver program that reads the traces, drives the branch prediction
simulation, and reports misprediction rates.
- traces.gz This file is a set of
17 million gzip'ed branch traces. You probably want to right-click to
download this file so your browser doesn't do the wrong thing.
You may find the following files helpful:
- always_taken.java This
file implements a very simple branch predictor that subclasses from
branch_predictor and always predicts taken.
- gshare.java This file has a quick
and dirty implementation of a 4096-entry gshare predictor.
The fast path-based neural branch predictor is supported
by NSF Grant CCR-0311091. This page was written by Daniel Jiménez