Introduction

The Direct Memory Access Controller (DMAC) autonomously performs data transfers between a source (peripheral or memory) and a destination (peripheral or memory) without CPU intervention.

Features

  • Provides 8 independent, configurable unidirectional transfer channels. Supports software-programmable channel priorities to independently manage data transfers between specified sources and destinations.

  • Fully compatible with the AXI4 protocol. Features an APB4 slave interface for register programming and an AXI master interface with a configurable 32-bit data bus width.

  • Supports four high-speed data transfer types: memory-to-memory (M2M), memory-to-peripheral (M2P), peripheral-to-memory (P2M), and peripheral-to-peripheral (P2P).

  • Flexible flow controller selection, allowing either the DMAC or the source/destination peripheral to act as the flow controller.

  • Supports single and burst transactions.

  • Independent source and destination address configuration, supporting address increment or fixed modes.

  • Supports linked-list and channel register auto-reload mechanisms for continuous multi-block data transfers.

  • Supports safe channel disable, suspend, and resume operations to ensure zero data loss during operations.

  • Provides event flags for single block transfer complete, multi-block transfer complete, and transfer errors (including security and protocol errors), with support for combined interrupt requests, independent outputs, and mask control.

  • Supports channel security mode configuration. Both the AXI master interface and APB slave interface support secure access control to enhance system data access security.

RTL8721Dx:
  • Each channel has an independent FIFO. The FIFO depth is 128 bytes for Channels 0/1, and 32 bytes for the remaining channels.

  • Supports large-capacity data block transfers, with a maximum single block transfer size of 65,535 data items (based on the source transfer width).

  • Provides 30 hardware handshake interfaces for transfer requests and flow control with peripherals.

Block Diagram

The following figure illustrates the DMAC architecture, comprising the control interface, data transfer interface, independent channel FIFOs, hardware request interfaces, and an internal arbiter.

../../../_images/block_diagram_of_dmac.png

DMA Controller Block Diagram

  • APB Slave Interface: Used for configuring and accessing the DMAC. The system programs the DMAC via the APB bus, including setting source/destination addresses, configuring channel control registers, and selecting flow controllers. It is also used to read channel interrupts and operating statuses.

  • AXI Master Interface: The DMAC operates as a master on the AXI bus. It executes data transfers through this interface—reading data from source peripherals and writing it to destination peripherals or memory. This interface fully supports both single and burst transactions.

  • Hardware Request Interface: Provides a dedicated set of hardware handshake signals for interaction with peripherals. When a peripheral is ready to send or request data, it asserts a hardware request to the DMAC via this interface. The DMAC responds by controlling single or burst transactions according to the protocol.

  • Channels and FIFOs: The DMAC integrates multiple independent transfer channels to support concurrent multi-tasking. During a transfer, data read from the source is first buffered in the channel’s dedicated FIFO before being written to the destination. This FIFO-based mechanism mitigates transfer bottlenecks caused by clock or processing rate mismatches between the source and destination.

  • Arbiter: When multiple active DMA channels request data transfers simultaneously, the arbiter grants AXI bus access based on predefined priority scheduling policies. This ensures efficient and orderly utilization of the DMAC master interface resources in high-throughput scenarios.