Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 3 (45 marks) (a) What is meant by the term control hazard with reference to a pipelined processor? (5 marks) (b) The following is
Question 3 (45 marks) (a) What is meant by the term control hazard with reference to a pipelined processor? (5 marks) (b) The following is an assembly language implementation of a for-loop in C. BX is used to hold the variable i. AX and CX somehow hold the array elements a [i] and c [i]. You will notice that there is a conditional branch (jl) and an unconditional jump (jmp) instruction. As far as the branch prediction algorithm is concerned, conditional and unconditional branches are treated in the same way. We assume that branch prediction is implemented in the instruction-fetch unit using a small amount of memory to hold the branch prediction buffer. Before the loop is executed, there are no entries in the branch prediction buffer so the first time when the conditional or unconditional branch is encountered, it is predicted as not-taken. Under a 1-bit branch prediction scheme as described, fill in the following table with simulating the implementation above: (10 marks) (c) With reference to answer of 1 bit branch prediction scheme in (b), obtain (i) The total number of jump and branch encountered (ii) The total number of incorrect predictions (either jump or branch) (iii) Misprediction rate for all predictions (iv) Misprediction rate per iteration
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started