Finite state machine code example. Q : set of all states.

Finite state machine code example. State Definitions in FSM Diagram and VHDL .