Forum Discussion
Altera_Forum
Honored Contributor
18 years agoInferring a ROM
Has anyone used a HEX (Intel format) file to infer a ROM? I'd like to build a look-up table for waveform generation using a 32768 x 16 ROM and would prefer not to type in all of the values manually....
Altera_Forum
Honored Contributor
18 years agoWhat's the nature of the values being stored by the ROM? Are they random or do they fall naturally from some simple formula? You can always write a script to save you the typing. I avoid using MIF/HEX files unless I need to update my memory contents without recompiling the design. Instead, I describe the RAM and initial contents purely in HDL. Quartus II will infer initial contents from the HDL source, e.g.
signal rom : my_rom_t := initialize_rom();
Look at the Verilog and VHDL templates in the Quartus II GUI for more examples.