GATE / CS ARCHIVE

GATE CSE 2005 / QUESTION 80

Single-bus subroutine call

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

GATE 2005, Q80 2 marks · MCQ
Report issue

Datapath & Control Unit

Question 80, GATE 2005: Single-bus CPU: MAR, MDR, IR, PC, general registers and ALU input latches S, T share the bus; ALU output returns directly to it. All widths equal; increments must use ALU. Memory read takes two cycles: address→MAR then memory→MDR. Two-word CALL Rn, sub: opcode fetch already increments PC to second word. Execute Rn←PC+1 and PC←M[PC]. Minimum execution cycles A2; B3; C4; D5.
Question 80, GATE 2005: Single-bus CPU: MAR, MDR, IR, PC, general registers and ALU input latches S, T share the bus; ALU output returns directly to it. All widths equal; increments must use ALU. Memory read takes two cycles: address→MAR then memory→MDR. Two-word CALL Rn, sub: opcode fetch already increments PC to second word. Execute Rn←PC+1 and PC←M[PC]. Minimum execution cycles A2; B3; C4; D5.
Question 80, GATE 2005: Single-bus CPU: MAR, MDR, IR, PC, general registers and ALU input latches S, T share the bus; ALU output returns directly to it. All widths equal; increments must use ALU. Memory read takes two cycles: address→MAR then memory→MDR. Two-word CALL Rn, sub: opcode fetch already increments PC to second word. Execute Rn←PC+1 and PC←M[PC]. Minimum execution cycles A2; B3; C4; D5.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

At execution start PC addresses the second instruction word. A four-cycle schedule is: (1) broadcast PC to MAR and S; (2) read M[MAR] into MDR while loading the increment operand 1 into T; (3) send ALU(S+T) to Rn; (4) send MDR to PC. The external memory read does not occupy the internal bus carrying 1 in cycle 2. Three bus transfers of PC, return address, and target plus preparation of the increment require four cycles in this latched-input datapath. Thus C (4), assuming the usual constant-one ALU input/control needed for the specified increment operation, which the schematic does not explicitly draw.

Two different results must be preserved: the incremented return address and the target stored in memory. Broadcast PC to MAR and S together in the first cycle, since both need the same value. In the second, memory fills MDR while the internal bus supplies the increment constant to T. The third transfers S+T to Rn; the fourth transfers MDR to PC. Memory’s external transfer can overlap internal-bus work; counting it as another serialized internal transfer would overestimate. The constant input is a conventional control assumption explicitly identified.

Original paper, page 11