Forum Discussion
Altera_Forum
Honored Contributor
17 years agoA Megawizard generated RAM module can be instantiated as often as you like, up to the RAM capacity. By creating the module through Megawizard, the designfile is automaticly added to your project. Also a file with component definition for the module and an instantiation template file are created. You only need to copy the content of the two files to the design file, that shall use the RAM.
You will notice, that you may skip one level and instantiate altsyncram directly in your design. You can use the code from the Megawizard generated file as a template. This would allow to have modified copies of the original RAM module without using the Megawizard, or e. g. parameterizable modules that directly derive altsyncram instance parameters from module parameters. Alternatively, you can "infer" RAM directly from HDL code, without explicitely instantiating altsyncram. Quartus II software manual has examples how to in Quartus integrated synthesis chapter. But this technique doesn't work for all RAM types, e. g. for dualport RAM, you need altsyncram.