Module 3: Sequential Circuit Design · 3.4 Registers & Shift Registers

Shift Registers

A standard parallel register stores digital data. A shift register moves digital data laterally through cascaded flip-flops.

Shift registers perform serial-to-parallel and parallel-to-serial data conversion. These circuits form the core of digital serial communication interfaces, including SPI, UART, and I²C.

The Cascaded Flip-Flop Chain

A shift register connects $N$ edge-triggered D flip-flops in series.

The output $Q$ of each flip-flop connects to data input $D$ of the subsequent flip-flop (Figure 1). All flip-flops share a common clock.

The first flip-flop receives the external serial input (SIN). The final flip-flop drives the external serial output (SOUT).

Shift register chain
Figure 1: Four cascaded flip-flops forming a 4-bit shift register with parallel tap outputs

On each active clock edge, each stage samples the output of its predecessor. Data bits advance by one register stage per clock cycle. A data bit applied at the serial input emerges at the serial output after $N$ clock cycles.

The Four Architectural Configurations

Shift registers are classified into four configurations based on data input and output formats:

1. Serial-In, Serial-Out (SISO)

Data enters serially one bit per clock cycle and exits serially from the final stage (Figure 2).

A SISO register functions as a synchronous digital delay line that stores the most recent $N$ bits. Digital signal processors use SISO registers for finite impulse response (FIR) filter taps and pipeline alignment.

SISO timing
Figure 2: Timing diagram showing sequential bit propagation through a SISO delay chain

2. Serial-In, Parallel-Out (SIPO)

Data enters serially one bit per cycle. Output pins connect to every flip-flop stage, exposing the entire $N$-bit word simultaneously.

After shifting $N$ bits into the register, external logic reads the full parallel word. SIPO registers perform serial-to-parallel conversion in UART, SPI, and I²C receivers. A data_valid flag indicates when all $N$ bits have arrived.

3. Parallel-In, Serial-Out (PISO)

Data loads into all $N$ flip-flops simultaneously in parallel. The register then shifts the data bits out serially through the final output pin.

Each stage includes a 2-to-1 input multiplexer (Figure 3):

$$D_{\text{actual}}[i] = \text{LOAD} \cdot D_{\text{parallel}}[i] + \overline{\text{LOAD}} \cdot Q[i-1]$$

The first stage receives SIN in place of $Q[-1]$. When $\text{LOAD} = 1$, the register captures the parallel word. When $\text{LOAD} = 0$, the register shifts data serially. PISO registers perform parallel-to-serial conversion in serial transmitters.

PISO structure
Figure 3: Schematic of a parallel-in, serial-out register with load multiplexers at each stage

4. Parallel-In, Parallel-Out (PIPO)

Data loads and reads in parallel across all stages. A PIPO register operates as a standard parallel-load storage register without lateral shift operations.

Architectural Summary

Configuration Input Format Output Format Primary Application
SISO Serial Serial Digital delay line, pipeline balancing
SIPO Serial Parallel Serial-to-parallel conversion (UART/SPI receiver)
PISO Parallel Serial Parallel-to-serial conversion (UART/SPI transmitter)
PIPO Parallel Parallel General datapath storage register

A Serial Peripheral Interface (SPI) controller integrates a PISO register on its transmit channel (MOSI) and a SIPO register on its receive channel (MISO).

Practical Design Considerations

When implementing shift registers, observe these protocol conventions:

  • Bit Transmission Order: Communication protocols specify transmission order: Most Significant Bit first (MSB-first) or Least Significant Bit first (LSB-first). The shift direction must match protocol requirements.
  • Clock Domain Boundaries: If serial data arrives under an external peripheral clock, the completed parallel word must cross into the internal system clock domain using synchronizers.

Practice Exercises

Problem 1

An 8-bit SIPO register receives this sequence MSB-first: 0, 1, 1, 0, 1, 0, 0, 1. Determine the resulting parallel byte in hexadecimal notation.

Solution

Because bits enter MSB-first, the first bit (0) shifts into the MSB position ($Q_7$) after eight clock cycles:

$$\text{Output Vector} = 8\text{‘b}0110_1001 = 0\text{x}69$$

Problem 2

An 8-bit PISO register loads binary value $0\text{xA5}$ (8'b1010_0101). The register shifts left by 5 bit positions, shifting in logic 0 at each step. Determine the 5 serial output bits and the final register value.

Solution

Shift the register left five consecutive times:

  • Bits shifted out from MSB: 1, then 0, then 1, then 0, then 1.
  • Internal bits shift left while five zeros enter from the right:

$$\text{Final Register Contents} = 8\text{‘b}0000_0101 = 0\text{x}05$$

Problem 3

Calculate the minimum external pin count for a 4-bit SIPO register, excluding power supply pins.

Solution

Count the required physical signal pins:

  • Input pins: Serial data input (SIN), system clock (CLK), and reset (RST_N) = 3 pins.
  • Output pins: Four parallel tap outputs ($Q_0, Q_1, Q_2, Q_3$) = 4 pins.

The circuit requires 7 external signal pins. The serial output is accessible directly from pin $Q_3$.

The next article examines advanced applications of shift registers, including Linear Feedback Shift Registers (LFSR), ring counters, and scan chains.

← Registers Shift Register Applications →