GATEverse
← GATE IT 2006

Q78

MCQ2 marks, −0.5

A pipelined processor uses a 4−4-stage instruction pipeline with the following stages: Instruction fetch (IF), Instruction decode (ID), Execute (EX) and Writeback (WB). The arithmetic operations as well as the load and store operations are carried out in the EX stage. The sequence of instructions corresponding to the statement X=(S−R∗(P+Q))/TX = (S - R * (P + Q))/T is given below. The values of variables P,Q,R,SP, Q, R, S and TT are available in the registers R0,R1,R2,R3R0, R1, R2, R3 and R4R4 respectively, before the execution of the instruction sequence.

ADDR5, R0, R1; R5 ← R0 + R1MULR6, R2, R5; R6 ← R2 * R5SUBR5, R3, R6; R5 ← R3 - R6DIVR6, R5, R4; R6 ← R5/R4STORER6, X; X ← R6\begin{array}{ll} \text{ADD} & \text{R5, R0, R1} && \text{; R5 ← R0 + R1} \\ \text{MUL} & \text{R6, R2, R5} && \text{; R6 ← R2 * R5} \\ \text{SUB} & \text{R5, R3, R6} && \text{; R5 ← R3 - R6} \\ \text{DIV} & \text{R6, R5, R4} && \text{; R6 ← R5/R4} \\ \text{STORE} & \text{R6, X} && \text{; X ← R6} \\ \end{array}

The number of Read-After-Write (RAW) dependencies, Write-After-Read( WAR) dependencies, and Write-After-Write (WAW) dependencies in the sequence of instructions are, respectively,

Sign in to save attempts.

Loading…