Question: 2 . Data Dependencies ( 3 0 points ) Here is a short MIPS assembly language loop. ( This is a simpler version of a

2. Data Dependencies (30 points)
Here is a short MIPS assembly language loop. (This is a simpler version of a very common
operation in scientific applications.) Assume that we run this code on the 5-stage pipelined
datapath.
Bilbo:
lw $t1,0($a2)
add $t2, $t1, $a3
lw $t3,0($a1)
sub $t3, $t3, $t2
sw $t3,0($a1)
subi $a4, $a4,1
addi $a2, $a2,8
addi $a1, $a1,8
bne $a4, $zero, Bilbo
Find all data dependencies and RAW hazards in the code. How many stalls do you need to
insert to solve RAW hazards? No forwarding or reordering!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!