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
464 stars 227 forks source link

random wrong frame when applications Increasing on linux #100

Open yaoyongtong opened 5 years ago

yaoyongtong commented 5 years ago

hello, I use the driver to transfer frame data as the path: camera--vido in to axi4stream ip--dma--ps.ddr,the frame size is 480*360, the fifo depth of vido in to axi4stream ip is 32. I use petalinux complie the driver, and process the frame data on linux.

1.do not process the data with 10 frame buffers,transfer out through eth ,show in opencv , it is fine and real time。 2.10 frame buffers, transfer the frame to my application, then transfer out through eth ,show in opencv ,it will be random wrong frame: when it is wrong, the hole frame my increase 36 pixels, the first 4 comes from dma.tready, after 4 vidointoaxi4streamip.tvalid clks, dma.tready pull down, when the next frame come, dma continues get the 32 fifo data in vidointoaxi4streamip and the coming frame(480*360), so dma almost miss1 frame .

I think dma doesn't get rx instruction when wrong frame ,but how and why ?

yaoyongtong commented 5 years ago

Im sure dma just needs receive frame to 10 buffer, when my app need new frame ,the frame will be copy to a new space (may cost 2 us). 10 buffers and the new space are completely independent and undisturbed.

Im confused.