DMA not working as expected on PYNQ

I am using PYNQ v3.0.1 on ZCU104 to test my HLS IP. I have exported my IP and created block design in Vivado, generated the bitstream. I have written the following python code to test my IP.
I want to invoke DMA multiple times, so I kept the DMAsendchannel and DMArecvchannel in a loop.
I want to send 19096 samples each of 32 bit (integer)to my IP using MM2S and receive 14 samples each of 64 bit (double) using S2MM. I am getting the first iteration output correctly but the successive iterations results are not correct. Please help me find out the problem.

DMA customization and Python Notebook

Please help me understand the issue and possible solutions to fix that.

1 Like

For your IP that generates the 14 samples you want to read back, does it generate TLAST at the end of each set of 14 samples?

You can use Register Map to check the status of the DMA. Video example showing how to use it:

Even though the 14 samples have been transferred, the DAM status will not show as idle (and ready for the next transaction) if your IP does not generate TLAST.

You can find lost of questions on this forum about TLAST.



Yes, In my HLS code I have generated TLAST signal at the end I received my 14th sample. So I managed TLAST signal in my HLS code. I used register map in my code an checked the ip registers status. The IP register status (DMA status also) showing idle after every iteration.

1 Like

OK, sorry, I misunderstood your question.

Just to be clear, can you keep sending (19096) and receiving (14 samples) continuously in a loop?
Is the problem that the results are only correct for the first iteration, and incorrect for subsequent iterations?
Can you share what data you receive? i.e. is it random, or some fixed value or zeros?