Home / Learn Verilog / Delay Line

Delay Line

Delay a signal by N clocks.

Bottom lineDelay a signal by N clocks.

Breaking it down

DelayinFFFFFFout (3 clocks later)
Delay

What it is

A shift register of length N delays its input by N clock cycles.

Why it matters

Aligning signals in pipelines.

Mechanically speaking

sr <= {sr[N-2:0], in}; out = sr[N-1].

Shows up in

  • Everyday RTL design
  • FPGA and ASIC projects
  • Testbenches and debugging

Try it

3-clock delayVerilog: edit and run

The pulse appears 3 clocks later at out.

Check yourself

1. 3 flip-flops delay by...