Answered step by step
Verified Expert Solution
Link Copied!

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:
I0: lw $R9,4,($R1)// LDW R9= MEM[R1+4];
I1: add $R3,$R4,$R9//ADD R3= R4+ R9;
I2: lw $R1,100($R3)//LDW R1= MEM[R3+100];
I3: add $R4,$R1,$R0//ADD R4= R1+ R0;
I4: lw $R1,0($R3)//LDW R1= MEM[R3+0];
I5: sub $R3,$R1,$R4//SUB R3= R1- R4;
I6: and $R9,$R9,$R7//AND R9= R9 & R7;
I7: lw $R2,100($R4)//LDW R2= MEM[R4+100];
I8: sw $R4,100($R2)//STW MEM[R2+100]= R4;
I9: add $R1,$R5,$R4//ADD R1= R5+ R4;
Consider a pipeline with forwarding, hazard detection, and 1 delay slot for branches. The pipeline is the typical 5-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 write-back 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?
T0
T1
T2
T3
T4
T5
T6
T7
T8
T9
T10
T11
T12
T13
T14
T15
T16
T17
I0
I1
I2
I3
I4
I5
I6
I7
I8
I9
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 single-cycled processor.
ii) Using a pipelined processor.
IF
ID
EX
MEM
WB
Pipeline Register
45ps
50ps
35ps
65ps
30ps
15ps

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

New Trends In Databases And Information Systems Adbis 2019 Short Papers Workshops Bbigap Qauca Sembdm Simpda M2p Madeisd And Doctoral Consortium Bled Slovenia September 8 11 2019 Proceedings

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Robert Wrembel ,Mirjana Ivanovic ,Johann Gamper ,Mikolaj Morzy ,Theodoros Tzouramanis ,Jerome Darmont

1st Edition

3030302776, 978-3030302771

More Books

Students also viewed these Databases questions

Question

Discuss international terms of sale and Incoterms.

Answered: 1 week ago

Question

What are the key drivers of customer value for your business?

Answered: 1 week ago