It seems to work, well, almost. First error I see is that you do not drive axis_tready
. Per the AXI-Stream specification, a data-beat is valid only if both axis_tready
and axis_tvalid
are '1'. The AXI DMA drives axis_tvalid
as expected, but do not complete the transfer of 4 dwords since axis_tready
is not driven. However, the general transfer seems to work as expected.
I would bet that you have a cache problem. When initialize_parameters
is executed, it writes the data to the cache, and if you start the DMA transfer before the cache is flushed to DDR, you won't read what you wrote, but what was is still in the DDR. I don't have much experience with the Zynq and it's extensive cache system, so you have to figure out yourself how to flush the cache properly. The functions you seek are the flush functions from "xil_cache_l.h", on microblaze I would use Xil_DCacheFlushRange(SrcAddress, 4*4)
. Looking at the code, it seems to flush L1 and L2 caches on Zynq, so it's probably all you need. If it doesn't work, try writing a megabyte of data, you will be sure the first 4 dwords are flushed that way.
Since you have the ILA for the AXI bus, you should be able to verify if there is a write transaction at address SrcAddress
, if there is not before the AXI dma transaction you will know this is a cache issue.
On a side note, when you read using the AXI-DMA, you should do a cache invalidate before reading from the DDR. Otherwise, if you read at SrcAddress
, start the DMA Transfer and read again at ScrAddress
, you will read the old value still in cache.
Best Answer
Found an answer here:
http://forums.xilinx.com/t5/Embedded-Development-Tools/problem-in-passing-floating-point-values-to-custom-ip/m-p/590261#M35926
And as an answer needs to have 30 characters I'll write some blablablaa