| mcdma Vitis Drivers API Documentation

- Overview
- APIs
- File List

Functions
xmcdma_polled_example.c File Reference

## Overview

This file demonstrates how to use the mcdma driver on the Xilinx AXI MCDMA core (AXI MCDMA) to transfer packets in polling mode.

This examples shows how to do multiple packets and multiple BD's per packet transfers.

H/W Requirements: In order to test this example at the h/w level AXI MCDMA MM2S should be connected to the S2MM channel.

System level considerations for Zynq UltraScale+ designs: On ZU+ MPSOC for PL IP's 3 different ports are available HP, HPC and ACP.

The explanation below talks about HPC and HP port.

HPC design considerations: ZU+ MPSOC has in-built cache coherent interconnect(CCI) to take care of Coherency through HPC port. CCI is only support at EL1 NS level. Following needs to be done by the system components before running the example- 1) Snooping should be enabled in the S3 (0xFD6E4000) 2) Mark the DDR memory being used for buffers as outer-shareable. translation_table.S. .set Memory, 0x405 | (2 << 8) | (0x0).

It is recommended to use HPC to make use of H/W coherency feature.

HP design considerations: The example uses un-cached memory for buffer descriptors and uses Normal memory for buffers..

    MODIFICATION HISTORY:

    Ver   Who  Date       Changes
    ----- ---- --------   -------------------------------------------------------
    1.0      adk  18/07/2017 Initial Version.
    1.2      rsp  07/19/2018 Read channel count from IP config.
          rsp  08/17/2018 Fix typos and rephrase comments.
          rsp  08/17/2018 Read Length register value from IP config.
    1.3   rsp  02/05/2019 Remove snooping enable from application.
          rsp  02/06/2019 Programmatically select cache maintenance ops for HPC
                          and non-HPC designs. In Rx remove arch64 specific dsb
                          instruction by performing cache invalidate operation
                          for all supported architectures.
    1.7   sa   08/12/22  Updated the example to use latest MIG cannoical define
                            i.e XPAR_MIG_0_C0_DDR4_MEMORY_MAP_BASEADDR.
    1.8   sa   09/29/22  Fix infinite loops in the example.
    1.9      aj   07/19/23   Updated the example to support the system device tree
                             flow

## Functions
int | main (void)
| Main function. More...

## Function Documentation

int main | ( | void |  | ) |

Main function.

This function is the main entry of the tests on DMA core. It sets up DMA engine to be ready to receive and send packets, then a packet is transmitted and will be verified after it is received via the DMA.

Parameters

  None |

Returns
  - XST_SUCCESS if test passes
  - XST_FAILURE if test fails.

Note
  None.

References XMcDma_CfgInitialize(), and XMcdma_LookupConfig().