Write a program in any high level programming language to perform the following:
1. Read a text file containing a sequence of branches, for each branch, predict the branch to be taken based on the three branch prediction techniques:
a. Static – Predict Taken
b. Static – Predict Not Taken
c. Dynamic Branch Prediction 1
6-state scheme where change prediction only if get misprediction three times
2. For each branch prediction, increment a branch prediction stall counter according to the following:
Prediction Correct Prediction Incorrect
Predict Taken 0 2
Predict Not Taken 0 3
3. Calculate the misprediction and successful prediction rates for each technique and print out the results. Also print a report on total cycles added to each program’s execution due to control hazards.
A sample output for dynamic branch prediction technique is shown below:
Dynamic Branch Prediction
Read 80 points
40 successes in 80 branches => 50% success rate
Total number of branch hazard cycles: xxx
Run the program for the three attached input files and collect the program outputs in a Word file. Also in your file answer the following:
1. What technique gives the best performance for a single test case? Why?
2. What technique gives the worst performance for a single test case? Why?
3. What technique gives the best performance ON THE AVERAGE for a all test cases? Why?
T
N N
Predict Taken
T* T*N
T T
N
T*N*N
T
N N
Predict Taken
Predict Not
Predict Not
Taken
N*T*T T
N*T N*
T
Taken
N
4. Based on answers above, what technique is the most flexible? You must submit:
1. A zip fie containing the following:
a. Your fully commented source file
b. The executable compiled from your source code. The executable should be compatible with a Windows™ based PC.
2. A Word file containing the screen shot of all your program runs, and the answers to the 4 questions above.
THE DUE DATE FOR THIS PROJECT IS 11:59PM (EST) OF 15 November, 2015
Last Completed Projects
| topic title | academic level | Writer | delivered |
|---|
Are you looking for a similar paper or any other quality academic essay? Then look no further. Our research paper writing service is what you require. Our team of experienced writers is on standby to deliver to you an original paper as per your specified instructions with zero plagiarism guaranteed. This is the perfect way you can prepare your own unique academic paper and score the grades you deserve.
Use the order calculator below and get started! Contact our live support team for any assistance or inquiry.
[order_calculator]