Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises
1175 Discussions

Need Help Writing to SRAM

Altera_Forum
Honored Contributor II
1,140 Views

I am working on a project that is going to be an interface between a custom digital imager and a computer monitor. I have my whole set up done in the SOPC builder and some other VHDL code written to control outputs for controlling the imager.  

 

The problem I am facing now is how to save the image data in memory? The incoming image is 60x80 pixels and I just need to save it in the SRAM memory with the initial address of 0x00080000 and the system I built in the SOPC builder should take care of the rest. The incoming pixel data will be 14 bits in size (output of a 14-bit A to D converter). I have no experience with writing to memory so if someone could help me out that would be awesome!!  

 

Thanks ahead of time!! 

 

Greg
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
414 Views

If you can format the incoming data as an Avalon Stream, then you could use a DMA component (such as Altera's SGDMA) to write the image to memory.

0 Kudos
Altera_Forum
Honored Contributor II
414 Views

How do I do that? I am a rookie at this stuff and the only way I have been able to do what I have done is by following a demo and reading a textbook...

0 Kudos
Altera_Forum
Honored Contributor II
414 Views

You can read about the Avalon Stream specification in this document (http://www.altera.com/literature/manual/mnl_avalon_spec.pdf) (chapter 5) and the Altera SGDMA in this document (http://www.altera.com/literature/ug/ug_embedded_ip.pdf) (chapter 25). 

To connect your custom interface with the SGDMA in SOPC builder you will have to create a custom component. You can have a look at this document (http://www.altera.com/literature/ug/ug_sopc_builder.pdf) (chapter 6) about SOPC builder's component creator.
0 Kudos
Altera_Forum
Honored Contributor II
414 Views

Ok I'll take a look at it. Thanks for the help.

0 Kudos
Reply