Question: I need help completing the following computer architecture problem (I know that the anser should have about 25 columns): Consider a 5-stage IF, ID, EX,
I need help completing the following computer architecture problem (I know that the anser should have about 25 columns):
Consider a 5-stage IF, ID, EX, MEM and WB pipeline. Assume that we use predict branch not taken method. Calculation of branch address is made in the EX stage. Data is forwarded when possible.
You are to analyze the pipeline execution of this following code. Draw the 5-stage execution diagram using the template shown (i.e., see the initial two cycles below.) Point out where the stalls are needed to prevent data and control hazard. Point out where data are forwarded from one stage to another stage.
*** . Show your work. ****
(a) addi $s0, $0, 2
(b) loop: lw $t0, 12 ($s0)
(c) add $t1, $t0, $t0
(d) lw $t2, 0($t1)
(e) add $t4, $t1, $t2
(f) sw $t2, 0($t4)
(g) subi $s0, $s0, 1
(h) bne $s0, $zero, loop
(i) lw $s1,16($s0)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
