Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16556 Discussions

use mif file to initialize mem

Altera_Forum
Honored Contributor II
1,368 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
412 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
412 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
412 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