Forum Discussion
Altera_Forum
Honored Contributor
12 years agoUsing the park mode is tricky because if you are not careful you may end up with a race condition when switching to another descriptor list. I don't have an example of it but if you look at the example designs for the NEEK that use the LCD you will see the video framebuffering getting parked so that the same frame can be re-used. Essentially the way it works is you create a linked list that loops back on itself and by setting the park bit the SGDMA doesn't flip the owned by hardware bit low when it consumes the descriptors. Due to that and the descriptor linked list loopback the SGDMA hits the end of the list, loops back to the start, and reuses the descriptors.
If you want to see a simpler implementation take a look at the DMA engine that I posted to the wiki: http://www.alterawiki.com/wiki/modular_sgdma Parking is a simple as turning on a bit in a descriptor so that the engine keeps using it until you provide a new descriptor. You also don't need to chain a bunch of descriptors together to get a large transfer size, this DMA engine can move up to 4GB if you setup the hardware accordingly. An example of how to use the feature for video buffering purposes is shown here: http://www.alterawiki.com/wiki/modular_sgdma_video_frame_buffer