Forum Discussion
Altera_Forum
Honored Contributor
14 years agoI would recommend something more along the lines of a FIFO. So you send the camera data into the FIFO and the DMA empties the FIFO. If the DMA is faster then the FIFO will hit empty and backpressure. Using a DMA supporting MM fixed address reads or streaming data should work. For example you can use the DMA (not the SGDMA) in SOPC Builder/Qsys to do this:
Camera interface (ST) --> (ST) FIFO (MM) --> (MM) DMA (MM) --> (MM) SDRAM If your camera interface is really simple you might be able to get away with just exporting the ST interface of the FIFO directly out of your Qsys system and connecting it directly to the I/O with a little bit of glue logic. PIOs are typically not a good choice for this sort of thing because you are either pulling in samples and you can't easily sample a PIO in a deterministic way, or they are susceptible to missing samples (when you don't poll fast enough). With a FIFO get both assuming you can empty the FIFO faster than you fill it.