If you have a memory megafunction that was generated by the MegaWizard™ Plug-In Manager, you can change the RAM block type or other RAM parameters without re-running the wizard by using the set_parameter command in your Quartus® II Settings File (.qsf). This allows different instances of the memory megafunction to use different RAM block types or other settings.
For example, to change the RAM block type to MLAB, use the following command in your .qsf:
set_parameter -name ram_block_type MLAB -to "altera_tse_sdpm_altsyncram:U_RAM|altsyncram:altsyncram_component"
The Quartus II software implements this memory in MLAB during the next compilation.