Question

The code chain below is executed on a data forwarding, 5-stage pipelined processor. Which of the...

The code chain below is executed on a data forwarding, 5-stage pipelined processor. Which of the following instructions will encounter a stall? Write the instruction number along with the number of stall cycles that instruction experiences.

(Note the data forwarding)

1. add $4, $5, $6

2. add $7, $4, $5

3. sw $8, 0($7)

4. add $8, $8, $6

5. lw $6, 0($8)

6. add $10, $9, $8

0 0
Add a comment Improve this question Transcribed image text
Answer #1
1 2 3 4 5 6 7 8 9 10
add $4, $5, $6 IF ID EX MEM WB $4 is forwarded at the end of 3rd clock cycle
add $7, $4, $5 IF ID EX MEM WB $7 is forwarded at the end of 4th clock cycle
sw $8, 0($7) IF ID EX MEM WB
add $8, $8, $6 IF ID EX MEM WB $8 is forwarded at the end of 6th clock cycle
lw $6, 0($8) IF ID EX MEM WB $6 is available at the end of 8th clock cycle
add $10, $9, $8 IF ID EX MEM WB

No instruction in the above code experience a stall cycle.

Add a comment
Know the answer?
Add Answer to:
The code chain below is executed on a data forwarding, 5-stage pipelined processor. Which of 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