My question relates to a video I watched on YouTube.
The pipeline is a 5-stage pipeline which include fetch, decode, ALU, Mem (data), and Write.
It mentions that nothing is fetched until we're sure what to fetch. How can that be though? Won't you need to fetch and decode an instruction first to know what to fetch?
He mentions that the ADDI instruction gets fetched, but then goes in a bubble since it's not a branch. I really do not understand what is happening here and why the CPI for each instruction are ADDI=2, ADD=2, and BNEZ=3.
Can any explain to me what's going on here? Maybe a table with cycle iteration would be helpful.
Here's the video link: Branch Prediction question