Skip to content
BetterDL

Delay line

Also called: digital delay line, shift register delay, clocked delay line

A SISO shift register used to delay a serial bit stream: an n-stage register outputs the stream n clock periods later, in the same order.

A delay line delays a stream of bits by a fixed number of clock periods. The digital version is simply a SISO shift register (serial in, serial out; see siso sipo piso pipo).

How it works: each flip-flop holds a bit for exactly one clock period before passing it on. With n stages, every bit spends n periods inside, so the output stream is the input stream delayed by n clock periods. Nothing is lost or reordered: first in, first out.

Sizing rule: a delay of N clock periods needs N flip-flops. A single d flip flop is a delay line of one period.

Counting edges: a bit that enters at edge k is in stage 1 after edge k, stage 2 after edge k + 1, and reaches the last stage of an n-stage line at edge k + n − 1.

Where they are used: lining up two signals that took paths of different lengths through a circuit, building digital filters (each tap is an earlier sample), and detecting patterns in a stream by looking at the last n bits at once.

Worked examples

Example

Delaying by 9 periods

A serial stream must be delayed by exactly 9 clock periods. How many flip-flops?

  1. 1.

    Each stage adds one clock period of delay.

  2. 2.

    9 periods need 9 stages: 9 flip-flops.

  3. 3.

    Check with one stage: a single D flip-flop delays a stream by one period.

Example

Following one bit

A 5-stage delay line receives a 1 at edge 4 and 0s otherwise. When does the 1 reach the output?

  1. 1.

    After edge 4 it is in stage 1.

  2. 2.

    After edges 5, 6, 7 it is in stages 2, 3, 4.

  3. 3.

    After edge 8 it is in stage 5, the output: 4 + 5 − 1 = 8.

Common mistakes

  • Using n − 1 stages for a delay of n periods by counting the gaps between stages. Every stage, including the first, adds a period.

  • Thinking the bits come out reversed. A delay line is first in, first out.

Practice Delay line

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Delay line is taught in Registers.