



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A project for ece 463 and 521 students where they will construct a branch predictor simulator and design branch predictors using local, global, and hybrid predictors. Students are encouraged to work in pairs and use c/c++ or java for implementation. The project includes designing, coding, and reporting on the results.
Typology: Study Guides, Projects, Research
1 / 6
This page cannot be seen from the preview
Don't miss anything!




In this project you will construct a branch predictor simulator and use it to design branch predictors.
History regs. Counters Actual branch outcomes Prediction
Program Counter
m+1:
mmmm+1 : 2
(a) The counter saturates at 0 and 3 (the counter will never go below zero or above three). (b) All choice counters are initialized to 1 at the beginning of the simulation (c) The index for the chooser table is bit k+1 to bit 2 of the address of the branch (the value of the PC when the branch is encountered). (d) Only the predictor that was selected (local or global) is updated with the branch behavior. (e) The global history register will be updated even if the local branch predictor is selected. You should be able to select any of the predictors (local, global, or hybrid) based on a command-line parameter. The parameters of the simulation are: { m, n 1 } for local branch predictor. { n 2 } for global branch predictor. { { m, n 1 }, { n 2 }, k} for the hybrid predictor.
The simulator reads a trace file in the following format: 0x〈hex branch PC〉 t/n 0x〈hex branch PC〉 t/n … where 〈hex branch PC〉 holds the hexadecimal form of address of the branch instruction in memory. “t” indicates that the branch is actually taken. “n” indicates that the branch is not taken. Example 1100023b t 0a050201 n
The simulation output should include:
local: brn_predictor [tracefile name] [m1] [n1] global: brn_predictor [tracefile name] [n2] hybrid: brn_predictor [tracefile name] [m1] [n1] [n2] [k]
Example: For local branch predictor, eos% brn_predictor gcc_trace.txt 12 8 The first parameter is the number of low-order PC bits ( m = 12). The second parameter is the number of bits in history register ( n = 8).
For the traces given in the course locker (directory /afs/eos/courses/ece/ece521/common/www/homework/projects/2/traces), use your simulator as follows: (1) ( All students ) Do a preliminary design-space search using the following configurations. Local Branch Predictor : (5 ≤ m ≤ 15, 2 ≤ n ≤ m), where n is even.