Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
959 Views

use mif file to initialize mem

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
Highlighted
Valued Contributor III
3 Views

Re: use mif file to initialize mem

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
Highlighted
Valued Contributor III
3 Views

Re: use mif file to initialize mem

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

0 Kudos
Highlighted
Valued Contributor III
3 Views

Re: use mif file to initialize mem

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