Create+ROM+HowTo

Create a ROM with the MegaWizard Plug-In Manager

Open the Mega Wizard from the tools menu:

Configure Data width and memory size

Uncheck the 'q' output port

Specify the memory content file

And press Finish!

Now Instantiate the ROM in your code and pin map it: code format="vhdl" SinusoidROM_1 : entity work.SinusoidROM port map (     address => RomAddress,      clock   => AudioClk12MHz,      q       => Waveform);

code

-And you are done!

Note the waveform diagram:

New data is latched at each rising clock edge. Note that the address must be valid and stable before the rising clock edge. The Quartus timing analyzer will warn you if this is not the case.