GATE CS 2021 Set 2 | Question 63
Computer Organization & Architecture › Pipelining · NAT · 2 marks · Answer: 1.87 to 1.88
- Question 63Computer Organization & Architecturenat2 marksConsider a pipelined processor with 5 stages: Instruction Fetch (IF), Instruction Decode (ID), Execute (EX), Memory Access (MEM) and Write Back (WB). Each stage, except the EX stage, takes one cycle. The ID stage merely decodes the instruction and the register read is performed in the EX stage. The EX stage takes one cycle for ADD and two cycles for MUL. Ignore pipeline register latencies. Consider the sequence of 8 instructions:
Every MUL is data-dependent on the ADD just before it, and every ADD (except the first) is data-dependent on the MUL just before it. Speedup = (execution time without operand forwarding) / (execution time with operand forwarding). The speedup achieved (rounded to 2 decimal places) is ______.ADD, MUL, ADD, MUL, ADD, MUL, ADD, MULAnswer: 1.87 to 1.88
Solution
Counting cycles for the dependent ADD/MUL chain with and without operand forwarding (forwarding removes the stalls inserted to wait for register write-back) gives a speedup of approximately 1.87–1.88.
More GATE PYQ on Pipelining
All GATE CS Computer Organization & Architecture PYQ →Attempt GATE CS 2021 Set 2 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →