cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nkelly
Visitor
Visitor
920 Views
Registered: ‎06-19-2018

Scatter-Gather DMA: no of tlast's per transfer?

Jump to solution

Hi,

I'm using the axi dma core (v 7.1) on a ZynqMP to transfer a large amount of data from PL to PS memory. The data size is greater than the 2^26 byte maximum supported by the ip core so I am using scatter-gather mode. My question is how to manage the "tlast" input to the DMA core in SG mode. Should tlast be asserted only once, at the very end of the transfer to mark the final data sample? Or should it be asserted multiple times during the transfer, once for each scatter-gather descriptor?

Thanks for your help!

0 Kudos
1 Solution

Accepted Solutions
calebd
Moderator
Moderator
869 Views
Registered: ‎01-09-2019

Hello @nkelly 

Looking at PG021 (https://www.xilinx.com/support/documentation/ip_documentation/axi_dma/v7_1/pg021_axi_dma.pdf) page 63 we see the following:

nkelly-Scatter_Gather_DMA_no_of_tlasts_per_transfer.PNG

That states that tlast is the indicator for the end of your transfer.  If you want to send it all as one singular transfer then you would assert TLAST only once at the end of your data, but you could chop the entire data transfer into a more manageable load with multiple TLASTs.

Of note one of the requirements is that the entire transfer cannot be larger than 26 bits wide so if you are transferring >2^26 bytes then you will need to separate the transfers so that all the data will be transferred.  This would need to be handled accordingly in software, and so would need to be properly thought through.  Look at page 46 for the note about maximum transfer size for an S2MM transfer in SG mode (the same limitation applies to MM2S in SG mode)

There is also the EOF bit which will determine the change between packets, but the TLAST assertion is a new transfer.  A packet can contain multiple BDs and so a transfer can include multiple packets therefore having multiple BDs.

Thanks,

Caleb


------------------------------------------------------------------------------------------------

Don’t forget to reply, kudo, and accept as solution.

If starting with Versal take a look at our Versal Design Process Hub and our
Versal Blogs

------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
calebd
Moderator
Moderator
870 Views
Registered: ‎01-09-2019

Hello @nkelly 

Looking at PG021 (https://www.xilinx.com/support/documentation/ip_documentation/axi_dma/v7_1/pg021_axi_dma.pdf) page 63 we see the following:

nkelly-Scatter_Gather_DMA_no_of_tlasts_per_transfer.PNG

That states that tlast is the indicator for the end of your transfer.  If you want to send it all as one singular transfer then you would assert TLAST only once at the end of your data, but you could chop the entire data transfer into a more manageable load with multiple TLASTs.

Of note one of the requirements is that the entire transfer cannot be larger than 26 bits wide so if you are transferring >2^26 bytes then you will need to separate the transfers so that all the data will be transferred.  This would need to be handled accordingly in software, and so would need to be properly thought through.  Look at page 46 for the note about maximum transfer size for an S2MM transfer in SG mode (the same limitation applies to MM2S in SG mode)

There is also the EOF bit which will determine the change between packets, but the TLAST assertion is a new transfer.  A packet can contain multiple BDs and so a transfer can include multiple packets therefore having multiple BDs.

Thanks,

Caleb


------------------------------------------------------------------------------------------------

Don’t forget to reply, kudo, and accept as solution.

If starting with Versal take a look at our Versal Design Process Hub and our
Versal Blogs

------------------------------------------------------------------------------------------------

View solution in original post

nkelly
Visitor
Visitor
850 Views
Registered: ‎06-19-2018

Hi calebd,

Thanks for your reply. So in SG mode TLAST does not need to be asserted for each BD. It need only be asserted once, at the end of the full transfer.  

Thanks again.

0 Kudos