EcrioniX/ Digital Electronics/ SISO SIPO PISO PIPO
Topic 39 · Shift Registers

SISO · SIPO · PISO · PIPO
All Shift Register Types Explained

Serial-In Serial-Out, Serial-In Parallel-Out, Parallel-In Serial-Out, Parallel-In Parallel-Out — with diagrams, truth tables, and Verilog RTL code.

SISO
Serial In · Serial Out
→ 1 bit in → [D Q]→[D Q]→[D Q]→[D Q] → 1 bit out
Delay line, LFSR, serial buffer
SIPO
Serial In · Parallel Out
→ 1 bit in → [D Q]→[D Q]→[D Q]→[D Q] → 4-bit out
Deserializer, UART RX, SPI
PISO
Parallel In · Serial Out
4-bit in → [D Q]→[D Q]→[D Q]→[D Q] → 1 bit out
Serializer, UART TX, SPI
PIPO
Parallel In · Parallel Out
4-bit in → [D Q][D Q][D Q][D Q] → 4-bit out
Pipeline latch, data register

SHIFT REGISTER TYPES — BLOCK DIAGRAM

SISO Serial In → Serial Out SI→ FF0 FF1 FF2 FF3 →SO SIPO Serial In → Parallel Out SI→ FF0 FF1 FF2 FF3 Q0 Q1 Q2 Q3 PISO Parallel In → Serial Out FF0 FF1 FF2 FF3 D0 D1 D2 D3 →SO PIPO Parallel In → Parallel Out FF0 FF1 FF2 FF3 D0 D1 D2 D3 Q0 Q1 Q2 Q3

Comparison Table ALL 4 TYPES

TypeFull NameInputOutputClocks to OutputMain Use
SISOSerial In Serial Out1 bit/clk1 bit/clkN clocks (delay)Delay line, LFSR, serial buffer
SIPOSerial In Parallel Out1 bit/clkN bits at onceN clocks to fillDeserializer, UART RX, SPI RX
PISOParallel In Serial OutN bits at once1 bit/clk1 load + N shiftsSerializer, UART TX, SPI TX
PIPOParallel In Parallel OutN bits at onceN bits at once1 clockPipeline latch, data register

1. SISO — Serial In Serial Out DELAY LINE

A SISO shift register accepts one bit per clock on its input and produces one bit per clock on its output. Data shifts through a chain of D flip-flops. An N-bit SISO delays the input signal by exactly N clock cycles.

verilog
module siso_shift_reg #(parameter N=8) (
  input  clk, rst_n, si,   // serial input
  output so               // serial output (N-cycle delayed)
);
  reg [N-1:0] shift_reg;

  always @(posedge clk or negedge rst_n) begin
    if (!rst_n) shift_reg <= '0;
    else        shift_reg <= {shift_reg[N-2:0], si};  // shift left
  end

  assign so = shift_reg[N-1];  // MSB is output after N clocks
endmodule

Applications: Pipeline delay element, LFSR (with XOR feedback), CRC generation, serial communication buffer, waveform stretching.

2. SIPO — Serial In Parallel Out DESERIALIZER

A SIPO shift register shifts in bits serially and presents all N bits simultaneously at parallel outputs. After N clock cycles, the full N-bit word is available. This is the basis of every deserializer — UART, SPI, I2C receiver.

verilog
module sipo_shift_reg #(parameter N=8) (
  input        clk, rst_n, si,
  output [N-1:0] parallel_out   // all N bits visible at all times
);
  reg [N-1:0] shift_reg;

  always @(posedge clk or negedge rst_n) begin
    if (!rst_n) shift_reg <= '0;
    else        shift_reg <= {shift_reg[N-2:0], si};
  end

  assign parallel_out = shift_reg;  // all bits exposed
endmodule

SIPO in UART: UART RX samples the line once per bit period and shifts each bit into a SIPO register. After 8 bits, the parallel output is the received byte. A valid flag is raised on bit count = 8.

3. PISO — Parallel In Serial Out SERIALIZER

A PISO shift register loads all N bits in parallel on a load pulse, then shifts them out one bit at a time over N clock cycles. This is the serializer — used in UART TX, SPI TX, and any parallel-to-serial conversion.

verilog
module piso_shift_reg #(parameter N=8) (
  input        clk, rst_n,
  input        load,            // 1 = load parallel data
  input  [N-1:0] parallel_in,
  output       so               // serial output
);
  reg [N-1:0] shift_reg;

  always @(posedge clk or negedge rst_n) begin
    if      (!rst_n) shift_reg <= '0;
    else if (load)   shift_reg <= parallel_in;   // parallel load
    else             shift_reg <= {1'b0, shift_reg[N-1:1]};  // shift right
  end

  assign so = shift_reg[0];  // LSB out first (LSB-first protocol)
endmodule

4. PIPO — Parallel In Parallel Out REGISTER / LATCH

A PIPO shift register loads all N bits simultaneously and outputs all N bits simultaneously on the next clock edge. This is functionally equivalent to a D flip-flop register — the fundamental building block of every CPU pipeline stage.

verilog
module pipo_register #(parameter N=8) (
  input        clk, rst_n, en,
  input  [N-1:0] d,
  output reg [N-1:0] q
);
  always @(posedge clk or negedge rst_n) begin
    if      (!rst_n) q <= '0;
    else if (en)     q <= d;   // load on enable
  end
endmodule

Universal Shift Register ALL MODES

A Universal Shift Register combines all 4 modes — selected by a 2-bit mode control. The 74194 IC is the classic example.

S1 S0ModeOperation
0 0HoldNo change — register holds current value
0 1Shift RightSISO/SIPO mode — shift right, SI from left
1 0Shift LeftSISO/SIPO mode — shift left, SI from right
1 1Parallel LoadPISO/PIPO mode — load all bits in parallel
verilog
module universal_shift_reg #(parameter N=8) (
  input        clk, rst_n,
  input  [1:0]  mode,          // 00=hold 01=shr 10=shl 11=load
  input        si_right, si_left,
  input  [N-1:0] d,
  output reg [N-1:0] q
);
  always @(posedge clk or negedge rst_n) begin
    if (!rst_n) q <= '0;
    else case (mode)
      2'b00: q <= q;                           // hold
      2'b01: q <= {si_right, q[N-1:1]};        // shift right
      2'b10: q <= {q[N-2:0], si_left};        // shift left
      2'b11: q <= d;                           // parallel load
    endcase
  end
endmodule

LFSR — Shift Register with Feedback PRBS / BIST

An LFSR (Linear Feedback Shift Register) is a SISO shift register where the input bit is computed as XOR of specific "tap" positions. It generates a maximal-length pseudo-random sequence used in BIST, CRC, scrambling, and PRBS testing.

verilog
// 8-bit LFSR — taps at positions 8,6,5,4 (maximal length = 255)
module lfsr_8bit (
  input       clk, rst_n,
  output reg [7:0] prbs
);
  always @(posedge clk or negedge rst_n) begin
    if (!rst_n) prbs <= 8'hFF;  // non-zero seed
    else prbs <= {prbs[6:0],
                   prbs[7] ^ prbs[5] ^ prbs[4] ^ prbs[3]};
  end
endmodule

Frequently Asked Questions FAQ

What are the 4 types of shift registers? +

SISO (Serial In Serial Out), SIPO (Serial In Parallel Out), PISO (Parallel In Serial Out), PIPO (Parallel In Parallel Out). Each differs in how data enters and exits the register.

What is the difference between SIPO and PISO? +

SIPO = Deserializer: takes in bits one at a time, outputs all at once (UART RX). PISO = Serializer: loads all bits at once, outputs one bit at a time (UART TX). They are complementary and form a serial communication pair.

What is PIPO used for? +

PIPO is used as a pipeline register, data latch, or general-purpose storage register. It loads N bits in one clock and outputs them in the same clock. Every CPU register file and pipeline stage uses PIPO-style registers.

What is an LFSR? +

LFSR (Linear Feedback Shift Register) is a SISO register where the input is an XOR of specific bit positions (taps). It generates pseudo-random sequences used in BIST (Built-In Self Test), CRC calculation, and PRBS testing in VLSI chips.

How to write a shift register in Verilog? +

Basic shift: always @(posedge clk) shift_reg <= {shift_reg[N-2:0], serial_in}; — this shifts left each clock. For PISO with load: if (load) shift_reg <= parallel_in; else shift_reg <= {1'b0, shift_reg[N-1:1]};

Related topics:

Shift Registers Digital Electronics Verilog Verilog Simulator