Question: You are asked to design a small computing system with a customized 17-bits ISA that can execute the following loop program: for (i=0, i Sum
You are asked to design a small computing system with a customized 17-bits ISA that can execute the following loop program:
for (i=0, i
Sum = Sum + 3A[i]
There needs one R-type (Add), four I-type (beq, lw, sw, addi), and one J-type (J) Instructions and five registers $zero, $s0, $t0, $t1, $t2 to translate the above program into MIPS Code. Assuming t0, t1, t2, s0 hold the values of x, i, Sum and base of A[] respectively.
Question: Translate the above code into MIPS code and locate the Hazards (Structure, Data, Control) if there's any and Solve the Hazards.
Then turn the "beq" instruction into MACHINE Code. Like (00100110101010100)2
Please NOTE: "add $t1, $zero, $zero and so on" you need to write the full MIPS Code like this for the given Loop Code above.
I'm adding a similar MIPS code example for REFERENCE below:

LI: add $t1, Szero, Szero beg $ $t1, $t0, L2 add $12, St2, $t1 add $12, $12, $t1 addi $12, St2, / , $12 JLI exit... L2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
