Home / Learn Verilog / Sequence Detector (1011)

Sequence Detector (1011)

Detect a bit pattern in a serial stream.

The short versionDetect a bit pattern in a serial stream.

Theory in plain words

Detect 10111011/hitS0S1S10S101
Detect 1011

What it is

The FSM remembers how much of the pattern it has seen.

Why it matters

Protocol headers, preamble detection.

Mechanically speaking

One state per matched prefix.

Shows up in

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

Try it

1011 detector with overlapVerilog: edit and run

Overlapping patterns (1011011) are found.

Check yourself

1. Sequence detector FSM remembers...