Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17268 Discussions

use mif file to initialize mem

Altera_Forum
Honored Contributor II
1,855 Views

Are there any tutorial about how to create a mif file via file->new->mif from the tool bar? For example, If I need to initialize RAM/ROM with  

addr value 

0 00 

1 01 

2 11 

3 10 

how should I choose the number of words and word size and fill in numbers? Thanks.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
899 Views

a mif is just a text file, you can create it with any editor you like. 

As for the file format, if you go into the Quartus help menu, click search and type "mif", the first result is a description of the format, with an example.
0 Kudos
Altera_Forum
Honored Contributor II
899 Views

lpm_ram_dq is used to create a RAM. Is there a similar way to create a ROM?

0 Kudos
Altera_Forum
Honored Contributor II
899 Views

I don't know if there is a LPM ROM primitive, but if you just use the RAM primitive and connect the write signal to always 0, you get a ROM.

0 Kudos
Reply