FX3/CX3 DMA Overview

来源:互联网 发布:吃鸡启动项优化 编辑:程序博客网 时间:2024/06/06 00:43

. DMA Socket - A DMA socket is a FX3 device construct that maps to one end of a data path into or out of the device
. DMA Buffer - A DMA buffer is a memory buffer in the FX3 system memory that is assigned to hold one or more packets of data in a data flow.
. DMA Descriptor - A DMA descriptor is a data structure that binds the buffers and sockets corresponding to a data flow.

A typical DMA transaction between two blocks involve:
. 2 Sockets – a Producer and a Consumer
. One or more buffers
. One or more descriptors
A Typical DMA Transaction
Producer:
1.Gets DMA descriptor
2.Fills the buffer with data
3.Updates the DMA descriptor
4.Notifies the Consumer socket

Consumer:
1.Gets DMA descriptor
2.Removes the data from the buffer
3.Updates the DMA descriptor
4.Notifies the Producer socket
DMA Channel and Manager

. DMA Channel - A DMA channel is a software construct that encapsulates all of the hardware elements that are used in a single data flow

. The DMA manager in the firmware library provides functions to create, configure, control and operate DMA channels within the FX3 device.

. The DMA manager allow the user application to create data flows between any pair of interfaces, to configure its behavior and to steer or monitor the actual flow of data packets on this path.
Types of DMA Channel
AUTO CHANNEL
Completes data transfer in the hardware without any firmware intervention

AUTO SIGNAL CHANNEL
Similar to the auto channel
The only difference is that whenever a buffer is generated by the producer the firmware gets notified via a registered callback
This mode is useful when the incoming data needs to be tracked
There is no guarantee that data is retained in system memory as the DMA operation progresses
MANUAL CHANNEL
A manual channel is a form of DMA where the data transfer happens with firmware intervention.
The user receives notification via callback and the data will remain in the buffer until the user explicitly invokes a commit or discard of the buffer.

MANUAL IN CHANNEL
A manual IN channel is a type of manual channel where there is only valid producer socket and the consumer is CPU
This is used when the CPU needs to receive data from one of the sockets

MANUAL OUT CHANNEL
A manual OUT channel is a type of manual channel where there is only valid consumer socket and the producer is CPU
This is used when the CPU needs to send data on one of the sockets. The data is loaded by the CPU and committed for transmission by the consumer

原创粉丝点击