17 Aug Simulate a simple branch predictor with a 2-bit saturating counter.(c++)
Please do not plagiarize.
Please see the detailed question in the attached.
You will have branchsimulator_skeleton.cpp config.txt makefile.txt trace.txt
In this lab, you will simulate a simple branch predictor with a 2-bit saturating counter. You are provided with a text file containing a trace of branch instructions consisting of the PC at which each branch occurs, and whether the branch is Taken or Not Taken.
Your goal is to write code to evaluate the performance of a 2-bit saturating counter based branch predictor on this trace. Your output file indicates, for each branch in the trace, whether it was predicted as Taken or Not Taken.
What to Submit
a) code
1. Your source code. On compilation, we should be able to execute your simulator with the following command
./branchsimulator.out config.txt trace.txt
Your simulator should output a file trace.txt.out in the same directory.
2. A Makefile that will compile the code. You must use a Makefile, any special instructions must be included in a readme.txt with instructions on how to compile your code (only if necessary, please keep it simple).
b)Analysis
Forr the provided trace.txt, plot a graph of the branch misprediction rate as a function of m with m varying from 10 to 20 in increments of 1.
Submit your plot as a PDF file in the same folder as your source code.
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.