cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Voyager
Voyager
140 Views
Registered: ‎05-14-2017

Reading contiguous 64 MB from AXI DMA direct mode (2019.2) [2]

Hello,

I am trying to continously read data from AXI DMA in direct mode (S2MM channel), but I notice that the received data I read from PS is corrupted.

The block design part is the following:

Screenshot_2020-02-17_12-28-11.png

where the AxiStreamCounter IP is a custom Master AXI4-Stream counter that I am using to test data streaming. It can issue a TLAST every N clock cycles I can set using a parameter variable: so if data is 32 bits long and I want to send 64 MB to the AXI DMA, I set TLAST to 16777216. If I want to stream 8 MB of data I set TLAST to 2097152 and so on...

The whole PL logic is running @12 MHz.

The DMA is configured as follows:

Screenshot_2020-02-17_12-30-02.png

On Linux side, RAM is limited from device-tree configuration as follows:

memory {
        device_type = "memory";
        reg = <0x0 0x0 0x0 0x70000000>;
    };

so from 2GB of hardware RAM available on board, linux only sees 1.75 GB of it.

The problem is that my design works fine if I stram 8 MB, but if I stream 64 MB of data, after the first TLAST I read garbage. Here is a screeshot of the dump after the first 16777216 32 bits values (64 MB):

Screenshot_2020-02-17_13-14-46.png

At line 16777214 value read is 0x00ffffff and succesive read is 0x01fffffc, but this latter should be 0x1000000.

From PS software I can see that the S2MM_LENGTH after each transfer is set to 0x3ffffff (26 bits) which is OK, but I also can detect DMASlvErr,DMADecErr and Err_Irq.

What could be the issue that make the design working fine for 8 MB streaming, but not for 64 MB of data ?

Thanks.

s.

0 Kudos
1 Reply
Highlighted
Voyager
Voyager
75 Views
Registered: ‎05-14-2017

Re: Reading contiguous 64 MB from AXI DMA direct mode (2019.2) [2]

Update: from userspace application I notice that after the first read the S2MM_LENGTH is always 3fffff0 instead of 3ffffff...

I can dump continous data from the first chunk only because then the dma hangs if I don't enable irq of errors.

The key point is that I always read an S2MM_LENGTH less than 3ffffff bytes after thr first read. This is causing problems of course.

This never happens with 8 MB packets..

s.

0 Kudos