...
Table of Contents
Table of Contents |
---|
This page gives an overview of zdma driver which is available as part of the Xilinx Vivado and
...
Vitis distribution.
...
ZDMA is a general purpose DMA designed to support memory to memory and memory to IO buffer transfers.
Zynq
...
Ultrascale+ MPSOC has two instance of general purpose ZDMA.
One is located in FPD (full power domain) which usually called as GDMA and other is located
...
in LPD (low power domain) which usually called as ADMA.
How to enable
...
Versal has one instance of general purpose DMA in LPD (low power domain) known as ADMA.
For more information, please refer to ADMA/GDMA chapter in ZynqMP TRM (UG1085) or Versal TRM (AM011).
Driver Sources
The source code for the driver is included with the Vitis Unified Software Platform installation, as well as being available in the Xilinx Github repository.
Driver Name | Path in Vitis | Path in Github |
---|---|---|
zdma | <Vitis Install Directory>/data/embedded/XilinxProcessorIPLib/drivers/zdma | https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/zdma |
Note: To view the sources for a particular release, use the rel-version tag in github. For example, for the 2020.1 release, the proper version of the code is: https://github.com/Xilinx/embeddedsw/tree/ |
...
...
The driver source code is organized into different folders.
...
The table below shows the
...
ZDMA driver source organization.
Directory |
---|
...
Description |
---|
...
doc |
...
Provides the API and data structure details |
...
data | Driver .tcl, .mdd file and .yaml files |
examples | Example applications that show how to use the driver |
...
Features Supported
Controller Features
- Configurable AXI bus width
- AXI 4 support , burst length is limited to 16 to provide AXI 3 compatibility
- SRC and DST payload can start and end at any alignment
- Over fetching can be enabled/disabled per channel
- Up to 8 configurable DMA channels
- Each channel can be programmed secure or non-secure
- Programmable number of outstanding transactions per channel
- Support for periodic transaction scheduling. Period can be independently programmed per channel
- Supports Simple(descriptor less) and Scatter Gather (SG) DMA modes
- Supports read only DMA mode
- Supports write only DMA mode
- Common Buffer is automatically shared among all enabled DMA channels
- Support for DMA START, STOP and PAUSE
- Interrupt Accounting support
- Descriptor prefetch support to maximize DMA efficiency
- Support for error recovery
- INCR & FIXED type burst supported
- Independent AXI burst length is supported on SRC & DST Side
- Support for per channel flow control interface
Standalone Driver Supported Features
...
features | |
src | Driver source files, make and cmake files |
Note: AMD Xilinx embeddedsw build flow is changed from 2023.2 release to adapt to the new system device tree based flow. For further information, refer to the wiki page Porting embeddedsw components to system device tree (SDT) based flow - Xilinx Wiki - Confluence (atlassian.net).
The .yaml(in data folder) and CMakeLists.txt(in src folder) files are needed for the System Device Tree based flow. The Driver .tcl and .mdd files are for the older build flow which will be deprecated in the future.
Driver Implementation
For a full list of features supported by this IP, please refer to ADMA/GDMA chapter in ZynqMP TRM (UG1085) or Versal TRM (AM011) for respective devices.
Features
Controller/Driver features supported
GMDA & ADMA are configured each with 8 DMA channels and and each channel can be programmed secure or non-secure.
It support two DMA Modes
Simple DMA mode
Normal data transfer from source to destination
Write Only Mode
Read Only Mode
Scatter Gather DMA mode
Normal data transfer from source to destination
In Scatter gather Mode it supports 2 types of descriptors out of 3 that h/w supports
Linear descriptor
Linked list descriptor
Interrupt Accounting Support
INCR and Fixed burst are supported.
Known Issues and Limitations
Hybrid list descriptors are not supported.
Flow controller feature is not supported
Peripheral DMA is not tested/supported.
Example Design Architecture
ZDMA examples demonstrate ZDMA features in simple and SG modes.
Test cases
...
Example Applications
ZDMA driver supports a interrupt examples in various operating modes describing how its different features can be exercised. These example applications can be imported into the Vitis IDE from the Board Support Package settings tab.
Links to Examples
Examples Path:
https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/zdma/examples
Test Name | Example Source | Description |
---|---|---|
ZDMA Selftest example |
...
Basic ZDMA selftest example to check sanity and use core APIs. | |
ZDMA Write-only example |
...
ZDMA example demonstrating write-only feature. | |
ZDMA Read-only example |
...
ZDMA example demonstrating read-only feature. | |
ZDMA SG Linear example |
...
ZDMA example demonstrating Scatter Gather Linear descriptor mode. | |
ZDMA SG Linked list example |
...
ZDMA example demonstrating Scatter Gather Linked list descriptor mode. | |
ZDMA Simple DMA example |
...
ZDMA example demonstrating Simple DMA mode. |
Known issues and Limitations
- Hybrid list descriptors are not supported.
- Flow controller feature is not supported
- Peripheral dma is not tested/supported.
Change Log
- Enable applications to use scatter-gather and enable APIs independently.
- Support for parallel makefile execution
Commits:
- Minor enhancements and warning fixes
...
Example Application Usage
ZDMA Selftest example
Basic ZDMA selftest example to check sanity and use core APIs.
Expected Output
|
ZDMA Write-only example
ZDMA example demonstrating write-only feature.
Expected Output
|
ZDMA Read-only example
ZDMA example demonstrating read-only feature.
Expected Output
|
ZDMA SG Linear example
ZDMA example demonstrating Scatter Gather Linear descriptor mode.
Expected Output
|
ZDMA SG Linked list example
ZDMA example demonstrating Scatter Gather Linked list descriptor mode.
Expected Output
|
ZDMA Simple DMA example
ZDMA example demonstrating Simple DMA mode.
Expected Output
|
Performance
NA
Change Log
2023.2
https://github.com/Xilinx/embeddedsw/blob/xlnx_rel_v2023.2/doc/ChangeLog#L567
2023.1
https://github.com/Xilinx/embeddedsw/blob/xilinx_v2023.1/doc/ChangeLog#L162
2022.2
https://github.com/Xilinx/embeddedsw/
...
...
...
...
761c9af Fixed trivial typos reported by codespell utility
a2c7c62 zdma: This patch fixes the coverity warnings for "Deadcode".
599653d zdma: This patch fixes the coverity warnings for "OVERFLOW_BEFORE_WIDEN"
c78886a zdma: This patch fixes the coverity warning for "Event result_independent_of_operands".
3088184 zdma: Updated the modification history for zdma.
- Minor enhancements and bugfixes
Commits:
2022.1
https://github.com/Xilinx/embeddedsw/blob/xilinx_v2022.1/doc/ChangeLog#L265
2021.2
https://github.com/Xilinx/embeddedsw/blob/xlnx_rel_v2021.2/doc/ChangeLog#L133
2021.1
https://github.com/Xilinx/embeddedsw/
...
...
...
...
cc2043c zdma: Fix data alignment in the examples for IAR compiler
2f2fc35 zdma: Fix peripheral app compilation issue with armclang compiler
2018.3
- Bugfixes and warning fixes
Commits:
da83a6d zdma: Fix cppcheck and coverity warnings
b4a4e8e zdma: Fix cpp check warning
60f5393 zdma: Resolve MISRA-C:2012 compliance mandatory violations
f406504 zdma: Use -hier option while using get_cells command
...
- None
...
- Added support for peripheral test app support
...
- Add support for peripheral test app support
...
- None
...
- Add support for CCI at EL1 NS
- Updated examples for CCI support
...
- None
...
- Fixed compilation errors for IAR compiler
- Added readme.txt file to generate doxygen for examples
...
- None
...
- None
2020.2
https://github.com/Xilinx/embeddedsw/blob/release-2020.2/doc/ChangeLog#L234
2020.1
No functional changes
https://github.com/Xilinx/embeddedsw/blob/release-2020.1/doc/ChangeLog#L569
2019.2
https://github.com/Xilinx/embeddedsw/blob/release-2019.2/doc/ChangeLog#L93
2019.1
https://github.com/Xilinx/embeddedsw/blob/release-2019.1/doc/ChangeLog#L290
2018.3
https://github.com/Xilinx/embeddedsw/blob/release-2018.3/doc/ChangeLog#L419
2018.2
None
2018.1
https://github.com/Xilinx/embeddedsw/blob/release-2018.1/doc/ChangeLog#L287
Related Links
...
...
...