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

This question considers the basic MIPS 5-stage pipeline (F, D, EX, M, WB). Show

ID: 3909357 • Letter: T

Question

This question considers the basic MIPS 5-stage pipeline (F, D, EX, M, WB).

Show how the instructions in the sequence given below will proceed through the pipeline:

Predict the the beq instruction is not taken

When the beq instruction is executed, the value in $1 is equal to the value in $2

beq $1, $2, FINAL # i1

lw $10, 0($11) # i2

sub $14, $10, $10 # i3

FINAL: add $4, $1, $2 # i4

(For this problem, you may assume that there is full forwarding hardware support.)

A. 1 2 3 4 5 6 7 8 9 i1 F D i2 F i3 F i4 F D E M W

Explanation / Answer

When 'i1' starts executing and when it comes in E stage (3rd stage), since value of $1=$2) control willl go to instruction 'i4'. Meanwhile due to pipelining, i2 and i3 will complete there (fetch,decode) and fetch stages respectively but will not execute further stages as control will go to 'i4'.

Hence option C is the accurate way that instruction will proceed through pipelining system.

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