Question: ( Loop unrolling and instruction reordering ) Given the code segment shown below, assume we use a conventional 5 - stage pipeline. Load - use
Loop unrolling and instruction reordering Given the code segment
shown below, assume we use a conventional stage pipeline. Loaduse would
cause cycle pipeline stall, and branches are resolved at the instruction decode
stage. Registers St ~ St are for temporal use. Please answer the following
questions.
Loop: lw $to$s
addu $t St $s
SW $t$s
add $s $s
bne $s Szero, Loop
a pts Without loop unrolling and instruction reordering, how many
needed to execute four iterations?
b pts With loop unrolling that unrolls the loop four times and instruction
reordering, how many cycles are required to execute fous iterations?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
