[Verilog Basics] Solving Traffic Light Problems with State Machines

1. Title description: Design two traffic lights with a state machine, the red light lasts for 30 clks, the green light lasts for 25 clks, and the yellow light lasts for 5 clks

Idea: counter plus state machine

  • 1. State combination
light1 light2 state state transition condition jump to
red(100) green(001) S0 The current state is S0, the count value cnt = 24 S1
red(100&

Guess you like

Origin blog.csdn.net/claylovetoo/article/details/131344243