Mealy vhdl code