Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following assembly language code: I 0 : lw $R 9 , 4 , ( $R 1 ) / / LDW R 9 =
Consider the following assembly language code:
I: lw $R$R LDW R MEMR;
I: add $R$R$RADD R R R;
I: lw $R$RLDW R MEMR;
I: add $R$R$RADD R R R;
I: lw $R$RLDW R MEMR;
I: sub $R$R$RSUB R R R;
I: and $R$R$RAND R R & R;
I: lw $R$RLDW R MEMR;
I: sw $R$RSTW MEMR R;
I: add $R$R$RADD R R R;
Consider a pipeline with forwarding, hazard detection, and delay slot for branches. The pipeline is the typical stage IF ID E M WB MIPS design. For the above code, complete the pipeline diagram below instructions on the left, cycles on top for the code. Insert the characters IF ID E M WB for each instruction in the boxes. Assume that there two levels of bypassing, that the second half of the decode stage performs a read of source registers, and that the first half of the writeback stage writes to the register file. Label all data stalls Draw an X in the box Label all data forwards that the forwarding unit detects arrow between the stages handing off the data and the stages receiving the data
a What is the final execution time of the code?
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
I
I
I
I
I
I
I
I
I
I
There is a total of cycles
b Verify that the program takes number of cycles found in the previous part
c Assuming that the timings for the five pipeline stages are the ones given in the table below, find how long would it take to execute the code in part a and the respective speedups:
i Using a singlecycled processor.
ii Using a pipelined processor.
IF
ID
EX
MEM
WB
Pipeline Register
ps
ps
ps
ps
ps
ps
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