Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21592 Discussions

Writing text image to SRAM

Altera_Forum
Honored Contributor II
1,979 Views

Hi all, please I need your help with this issue,  

 

I save my image as text ( 256 * 256) gray scale, and I want to load it to SRAM before start modifying it, but I have no glue how , I meant to use VHDL with NIOS to be able to manage my image using pure VHDL.  

Thank you.
0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
1,270 Views

There is an option to initialize memory blocks with custom data. It should be fine if you need to modify your initial image seldom.You can create such memory initialization file with Quartus and when creating memory block guide the wizard to it.

0 Kudos
Altera_Forum
Honored Contributor II
1,270 Views

 

--- Quote Start ---  

There is an option to initialize memory blocks with custom data. It should be fine if you need to modify your initial image seldom.You can create such memory initialization file with Quartus and when creating memory block guide the wizard to it. 

--- Quote End ---  

 

 

Thank you for your reply Linas, do you mean the mif file ? If so , I already create it but I couldn't transfer it's contents to my SRAM DQ. Do you have any idea? 

Thanks again
0 Kudos
Altera_Forum
Honored Contributor II
1,270 Views

It works fine here. I use MegaWizard Plug-In Manager. When creating ROM IP I just select my mif file unter Parameter Settings / Mem Init / Browse and it does the rest.

0 Kudos
Altera_Forum
Honored Contributor II
1,270 Views

 

--- Quote Start ---  

It works fine here. I use MegaWizard Plug-In Manager. When creating ROM IP I just select my mif file unter Parameter Settings / Mem Init / Browse and it does the rest. 

--- Quote End ---  

 

 

I got this , thanks, but my issue is how to store these data in the SRAM? 

Regards
0 Kudos
Altera_Forum
Honored Contributor II
1,270 Views

Well, in this case you also need SRAM controller connected to the same bus as ROM is and then some bus master to copy all the data from ROM to SRAM. Either you write your own module to do that or use Nios.

0 Kudos
Altera_Forum
Honored Contributor II
1,270 Views

 

--- Quote Start ---  

Well, in this case you also need SRAM controller connected to the same bus as ROM is and then some bus master to copy all the data from ROM to SRAM. Either you write your own module to do that or use Nios. 

--- Quote End ---  

 

 

Thank you Linas for your efforts , I initialized the mif file but till now I don't get how to load M4K with mif file data.
0 Kudos
Altera_Forum
Honored Contributor II
1,270 Views

??? The memory megafunction ROM/RAM has already the contents of mif file after synthesis inside. At least it should. Or it isn't your case? Then you need open a ticket at Altera's support.

0 Kudos
Altera_Forum
Honored Contributor II
1,270 Views

There are further steps I am already searching for them. thanks

0 Kudos
Reply