![]() |
zdma
Vitis Drivers API Documentation
|
This file contains the example using XZDma driver to do data transfer in Linear mode on ZDMA device.
MODIFICATION HISTORY:
Ver Who Date Changes
1.0 vns 2/27/15 First release ms 04/05/17 Modified comment lines notation in functions to avoid unnecessary description to get displayed while generating doxygen. 1.3 mus 08/14/17 Do not perform cache operations if CCI is enabled 1.4 adk 11/02/17 Updated example to fix compilation errors for IAR compiler. 1.7 adk 21/03/19 Fix data alignment in the example for IAR compiler. 1.13 sk 08/02/21 Make Done, Pause variables as volatile to fix failure at optimization level 2. 1.13 asa 08/24/21 Make changes to add a missing data invalidation operation just before the destination buffer data is being read. Along with the changes were done to ensure proper sizes for linear SG buffers. Changes were done to allocate the buffers with sizes which are in sync with other examples. Changes were done for other cleanups and also to ensure that the DMA is reset before the program exits. 1.16 sa 09/29/22 Fix infinite loops in the example.
#include "xzdma.h"#include "xparameters.h"#include "xinterrupt_wrap.h"#include "xil_util.h"#include "xplatform_info.h"Macros | |
| #define | TESTDATA1 0xABCD1230 |
| Test data. More... | |
| #define | TESTDATA2 0x00005000 |
| Test data. More... | |
| #define | DESCRIPTOR1_DATA_SIZE 1024 |
| Descriptor 1 data in bytes. More... | |
| #define | DESCRIPTOR2_DATA_SIZE 64 |
| Descriptor 2 data in bytes. More... | |
Functions | |
| int | XZDma_LinearExample (UINTPTR BaseAddress) |
| This function does a test of the data transfer in linear mode on the ZDMA driver. More... | |
| int | main (void) |
| Main function to call the example. More... | |
Variables | |
| XZDma | ZDma |
| Instance of the ZDMA Device. More... | |
| u32 | DstBuf [256] |
| Destination buffer. More... | |
| u32 | SrcBuf [256] |
| Source buffer. More... | |
| u32 | Dst1Buf [256] |
| Destination buffer. More... | |
| u32 | Src1Buf [256] |
| Source buffer. More... | |
| u32 | AlloMem [256] |
| memory allocated for descriptors More... | |
| #define DESCRIPTOR1_DATA_SIZE 1024 |
Descriptor 1 data in bytes.
Referenced by XZDma_LinearExample().
| #define DESCRIPTOR2_DATA_SIZE 64 |
Descriptor 2 data in bytes.
Referenced by XZDma_LinearExample().
| #define TESTDATA1 0xABCD1230 |
Test data.
Referenced by XZDma_LinearExample().
| #define TESTDATA2 0x00005000 |
Test data.
Referenced by XZDma_LinearExample().
| int main | ( | void | ) |
Main function to call the example.
References XZDma_LinearExample().
| int XZDma_LinearExample | ( | UINTPTR | BaseAddress | ) |
This function does a test of the data transfer in linear mode on the ZDMA driver.
| BaseAddress | contains the base address of the device |
References AlloMem, XZDma_Config::BaseAddress, DESCRIPTOR1_DATA_SIZE, DESCRIPTOR2_DATA_SIZE, Dst1Buf, XZDma_Transfer::DstAddr, DstBuf, XZDma_DataConfig::DstBurstLen, XZDma_DataConfig::DstBurstType, XZDma_DataConfig::DstCache, XZDma_Transfer::DstCoherent, XZDma_Config::IntrId, XZDma_Config::IntrParent, XZDma_Config::IsCacheCoherent, XZDma_DataConfig::OverFetch, XZDma_Transfer::Pause, XZDma_Transfer::Size, Src1Buf, XZDma_Transfer::SrcAddr, SrcBuf, XZDma_DataConfig::SrcBurstLen, XZDma_DataConfig::SrcBurstType, XZDma_DataConfig::SrcCache, XZDma_Transfer::SrcCoherent, XZDma_DataConfig::SrcIssue, TESTDATA1, TESTDATA2, XZDma_CfgInitialize(), XZDma_CreateBDList(), XZDma_DisableIntr, XZDma_EnableIntr, XZDma_GetChDataConfig(), XZDMA_HANDLER_DONE, XZDMA_HANDLER_ERROR, XZDMA_INCR_BURST, XZDma_IntrHandler(), XZDMA_IXR_DMA_DONE_MASK, XZDMA_IXR_DMA_PAUSE_MASK, XZDMA_LINEAR, XZDma_LookupConfig(), XZDMA_NORMAL_MODE, XZDma_Reset(), XZDma_Resume(), XZDma_SelfTest(), XZDma_SetCallBack(), XZDma_SetChDataConfig(), XZDma_SetMode(), and XZDma_Start().
Referenced by main().
| u32 AlloMem[256] |
memory allocated for descriptors
Referenced by XZDma_LinearExample(), and XZDma_LinkedListExample().
| u32 Dst1Buf[256] |
Destination buffer.
Referenced by XZDma_LinearExample(), and XZDma_LinkedListExample().
| u32 DstBuf[256] |
Destination buffer.
Referenced by XZDma_LinearExample(), XZDma_LinkedListExample(), and XZDma_WriteOnlyExample().
| u32 Src1Buf[256] |
Source buffer.
Referenced by XZDma_LinearExample(), and XZDma_LinkedListExample().
| u32 SrcBuf[256] |
Source buffer.
Referenced by XZDma_LinearExample(), XZDma_LinkedListExample(), XZDma_SimpleReadOnlyExample(), and XZDma_WriteOnlyExample().
| XZDma ZDma |
Instance of the ZDMA Device.