Implementing the candy-lock FSM in VHDL