Sequence Detector FSM
📖 Scenario: You are designing a digital circuit that detects a specific sequence of bits on an input signal. This is useful in communication systems where certain patterns trigger actions.
🎯 Goal: Build a finite state machine (FSM) in Verilog that detects the sequence 1011 on a serial input in_bit. The FSM should output 1 on out_seq when the sequence is detected, otherwise 0.
📋 What You'll Learn
Create a Verilog module named
seq_detector with inputs clk, reset, and in_bit, and output out_seq.Define states to track progress through the sequence
1011.Use a synchronous reset to return to the initial state.
Output
out_seq = 1 for one clock cycle when the full sequence is detected.Use a case statement inside an always block triggered on the rising edge of
clk.💡 Why This Matters
🌍 Real World
Sequence detectors are used in communication protocols to identify control sequences or flags in data streams.
💼 Career
Understanding FSM design in Verilog is essential for hardware engineers working on digital design, FPGA programming, and ASIC development.
Progress0 / 4 steps