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

One port ram question

Hi all, my project currently will use multiple memory block with some initial data. If I try to use on chip memory such as on port ram, and I generate the memory block through the wizard. I known I need to create a mif file for each memory. But how can I link each mif file to the corresponding memory. By creating new on chip memory for each mif file? or I can write the new architecture in the memory file i get from wizard? 

 

Thanks.
0 Kudos
3 Replies
Highlighted
Valued Contributor III

Re: One port ram question

When you generate the ram from the wizard, you can specify the .mif file to use for initialisation. 

You only need a .mif file if you need the ram to be filled when the power is turned on. .mif file is not required if you intend to fill the ram yourself during run time.
0 Kudos
Highlighted
Valued Contributor III

Re: One port ram question

Thanks for the help. 

 

If I need 100 memories with same kind of memory block but with different mif files, how can I do that? 

 

I will have 100 mif files: m1_data.mif to m100_data.mif 

 

But I want to link these files to the mem.vhd which I got from wizard, so I need to generate 100 .vhd files for each .mif file, is that right?  

 

Or there is another way to do it?
0 Kudos
Highlighted
Valued Contributor III

Re: One port ram question

Yes. You can instantiate the rams yourself, and you could instantiate them inside a generate loop and generate the .mif string for each ram 

or you can infer the ram and use attributes to specify the .mif file to use, but that wont work in simulation. But you can use a function to initialise the ram yourself.
0 Kudos