zdma
Vitis Drivers API Documentation
|
This file contains the example using XZDma driver to do simple data transfer in Write only mode on ZDMA device.
In this mode data will be predefined and will be repetitively written into the given address and for given size. For ADMA only 2 words are repeated and for GDMA 4 words are repeated.
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 18/03/19 Update the example data verification check to support versal adma IP. 1.7 adk 21/03/19 Fix alignment pragmas in the example for IAR compiler. 1.13 sk 08/02/21 Make Done variable 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. 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.
Macros | |
#define | ZDMA_INTC_DEVICE_ID XPAR_SCUGIC_SINGLE_DEVICE_ID |
SCUGIC Device ID. More... | |
#define | ZDMA_INTR_DEVICE_ID XPAR_XADMAPS_0_INTR |
ZDMA Interrupt Id. More... | |
Functions | |
int | XZDma_WriteOnlyExample (u16 DeviceId) |
This function does a test of the data transfer in simple mode of write only mode on the ZDMA driver. More... | |
u32 DstBuf[300] | __attribute__ ((aligned(64))) |
Destination buffer. More... | |
int | main (void) |
Main function to call the example. More... | |
Variables | |
XZDma | ZDma |
Instance of the ZDMA Device. More... | |
XScuGic | Intc |
XIntc Instance. More... | |
u32 | SrcBuf [4] |
Source buffer. More... | |
#define ZDMA_INTC_DEVICE_ID XPAR_SCUGIC_SINGLE_DEVICE_ID |
SCUGIC Device ID.
Referenced by XZDma_WriteOnlyExample().
#define ZDMA_INTR_DEVICE_ID XPAR_XADMAPS_0_INTR |
ZDMA Interrupt Id.
Referenced by XZDma_WriteOnlyExample().
u32 DstBuf [300] __attribute__ | ( | (aligned(64)) | ) |
Destination buffer.
int main | ( | void | ) |
Main function to call the example.
References XZDma_WriteOnlyExample().
int XZDma_WriteOnlyExample | ( | u16 | DeviceId | ) |
This function does a test of the data transfer in simple mode of write only mode on the ZDMA driver.
DeviceId | is the XPAR_<ZDMA Instance>_DEVICE_ID value from xparameters.h. |
References XZDma_Config::BaseAddress, XZDma::Config, XZDma_Config::DmaType, XZDma_Transfer::DstAddr, XZDma_DataConfig::DstBurstLen, XZDma_DataConfig::DstBurstType, XZDma_DataConfig::DstCache, XZDma_Transfer::DstCoherent, Intc, XZDma_Config::IsCacheCoherent, XZDma_DataConfig::OverFetch, XZDma_Transfer::Pause, SIZE, XZDma_Transfer::Size, XZDma_Transfer::SrcAddr, SrcBuf, XZDma_DataConfig::SrcBurstLen, XZDma_DataConfig::SrcBurstType, XZDma_DataConfig::SrcCache, XZDma_Transfer::SrcCoherent, XZDma_DataConfig::SrcIssue, XZDma_CfgInitialize(), XZDma_DisableIntr, XZDma_EnableIntr, XZDMA_HANDLER_DONE, XZDMA_INCR_BURST, XZDma_IntrHandler(), XZDMA_IXR_DMA_DONE_MASK, XZDma_LookupConfig(), XZDma_Reset(), XZDma_SelfTest(), XZDma_SetCallBack(), XZDma_SetChDataConfig(), XZDma_SetMode(), XZDma_Start(), XZDma_WOData(), XZDMA_WRONLY_MODE, ZDMA_INTC_DEVICE_ID, and ZDMA_INTR_DEVICE_ID.
Referenced by main().
XScuGic Intc |
XIntc Instance.
u32 SrcBuf[4] |
Source buffer.
XZDma ZDma |
Instance of the ZDMA Device.