Question: ! Consider the instruction sequence below. Assume we have forwarding with a 5-stage pipeline processor (in order processor). addi x1, x0, 2 begin: end:

! Consider the instruction sequence below. Assume we have forwarding with a 5-stage pipeline processor (in

! Consider the instruction sequence below. Assume we have forwarding with a 5-stage pipeline processor (in order processor). addi x1, x0, 2 begin: end: beq x1, x0, end and x2, x0, x0 add x3, x3, x2 addi x1, x1, -1 jal x0, begin xor x0, x0, x0 xor x0, x0, x0 xor x0, x0, x0 add x0, x0, x0 a. Assume that branches are resolved in the DE stage with an always-not-taken branch predictor. Draw the timeline (by putting f,d,e,m,w) for each instruction. You don't need to show the forwarding. If the instructions need to be flushed and replaced by bubbles show it with b (e.g., eb, mb, and wb for bubbles in each stage). What is the total number of cycles? b. Now assume we add a perfect BTB (i.e., all addresses are pre-stored) with always-taken prediction and the branches are still resolved in the DE stage. What is the new total number of cycles (draw the table)? c. Now assume we add a BTB with always-taken prediction that is initially empty, and the branches are still resolved in the DE stage. What is the new total number of cycles (draw the table)?

Step by Step Solution

3.44 Rating (167 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a Timeline with alwaysnottaken branch prediction and forwarding ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!