Given the following information, calculate the speedup. Assume that the lw instr
ID: 3699696 • Letter: G
Question
Given the following information, calculate the speedup. Assume that the lw instruction has a CPI of 5 but all other instructions in our MIPS subset (including beq and j) have a CPI of 4. A program consisting of 2,800,460 instructions (all taken from our MIPS subset) is executed on the multi-cycle implementation of our MIPS data-path running at a fixed 1 GHz clock rate. The program uses the following mix of instructions: 40% R-type, 20% lw, 10% sw, 20% beq and 10% j. What speedup would result if the j (jump) and beq instructions could be improved so that they each require 3 cycles rather than 4 cycles and this is the only improvement?
Explanation / Answer
Solution:
Number of instructions= 2,800,460 instructions?
The mix instruction 40% R-type, 20% lw, 10% sw, 20% beq and 10% j
Average CPI without modification is= 0.4*4 + 0.2*5 + 0.1 * 4 + 0.2 * 4 + 0.1 * 4= 4.2
Now that beq is improved and required 3 cycles only
the new average CPI will be= 0.4*4 + 0.2*5 + 0.1 * 4 + 0.2 * 3 + 0.1 * 4= 4.0
The speedup= 4.2/4= 1.05
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.