--- Quote Start ---
Thanks mirimon.
I have found the stuff i need in the pdf. Why does "the lpm rom/ram functions are not to be used any more" ? Any disadvantage or inconvenience?
--- Quote End ---
hapyang,
In Quartus II MegaWizard plug-in Manager, Memory compiler section, choose the memory type you want to implement. The .v or .vhdl file written out will show you what function is instantiated - lpm or alt function. Quartus II takes care of it for you.
lpm rom/ram functions are not an inconvenience but those are legacy functions for older generation device families.
For further reading, you may want to look into
1)
http://www.altera.com/literature/ug/ug_memrom.pdf 2)
www.altera.com/literature/ug/ug_ram.pdf