I've got a question for your guys that spend your days designing processors. In one of my current computer engineering classes we are talking about processor design and we started out with multi-cycle designs and are now talking about pipelined processors. As I understand it, pipelined is better because the hardware doesn't "go to waste" since an instruction only uses one part of the processor at a time. So beginning a second instruction before the other one is finished seems like a really good idea to use unused parts of the processor.
But my question is this? How much does this help with real code in the real world? Pipelined seems great, except when the instructions depend on the result of the previous instruction. This prevents you from running the instructions right along-side each other (obviously). And then there is the problem of branches, if you take the "wrong" branch you have have to throw out all the work that is in the pipeline, right? Branch prediction units help, but how good are they really?
The reason I'm asking is because it seems like a pipelined processor would be much more complex to actually build given the numerous problems the design introduces. In the real world, is it still faster and does it still make better use of hardware?
Thanks for any help you guys and girls can give me in understanding this better.
But my question is this? How much does this help with real code in the real world? Pipelined seems great, except when the instructions depend on the result of the previous instruction. This prevents you from running the instructions right along-side each other (obviously). And then there is the problem of branches, if you take the "wrong" branch you have have to throw out all the work that is in the pipeline, right? Branch prediction units help, but how good are they really?
The reason I'm asking is because it seems like a pipelined processor would be much more complex to actually build given the numerous problems the design introduces. In the real world, is it still faster and does it still make better use of hardware?
Thanks for any help you guys and girls can give me in understanding this better.