Question

Show how the following four instructions will be executed within the MIPS pipeline. Also show the forwarding paths needed. Use the graphical notation showing all stages of MIPS pipeline. Indicate all data dependencies. Which dependencies are data hazards that will be resolved via forwarding? Which dependencies are data hazards that will cause a stall? add $s3, s 4, $s 6 sub s 5, s 5, $s2 lw s 7, 100 ($s5) add $s8, s7, s2

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:

Pipelining fiuure:

1

2

3

4

5

6

7

8

ADD

S3,S4,S6

IF

ID

EXadd

MEM

WB

SUB

S5, S5,S2

IF

ID

EXsub

MEM

WB

lw

S7,100(s5)

IF

ID

EX­lw

MEM

WB

ADD

S8,S7,S2

IF

ID

EXlw

MEM

WB

The first forwadin is the value of s5 from EXsub to EXlw.

The second forwadin is the value of S7 from EXlw. To EXadd

Data dependencies:

The third LW instruction is depends on second, since S5 is the result of second.

The last ADD instruction is depends on the load instruction for S7.

Data hazrds :

Data hazrds is the data values which are not available during durin decoding.

Both the above mentioned dependencies will resulr in data hazards if no forwardin is there.

Stall:

Both the above dependies will also result in stall, the ID step will not happen till the previous step execution happens,

Add a comment
Know the answer?
Add Answer to:
Show how the following four instructions will be executed within the MIPS pipeline. Also, show the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT