I am learning computer architecture and organization. I have the following doubt. Given below is a question along with its solution as seen in number 5 of some homework assignment solutions. But I think that solution is wrong.
Consider an instruction pipeline for the MIPS32 processor where data references constitute 42% of the instructions, and the ideal CPI ignoring memory structural hazards is 1.25. How much faster is the ideal machine without the memory structural hazard versus the machine with the hazard?
d. None of the above
Correct answer is (a).
Speedup = (Ideal CPI x Pipeline Depth) / (Ideal CPI + Stall cycles per instr)
So, Speedupideal= 1.25 x Depth / (1.25 + 0) = Depth
And, Speedupreal= 1.25 x Depth / (1.25 + 0.42 x 1) = 1.25 x Depth / 1.67
Required answer = 1.67 / 1.25 = 1.34 (approx.)
The solution calculates Speedupideal and Speedupreal and then it divides them. I don't understand how it gives the answer. I think the solution is wrong. Moreover, the solution says that the stall cycles per instruction are 0.42 * 1 which I think it got from the data references but I don't understand how it got stall cycles per instruction from data references.
As I am a beginner my concepts are not very clear so some help will be appreciated.