GATE / CS ARCHIVE

GATE CSE 2001 / QUESTION 2.13

Microcycles for push on an eight-bit datapath

Computer Organization & Architecture · Datapath & Control Unit · Full GATE CSE 2001 paper

GATE 2001, Q2.13 2 marks · MCQ
Report issue

Datapath & Control Unit

Question 2.13, GATE 2001: An unpipelined CPU has an 8-bit bus, ALU, general registers and MDR, but 16-bit SP and MAR. Byte-select mux/demux connect SP and MAR to the bus; memory operations take two cycles; SP can decrement locally. For push r, perform M[SP]←r then SP←SP−1. How many execution cycles: 2,3,4,5? The complete datapath is linked.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Step 1: The 16-bit SP must be copied to 16-bit MAR through an 8-bit bus. This requires two distinct bus transfers, one per byte, using the mux/demux controls.

Step 2: Copy the 8-bit register r to MDR in a third cycle. The memory write then uses two cycles with MAR supplying the address and MDR the byte. SP can be decremented locally in parallel after its old value has been transferred, so no additional bus cycle is needed for that decrement.

Total 2+1+2=5 cycles, D, in the standard clocked-transfer schedule with memory write starting after MAR/MDR are loaded. Instruction-fetch cycles are not part of this execution count.

Original paper, page 5