Memory code vhdl