In which stage ( on an ideal 5-stage pipeline ) are branches and hazards handled? How much is the branch penalty for a branch hazard or data hazard. Is there different stages to find data hazards or branch hazards ( meaning for example branch hazards occurs on the 2th stage in the pipeline) or are all hazards detected at a specific stage?
2$\begingroup$ For reference en.wikipedia.org/wiki/Classic_RISC_pipeline is probably meant with "ideal 5 stage pipeline". $\endgroup$– adrianNAug 5, 2016 at 13:44
The classic RISC pipeline resolves branches in the decode stage, which means the branch resolution recurrence is two cycles long. More information can be found in the Wikipedia article on the Classic RISC pipeline.