GATE Computer ScienceHardGATE CSE
A 5-stage pipeline (IF, ID, EX, MEM, WB) has no forwarding; the register file is written in the first half of a cycle and read in the second half. Instructions: I1: ADD R1,R2,R3; I2: SUB R4,R1,R5; I3: AND R6,R4,R1; I4: OR R7,R2,R3; I5: XOR R8,R6,R7. The pipeline stalls in ID until operands are available, and instructions issue in order. How many clock cycles pass from the first fetch until I5 completes WB?
- A. 15
- B. 12
- C. 17
- D. 9
Correct answer: A. 15
I2 reads R1 only in I1's WB cycle (5), finishing at 8; I3 waits for I2's WB (8), finishing at 11; I4 reads at 9 (WB 12); I5 waits for I4's WB at 12 and completes at 15.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A two-level cache: L1 hit time 1 ns with 5% miss rate; L2 hit time 10 ns with a LOCAL miss rate of 20%; main memory access 100 ns. The…
- A 5-stage pipeline has ideal CPI 1. 20% of instructions are branches, 60% of which are taken; branches are predicted not-taken and a taken…
- A 32-bit instruction format holds two register specifiers (the machine has 48 registers) and a 12-bit immediate; all remaining bits form…
- A SECDED (single-error-correct, double-error-detect) extended Hamming code protects 256 data bits. What is the total number of bits stored…
- A virtually indexed, physically tagged 256 KB cache is 8-way set associative with 64-byte lines. The page size is 4 KB. Into how many page…
- A program spends 40% of its time in floating-point operations, 30% in memory operations and 30% elsewhere. FP operations are made 5 times…