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?

a. 1.34
b. 1.26
c. 1.38
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.

  1. If stall cycles are not given we can take 1 stall cycle by default.
  2. We do not need to find the speed up for both ideal and real to get our answer we can simply find the time taken by pipeline with hazard and without hazard and divide it to get our answer. Source: explanation given by made easy gate faculty. Hope it helps :)
  • $\begingroup$ Welcome to COMPUTER SCIENCE @SE. In "markdown", a) Where finished with a list, append a blank line. b) For effective line-breaks, append two spaces to the line you want a break after. $\endgroup$
    – greybeard
    Oct 31 at 6:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.