GATE / CS ARCHIVE

GATE CSE 1991 / QUESTION 7(a)

Fetch and indexed effective-address transfers

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

GATE 1991, Q7(a) 4 marks · Descriptive
Report issue

Datapath & Control Unit

Question 7(a), GATE 1991: A single-address CPU has 16-bit instructions; the low 8 bits are the operand-address field. Design a hardwired fetch cycle which also forms the effective address for an indexed instruction. The reproduction does not specify memory word size, address width, index-mode encoding, or a memory-ready protocol. Give register transfers.
Question 7(a), GATE 1991: A single-address CPU has 16-bit instructions; the low 8 bits are the operand-address field. Design a hardwired fetch cycle which also forms the effective address for an indexed instruction. The reproduction does not specify memory word size, address width, index-mode encoding, or a memory-ready protocol. Give register transfers.
Question 7(a), GATE 1991: A single-address CPU has 16-bit instructions; the low 8 bits are the operand-address field. Design a hardwired fetch cycle which also forms the effective address for an indexed instruction. The reproduction does not specify memory word size, address width, index-mode encoding, or a memory-ready protocol. Give register transfers.
Tap to enlarge
Answer & solution

Answer: MAR←PC; read instruction; IR←MDR, PC←PC+1; EA←zero_extend(IR[7:0])+(indexed?X:0), for word-addressed memory. (no official key was published)

Use a word-addressed memory returning one 16-bit instruction per access, an address-width w≥8, PC, MAR, MDR, IR, index register X and effective-address register EA. Let I be the decoded indexed-mode condition, and Z(IR[7:0]) the zero-extended address field. These are explicit implementation assumptions, not facts supplied by the question.

T0: MAR←PC.
T1: assert memory READ; wait until READY; MDR←M[MAR].
T2: IR←MDR; PC←PC+1.
T3: EA←Z(IR[7:0]) + (I ? X : 0), modulo 2w; finish fetch.

The operand field must come from the newly loaded IR, so effective-address formation follows T2. PC increment is independent of indexing: indexing modifies the operand address, not the address of the next instruction. The index flag is obtained from the instruction’s opcode/mode decoding; assigning it a particular bit without specification would be unjustified.

If memory is byte-addressed with an 8-bit data bus, use two reads, assemble the two bytes according to the selected endianness, and advance PC by two instead. If memory has a fixed guaranteed cycle, the READY self-loop can be replaced by the corresponding fixed number of timing states. These implementation variants do not change the essential separation of fetch, decode and address formation.

Original paper, page 5