Branch Prediction using SimpleScalar

In this lab, you will investigate the effects of various branch prediction schemes on the branch address prediction rate as well as CPI/IPC for ALPHA benchmarks that you worked with in the first lab. You will be sim-bpred simulator to conduct this lab.

Quick fact about sim-bpred simulator

It is a branch predictor simulator. This tool can simulate difference branch prediction schemes and reports results such as prediction hit and miss rates.

All the simulators including sim-bpred are available in the home/simplesim-3.0 directory.

 Go to home/simplesim-3.0 directory and type the following to seek help about sim-bpred.

home/simplesim-3.0$./sim-bpred h

 Help can also be invoked just by typing simulator name without any arguments.

 

1) Execute the benchmarks and fill in Table 1.

 

Benchmark Taken

Branch Address Prediction Rate

Not Taken

Branch Address Prediction Rate

Bimod(2bit prediction)

Branch Add Prediction Rate

anagram.alpha

     

go.alpha

     

compress.alpha

     

gcc.alpha

     

 

Plot a histogram for all the four benchmarks and draw conclusion? Does your conclusion agree with your intuition?

 

2) Use sim-outorder to calculate CPI for the two of the above four benchmarks. The other two take very long time to simulate and hence they are being skipped here. Note that you will have to modify the default.cfg configuration file according to the configuration in Table 1. Fill Table 2.

Benchmark Taken (CPI) Not Taken (CPI) Bimod (CPI)
anagram.alpha      
compress.alpha      

Plot a histogram for the two benchmarks for the three schemes.

 

Bonus Part

Write, compile and run a C program targeted towards PISA ISA which contains a for loop that iterates 10 million times. Please see bonus lab1 to know how to install gcc for PISA ISA. Calculate Branch address pred-Rate for the three case Taken, Not Taken and bimod