UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor rnelsonee1
Visitor
2,072 Views
Registered: ‎03-30-2017

Reading more than 4 bytes from DMA - possible with SimplePollExample?

Jump to solution

Hello all,

I am trying to stream data from a Custom IP, right now it's just a counter running at 8MHz, to a FIFO, to DMA. This is an image of the design. But the DMA and FIFO only ask (TREADY/WREADY) for data about 0.2 MHz. I'm sure it's because my code is only getting 4 bytes at a time from DMA, so even in a simple loop it's not fast enough.

 

My question is hopefully an easy one: with something like  

XAxiDma_SimpleTransfer(&AxiDma,(u32) RxBufferPtr, MAX_PKT_LEN, XAXIDMA_DEVICE_TO_DMA);

I should be able to have an array of size MAX_PKT_LEN ready to use (I'm just trying to send this out via UDP as fast as possible)? I'd imagine a pointer should be available to point to a 'set' of contiguous memory, correct? I only get 4 bytes from the above function.

 

I'm using a fairly simple program found online using XAxiDma_SimplePollExample(). In that program, it reads the first 1024 bytes just fine, and then actually the next 4 bytes, but then it starts 'dropping' data as my Custom IP keeps on going (I have the TREADY flag ignored for testing). The program output is here where you see it start to skip. And here are the DMA settings and here are the FIFO settings.

 

Thank you to anyone who can help! I've been at this for over a week and it's got to be a 2-minute fix I'm sure! I appreciate *any* help, I'm very new at all this. 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor rnelsonee1
Visitor
3,691 Views
Registered: ‎03-30-2017

Re: Reading more than 4 bytes from DMA - possible with SimplePollExample?

Jump to solution

To anyone that sees this in the future:

 

My issue was with TLAST. I had it high, and my Custom IP sent out 4 bytes at a time. This limited the DMA to only give out 4 bytes at a time. By only asserting TLAST once every N bytes (you can't keep it at 0, despite the AXI-S spec saying it's optional) the DMA will read back N bytes.

 

This thread links to a custom IP you can use to generate TLAST for you which sits between the FIFO and the DMA so your Custom IP doesn't need to do it.

0 Kudos
2 Replies
Visitor rnelsonee1
Visitor
2,024 Views
Registered: ‎03-30-2017

Re: Reading more than 4 bytes from DMA - possible with SimplePollExample?

Jump to solution
I crossposted this in a Digilent forum thread (I have a Microblaze processor) and should mention I've enabled Unaligned Transfers in the DMA and the problem persists. Thanks!
0 Kudos
Highlighted
Visitor rnelsonee1
Visitor
3,692 Views
Registered: ‎03-30-2017

Re: Reading more than 4 bytes from DMA - possible with SimplePollExample?

Jump to solution

To anyone that sees this in the future:

 

My issue was with TLAST. I had it high, and my Custom IP sent out 4 bytes at a time. This limited the DMA to only give out 4 bytes at a time. By only asserting TLAST once every N bytes (you can't keep it at 0, despite the AXI-S spec saying it's optional) the DMA will read back N bytes.

 

This thread links to a custom IP you can use to generate TLAST for you which sits between the FIFO and the DMA so your Custom IP doesn't need to do it.

0 Kudos