Multi Channel DMA Intel® FPGA IP for PCI Express User Guide

ID 683821
Date 10/29/2021
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

8.3.3.1. Device Management

IP Reset

IP reset is performed through the sysfs attribute file mcdma_ipreset. Following command performs the IP reset:
echo 1 > /sys/bus/pci/devices/<bdf>/mcdma_ipreset

Open

When the userspace application calls the open system call on the char dev node, kernel module checks and allocates an available channel to that application and stores the channel context in a private area of the file descriptor context, and the file descriptor is returned. The same file descriptor is used for further channel-specific operations.

Close

Once all the DMA transactions are completed, you must close the file allocated during opening of the device. As part of this, kernel retrieves the channel context associated to that device and frees the same to device.

Figure 41. Open/Close

Read & Write

When the userspace application wants to perform DMA, it is needed to call standard read/write system calls by providing the pre-allocated DMA memory acquired from the libmcmem library. The application must provide the physical starting address of the buffer. The kernel module converts the DMA buffer into a Hardware specified descriptor and submits it.

Figure 42. Read/Write

Readv & Writev

Readv & writev system calls are used to submit DMA requests in batches.