With what stage of the branch instruction does the IF stage executes if the branch is taken?
The reference solution to the exercise is inconsistent: The exercise states that the five stages are &quot;IF, ID, OF, EX, WB&quot; but the solution then assumes a different pipeline consisting of &quot;IF, ID, EX, MEM, WB&quot;, effectively shifting the Execute operation to an earlier location in the pipeline and thereby making the branch take one less clock cycle. In any case, the actual jump happens during the Execute stage; that is, once the EX stage of the branch has completed, the next instruction will be fetched from the jumped-to location.
Given the original five pipeline stages stated in the exercise (IF, ID, OF, EX, WB), the instruction sequence will in fact need 15 clock cycles to execute.