cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Participant
Participant
1,611 Views
Registered: ‎09-26-2016

AXI CDMA in Scatter-Gather mode. Could some please explain it's purpose.

Jump to solution

Hi,

 

I started to implement AXI CDMA core into my design and would like to ask few questions. First of all, I went through a CDMA manual but I didn't understand everything. I understand how does a CDMA in a Simple mode work, but I don't understand the purpose of so called "scatter-gather" mode. Could someone please explain when is this feature good to use and what are the benefits compared to the normal (simple) mode?

 

In my case I would like to transfer data from FIFO (when a sufficient number of bytes is available, let say 1 kB) to the another AXI slave. New transfer over DMA should start as soon as new 1 kB of data is available in FIFO. Here, I would like to involve the CPU (Microblaze) as little as possible.

 

Thank you a lot.

Matic

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Scholar
Scholar
1,835 Views
Registered: ‎03-22-2016

Re: AXI CDMA in Scatter-Gather mode. Could some please explain it's purpose.

Jump to solution

@matic not necessarily. If they are both memory-like and they have defined addresses of blocks where you copy from/to then yes. But it depends on how these interfaces are supposed to be accessed.

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.

View solution in original post

0 Kudos
9 Replies
Highlighted
Scholar
Scholar
1,573 Views
Registered: ‎03-22-2016

Re: AXI CDMA in Scatter-Gather mode. Could some please explain it's purpose.

Jump to solution

@matic When you say "transfer to another AXI slave" I assume you want to transfer from FIFO to AXI MM-slave.

 

CDMA will not do what you want. CDMA will transfer from AXI MM to another AXI MM.

You need a component to move from AXI stream (fifo) to AXI memory address (slave). This is the AXI DMA. 

https://www.xilinx.com/support/documentation/ip_documentation/axi_dma/v7_1/pg021_axi_dma.pdf

 

Scatter gather is just programming several transfers in advance instead of just one. It is useful because the engine will always be working in the background. In single shot mode, there is a gap between the end of one transfer and configuring a new one and data might get dropped.

 

When you kick off a transfer it will start storing bytes as often as they come, unless you find a way to hold them in your component. I really see no reason why the DMA should hold on bytes waiting for them to accumulate instead of storing them right away.

 

Yes, no CPU work is involved in the process other than configuring the DMA and starting the engine.

 

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Highlighted
Participant
Participant
1,569 Views
Registered: ‎09-26-2016

Re: AXI CDMA in Scatter-Gather mode. Could some please explain it's purpose.

Jump to solution

@hbucherThank you for your reply.

 

Yes, the AXI slave is memory mapped slave.

 

In the previous design (without microblaze), I had implemented my own FIFO (not one from the IP catalog). Now, when I want to use (C)DMA, I thought to map an output port of my own FIFO as one addressed register in a customized AXI slave and do a DMA transaction between those two memory mapped AXI slaves.

 

If I understand you correctly, you suggest that I fill the "proper" AXI FIFO (from IP catalog) with my data and then do a transaction between that AXI FIFO and a destination AXI MM-slave in a stream manner (using DMA engine). Could you confirm this?

 

If that is true, I found out that there are several AXI FIFOs in the IP catalog. I see there "AXI-4 Stream FIFO" , "AXI-4 Stream Data FIFO" and "AXI Data FIFO". Which one should I use for that purpose?

 

Thank you again.

0 Kudos
Highlighted
Scholar
Scholar
1,565 Views
Registered: ‎03-22-2016

Re: AXI CDMA in Scatter-Gather mode. Could some please explain it's purpose.

Jump to solution

@matic No, I am not saying that. Even because I am having a hard time to understand what you are trying to accomplish.

I just said that if you have to send data to an AXI-stream interface, AXI CDMA is the wrong component.

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Highlighted
Participant
Participant
1,561 Views
Registered: ‎09-26-2016

Re: AXI CDMA in Scatter-Gather mode. Could some please explain it's purpose.

Jump to solution

@hbucher  I am reading data from the encoder, which is externally connected to the FPGA. This "reader" is a customized logic which is packaged into an IP block and connected to a Microblaze via AXI interface. Actually it is an AXI (full) MM-slave.

 

Here, Microblaze is used for data processing. But in some cases I want to transmit data directly to another IP (as fast as possible, without involving CPU). This another IP is also a customized IP and it serves for a communication to a PC. This IP is feeding data into FTDI chip which communicates to the PC via USB 2.0.

 

So, I would like to tranmit bytes which are constantly being read by my encoder reader to the other IP which is sending data over FTDI chip to the PC. I assume that I should have some kind of FIFO in between these two IPs and transmit data (bytes) from FIFO to the second IP (for output) via DMA.

 

Could you recommend something based on this description? Thank you

 

0 Kudos
Highlighted
Scholar
Scholar
1,554 Views
Registered: ‎03-22-2016

Re: AXI CDMA in Scatter-Gather mode. Could some please explain it's purpose.

Jump to solution

@matic Are those AXI or AXI-stream interfaces?

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Highlighted
Participant
Participant
1,550 Views
Registered: ‎09-26-2016

Re: AXI CDMA in Scatter-Gather mode. Could some please explain it's purpose.

Jump to solution

@hbucher

 

Both of them are AXI interfaces.

0 Kudos
Highlighted
Scholar
Scholar
1,543 Views
Registered: ‎03-22-2016

Re: AXI CDMA in Scatter-Gather mode. Could some please explain it's purpose.

Jump to solution

@matic then you need to have a processor dealing with these two interfaces. A fifo has streaming interfaces.

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Highlighted
Participant
Participant
1,541 Views
Registered: ‎09-26-2016

Re: AXI CDMA in Scatter-Gather mode. Could some please explain it's purpose.

Jump to solution

@hbucher

 

So, then I could use CDMA to transmit data between those two AXI MM-slaves. Am I correct?

 

I really appreciate your help.

0 Kudos
Highlighted
Scholar
Scholar
1,836 Views
Registered: ‎03-22-2016

Re: AXI CDMA in Scatter-Gather mode. Could some please explain it's purpose.

Jump to solution

@matic not necessarily. If they are both memory-like and they have defined addresses of blocks where you copy from/to then yes. But it depends on how these interfaces are supposed to be accessed.

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.

View solution in original post

0 Kudos