A $5$ stage pipelined processor has the following stages:
- $IF$ : instruction fetch
- $ID$ : instruction decode
- $EX$ : execute
- $MA$ : memory access
- $WB$ : write back
$$\large\color{red}{IF \rightarrow ID\rightarrow EX\rightarrow MA\rightarrow WB}$$
- Each stage needs one cycle for all instructions.
$\begin{matrix} I_1.&\text{Load} &R_1 ,\;[1000] &&& : \quad &R_1&\leftarrow &M[1000] \\ I_2.&\text{Load} &R_3 \; ,\; 5(R_2) &&& : \quad &R_3&\leftarrow &M[R_2+5] \\ I_3.&\text{MUL} &R_4 \; ,R_1\;,R_3 \; &&& : \quad &R_4&\leftarrow &R_1\;*\;R_3 \\ I_4.&\text{DIV} &R_5 \; ,R_1\;,R_4 \; &&& : \quad &R_5&\leftarrow &R_1\; \div \;R_4 \\ I_5.&\text{SUB} &R_6 \; ,R_4\;,R_5 \; &&& : \quad &R_6&\leftarrow &R_4\;-\;R_5 \\ \end{matrix}$
No. of cycles needed to execute these instructions using operand forwarding?