LED Blinker Process

Easy VHDL FSM
Solve this problem

Write a VHDL process that toggles an LED every N clock cycles. The counter must be generic and synchronous.

Constraints

  • Generic CNT_MAX.
  • Reset clears LED.
  • Toggle when counter reaches CNT_MAX.
  • Count increments each rising edge.
Starter codeVHDL
1entity blink is2  generic(CNT_MAX : integer := 5);3  Port ( clk: in std_logic;4         rst: in std_logic;5         led: out std_logic);6end blink;