Question: Consider the following assembly language code lw$R4.100($R2)//LDWR4 = MEM[R2 + 100); and $R9,$R4,$R2//AND R9 = R4 & R2; add $R9,$R2,$R0//ADD R9 = R2 + R0;

 Consider the following assembly language code lw$R4.100($R2)//LDWR4 = MEM[R2 + 100);

Consider the following assembly language code lw$R4.100($R2)//LDWR4 = MEM[R2 + 100); and $R9,$R4,$R2//AND R9 = R4 & R2; add $R9,$R2,$R0//ADD R9 = R2 + R0; sub $R8,$R2,$R9//SUB R8 = R2 - R9; add $R2,$R7,$R6//ADD R2 = R7 + R6; lw $R2,0($R4)//LDW R2 = MEM[R4 + 0]; and $R8,$R8,$R2//AND R8 = R8 & R2; sw $R4,100(&R9)//STW MEM[R9 + 100] = R4; Consider a pipeline with forwarding, hazard detection, and 1 delay slot for branches The pipeline is the typical 5-stage IF, ID, EX, MEM, WB MIPS design For the above axle, complete the pipeline diagram below (instructions on the left, cycles on top) for the code. Insert the characters IF, ID, EX, MEM, WB for each instruction in the boxes. Assume that there two levels of bypassing, that the second half of the decode stage performs a read of source registers, and that the first half of the write-back stage writes to the register file. Label all data stalls (Draw an X in the box). Label all data forwards that the forwarding unit detects (arrow between the stages handing off the data and the stages receiving the data) What is the final execution time of the code? Assuming that the timings for the five pipeline stages are the ones given in the table below, find how long would it take to execute the code in part (a) and the respective speedups: Using a single-cycled processor Using a pipelined processor

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 Databases Questions!