Three-block FSM coding style
📖 Scenario: You are designing a simple traffic light controller using a three-block FSM style in Verilog. The traffic light cycles through three states: Green, Yellow, and Red. Each state lasts for a fixed number of clock cycles.
🎯 Goal: Build a three-block FSM in Verilog with separate blocks for state register, next state logic, and output logic to control the traffic light signals.
📋 What You'll Learn
Create a state register block with a clock and reset
Create a combinational block for next state logic using
case statementCreate a combinational block for output logic based on current state
Use three states:
GREEN, YELLOW, and REDPrint the current state name in the final output step
💡 Why This Matters
🌍 Real World
Traffic light controllers use FSMs to manage light changes safely and predictably.
💼 Career
Understanding three-block FSM style is essential for hardware design engineers working with digital circuits and FPGA/ASIC development.
Progress0 / 4 steps