Forum Discussion
Altera_Forum
Honored Contributor
15 years agoROM initialization
Hi, I need to initialize a ROM. I will probably use the Cyclone EP1C6 device. My questions are: 1. Is there a dedicated memory\way of declaration for ROM\RAM or can I just define it in my code in ...
Altera_Forum
Honored Contributor
15 years ago1. Yes. Which HDL are you using? There are coding guidelines in the quartus handbook - Volume 1 Section III chapter 10. But declaring a constant array is a simple way of doing it. You can even use a complex function to initialise the array.
2. If you use the megawizard, you can specify a .mif file. If you declare an array/constant like above, I think you can use attributes to specify the array to read. Annoyingly, Quartus only allows you to read .txt files in Verilog (I have asked for support in VHDL, but they havent been forthcoming yet).