Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
告知
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.
21616 ディスカッション

Writing text image to SRAM

Altera_Forum
名誉コントリビューター II
2,039件の閲覧回数

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 件の賞賛
8 返答(返信)
Altera_Forum
名誉コントリビューター II
1,330件の閲覧回数

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.

Altera_Forum
名誉コントリビューター II
1,330件の閲覧回数

 

--- 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
Altera_Forum
名誉コントリビューター II
1,330件の閲覧回数

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.

Altera_Forum
名誉コントリビューター II
1,330件の閲覧回数

 

--- 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
Altera_Forum
名誉コントリビューター II
1,330件の閲覧回数

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.

Altera_Forum
名誉コントリビューター II
1,330件の閲覧回数

 

--- 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.
Altera_Forum
名誉コントリビューター II
1,330件の閲覧回数

??? 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.

Altera_Forum
名誉コントリビューター II
1,330件の閲覧回数

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

返信