I’m using PYNQ-Z2 board and trying to transfer data using DMA. I’m interested in calculating the total time taken for the data send and receive. Below is the snippet of my code
start = time.time() dma_fifo.sendchannel.transfer(input_buffer) dma_fifo.recvchannel.transfer(output_buffer) dma_fifo.sendchannel.wait() dma_fifo.recvchannel.wait() end = time.time() total_time = end-start print(total_time)
But every time I run this, the total_time value for the same set of data keeps varying.
Why and how’s this happening? Is there some mistake in my approach in calculating the time taken for the data transfer? Or is there any better way to calculate time taken? Kindly help.