Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Given the following sequence of instructions to be executed on a 5-stage pipelin

ID: 3806034 • Letter: G

Question

Given the following sequence of instructions to be executed on a 5-stage pipelined data path as descripted in our textbook: List true dependencies in the given sequence in the format of (register_involved. producer_instruction, consumer_instruction). Use labels to indicate instructions. For example: ($ theta, I10, I11) means a true dependence between instruction I1theta and I11: value of register $ theta is generated by I1theta and used by I11. Do NOT list output or anti-dependences. If there is no forwarding or hazard detection, no reordering allowed, insert naps to ensure correct execution. Repeat b. but allow instruction reordering - - naps should be inserted only when a hazard cannot be avoided by reordering instructions. If there is full forwarding support, draw multiple-cycled pipeline diagram to show the execution of the original sequence (NOT the reordered version). Use arrows to mark forwarding's clearly in your diagram. Each arrow should point from instruction/stage that generates the data rightarrow instruction/stage that consumes the data. Also mark the necessary pipeline stalls.

Explanation / Answer

Following are the semantics of instructions

I1:           $8           <-            $12 + $10

I2:           M[$8]    <-            $9

I3:           $8           <-            M[$9 + 4]

I4:           $12         <-            $12 & $8

I5:           M[$9]    <-            $8

a) Following are the dependencies b/w instructions

Register label

Producer Instruction

Consumer instruction

$8

I1

I2

$8

I3

I5

$8

I3

I4

b)

I1:          $8           <-            $12 + $10

I2:           NOPS

I3:           NOPS

I4:           NOPS

I5:           M[$8]    <-            $9

I6:           $8           <-            M[$9 + 4]

I7:           NOPS

I8:           NOPS

I9:           NOPS

I10:         $12         <-            $12 & $8

I11:         M[$9]    <-            $8

C)

I1:           $8           <-            $12 + $10

I3:           $1           <-            M[$9 + 4]      //Register 8 renames to register 1

                NOP

                NOP

I2:           M[$8]    <-            $9

I4:           $12         <-            $12 & $1

I5:           M[$9]    <-            $1

d)

1

2

3

4

5

6

7

8

9

10

11

12

13

Add

IF

ID

EX

MEM

WB

Sw

IF

-

-

ID

EX

MEM

WB

lw

IF

ID

EX

MEM

WB

And

IF

-

-

ID

EX

MEM

WB

sw

IF

ID

EX

MEM

WB

Please let me know in case of any doubt.

Thanks

Register label

Producer Instruction

Consumer instruction

$8

I1

I2

$8

I3

I5

$8

I3

I4

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote