zdma
Vitis Drivers API Documentation
|
This file contains the example using XZDma driver to do simple data transfer in Normal mode on ZDMA device for 1MB data transfer.
MODIFICATION HISTORY:
Ver Who Date Changes
1.0 vns 2/27/15 First release vns 10/13/15 Declared static array rather than hard code memory. 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.5 adk 11/22/17 Added peripheral test app support. 12/11/17 Fixed peripheral test app generation issues when dma buffers are configured on OCM memory(CR#990806). 18/01/18 Remove unnecessary column in XIntc_Connect() API. 01/02/18 Added support for error handling. 1.7 adk 21/03/19 Fix alignment pragmas in the example for IAR compiler. 19/04/19 Rename the dma buffers to avoid peripheral test compilation errors with armclang compiler. 1.12 sk 02/16/21 Add the documentation for XZDma_SimpleExample() function parameters to fix the doxygen warning. 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... | |
#define | SIZE 1000000 |
Size of the data to be transferred. More... | |
#define | TESTVALUE 0x1230 |
For writing into source buffer. More... | |
Functions | |
int | XZDma_SimpleExample (INTC *IntcInstPtr, XZDma *ZdmaInstPtr, u16 DeviceId, u16 IntrId) |
This function does a test of the data transfer in simple mode of normal mode on the ZDMA driver. More... | |
u8 ZDmaDstBuf[SIZE] | __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... | |
#define SIZE 1000000 |
Size of the data to be transferred.
Referenced by XZDma_SimpleExample().
#define TESTVALUE 0x1230 |
For writing into source buffer.
Referenced by XZDma_SimpleExample().
#define ZDMA_INTC_DEVICE_ID XPAR_SCUGIC_SINGLE_DEVICE_ID |
SCUGIC Device ID.
#define ZDMA_INTR_DEVICE_ID XPAR_XADMAPS_0_INTR |
ZDMA Interrupt Id.
Referenced by main().
u8 ZDmaDstBuf [SIZE] __attribute__ | ( | (aligned(64)) | ) |
Destination buffer.
Source buffer.
int main | ( | void | ) |
Main function to call the example.
References Intc, XZDma_SimpleExample(), and ZDMA_INTR_DEVICE_ID.
int XZDma_SimpleExample | ( | INTC * | IntcInstPtr, |
XZDma * | ZdmaInstPtr, | ||
u16 | DeviceId, | ||
u16 | IntrId | ||
) |
This function does a test of the data transfer in simple mode of normal mode on the ZDMA driver.
IntcInstPtr | is a pointer to the instance of the INTC. |
ZdmaInstPtr | contains a pointer to the ZDMA instance which is going to be connected to the interrupt controller. |
DeviceId | is the XPAR_<ZDMA Instance>_DEVICE_ID macro value. |
IntrId | is the interrupt Id and is typically XPAR_<ZDMA_instance>_INTR macro value. |
References XZDma_Config::BaseAddress, XZDma_Transfer::DstAddr, XZDma_DataConfig::DstBurstLen, XZDma_DataConfig::DstBurstType, XZDma_DataConfig::DstCache, XZDma_Transfer::DstCoherent, XZDma_DataConfig::DstQos, XZDma_Config::IsCacheCoherent, XZDma_DataConfig::OverFetch, XZDma_Transfer::Pause, SIZE, XZDma_Transfer::Size, XZDma_Transfer::SrcAddr, XZDma_DataConfig::SrcBurstLen, XZDma_DataConfig::SrcBurstType, XZDma_DataConfig::SrcCache, XZDma_Transfer::SrcCoherent, XZDma_DataConfig::SrcIssue, XZDma_DataConfig::SrcQos, TESTVALUE, XZDma_CfgInitialize(), XZDma_DisableIntr, XZDma_EnableIntr, XZDMA_HANDLER_DONE, XZDMA_HANDLER_ERROR, XZDMA_INCR_BURST, XZDma_IntrHandler(), XZDMA_IXR_ALL_INTR_MASK, XZDMA_IXR_AXI_RD_DATA_MASK, XZDMA_IXR_AXI_WR_DATA_MASK, XZDma_LookupConfig(), XZDMA_NORMAL_MODE, XZDma_Reset(), XZDma_SelfTest(), XZDma_SetCallBack(), XZDma_SetChDataConfig(), XZDma_SetMode(), and XZDma_Start().
Referenced by main().
XZDma ZDma |
Instance of the ZDMA Device.