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

Camera writing images to SDRAM, and needs to output to VGA monitor real time

Altera_Forum
Honored Contributor II
1,508 Views

Basically we store the images (around 15 fps from the camera) in a memory (32 MB SDRAM in my case, i cant use the SRAM since its only small like 32 to 64 k bytes and its not enough to store the 640 by 480 YUV image). Now in order for the VGA to display the images, it needs to access the SDRAM. But that means the VGA will be using the SDRAM all the time (we can no longer perform writing new frames from ov7670 towardss the SDRAM, since we cant afford to miss every VGA reads since it will cause "tearing" . 

1.) How can we solve that issue / sdram contention? 

2.) Um the vga , when it requests for the pixel values, the values needs to be there immediately. The problem is we are using SDRAM and in order to read a value from a given address, itt akes around a few clock cycles or latency I am afraid it will be complicated 

 

 

Board : DE0-Nano altera cyclone IV
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
711 Views

 

--- Quote Start ---  

 

1.) How can we solve that issue / sdram contention? 

 

--- Quote End ---  

 

You need to add arbitration logic. If you are using Qsys/SOPC Builder, it will do this automatically for you; otherwise, write it yourself. 

 

 

--- Quote Start ---  

 

2.) Um the vga , when it requests for the pixel values, the values needs to be there immediately. The problem is we are using SDRAM and in order to read a value from a given address, itt akes around a few clock cycles or latency I am afraid it will be complicated 

 

--- Quote End ---  

 

 

You need to add an appropriately sized buffer (FIFO) to both your camera writing and VGA reading components [or elsewhere in the design]. You need to efficiently write/read the SDRAM using burst transactions. 

An underrun condition on the VGA (or an overrun condition on the camera) is a critical problem and you should be sure to have status bits to indicate the condition has occurred.
0 Kudos
Reply