bperez77 / xilinx_axidma

A zero-copy Linux driver and a userspace interface library for Xilinx's AXI DMA and VDMA IP blocks. These serve as bridges for communication between the processing system and FPGA programmable logic fabric, through one of the DMA ports on the Zynq processing system. Distributed under the MIT License.
MIT License
474 stars 230 forks source link

Howto setup continuous DMA transfers? #143

Open dayanola opened 2 years ago

dayanola commented 2 years ago

I would like my application to setup non-stop continuous DMA transfers until the user hits "CTRL-C" Target is to capture data all the time and run for a unknown period of time. Since the time the application should run is unknown, break the DMA transfers to managable chunks of 1 MB That is:

  1. setup 2 DMA transfers of 1 MB
  2. once the first DMA transfer is completed , setup a third transfer of 1 MB
  3. Keep submitting a new request on completion callback

System setup:

  1. 2 RX DMA channels from FPGA to APU
  2. oneway DMA transfers work on both AXI DMA channels.

How would I setup onway transfers to achieve this?

ccasas777 commented 2 years ago

If I don't miss your question, you can create a thread to do a while loop of oneway transfer. notice: if you set the last flag of the RX oneway transfer API: True, you would never need the callback function