Question: Problem 1 Consider the following MIPS code. begin { tabular } { lll } IO: & Iw $s 3 , 0 (

Problem 1
Consider the following MIPS code.
\begin{tabular}{lll}
IO: & Iw \$s3,0(\$s2) & \# LDW \$s3= M[\$s2+0]\\
I1: & Iw \$s1,12(\$s4) & \#LDW \$s1= M[\$s1= M[\$s4+12]\\
I2: & add \$s5,\$s1,\$s3 & \# ADD \$s5=\$s1+\$s3\\
I3: & beq \$s6,\$s7, L1 & \# IF (\$s6=\$s7) goto L1\\
I4: & sw \$s5,0(\$s3) & \#STW M[\$ s3+0]=\$s5\\
I5: L1: sw \$s5,12(\$s4) & \#STW M[\$s4+12]=\$s5
\end{tabular}
- In the absence of hazards, a new instruction can be fed to the pipeline every cycle.
How many cycles does this code take to complete? Use the table below.
Problem 1
Consider the following MIPS code.
IO: Iw $s3,0($s2) # LDW $s3= M[$s2+0] I1: Iw $s1,12($s4) #LDW $s1= M[$s1= M[$s4+12] I2: add $s5,$s1,$s3 # ADD $s5= $s1+ $s3 I3: beq $s6,$s7, L1 # IF ($s6= $s7) goto L1 I4: sw $s5,0($s3) #STW M[$ s3+0]= $s5 I5: L1: sw $s5,12($s4) #STW M[$s4+12]= $s5
In the absence of hazards, a new instruction can be fed to the pipeline every cycle.
How many cycles does this code take to complete? Use the table below.
B) Suppose that the MIPS processor with the 5-stage pipeline from part A). In addition, suppose that:
The instruction and data cache are split allowing the overlap of instruction fetch with read/write data to the cache
The pipeline has hazard detection and forwarding.
How many cycles does this code take to complete? Use the table below.
cycles
C) Suppose now that the Execution stage of the pipeline is split into two stages E1 and E2 and that instruction ( i+1) cannot use E1 until instruction (i) released E2, or more general E1 cannot be used again until
E2 is finished processing. Using the assumptions from part B), how many cycles does this code take to complete? Use the table below.
PLEASE SOLVE PARTS A, B, AND C. SPECIFY BOTH WHICH ROW AND COLUMN THE INSTRUCTION BELONGS IN. i.e: WB (T4, I0)
Problem 1 Consider the following MIPS code. \

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!