Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1 The following code computes Y [ i ] = a * * x [ i ] + Y [ i ] for an
Question
The following code computes for an array of length doubles. Initially, address of address of and contains a
ADDIU R R
; address of doubles
loop:
LD FR
MUL.D F F F
LD F OR
ADD.D F F F
SD F OR
ADDIU R R
ADDIU R R
BNE R R loop
; load F Xi
;
; load F Yi
; F
; store F
; increment pointer
; increment pointer
; loop if R R
Assume the following functional unit latencies given as stall cycles before use The loop branch is predicted to be always taken with zero delay.
tableInstruction producing result,Instruction using result,Stall cycles before useFP operation,Another FP operation, stall cyclesFP operation,FP store, stall cyclesFP load,FP operation, stall cyclesInteger ALU operation,Another ALU operation, stall cycles
a Assume a singleissue pipeline. Show the loop code including the stall cycles. What is the number of cycles per iteration to compute one element of the array Y
b Unroll the loop Two times and schedule it to reduce stall cycles, collapsing the loop overhead instructions. Show the instruction schedule. What is the average number of cycles to compute one element of the array Y
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