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
466 stars 230 forks source link

Double buffering lockdown #88

Open cipih opened 5 years ago

cipih commented 5 years ago

Hi, In my design I need to do large transfers from a costum IP to USB over the DMA, because of the design constraints and several other reasons I can only transfer smaller chunks, there for I need to do multiple DMA transfers consecutively. In order to have better performance I use 2 buffers allocated to the DMA (using axidma_malloc) and I preload buffer1 with the desired data (using axidma_oneway_transfer) after I get the done signal, I start loading buffer2(using axidma_oneway_transfer) while trying to send buffer1 over the USB(using write). Unfortunately when I try to write to the USB fd from buffer1 I get an error that buffer1 is currently being used by the DMA although I'm writing in buffer2 (using axidma_oneway_transfer). Do you have any suggestion on how I could solve this problem or implement a double buffering system using your axidma driver. Thanks, Cipi

samberhanu commented 3 years ago

Did you come across a solution to your problem with this specific driver?