Forum Discussion
Altera_Forum
Honored Contributor
18 years agoLPM rom
hi, im new in quartus and vhdl. im trying to use the rom from the megafunction for my project. can i store real number in the rom? or it has to be hex? if it has to be hex, is it hav to be the ieee h...
Altera_Forum
Honored Contributor
18 years ago --- Quote Start --- thank you very much. but how do you create hex file with decimal number? i mean if hex i just do like: :03800000028100FA but if using decimal how? and if using decimal so the output of the rom shd be declared as integer? sorry for the trouble.... --- Quote End --- .mif and .hex are simply different file formats used to store the initialization data. A mif file looks like this WIDTH=8; DEPTH=256; ADDRESS_RADIX=UNS; DATA_RADIX=UNS; CONTENT BEGIN 0 : 100; 1 : 101; 2 : 0102; [3..255] : 0; END; You can see the Address and data radix are set to UNS (Unsigned). This can be changed to HEX/Decimal etc. To make one of these Use the Quartus File menu->New->Other Files->Memory Initialization File and follow the prompts to build the size you want You can change the radix by right clicking on the data columns of the editor. You can also manually edit the generated mif file with text editors etc Hope this helps Vern