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 WExplanation / 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.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.