GATE / CS ARCHIVE

GATE CSE 1991 / QUESTION 6(b)

RAM-based 1024-bit serial delay

Digital Logic · Flip-Flops, Registers & Sequential Circuits · Full GATE CSE 1991 paper

GATE 1991, Q6(b) 5 marks · Descriptive
Report issue

Flip-Flops, Registers & Sequential Circuits

Question 6(b), GATE 1991: Design a 1024-bit serial-in/serial-out unidirectional shift register using a 1K×1 RAM with Din,Dout and READ/WRITE control, plus standard gates, registers and counters.
Tap to enlarge
Answer & solution

Answer: Use a modulo-1024 address counter and read-before-write phases: capture old RAM[p] as output, overwrite RAM[p] with input, then advance p. (no official key was published)

A literal shift of all 1024 RAM cells on every bit would be wasteful. Instead, regard the RAM as a circular queue. Use a 10-bit binary counter p connected to RAM address A9..A0, an input holding flip-flop I, an output flip-flop O, and a two-phase controller.

Schematic

serial IN→I→RAM Din; counter p[9:0]→RAM address; RAM Dout→O→serial OUT.
Controller→{I clock, RAM READ/WRITE, O clock, counter enable}.

For each external shift event: (1) latch the incoming bit in I and keep p stable; (2) select READ, wait for RAM access time, and clock Dout into O; (3) select WRITE and store I at the same p, meeting write pulse/setup/hold timing; (4) return to READ and increment p modulo 1024. The output must be captured before the write, since the RAM’s read-during-write behavior is not specified.

After initialization, address p holds the oldest of the 1024 retained bits. Reading emits that bit, overwriting appends the new bit, and incrementing makes the next-oldest location the head. Inductively, input bit s[k] is emitted on shift event k+1024, where an event’s output means the bit removed on that event. The first 1024 outputs depend on the RAM’s initial contents. To emulate a reset-to-zero shift register, clear every RAM location during a separate initialization sweep. The external shift period must accommodate both the read and write phases.

Original paper, page 5