zdma
Xilinx SDK Drivers API Documentation
xzdma_simple_example.c File Reference

Overview

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

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 (u16 DeviceId)
 This function does a test of the data transfer in simple mode of normal mode on the ZDMA driver. More...
 
u8 DstBuf [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...
 
XScuGic Intc
 XIntc Instance. More...
 
u8 Done = 0
 Done flag. More...
 

Macro Definition Documentation

◆ SIZE

#define SIZE   1000000

Size of the data to be transferred.

Referenced by XZDma_SimpleExample().

◆ TESTVALUE

#define TESTVALUE   0x1230

For writing into source buffer.

Referenced by XZDma_SimpleExample().

◆ ZDMA_INTC_DEVICE_ID

#define ZDMA_INTC_DEVICE_ID   XPAR_SCUGIC_SINGLE_DEVICE_ID

SCUGIC Device ID.

◆ ZDMA_INTR_DEVICE_ID

#define ZDMA_INTR_DEVICE_ID   XPAR_XADMAPS_0_INTR

ZDMA Interrupt Id.

Function Documentation

◆ __attribute__()

u8 DstBuf [SIZE] __attribute__ ( (aligned(64))  )

Destination buffer.

Source buffer.

◆ main()

int main ( void  )

Main function to call the example.

Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if failed.
Note
None.

References XZDma_SimpleExample().

◆ XZDma_SimpleExample()

int XZDma_SimpleExample ( u16  DeviceId)

This function does a test of the data transfer in simple mode of normal mode on the ZDMA driver.

Parameters
DeviceIdis the XPAR_<ZDMA Instance>_DEVICE_ID value from xparameters.h.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if failed.
Note
None.

References XZDma_Config::BaseAddress, XZDma_Config::IsCacheCoherent, SIZE, SrcBuf, TESTVALUE, XZDma_CfgInitialize(), XZDMA_HANDLER_DONE, XZDma_LookupConfig(), XZDMA_NORMAL_MODE, XZDma_SelfTest(), XZDma_SetCallBack(), and XZDma_SetMode().

Referenced by main().

Variable Documentation

◆ Done

u8 Done = 0

Done flag.

◆ Intc

XScuGic Intc

XIntc Instance.

◆ ZDma

XZDma ZDma

Instance of the ZDMA Device.