Well
First of all you should know the architecture of memory. You've got to be familiar with concept of I/O of the memory such as input data, address, output data and etc.
In simple word, Memory is a collection of registers, which can hold the required data and is able to transfer data IN and OUT of itself.
But for better understanding You need to search on the web to realize these concepts.
Then, you are will be able to encounter HDLs (like VHDL) and write code for your project.
This can be a good point to start
**broken link removed**