GATEverse
← GATE CSE 2007

Q37

MCQ2 marks, −0.5

Consider a pipelined processor with the following four stages: IF: Instruction Fetch ID: Instruction Decode and Operand Fetch EX: Execute WB: Write Back The IF, ID and WB stages take one clock cycle each to complete the operation. The number of clock cycles for the EX stage depends on the instruction. The ADD and SUB instructions need 11 clock cycle and the MUL instruction needs 33 clock cycles in the EX stage. Operand forwarding is used in the pipelined processor. What is the number of clock cycles taken to complete the following sequence of instructions?

ADDR2, R1, R0R2 ← R1+R0MULR4, R3, R2R4 ← R3∗R2SUBR6, R5, R4R6 ← R5−R4\begin{array}{ll} \textbf{ADD} & \text{R2, R1, R0} &&& \text{R2 $\leftarrow$ R1$+$R0} \\ \textbf{MUL} & \text{R4, R3, R2} &&& \text{R4 $\leftarrow$ R3$*$R2} \\ \textbf{SUB} & \text{R6, R5, R4} &&& \text{R6 $\leftarrow$ R5$-$R4} \\ \end{array}
Sign in to save attempts.

Loading…