Your goal is to write code to evaluate the performance of a 2-bit saturating counter based branch predictor on this trace.
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.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
