![]() |
zdma
Vitis Drivers API Documentation
|
Data Structures | |
| struct | XZDma_Descriptor |
| Holds scatter-gather descriptor fields for the ZDMA core. More... | |
| struct | XZDma_LlDscr |
| Holds scatter-gather descriptor fields for the ZDMA core. More... | |
| struct | XZDma_LiDscr |
| Holds linear descriptor fields for the ZDMA core. More... | |
| struct | XZDma_DataConfig |
| Holds data transfer configuration for the ZDMA core. More... | |
| struct | XZDma_DscrConfig |
| Holds descriptor fetch configuration for the ZDMA core. More... | |
| struct | XZDma_Config |
| Holds configuration information for a ZDMA core. More... | |
| struct | XZDma |
| The XZDma driver instance data structure. More... | |
| struct | XZDma_Transfer |
| Holds fields for a ZDMA data transfer. More... | |
Macros | |
| #define | XZDma_IntrGetStatus(InstancePtr) XZDma_ReadReg((InstancePtr)->Config.BaseAddress, XZDMA_CH_ISR_OFFSET(InstancePtr)) |
| This function returns interrupt status read from Interrupt Status Register. More... | |
| #define | XZDma_IntrClear(InstancePtr, Mask) |
| This function clears interrupt(s). More... | |
| #define | XZDma_GetIntrMask(InstancePtr) |
| This function returns interrupt mask to know which interrupts are enabled and which of them were disabled. More... | |
| #define | XZDma_EnableIntr(InstancePtr, Mask) (InstancePtr)->IntrMask = ((InstancePtr)->IntrMask | (Mask)) |
| This function enables individual interrupts of the ZDMA core by updating the Interrupt Enable register. More... | |
| #define | XZDma_DisableIntr(InstancePtr, Mask) |
| This function disables individual interrupts of the ZDMA core by updating the Interrupt Disable register. More... | |
| #define | XZDma_SrcCurPyld(InstancePtr) |
| This function returns source current payload address under process of ZDMA core. More... | |
| #define | XZDma_DstCurPyld(InstancePtr) |
| This function returns destination current payload address under process of ZDMA core. More... | |
| #define | XZDma_SrcDscrCurPyld(InstancePtr) |
| This function returns source descriptor current payload address under process of ZDMA core. More... | |
| #define | XZDma_DstDscrCurPyld(InstancePtr) |
| This function returns destination descriptor current payload address under process of ZDMA core. More... | |
| #define | XZDma_GetTotalByte(InstancePtr) |
| This function gets the count of total bytes transferred through core since last clear in ZDMA core. More... | |
| #define | XZDma_TotalByteClear(InstancePtr) |
| This function clears the count of total bytes transferred in ZDMA core. More... | |
| #define | XZDma_GetSrcIntrCnt(InstancePtr) |
| This function gets the total number of Interrupt count for source after last call of this API. More... | |
| #define | XZDma_GetDstIntrCnt(InstancePtr) |
| This function gets the total number of Interrupt count for destination after last call of this API. More... | |
| #define | XZDma_EnableCh(InstancePtr) |
| This function Enable's the ZDMA core for initiating the data transfer once the data transfer completes it will be automatically disabled. More... | |
| #define | XZDma_DisableCh(InstancePtr) |
| This function Disable's the ZDMA core. More... | |
| #define | XZDma_In32 Xil_In32 |
| Input operation. More... | |
| #define | XZDma_Out32 Xil_Out32 |
| Output operation. More... | |
| #define | XZDma_ReadReg(BaseAddress, RegOffset) XZDma_In32((BaseAddress) + (u32)(RegOffset)) |
| This macro reads the given register. More... | |
| #define | XZDma_WriteReg(BaseAddress, RegOffset, Data) XZDma_Out32(((BaseAddress) + (u32)(RegOffset)), (u32)(Data)) |
| This macro writes the value into the given register. More... | |
| #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... | |
| #define | POLL_TIMEOUT_COUNTER 1000000U |
| Maximum poll iterations while waiting for a DMA event. More... | |
| #define | NUM_OF_EVENTS 1 |
| Number of events to wait for in Xil_WaitForEventSet. More... | |
| #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... | |
| #define | POLL_TIMEOUT_COUNTER 1000000U |
| Maximum poll iterations while waiting for a DMA event. More... | |
| #define | NUM_OF_EVENTS 1 |
| Number of events to wait for in Xil_WaitForEventSet. More... | |
| #define | SIZE 100 |
| Size of the data to be transferred. More... | |
| #define | POLL_TIMEOUT_COUNTER 1000000U |
| Maximum poll iterations while waiting for a DMA event. More... | |
| #define | NUM_OF_EVENTS 1 |
| Number of events to wait for in Xil_WaitForEventSet. More... | |
| #define | SIZE 1000000 |
| Size of the data to be transferred. More... | |
| #define | TESTVALUE 0x1230 |
| For writing into source buffer. More... | |
| #define | POLL_TIMEOUT_COUNTER 1000000U |
| Maximum poll iterations while waiting for a DMA event. More... | |
| #define | NUM_OF_EVENTS 1 |
| Number of events to wait for in Xil_WaitForEventSet. More... | |
| #define | SIZE 1024 |
| Size of the data to be written. More... | |
| #define | POLL_TIMEOUT_COUNTER 1000000U |
| Maximum poll iterations while waiting for a DMA event. More... | |
| #define | NUM_OF_EVENTS 1 |
| Number of events to wait for in Xil_WaitForEventSet. More... | |
Typedefs | |
| typedef void(* | XZDma_DoneHandler )(void *CallBackRef) |
| Callback type for Completion of all data transfers. More... | |
| typedef void(* | XZDma_ErrorHandler )(void *CallBackRef, u32 ErrorMask) |
| Callback type for all error interrupts. More... | |
Enumerations | |
| enum | XZDma_Handler { XZDMA_HANDLER_DONE, XZDMA_HANDLER_ERROR } |
| Defines ZDMA handler types. More... | |
| enum | XZDma_DscrType { XZDMA_LINEAR, XZDMA_LINKEDLIST } |
| Defines ZDMA descriptor types. More... | |
| enum | XZDma_Mode { XZDMA_NORMAL_MODE, XZDMA_WRONLY_MODE, XZDMA_RDONLY_MODE } |
| Defines ZDMA operation modes. More... | |
| enum | XZDmaState { XZDMA_IDLE, XZDMA_PAUSE, XZDMA_BUSY } |
| Defines ZDMA channel states. More... | |
| enum | XZDma_BurstType { XZDMA_FIXED_BURST = 0, XZDMA_INCR_BURST } |
| Defines ZDMA AXI burst types. More... | |
Functions | |
| s32 | XZDma_CfgInitialize (XZDma *InstancePtr, XZDma_Config *CfgPtr, u32 EffectiveAddr) |
| This function initializes an ZDMA core. More... | |
| s32 | XZDma_SetMode (XZDma *InstancePtr, u8 IsSgDma, XZDma_Mode Mode) |
| This function sets the pointer type and mode in which ZDMA needs to transfer the data. More... | |
| u32 | XZDma_CreateBDList (XZDma *InstancePtr, XZDma_DscrType TypeOfDscr, UINTPTR Dscr_MemPtr, u32 NoOfBytes) |
| This function sets the descriptor type and descriptor pointer's start address of both source and destination based on the memory allocated by user and also calculates no of descriptors(BDs) can be created in the allocated memory. More... | |
| s32 | XZDma_SetChDataConfig (XZDma *InstancePtr, XZDma_DataConfig *Configure) |
| This function sets the data attributes and control configurations of a ZDMA core based on the inputs provided. More... | |
| void | XZDma_GetChDataConfig (XZDma *InstancePtr, XZDma_DataConfig *Configure) |
| This function gets the data attributes and control configurations of a ZDMA core. More... | |
| s32 | XZDma_SetChDscrConfig (XZDma *InstancePtr, XZDma_DscrConfig *Configure) |
| This function sets the descriptor attributes based on the inputs provided in the structure. More... | |
| void | XZDma_GetChDscrConfig (XZDma *InstancePtr, XZDma_DscrConfig *Configure) |
| This function gets the descriptor attributes of the channel. More... | |
| void | XZDma_WOData (XZDma *InstancePtr, u32 *Buffer) |
| This function preloads the buffers which will be used in write only mode. More... | |
| void | XZDma_Resume (XZDma *InstancePtr) |
| This function resume the paused state of ZDMA core and starts the transfer from where it has paused. More... | |
| void | XZDma_Reset (XZDma *InstancePtr) |
| This function resets the ZDMA core. More... | |
| XZDmaState | XZDma_ChannelState (XZDma *InstancePtr) |
| This function returns the state of ZDMA core. More... | |
| s32 | XZDma_Start (XZDma *InstancePtr, XZDma_Transfer *Data, u32 Num) |
| This function sets all the required fields for initiating data transfer. More... | |
| void | XZDma_ScatterGather (XZDma *InstancePtr, XZDma_Transfer *Data, u32 Num) |
| This function sets all the required fields for initiating data transfer in scatter gather mode. More... | |
| void | XZDma_Enable (XZDma *InstancePtr) |
| This function enables all the interrupts which user intended to enable and enables the ZDMA channel for initiating data transfer. More... | |
| s32 | XZDma_Stop (XZDma *InstancePtr) |
| Stops the ZDMA engine and releases power management resources if supported. More... | |
| XZDma_Config * | XZDma_LookupConfig (UINTPTR BaseAddress) |
| Looks up device configuration by base address. More... | |
| s32 | XZDma_SelfTest (XZDma *InstancePtr) |
| Runs a diagnostic self-test for the ZDMA driver instance. More... | |
| void | XZDma_IntrHandler (void *Instance) |
| This function is the interrupt handler for the ZDMA core. More... | |
| s32 | XZDma_SetCallBack (XZDma *InstancePtr, XZDma_Handler HandlerType, void *CallBackFunc, void *CallBackRef) |
| This routine installs an asynchronous callback function for the given HandlerType. More... | |
| 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... | |
| int | XZDma_LinkedListExample (UINTPTR BaseAddress) |
| This function does a test of the data transfer in linked mode on the ZDMA driver. More... | |
| int | XZDma_SimpleReadOnlyExample (UINTPTR BaseAddress) |
| This function does a test of the data transfer in simple mode of read only mode on the ZDMA driver. More... | |
| int | XZDma_SelfTestExample (UINTPTR BaseAddress) |
| This function does a minimal test on the ZDMA driver. More... | |
| int | XZDma_SimpleExample (XZDma *ZdmaInstPtr, UINTPTR BaseAddress) |
| This function does a test of the data transfer in simple mode of normal mode on the ZDMA driver. More... | |
| int | XZDma_WriteOnlyExample (UINTPTR BaseAddress) |
| This function does a test of the data transfer in simple mode of write only mode on the ZDMA driver. More... | |
Variables | |
| XZDma_Config | XZDma_ConfigTable [] |
| Configuration table for each ZDMA instance in the system. More... | |
| 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... | |
| XZDma | ZDma |
| Instance of the ZDMA Device. More... | |
| XZDma | ZDma |
| Instance of the ZDMA Device. More... | |
| u32 | SrcBuf [256] |
| Source buffer. More... | |
| XZDma | ZDma |
| Instance of the ZDMA Device. More... | |
| XZDma | ZDma |
| Instance of the ZDMA Device. More... | |
| u8 | ZDmaDstBuf [SIZE] |
| Destination buffer. More... | |
| u8 | ZDmaSrcBuf [SIZE] |
| Source buffer. More... | |
| XZDma | ZDma |
| Instance of the ZDMA Device. More... | |
| u32 | SrcBuf [4] |
| Source buffer. More... | |
| u32 | DstBuf [300] |
| Destination buffer. More... | |
Registers offsets | |
| #define | XZDMA_ERR_CTRL (0x000U) |
| Error control register offset. More... | |
| #define | XZDMA_CH_ECO (0x004U) |
| Channel ECO register offset. More... | |
| #define | XZDMA_CH_ISR_OFFSET(InstancePtr) ((InstancePtr)->irq_offset + (0x100U)) |
| ISR offset. More... | |
| #define | XZDMA_CH_IMR_OFFSET(InstancePtr) ((InstancePtr)->irq_offset + (0x104U)) |
| IMR offset. More... | |
| #define | XZDMA_CH_IEN_OFFSET(InstancePtr) ((InstancePtr)->irq_offset + (0x108U)) |
| IEN offset. More... | |
| #define | XZDMA_CH_IDS_OFFSET(InstancePtr) ((InstancePtr)->irq_offset + (0x10CU)) |
| IDS offset. More... | |
| #define | XZDMA_CH_CTRL0_OFFSET (0x110U) |
| Control 0 register offset. More... | |
| #define | XZDMA_CH_CTRL1_OFFSET (0x114U) |
| Control 1 register offset. More... | |
| #define | XZDMA_CH_PERIF_OFFSET (0x118U) |
| Peripheral register offset. More... | |
| #define | XZDMA_CH_STS_OFFSET (0x11CU) |
| Status register offset. More... | |
| #define | XZDMA_CH_DATA_ATTR_OFFSET (0x120U) |
| Data attribute register offset. More... | |
| #define | XZDMA_CH_DSCR_ATTR_OFFSET (0x124U) |
| Descriptor attribute register offset. More... | |
| #define | XZDMA_CH_SRC_DSCR_WORD0_OFFSET (0x128U) |
| Source descriptor word 0 offset. More... | |
| #define | XZDMA_CH_SRC_DSCR_WORD1_OFFSET (0x12CU) |
| Source descriptor word 1 offset. More... | |
| #define | XZDMA_CH_SRC_DSCR_WORD2_OFFSET (0x130U) |
| Source descriptor word 2 offset. More... | |
| #define | XZDMA_CH_SRC_DSCR_WORD3_OFFSET (0x134U) |
| Source descriptor word 3 offset. More... | |
| #define | XZDMA_CH_DST_DSCR_WORD0_OFFSET (0x138U) |
| Destination descriptor word 0 offset. More... | |
| #define | XZDMA_CH_DST_DSCR_WORD1_OFFSET (0x13CU) |
| Destination descriptor word 1 offset. More... | |
| #define | XZDMA_CH_DST_DSCR_WORD2_OFFSET (0x140U) |
| Destination descriptor word 2 offset. More... | |
| #define | XZDMA_CH_DST_DSCR_WORD3_OFFSET (0x144U) |
| Destination descriptor word 3 offset. More... | |
| #define | XZDMA_CH_WR_ONLY_WORD0_OFFSET (0x148U) |
| Write-only word 0 offset. More... | |
| #define | XZDMA_CH_WR_ONLY_WORD1_OFFSET (0x14CU) |
| Write-only word 1 offset. More... | |
| #define | XZDMA_CH_WR_ONLY_WORD2_OFFSET (0x150U) |
| Write-only word 2 offset. More... | |
| #define | XZDMA_CH_WR_ONLY_WORD3_OFFSET (0x154U) |
| Write-only word 3 offset. More... | |
| #define | XZDMA_CH_SRC_START_LSB_OFFSET (0x158U) |
| Source start LSB offset. More... | |
| #define | XZDMA_CH_SRC_START_MSB_OFFSET (0x15CU) |
| Source start MSB offset. More... | |
| #define | XZDMA_CH_DST_START_LSB_OFFSET (0x160U) |
| Destination start LSB offset. More... | |
| #define | XZDMA_CH_DST_START_MSB_OFFSET (0x164U) |
| Destination start MSB offset. More... | |
| #define | XZDMA_CH_SRC_CUR_PYLD_LSB_OFFSET (0x168U) |
| Source current payload LSB offset. More... | |
| #define | XZDMA_CH_SRC_CUR_PYLD_MSB_OFFSET (0x16CU) |
| Source current payload MSB offset. More... | |
| #define | XZDMA_CH_DST_CUR_PYLD_LSB_OFFSET (0x170U) |
| Destination current payload LSB offset. More... | |
| #define | XZDMA_CH_DST_CUR_PYLD_MSB_OFFSET (0x174U) |
| Destination current payload MSB offset. More... | |
| #define | XZDMA_CH_SRC_CUR_DSCR_LSB_OFFSET (0x178U) |
| Source current descriptor LSB offset. More... | |
| #define | XZDMA_CH_SRC_CUR_DSCR_MSB_OFFSET (0x17CU) |
| Source current descriptor MSB offset. More... | |
| #define | XZDMA_CH_DST_CUR_DSCR_LSB_OFFSET (0x180U) |
| Destination current descriptor LSB offset. More... | |
| #define | XZDMA_CH_DST_CUR_DSCR_MSB_OFFSET (0x184U) |
| Destination current descriptor MSB offset. More... | |
| #define | XZDMA_CH_TOTAL_BYTE_OFFSET (0x188U) |
| Total byte count register offset. More... | |
| #define | XZDMA_CH_RATE_CNTL_OFFSET (0x18CU) |
| Rate control register offset. More... | |
| #define | XZDMA_CH_IRQ_SRC_ACCT_OFFSET (0x190U) |
| Source interrupt account offset. More... | |
| #define | XZDMA_CH_IRQ_DST_ACCT_OFFSET (0x194U) |
| Destination interrupt account offset. More... | |
| #define | XZDMA_CH_CTRL2_OFFSET (0x200U) |
| Control 2 register offset. More... | |
IRQ Register offset for Versal 2VE and 2VM devices | |
| #define | XZDMA_IRQ_REG_OFFSET (0x308U) |
| IRQ register offset for Versal. More... | |
Interrupt Enable/Disable/Mask/Status registers bit masks and shifts | |
| #define | XZDMA_IXR_DMA_PAUSE_MASK (0x00000800U) |
| IXR pause mask. More... | |
| #define | XZDMA_IXR_DMA_DONE_MASK (0x00000400U) |
| IXR done mask. More... | |
| #define | XZDMA_IXR_AXI_WR_DATA_MASK (0x00000200U) |
| IXR AXI write data error mask. More... | |
| #define | XZDMA_IXR_AXI_RD_DATA_MASK (0x00000100U) |
| IXR AXI read data error mask. More... | |
| #define | XZDMA_IXR_AXI_RD_DST_DSCR_MASK (0x00000080U) |
| IXR AXI read descriptor error mask. More... | |
| #define | XZDMA_IXR_AXI_RD_SRC_DSCR_MASK (0x00000040U) |
| IXR AXI write descriptor error mask. More... | |
| #define | XZDMA_IXR_DST_ACCT_ERR_MASK (0x00000020U) |
| IXR DST interrupt count overflow mask. More... | |
| #define | XZDMA_IXR_SRC_ACCT_ERR_MASK (0x00000010U) |
| IXR SRC interrupt count overflow mask. More... | |
| #define | XZDMA_IXR_BYTE_CNT_OVRFL_MASK (0x00000008U) |
| IXR byte count over flow mask. More... | |
| #define | XZDMA_IXR_DST_DSCR_DONE_MASK (0x00000004U) |
| IXR destination descriptor done mask. More... | |
| #define | XZDMA_IXR_SRC_DSCR_DONE_MASK (0x00000002U) |
| IXR source descriptor done mask. More... | |
| #define | XZDMA_IXR_INV_APB_MASK (0x00000001U) |
| IXR invalid APB access mask. More... | |
| #define | XZDMA_IXR_ALL_INTR_MASK (0x00000FFFU) |
| IXR OR of all the interrupts mask. More... | |
| #define | XZDMA_IXR_DONE_MASK (0x00000400U) |
| IXR All done mask. More... | |
| #define | XZDMA_IXR_ERR_MASK (0x00000BF9U) |
| IXR all Error mask. More... | |
Channel Control0 register bit masks and shifts | |
| #define | XZDMA_CTRL0_OVR_FETCH_MASK (0x00000080U) |
| Over fetch mask. More... | |
| #define | XZDMA_CTRL0_POINT_TYPE_MASK (0x00000040U) |
| Pointer type mask. More... | |
| #define | XZDMA_CTRL0_MODE_MASK (0x00000030U) |
| Mode mask. More... | |
| #define | XZDMA_CTRL0_WRONLY_MASK (0x00000010U) |
| Write only mask. More... | |
| #define | XZDMA_CTRL0_RDONLY_MASK (0x00000020U) |
| Read only mask. More... | |
| #define | XZDMA_CTRL0_RATE_CNTL_MASK (0x00000008U) |
| Rate control mask. More... | |
| #define | XZDMA_CTRL0_CONT_ADDR_MASK (0x00000004U) |
| Continue address specified mask. More... | |
| #define | XZDMA_CTRL0_CONT_MASK (0x00000002U) |
| Continue mask. More... | |
| #define | XZDMA_CTRL0_OVR_FETCH_SHIFT (7U) |
| Over fetch shift. More... | |
| #define | XZDMA_CTRL0_POINT_TYPE_SHIFT (6U) |
| Pointer type shift. More... | |
| #define | XZDMA_CTRL0_MODE_SHIFT (4U) |
| Mode type shift. More... | |
| #define | XZDMA_CTRL0_RESET_VALUE (0x00000080U) |
| CTRL0 reset value. More... | |
Channel Control1 register bit masks and shifts | |
| #define | XZDMA_CTRL1_SRC_ISSUE_MASK (0x0000001FU) |
| Source issue mask. More... | |
| #define | XZDMA_CTRL1_RESET_VALUE (0x000003FFU) |
| CTRL1 reset value. More... | |
Channel Peripheral register bit masks and shifts | |
| #define | XZDMA_PERIF_PROG_CELL_CNT_MASK (0x0000003EU) |
| Peripheral program cell count. More... | |
| #define | XZDMA_PERIF_SIDE_MASK (0x00000002U) |
| Interface attached the side mask. More... | |
| #define | XZDMA_PERIF_EN_MASK (0x00000001U) |
| Peripheral flow control mask. More... | |
Channel Status register bit masks and shifts | |
| #define | XZDMA_STS_DONE_ERR_MASK (0x00000003U) |
| Done with errors mask. More... | |
| #define | XZDMA_STS_BUSY_MASK (0x00000002U) |
| ZDMA is busy in transfer mask. More... | |
| #define | XZDMA_STS_PAUSE_MASK (0x00000001U) |
| ZDMA is in Pause state mask. More... | |
| #define | XZDMA_STS_DONE_MASK (0x00000000U) |
| ZDMA done mask. More... | |
| #define | XZDMA_STS_ALL_MASK (0x00000003U) |
| ZDMA status mask. More... | |
Channel Data Attribute register bit masks and shifts | |
| #define | XZDMA_DATA_ATTR_ARBURST_MASK (0x0C000000U) |
| Data ArBurst mask. More... | |
| #define | XZDMA_DATA_ATTR_ARCACHE_MASK (0x03C00000U) |
| Data ArCache mask. More... | |
| #define | XZDMA_DATA_ATTR_ARQOS_MASK (0x003C0000U) |
| Data ARQos masks. More... | |
| #define | XZDMA_DATA_ATTR_ARLEN_MASK (0x0003C000U) |
| Data Arlen mask. More... | |
| #define | XZDMA_DATA_ATTR_AWBURST_MASK (0x00003000U) |
| Data Awburst mask. More... | |
| #define | XZDMA_DATA_ATTR_AWCACHE_MASK (0x00000F00U) |
| Data AwCache mask. More... | |
| #define | XZDMA_DATA_ATTR_AWQOS_MASK (0x000000F0U) |
| Data AwQos mask. More... | |
| #define | XZDMA_DATA_ATTR_AWLEN_MASK (0x0000000FU) |
| Data Awlen mask. More... | |
| #define | XZDMA_DATA_ATTR_ARBURST_SHIFT (26U) |
| Data Arburst shift. More... | |
| #define | XZDMA_DATA_ATTR_ARCACHE_SHIFT (22U) |
| Data ArCache shift. More... | |
| #define | XZDMA_DATA_ATTR_ARQOS_SHIFT (18U) |
| Data ARQos shift. More... | |
| #define | XZDMA_DATA_ATTR_ARLEN_SHIFT (14U) |
| Data Arlen shift. More... | |
| #define | XZDMA_DATA_ATTR_AWBURST_SHIFT (12U) |
| Data Awburst shift. More... | |
| #define | XZDMA_DATA_ATTR_AWCACHE_SHIFT (8U) |
| Data Awcache shift. More... | |
| #define | XZDMA_DATA_ATTR_AWQOS_SHIFT (4U) |
| Data Awqos shift. More... | |
| #define | XZDMA_DATA_ATTR_RESET_VALUE (0x0483D20FU) |
| Data Attributes reset value. More... | |
Channel DSCR Attribute register bit masks and shifts | |
| #define | XZDMA_DSCR_ATTR_AXCOHRNT_MASK (0x00000100U) |
| Descriptor coherent mask. More... | |
| #define | XZDMA_DSCR_ATTR_AXCACHE_MASK (0x000000F0U) |
| Descriptor cache mask. More... | |
| #define | XZDMA_DSCR_ATTR_AXQOS_MASK (0x0000000FU) |
| Descriptor AxQos mask. More... | |
| #define | XZDMA_DSCR_ATTR_AXCOHRNT_SHIFT (8U) |
| Descriptor coherent shift. More... | |
| #define | XZDMA_DSCR_ATTR_AXCACHE_SHIFT (4U) |
| Descriptor cache shift. More... | |
| #define | XZDMA_DSCR_ATTR_RESET_VALUE (0x00000000U) |
| Dscr Attributes reset value. More... | |
Channel Source/Destination Word0 register bit mask | |
| #define | XZDMA_WORD0_LSB_MASK (0xFFFFFFFFU) |
| LSB Address mask. More... | |
Channel Source/Destination Word1 register bit mask | |
| #define | XZDMA_WORD1_MSB_MASK (0x0001FFFFU) |
| MSB Address mask. More... | |
| #define | XZDMA_WORD1_MSB_SHIFT (32U) |
| MSB Address shift. More... | |
Channel Source/Destination Word2 register bit mask | |
| #define | XZDMA_WORD2_SIZE_MASK (0x3FFFFFFFU) |
| Size mask. More... | |
Channel Source/Destination Word3 register bit masks and shifts | |
| #define | XZDMA_WORD3_CMD_MASK (0x00000018U) |
| Cmd mask. More... | |
| #define | XZDMA_WORD3_CMD_SHIFT (3U) |
| Cmd shift. More... | |
| #define | XZDMA_WORD3_CMD_NXTVALID_MASK (0x00000000U) |
| Next Dscr is valid mask. More... | |
| #define | XZDMA_WORD3_CMD_PAUSE_MASK (0x00000008U) |
| Pause after this dscr mask. More... | |
| #define | XZDMA_WORD3_CMD_STOP_MASK (0x00000010U) |
| Stop after this ..* dscr mask. More... | |
| #define | XZDMA_WORD3_INTR_MASK (0x00000004U) |
| Interrupt enable or disable mask. More... | |
| #define | XZDMA_WORD3_INTR_SHIFT (2U) |
| Interrupt enable disable shift. More... | |
| #define | XZDMA_WORD3_TYPE_MASK (0x00000002U) |
| Type of Descriptor mask. More... | |
| #define | XZDMA_WORD3_TYPE_SHIFT (1U) |
| Type of Descriptor Shift. More... | |
| #define | XZDMA_WORD3_COHRNT_MASK (0x00000001U) |
| Coherence mask. More... | |
Channel Source/Destination start address or current payload | |
| #define | XZDMA_START_MSB_ADDR_MASK (0x0001FFFFU) |
| Start msb address mask. More... | |
Channel Rate control count register bit mask | |
| #define | XZDMA_CH_RATE_CNTL_MASK (0x00000FFFU) |
| Channel rate control mask. More... | |
Channel Source/Destination Interrupt account count register bit mask | |
| #define | XZDMA_CH_IRQ_ACCT_MASK (0x000000FFU) |
| Interrupt count mask. More... | |
Channel debug register 0/1 bit mask | |
| #define | XZDMA_CH_DBG_CMN_BUF_MASK (0x000001FFU) |
| Common buffer count mask. More... | |
Channel control2 register bit mask | |
| #define | XZDMA_CH_CTRL2_EN_MASK (0x00000001U) |
| Channel enable mask. More... | |
| #define | XZDMA_CH_CTRL2_DIS_MASK (0x00000000U) |
| Channel disable mask. More... | |
| #define | XZDMA_WRITE_TO_CLEAR_MASK (0x00000000U) |
| Write to clear mask. More... | |
| #define DESCRIPTOR1_DATA_SIZE 1024 |
Descriptor 1 data in bytes.
Referenced by XZDma_LinkedListExample().
| #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_LinkedListExample().
| #define DESCRIPTOR2_DATA_SIZE 64 |
Descriptor 2 data in bytes.
Referenced by XZDma_LinearExample().
| #define NUM_OF_EVENTS 1 |
Number of events to wait for in Xil_WaitForEventSet.
Referenced by XZDma_SimpleReadOnlyExample().
| #define NUM_OF_EVENTS 1 |
Number of events to wait for in Xil_WaitForEventSet.
Referenced by XZDma_LinkedListExample().
| #define NUM_OF_EVENTS 1 |
Number of events to wait for in Xil_WaitForEventSet.
Referenced by XZDma_WriteOnlyExample().
| #define NUM_OF_EVENTS 1 |
Number of events to wait for in Xil_WaitForEventSet.
Referenced by XZDma_LinearExample().
| #define NUM_OF_EVENTS 1 |
Number of events to wait for in Xil_WaitForEventSet.
Referenced by XZDma_SimpleExample().
| #define POLL_TIMEOUT_COUNTER 1000000U |
Maximum poll iterations while waiting for a DMA event.
Referenced by XZDma_SimpleReadOnlyExample().
| #define POLL_TIMEOUT_COUNTER 1000000U |
Maximum poll iterations while waiting for a DMA event.
Referenced by XZDma_LinkedListExample().
| #define POLL_TIMEOUT_COUNTER 1000000U |
Maximum poll iterations while waiting for a DMA event.
Referenced by XZDma_WriteOnlyExample().
| #define POLL_TIMEOUT_COUNTER 1000000U |
Maximum poll iterations while waiting for a DMA event.
Referenced by XZDma_LinearExample().
| #define POLL_TIMEOUT_COUNTER 1000000U |
Maximum poll iterations while waiting for a DMA event.
Referenced by XZDma_SimpleExample().
| #define SIZE 100 |
Size of the data to be transferred.
Referenced by XZDma_SimpleReadOnlyExample().
| #define SIZE 1000000 |
Size of the data to be transferred.
Referenced by XZDma_SimpleExample().
| #define SIZE 1024 |
Size of the data to be written.
Referenced by XZDma_WriteOnlyExample().
| #define TESTDATA1 0xABCD1230 |
Test data.
Referenced by XZDma_LinkedListExample().
| #define TESTDATA1 0xABCD1230 |
Test data.
Referenced by XZDma_LinearExample().
| #define TESTDATA2 0x00005000 |
Test data.
Referenced by XZDma_LinkedListExample().
| #define TESTDATA2 0x00005000 |
Test data.
Referenced by XZDma_LinearExample().
| #define TESTVALUE 0x1230 |
For writing into source buffer.
Referenced by XZDma_SimpleExample().
| #define XZDMA_CH_CTRL0_OFFSET (0x110U) |
Control 0 register offset.
Referenced by XZDma_Reset(), XZDma_Resume(), XZDma_SelfTest(), XZDma_SetChDataConfig(), and XZDma_SetMode().
| #define XZDMA_CH_CTRL1_OFFSET (0x114U) |
Control 1 register offset.
Referenced by XZDma_Reset(), and XZDma_SetChDataConfig().
| #define XZDMA_CH_CTRL2_DIS_MASK (0x00000000U) |
Channel disable mask.
| #define XZDMA_CH_CTRL2_EN_MASK (0x00000001U) |
Channel enable mask.
| #define XZDMA_CH_CTRL2_OFFSET (0x200U) |
Control 2 register offset.
| #define XZDMA_CH_DATA_ATTR_OFFSET (0x120U) |
Data attribute register offset.
Referenced by XZDma_Reset(), and XZDma_SetChDataConfig().
| #define XZDMA_CH_DBG_CMN_BUF_MASK (0x000001FFU) |
Common buffer count mask.
| #define XZDMA_CH_DSCR_ATTR_OFFSET (0x124U) |
Descriptor attribute register offset.
Referenced by XZDma_Reset(), and XZDma_SetChDscrConfig().
| #define XZDMA_CH_DST_CUR_DSCR_LSB_OFFSET (0x180U) |
Destination current descriptor LSB offset.
| #define XZDMA_CH_DST_CUR_DSCR_MSB_OFFSET (0x184U) |
Destination current descriptor MSB offset.
| #define XZDMA_CH_DST_CUR_PYLD_LSB_OFFSET (0x170U) |
Destination current payload LSB offset.
| #define XZDMA_CH_DST_CUR_PYLD_MSB_OFFSET (0x174U) |
Destination current payload MSB offset.
| #define XZDMA_CH_DST_DSCR_WORD0_OFFSET (0x138U) |
Destination descriptor word 0 offset.
| #define XZDMA_CH_DST_DSCR_WORD1_OFFSET (0x13CU) |
Destination descriptor word 1 offset.
| #define XZDMA_CH_DST_DSCR_WORD2_OFFSET (0x140U) |
Destination descriptor word 2 offset.
| #define XZDMA_CH_DST_DSCR_WORD3_OFFSET (0x144U) |
Destination descriptor word 3 offset.
Referenced by XZDma_Reset().
| #define XZDMA_CH_DST_START_LSB_OFFSET (0x160U) |
Destination start LSB offset.
Referenced by XZDma_ScatterGather().
| #define XZDMA_CH_DST_START_MSB_OFFSET (0x164U) |
Destination start MSB offset.
Referenced by XZDma_ScatterGather().
| #define XZDMA_CH_ECO (0x004U) |
Channel ECO register offset.
| #define XZDMA_CH_IDS_OFFSET | ( | InstancePtr | ) | ((InstancePtr)->irq_offset + (0x10CU)) |
IDS offset.
| #define XZDMA_CH_IEN_OFFSET | ( | InstancePtr | ) | ((InstancePtr)->irq_offset + (0x108U)) |
IEN offset.
Referenced by XZDma_Enable().
| #define XZDMA_CH_IMR_OFFSET | ( | InstancePtr | ) | ((InstancePtr)->irq_offset + (0x104U)) |
IMR offset.
| #define XZDMA_CH_IRQ_ACCT_MASK (0x000000FFU) |
Interrupt count mask.
| #define XZDMA_CH_IRQ_DST_ACCT_OFFSET (0x194U) |
Destination interrupt account offset.
| #define XZDMA_CH_IRQ_SRC_ACCT_OFFSET (0x190U) |
Source interrupt account offset.
| #define XZDMA_CH_ISR_OFFSET | ( | InstancePtr | ) | ((InstancePtr)->irq_offset + (0x100U)) |
ISR offset.
| #define XZDMA_CH_PERIF_OFFSET (0x118U) |
Peripheral register offset.
| #define XZDMA_CH_RATE_CNTL_MASK (0x00000FFFU) |
Channel rate control mask.
| #define XZDMA_CH_RATE_CNTL_OFFSET (0x18CU) |
Rate control register offset.
| #define XZDMA_CH_SRC_CUR_DSCR_LSB_OFFSET (0x178U) |
Source current descriptor LSB offset.
| #define XZDMA_CH_SRC_CUR_DSCR_MSB_OFFSET (0x17CU) |
Source current descriptor MSB offset.
| #define XZDMA_CH_SRC_CUR_PYLD_LSB_OFFSET (0x168U) |
Source current payload LSB offset.
| #define XZDMA_CH_SRC_CUR_PYLD_MSB_OFFSET (0x16CU) |
Source current payload MSB offset.
| #define XZDMA_CH_SRC_DSCR_WORD0_OFFSET (0x128U) |
Source descriptor word 0 offset.
| #define XZDMA_CH_SRC_DSCR_WORD1_OFFSET (0x12CU) |
Source descriptor word 1 offset.
| #define XZDMA_CH_SRC_DSCR_WORD2_OFFSET (0x130U) |
Source descriptor word 2 offset.
| #define XZDMA_CH_SRC_DSCR_WORD3_OFFSET (0x134U) |
Source descriptor word 3 offset.
Referenced by XZDma_Reset().
| #define XZDMA_CH_SRC_START_LSB_OFFSET (0x158U) |
Source start LSB offset.
Referenced by XZDma_ScatterGather().
| #define XZDMA_CH_SRC_START_MSB_OFFSET (0x15CU) |
Source start MSB offset.
Referenced by XZDma_ScatterGather().
| #define XZDMA_CH_STS_OFFSET (0x11CU) |
Status register offset.
Referenced by XZDma_ChannelState().
| #define XZDMA_CH_TOTAL_BYTE_OFFSET (0x188U) |
Total byte count register offset.
| #define XZDMA_CH_WR_ONLY_WORD0_OFFSET (0x148U) |
Write-only word 0 offset.
Referenced by XZDma_WOData().
| #define XZDMA_CH_WR_ONLY_WORD1_OFFSET (0x14CU) |
Write-only word 1 offset.
Referenced by XZDma_WOData().
| #define XZDMA_CH_WR_ONLY_WORD2_OFFSET (0x150U) |
Write-only word 2 offset.
Referenced by XZDma_WOData().
| #define XZDMA_CH_WR_ONLY_WORD3_OFFSET (0x154U) |
Write-only word 3 offset.
Referenced by XZDma_WOData().
| #define XZDMA_CTRL0_CONT_ADDR_MASK (0x00000004U) |
Continue address specified mask.
Referenced by XZDma_Resume().
| #define XZDMA_CTRL0_CONT_MASK (0x00000002U) |
Continue mask.
Referenced by XZDma_Resume().
| #define XZDMA_CTRL0_MODE_MASK (0x00000030U) |
Mode mask.
Referenced by XZDma_SetMode().
| #define XZDMA_CTRL0_MODE_SHIFT (4U) |
Mode type shift.
| #define XZDMA_CTRL0_OVR_FETCH_MASK (0x00000080U) |
Over fetch mask.
Referenced by XZDma_SelfTest(), and XZDma_SetChDataConfig().
| #define XZDMA_CTRL0_OVR_FETCH_SHIFT (7U) |
Over fetch shift.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_CTRL0_POINT_TYPE_MASK (0x00000040U) |
Pointer type mask.
Referenced by XZDma_SetMode().
| #define XZDMA_CTRL0_POINT_TYPE_SHIFT (6U) |
Pointer type shift.
| #define XZDMA_CTRL0_RATE_CNTL_MASK (0x00000008U) |
Rate control mask.
| #define XZDMA_CTRL0_RDONLY_MASK (0x00000020U) |
Read only mask.
Referenced by XZDma_SetMode().
| #define XZDMA_CTRL0_RESET_VALUE (0x00000080U) |
CTRL0 reset value.
Referenced by XZDma_Reset().
| #define XZDMA_CTRL0_WRONLY_MASK (0x00000010U) |
Write only mask.
Referenced by XZDma_SetMode().
| #define XZDMA_CTRL1_RESET_VALUE (0x000003FFU) |
CTRL1 reset value.
Referenced by XZDma_Reset().
| #define XZDMA_CTRL1_SRC_ISSUE_MASK (0x0000001FU) |
Source issue mask.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_DATA_ATTR_ARBURST_MASK (0x0C000000U) |
Data ArBurst mask.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_DATA_ATTR_ARBURST_SHIFT (26U) |
Data Arburst shift.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_DATA_ATTR_ARCACHE_MASK (0x03C00000U) |
Data ArCache mask.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_DATA_ATTR_ARCACHE_SHIFT (22U) |
Data ArCache shift.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_DATA_ATTR_ARLEN_MASK (0x0003C000U) |
Data Arlen mask.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_DATA_ATTR_ARLEN_SHIFT (14U) |
Data Arlen shift.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_DATA_ATTR_ARQOS_MASK (0x003C0000U) |
Data ARQos masks.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_DATA_ATTR_ARQOS_SHIFT (18U) |
Data ARQos shift.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_DATA_ATTR_AWBURST_MASK (0x00003000U) |
Data Awburst mask.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_DATA_ATTR_AWBURST_SHIFT (12U) |
Data Awburst shift.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_DATA_ATTR_AWCACHE_MASK (0x00000F00U) |
Data AwCache mask.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_DATA_ATTR_AWCACHE_SHIFT (8U) |
Data Awcache shift.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_DATA_ATTR_AWLEN_MASK (0x0000000FU) |
Data Awlen mask.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_DATA_ATTR_AWQOS_MASK (0x000000F0U) |
Data AwQos mask.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_DATA_ATTR_AWQOS_SHIFT (4U) |
Data Awqos shift.
Referenced by XZDma_SetChDataConfig().
| #define XZDMA_DATA_ATTR_RESET_VALUE (0x0483D20FU) |
Data Attributes reset value.
Referenced by XZDma_Reset().
| #define XZDma_DisableCh | ( | InstancePtr | ) |
This function Disable's the ZDMA core.
| [in] | InstancePtr | is a pointer to the XZDma instance. C-style signature:
void XZDma_DisableCh(XZDma *InstancePtr) |
Referenced by XZDma_Reset().
| #define XZDma_DisableIntr | ( | InstancePtr, | |
| Mask | |||
| ) |
This function disables individual interrupts of the ZDMA core by updating the Interrupt Disable register.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| [in] | Mask | is the type of the interrupts to disable. Use OR'ing of XZDMA_IXR_DMA_*_MASK constants defined in xzdma_hw.h to create this parameter value. |
Referenced by XZDma_IntrHandler(), XZDma_LinearExample(), XZDma_LinkedListExample(), XZDma_Reset(), XZDma_SimpleExample(), and XZDma_WriteOnlyExample().
| #define XZDMA_DSCR_ATTR_AXCACHE_MASK (0x000000F0U) |
Descriptor cache mask.
Referenced by XZDma_SetChDscrConfig().
| #define XZDMA_DSCR_ATTR_AXCACHE_SHIFT (4U) |
Descriptor cache shift.
Referenced by XZDma_SetChDscrConfig().
| #define XZDMA_DSCR_ATTR_AXCOHRNT_MASK (0x00000100U) |
Descriptor coherent mask.
Referenced by XZDma_SetChDscrConfig().
| #define XZDMA_DSCR_ATTR_AXCOHRNT_SHIFT (8U) |
Descriptor coherent shift.
Referenced by XZDma_Reset(), and XZDma_SetChDscrConfig().
| #define XZDMA_DSCR_ATTR_AXQOS_MASK (0x0000000FU) |
Descriptor AxQos mask.
Referenced by XZDma_SetChDscrConfig().
| #define XZDMA_DSCR_ATTR_RESET_VALUE (0x00000000U) |
Dscr Attributes reset value.
Referenced by XZDma_Reset().
| #define XZDma_DstCurPyld | ( | InstancePtr | ) |
This function returns destination current payload address under process of ZDMA core.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| #define XZDma_DstDscrCurPyld | ( | InstancePtr | ) |
This function returns destination descriptor current payload address under process of ZDMA core.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| #define XZDma_EnableCh | ( | InstancePtr | ) |
This function Enable's the ZDMA core for initiating the data transfer once the data transfer completes it will be automatically disabled.
| [in] | InstancePtr | is a pointer to the XZDma instance. C-style signature:
void XZDma_EnableCh(XZDma *InstancePtr) |
Referenced by XZDma_Enable().
| #define XZDma_EnableIntr | ( | InstancePtr, | |
| Mask | |||
| ) | (InstancePtr)->IntrMask = ((InstancePtr)->IntrMask | (Mask)) |
This function enables individual interrupts of the ZDMA core by updating the Interrupt Enable register.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| [in] | Mask | is the type of the interrupts to enable. Use OR'ing of XZDMA_IXR_DMA_*_MASK constants defined in xzdma_hw.h to create this parameter value. |
Referenced by XZDma_LinearExample(), XZDma_LinkedListExample(), XZDma_SimpleExample(), XZDma_SimpleReadOnlyExample(), and XZDma_WriteOnlyExample().
| #define XZDMA_ERR_CTRL (0x000U) |
Error control register offset.
| #define XZDma_GetDstIntrCnt | ( | InstancePtr | ) |
This function gets the total number of Interrupt count for destination after last call of this API.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
Referenced by XZDma_Reset().
| #define XZDma_GetIntrMask | ( | InstancePtr | ) |
This function returns interrupt mask to know which interrupts are enabled and which of them were disabled.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
Referenced by XZDma_IntrHandler().
| #define XZDma_GetSrcIntrCnt | ( | InstancePtr | ) |
This function gets the total number of Interrupt count for source after last call of this API.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
Referenced by XZDma_Reset().
| #define XZDma_GetTotalByte | ( | InstancePtr | ) |
This function gets the count of total bytes transferred through core since last clear in ZDMA core.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| #define XZDma_In32 Xil_In32 |
Input operation.
| #define XZDma_IntrClear | ( | InstancePtr, | |
| Mask | |||
| ) |
This function clears interrupt(s).
Every bit set in Interrupt Status Register indicates that a specific type of interrupt is occurring, and this function clears one or more interrupts by writing a bit mask to Interrupt Clear Register.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| [in] | Mask | is the type of the interrupts to enable. Use OR'ing of XZDMA_IXR_DMA_*_MASK constants defined in xzdma_hw.h to create this parameter value. |
Referenced by XZDma_IntrHandler(), and XZDma_Reset().
| #define XZDma_IntrGetStatus | ( | InstancePtr | ) | XZDma_ReadReg((InstancePtr)->Config.BaseAddress, XZDMA_CH_ISR_OFFSET(InstancePtr)) |
This function returns interrupt status read from Interrupt Status Register.
Use the XZDMA_IXR_DMA_*_MASK constants defined in xzdma_hw.h to interpret the returned value.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
Referenced by XZDma_IntrHandler().
| #define XZDMA_IRQ_REG_OFFSET (0x308U) |
IRQ register offset for Versal.
Referenced by XZDma_CfgInitialize().
| #define XZDMA_IXR_ALL_INTR_MASK (0x00000FFFU) |
IXR OR of all the interrupts mask.
Referenced by XZDma_Enable(), XZDma_IntrHandler(), XZDma_Reset(), and XZDma_SimpleExample().
| #define XZDMA_IXR_AXI_RD_DATA_MASK (0x00000100U) |
IXR AXI read data error mask.
Referenced by XZDma_IntrHandler(), and XZDma_SimpleExample().
| #define XZDMA_IXR_AXI_RD_DST_DSCR_MASK (0x00000080U) |
IXR AXI read descriptor error mask.
Referenced by XZDma_IntrHandler().
| #define XZDMA_IXR_AXI_RD_SRC_DSCR_MASK (0x00000040U) |
IXR AXI write descriptor error mask.
Referenced by XZDma_IntrHandler().
| #define XZDMA_IXR_AXI_WR_DATA_MASK (0x00000200U) |
IXR AXI write data error mask.
Referenced by XZDma_IntrHandler(), and XZDma_SimpleExample().
| #define XZDMA_IXR_BYTE_CNT_OVRFL_MASK (0x00000008U) |
IXR byte count over flow mask.
| #define XZDMA_IXR_DMA_DONE_MASK (0x00000400U) |
IXR done mask.
Referenced by XZDma_IntrHandler(), XZDma_LinearExample(), XZDma_LinkedListExample(), XZDma_SimpleReadOnlyExample(), and XZDma_WriteOnlyExample().
| #define XZDMA_IXR_DMA_PAUSE_MASK (0x00000800U) |
IXR pause mask.
Referenced by XZDma_IntrHandler(), and XZDma_LinearExample().
| #define XZDMA_IXR_DONE_MASK (0x00000400U) |
IXR All done mask.
| #define XZDMA_IXR_DST_ACCT_ERR_MASK (0x00000020U) |
IXR DST interrupt count overflow mask.
| #define XZDMA_IXR_DST_DSCR_DONE_MASK (0x00000004U) |
IXR destination descriptor done mask.
| #define XZDMA_IXR_ERR_MASK (0x00000BF9U) |
IXR all Error mask.
Or of XZDMA_IXR_AXI_WR_DATA_MASK, XZDMA_IXR_AXI_RD_DATA_MASK, XZDMA_IXR_AXI_RD_DST_DSCR_MASK, XZDMA_IXR_AXI_RD_SRC_DSCR_MASK, XZDMA_IXR_INV_APB_MASK, XZDMA_IXR_DMA_PAUSE_MASK, XZDMA_IXR_BYTE_CNT_OVRFL_MASK, XZDMA_IXR_SRC_ACCT_ERR_MASK, XZDMA_IXR_DST_ACCT_ERR_MASK
Referenced by XZDma_IntrHandler().
| #define XZDMA_IXR_INV_APB_MASK (0x00000001U) |
IXR invalid APB access mask.
| #define XZDMA_IXR_SRC_ACCT_ERR_MASK (0x00000010U) |
IXR SRC interrupt count overflow mask.
| #define XZDMA_IXR_SRC_DSCR_DONE_MASK (0x00000002U) |
IXR source descriptor done mask.
| #define XZDma_Out32 Xil_Out32 |
Output operation.
| #define XZDMA_PERIF_EN_MASK (0x00000001U) |
Peripheral flow control mask.
| #define XZDMA_PERIF_PROG_CELL_CNT_MASK (0x0000003EU) |
Peripheral program cell count.
| #define XZDMA_PERIF_SIDE_MASK (0x00000002U) |
Interface attached the side mask.
| #define XZDma_ReadReg | ( | BaseAddress, | |
| RegOffset | |||
| ) | XZDma_In32((BaseAddress) + (u32)(RegOffset)) |
This macro reads the given register.
| [in] | BaseAddress | is the Xilinx base address of the ZDMA core. |
| [in] | RegOffset | is the register offset of the register. |
Referenced by XZDma_ChannelState(), XZDma_Resume(), XZDma_SelfTest(), XZDma_SetChDataConfig(), and XZDma_SetMode().
| #define XZDma_SrcCurPyld | ( | InstancePtr | ) |
This function returns source current payload address under process of ZDMA core.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| #define XZDma_SrcDscrCurPyld | ( | InstancePtr | ) |
This function returns source descriptor current payload address under process of ZDMA core.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| #define XZDMA_START_MSB_ADDR_MASK (0x0001FFFFU) |
Start msb address mask.
| #define XZDMA_STS_ALL_MASK (0x00000003U) |
ZDMA status mask.
Referenced by XZDma_ChannelState().
| #define XZDMA_STS_BUSY_MASK (0x00000002U) |
ZDMA is busy in transfer mask.
| #define XZDMA_STS_DONE_ERR_MASK (0x00000003U) |
Done with errors mask.
Referenced by XZDma_ChannelState().
| #define XZDMA_STS_DONE_MASK (0x00000000U) |
ZDMA done mask.
Referenced by XZDma_ChannelState().
| #define XZDMA_STS_PAUSE_MASK (0x00000001U) |
ZDMA is in Pause state mask.
Referenced by XZDma_ChannelState().
| #define XZDma_TotalByteClear | ( | InstancePtr | ) |
This function clears the count of total bytes transferred in ZDMA core.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
Referenced by XZDma_Reset().
| #define XZDMA_WORD0_LSB_MASK (0xFFFFFFFFU) |
LSB Address mask.
Referenced by XZDma_ScatterGather().
| #define XZDMA_WORD1_MSB_MASK (0x0001FFFFU) |
MSB Address mask.
Referenced by XZDma_ScatterGather().
| #define XZDMA_WORD1_MSB_SHIFT (32U) |
MSB Address shift.
Referenced by XZDma_ScatterGather().
| #define XZDMA_WORD2_SIZE_MASK (0x3FFFFFFFU) |
Size mask.
| #define XZDMA_WORD3_CMD_MASK (0x00000018U) |
Cmd mask.
| #define XZDMA_WORD3_CMD_NXTVALID_MASK (0x00000000U) |
Next Dscr is valid mask.
| #define XZDMA_WORD3_CMD_PAUSE_MASK (0x00000008U) |
Pause after this dscr mask.
| #define XZDMA_WORD3_CMD_SHIFT (3U) |
Cmd shift.
| #define XZDMA_WORD3_CMD_STOP_MASK (0x00000010U) |
Stop after this ..* dscr mask.
| #define XZDMA_WORD3_COHRNT_MASK (0x00000001U) |
Coherence mask.
Referenced by XZDma_Reset().
| #define XZDMA_WORD3_INTR_MASK (0x00000004U) |
Interrupt enable or disable mask.
| #define XZDMA_WORD3_INTR_SHIFT (2U) |
Interrupt enable disable shift.
| #define XZDMA_WORD3_TYPE_MASK (0x00000002U) |
Type of Descriptor mask.
| #define XZDMA_WORD3_TYPE_SHIFT (1U) |
Type of Descriptor Shift.
| #define XZDMA_WRITE_TO_CLEAR_MASK (0x00000000U) |
Write to clear mask.
| #define XZDma_WriteReg | ( | BaseAddress, | |
| RegOffset, | |||
| Data | |||
| ) | XZDma_Out32(((BaseAddress) + (u32)(RegOffset)), (u32)(Data)) |
This macro writes the value into the given register.
| [in] | BaseAddress | is the Xilinx base address of the ZDMA core. |
| [in] | RegOffset | is the register offset of the register. |
| [in] | Data | is the 32-bit value to write to the register. |
Referenced by XZDma_Enable(), XZDma_Reset(), XZDma_Resume(), XZDma_ScatterGather(), XZDma_SelfTest(), XZDma_SetChDataConfig(), XZDma_SetChDscrConfig(), XZDma_SetMode(), and XZDma_WOData().
| typedef void(* XZDma_DoneHandler)(void *CallBackRef) |
Callback type for Completion of all data transfers.
| [in] | CallBackRef | is a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked. |
| typedef void(* XZDma_ErrorHandler)(void *CallBackRef, u32 ErrorMask) |
Callback type for all error interrupts.
| [in] | CallBackRef | is a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked. |
| [in] | ErrorMask | is a bit mask indicating the cause of the error. Its value equals 'OR'ing one or more XZDMA_IXR_* values defined in xzdma_hw.h |
| enum XZDma_BurstType |
| enum XZDma_DscrType |
| enum XZDma_Handler |
| enum XZDma_Mode |
| enum XZDmaState |
| int main | ( | void | ) |
Main function to call the example.
References XZDma_LinearExample().
| s32 XZDma_CfgInitialize | ( | XZDma * | InstancePtr, |
| XZDma_Config * | CfgPtr, | ||
| u32 | EffectiveAddr | ||
| ) |
This function initializes an ZDMA core.
This function must be called prior to using an ZDMA core. Initialization of an ZDMA includes setting up the instance data and ensuring the hardware is in a quiescent state and resets all the hardware configurations.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| [in] | CfgPtr | is a reference to a structure containing information about a specific XZDma instance. |
| [in] | EffectiveAddr | is the device base address in the virtual memory address space. The caller is responsible for keeping the address mapping from EffectiveAddr to the device physical base address unchanged once this function is invoked. Unexpected errors may occur if the address mapping changes after this function is called. If address translation is not used, pass in the physical address instead. |
References XZDma_Config::BaseAddress, XZDma::ChannelState, XZDma::Config, XZDma_Config::DmaType, XZDma::DoneHandler, XZDma::ErrorHandler, XZDma::IntrMask, XZDma::irq_offset, XZDma_Config::IsCacheCoherent, XZDma::IsReady, XZDma::IsSgDma, XZDma::Mode, XZDma_Config::Name, XZDMA_IDLE, XZDMA_IRQ_REG_OFFSET, XZDMA_NORMAL_MODE, and XZDma_Reset().
Referenced by XZDma_LinearExample(), XZDma_LinkedListExample(), XZDma_SelfTestExample(), XZDma_SimpleExample(), XZDma_SimpleReadOnlyExample(), and XZDma_WriteOnlyExample().
| XZDmaState XZDma_ChannelState | ( | XZDma * | InstancePtr | ) |
This function returns the state of ZDMA core.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
References XZDma_Config::BaseAddress, XZDma::Config, XZDMA_BUSY, XZDMA_CH_STS_OFFSET, XZDMA_IDLE, XZDMA_PAUSE, XZDma_ReadReg, XZDMA_STS_ALL_MASK, XZDMA_STS_DONE_ERR_MASK, XZDMA_STS_DONE_MASK, and XZDMA_STS_PAUSE_MASK.
| u32 XZDma_CreateBDList | ( | XZDma * | InstancePtr, |
| XZDma_DscrType | TypeOfDscr, | ||
| UINTPTR | Dscr_MemPtr, | ||
| u32 | NoOfBytes | ||
| ) |
This function sets the descriptor type and descriptor pointer's start address of both source and destination based on the memory allocated by user and also calculates no of descriptors(BDs) can be created in the allocated memory.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| [in] | TypeOfDscr | is a variable which specifies descriptor type whether Linear or linked list type of descriptor.
|
| [in] | Dscr_MemPtr | is a pointer to the allocated memory for creating descriptors. It Should be aligned to 64 bytes. |
| [in] | NoOfBytes | specifies the number of bytes allocated for descriptors |
References XZDma::Config, XZDma::Descriptor, XZDma_Descriptor::DscrCount, XZDma_Descriptor::DscrType, XZDma_Descriptor::DstDscrPtr, XZDma_Config::IsCacheCoherent, XZDma_Descriptor::SrcDscrPtr, XZDMA_LINEAR, and XZDMA_LINKEDLIST.
Referenced by XZDma_LinearExample(), and XZDma_LinkedListExample().
| void XZDma_Enable | ( | XZDma * | InstancePtr | ) |
This function enables all the interrupts which user intended to enable and enables the ZDMA channel for initiating data transfer.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
References XZDma_Config::BaseAddress, XZDma::ChannelState, XZDma::Config, XZDma::IntrMask, XZDMA_BUSY, XZDMA_CH_IEN_OFFSET, XZDma_EnableCh, XZDMA_IXR_ALL_INTR_MASK, and XZDma_WriteReg.
Referenced by XZDma_Start().
| void XZDma_GetChDataConfig | ( | XZDma * | InstancePtr, |
| XZDma_DataConfig * | Configure | ||
| ) |
This function gets the data attributes and control configurations of a ZDMA core.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| [in] | Configure | is a pointer to the XZDma_ChDataConfig structure which has all the configuration fields. The fields of the structure are:
|
References XZDma::DataConfig, XZDma_DataConfig::DstBurstLen, XZDma_DataConfig::DstBurstType, XZDma_DataConfig::DstCache, XZDma_DataConfig::DstQos, XZDma_DataConfig::OverFetch, XZDma_DataConfig::SrcBurstLen, XZDma_DataConfig::SrcBurstType, XZDma_DataConfig::SrcCache, XZDma_DataConfig::SrcIssue, and XZDma_DataConfig::SrcQos.
Referenced by XZDma_LinearExample(), and XZDma_LinkedListExample().
| void XZDma_GetChDscrConfig | ( | XZDma * | InstancePtr, |
| XZDma_DscrConfig * | Configure | ||
| ) |
This function gets the descriptor attributes of the channel.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| [in] | Configure | is a pointer to the XZDma_ChDscrConfig structure which has all the configuration fields. The fields of the structure are:
|
References XZDma_DscrConfig::AXCache, XZDma_DscrConfig::AxCoherent, XZDma_DscrConfig::AXQos, and XZDma::DscrConfig.
| void XZDma_IntrHandler | ( | void * | Instance | ) |
This function is the interrupt handler for the ZDMA core.
This handler reads the pending interrupt from Status register, determines the source of the interrupts and calls the respective callbacks for the interrupts that are enabled in IRQ_ENABLE register, and finally clears the interrupts.
The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XZDma_SetCallBack() during initialization phase. .
| [in] | Instance | is a pointer to the XZDma instance to be worked on. |
References XZDma::ChannelState, XZDma::DoneHandler, XZDma::DoneRef, XZDma::ErrorHandler, XZDma::ErrorRef, XZDma_DisableIntr, XZDma_GetIntrMask, XZDMA_IDLE, XZDma_IntrClear, XZDma_IntrGetStatus, XZDMA_IXR_ALL_INTR_MASK, XZDMA_IXR_AXI_RD_DATA_MASK, XZDMA_IXR_AXI_RD_DST_DSCR_MASK, XZDMA_IXR_AXI_RD_SRC_DSCR_MASK, XZDMA_IXR_AXI_WR_DATA_MASK, XZDMA_IXR_DMA_DONE_MASK, XZDMA_IXR_DMA_PAUSE_MASK, XZDMA_IXR_ERR_MASK, and XZDMA_PAUSE.
Referenced by XZDma_LinearExample(), XZDma_LinkedListExample(), XZDma_SimpleExample(), XZDma_SimpleReadOnlyExample(), and XZDma_WriteOnlyExample().
| int XZDma_LinearExample | ( | UINTPTR | BaseAddress | ) |
This function does a test of the data transfer in linear mode on the ZDMA driver.
| [in] | 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, NUM_OF_EVENTS, XZDma_DataConfig::OverFetch, XZDma_Transfer::Pause, POLL_TIMEOUT_COUNTER, 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().
| int XZDma_LinkedListExample | ( | UINTPTR | BaseAddress | ) |
This function does a test of the data transfer in linked mode on the ZDMA driver.
| [in] | BaseAddress | contains the base address of the ZDMA device |
References AlloMem, XZDma_Config::BaseAddress, DESCRIPTOR1_DATA_SIZE, DESCRIPTOR2_DATA_SIZE, Dst1Buf, XZDma_Transfer::DstAddr, DstBuf, XZDma_DataConfig::DstCache, XZDma_Transfer::DstCoherent, XZDma_Config::IntrId, XZDma_Config::IntrParent, XZDma_Config::IsCacheCoherent, NUM_OF_EVENTS, XZDma_DataConfig::OverFetch, XZDma_Transfer::Pause, POLL_TIMEOUT_COUNTER, XZDma_Transfer::Size, Src1Buf, XZDma_Transfer::SrcAddr, SrcBuf, XZDma_DataConfig::SrcCache, XZDma_Transfer::SrcCoherent, TESTDATA1, TESTDATA2, XZDma_CfgInitialize(), XZDma_CreateBDList(), XZDma_DisableIntr, XZDma_EnableIntr, XZDma_GetChDataConfig(), XZDMA_HANDLER_DONE, XZDma_IntrHandler(), XZDMA_IXR_DMA_DONE_MASK, XZDMA_LINKEDLIST, XZDma_LookupConfig(), XZDMA_NORMAL_MODE, XZDma_Reset(), XZDma_SelfTest(), XZDma_SetCallBack(), XZDma_SetChDataConfig(), XZDma_SetMode(), and XZDma_Start().
| XZDma_Config * XZDma_LookupConfig | ( | UINTPTR | BaseAddress | ) |
Looks up device configuration by base address.
| [in] | BaseAddress | contains the base address of the device. |
References XZDma_Config::Name.
Referenced by XZDma_LinearExample(), XZDma_LinkedListExample(), XZDma_SelfTestExample(), XZDma_SimpleExample(), XZDma_SimpleReadOnlyExample(), and XZDma_WriteOnlyExample().
| void XZDma_Reset | ( | XZDma * | InstancePtr | ) |
This function resets the ZDMA core.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
References XZDma_Config::BaseAddress, XZDma::ChannelState, XZDma::Config, XZDma::IntrMask, XZDma_Config::IsCacheCoherent, XZDMA_CH_CTRL0_OFFSET, XZDMA_CH_CTRL1_OFFSET, XZDMA_CH_DATA_ATTR_OFFSET, XZDMA_CH_DSCR_ATTR_OFFSET, XZDMA_CH_DST_DSCR_WORD3_OFFSET, XZDMA_CH_SRC_DSCR_WORD3_OFFSET, XZDMA_CTRL0_RESET_VALUE, XZDMA_CTRL1_RESET_VALUE, XZDMA_DATA_ATTR_RESET_VALUE, XZDma_DisableCh, XZDma_DisableIntr, XZDMA_DSCR_ATTR_AXCOHRNT_SHIFT, XZDMA_DSCR_ATTR_RESET_VALUE, XZDma_GetDstIntrCnt, XZDma_GetSrcIntrCnt, XZDMA_IDLE, XZDma_IntrClear, XZDMA_IXR_ALL_INTR_MASK, XZDma_TotalByteClear, XZDMA_WORD3_COHRNT_MASK, and XZDma_WriteReg.
Referenced by XZDma_CfgInitialize(), XZDma_LinearExample(), XZDma_LinkedListExample(), XZDma_SimpleExample(), and XZDma_WriteOnlyExample().
| void XZDma_Resume | ( | XZDma * | InstancePtr | ) |
This function resume the paused state of ZDMA core and starts the transfer from where it has paused.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
References XZDma_Config::BaseAddress, XZDma::ChannelState, XZDma::Config, XZDma::IsSgDma, XZDMA_BUSY, XZDMA_CH_CTRL0_OFFSET, XZDMA_CTRL0_CONT_ADDR_MASK, XZDMA_CTRL0_CONT_MASK, XZDMA_PAUSE, XZDma_ReadReg, and XZDma_WriteReg.
Referenced by XZDma_LinearExample().
| void XZDma_ScatterGather | ( | XZDma * | InstancePtr, |
| XZDma_Transfer * | Data, | ||
| u32 | Num | ||
| ) |
This function sets all the required fields for initiating data transfer in scatter gather mode.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| [in] | Data | is a pointer to an array of XZDma_Transfer structure which has all the configuration fields for initiating data transfer. |
| [in] | Num | specifies number of array elements of Data pointer. |
References XZDma_Config::BaseAddress, XZDma::Config, XZDma::Descriptor, XZDma_Descriptor::DscrType, XZDma_Descriptor::DstDscrPtr, XZDma_Descriptor::SrcDscrPtr, XZDMA_CH_DST_START_LSB_OFFSET, XZDMA_CH_DST_START_MSB_OFFSET, XZDMA_CH_SRC_START_LSB_OFFSET, XZDMA_CH_SRC_START_MSB_OFFSET, XZDMA_LINEAR, XZDMA_WORD0_LSB_MASK, XZDMA_WORD1_MSB_MASK, XZDMA_WORD1_MSB_SHIFT, and XZDma_WriteReg.
Referenced by XZDma_Start().
| s32 XZDma_SelfTest | ( | XZDma * | InstancePtr | ) |
Runs a diagnostic self-test for the ZDMA driver instance.
| [in] | InstancePtr | is a pointer to XZDma instance. |
References XZDma_Config::BaseAddress, XZDma::Config, XZDMA_CH_CTRL0_OFFSET, XZDMA_CTRL0_OVR_FETCH_MASK, XZDma_ReadReg, and XZDma_WriteReg.
Referenced by XZDma_LinearExample(), XZDma_LinkedListExample(), XZDma_SelfTestExample(), XZDma_SimpleExample(), XZDma_SimpleReadOnlyExample(), and XZDma_WriteOnlyExample().
| int XZDma_SelfTestExample | ( | UINTPTR | BaseAddress | ) |
This function does a minimal test on the ZDMA driver.
| [in] | BaseAddress | contains the base address of the ZDMA device |
References XZDma_Config::BaseAddress, XZDma_CfgInitialize(), XZDma_LookupConfig(), and XZDma_SelfTest().
| s32 XZDma_SetCallBack | ( | XZDma * | InstancePtr, |
| XZDma_Handler | HandlerType, | ||
| void * | CallBackFunc, | ||
| void * | CallBackRef | ||
| ) |
This routine installs an asynchronous callback function for the given HandlerType.
HandlerType Callback Function Type ----------------------- -------------------------------------------------- XZDMA_HANDLER_DONE Done handler XZDMA_HANDLER_ERROR Error handler
| [in] | InstancePtr | is a pointer to the XZDma instance to be worked on. |
| [in] | HandlerType | specifies which callback is to be attached. |
| [in] | CallBackFunc | is the address of the callback function. |
| [in] | CallBackRef | is a user data item that will be passed to the callback function when it is invoked. |
References XZDma::DoneHandler, XZDma::DoneRef, XZDma::ErrorHandler, XZDma::ErrorRef, XZDma::IsReady, XZDMA_HANDLER_DONE, and XZDMA_HANDLER_ERROR.
Referenced by XZDma_LinearExample(), XZDma_LinkedListExample(), XZDma_SimpleExample(), XZDma_SimpleReadOnlyExample(), and XZDma_WriteOnlyExample().
| s32 XZDma_SetChDataConfig | ( | XZDma * | InstancePtr, |
| XZDma_DataConfig * | Configure | ||
| ) |
This function sets the data attributes and control configurations of a ZDMA core based on the inputs provided.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| [in] | Configure | is a pointer to the XZDma_ChDataConfig structure which has all the configuration fields. The fields of the structure are:
|
References XZDma_Config::BaseAddress, XZDma::ChannelState, XZDma::Config, XZDma::DataConfig, XZDma_DataConfig::DstBurstLen, XZDma_DataConfig::DstBurstType, XZDma_DataConfig::DstCache, XZDma_DataConfig::DstQos, XZDma_DataConfig::OverFetch, XZDma_DataConfig::SrcBurstLen, XZDma_DataConfig::SrcBurstType, XZDma_DataConfig::SrcCache, XZDma_DataConfig::SrcIssue, XZDma_DataConfig::SrcQos, XZDMA_CH_CTRL0_OFFSET, XZDMA_CH_CTRL1_OFFSET, XZDMA_CH_DATA_ATTR_OFFSET, XZDMA_CTRL0_OVR_FETCH_MASK, XZDMA_CTRL0_OVR_FETCH_SHIFT, XZDMA_CTRL1_SRC_ISSUE_MASK, XZDMA_DATA_ATTR_ARBURST_MASK, XZDMA_DATA_ATTR_ARBURST_SHIFT, XZDMA_DATA_ATTR_ARCACHE_MASK, XZDMA_DATA_ATTR_ARCACHE_SHIFT, XZDMA_DATA_ATTR_ARLEN_MASK, XZDMA_DATA_ATTR_ARLEN_SHIFT, XZDMA_DATA_ATTR_ARQOS_MASK, XZDMA_DATA_ATTR_ARQOS_SHIFT, XZDMA_DATA_ATTR_AWBURST_MASK, XZDMA_DATA_ATTR_AWBURST_SHIFT, XZDMA_DATA_ATTR_AWCACHE_MASK, XZDMA_DATA_ATTR_AWCACHE_SHIFT, XZDMA_DATA_ATTR_AWLEN_MASK, XZDMA_DATA_ATTR_AWQOS_MASK, XZDMA_DATA_ATTR_AWQOS_SHIFT, XZDMA_IDLE, XZDma_ReadReg, and XZDma_WriteReg.
Referenced by XZDma_LinearExample(), XZDma_LinkedListExample(), XZDma_SimpleExample(), XZDma_SimpleReadOnlyExample(), and XZDma_WriteOnlyExample().
| s32 XZDma_SetChDscrConfig | ( | XZDma * | InstancePtr, |
| XZDma_DscrConfig * | Configure | ||
| ) |
This function sets the descriptor attributes based on the inputs provided in the structure.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| [in] | Configure | is a pointer to the XZDma_ChDscrConfig structure which has all the configuration fields. The fields of the structure are:
|
References XZDma_DscrConfig::AXCache, XZDma_DscrConfig::AxCoherent, XZDma_DscrConfig::AXQos, XZDma_Config::BaseAddress, XZDma::ChannelState, XZDma::Config, XZDma::DscrConfig, XZDMA_CH_DSCR_ATTR_OFFSET, XZDMA_DSCR_ATTR_AXCACHE_MASK, XZDMA_DSCR_ATTR_AXCACHE_SHIFT, XZDMA_DSCR_ATTR_AXCOHRNT_MASK, XZDMA_DSCR_ATTR_AXCOHRNT_SHIFT, XZDMA_DSCR_ATTR_AXQOS_MASK, XZDMA_IDLE, and XZDma_WriteReg.
| s32 XZDma_SetMode | ( | XZDma * | InstancePtr, |
| u8 | IsSgDma, | ||
| XZDma_Mode | Mode | ||
| ) |
This function sets the pointer type and mode in which ZDMA needs to transfer the data.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| [in] | IsSgDma | is a variable which specifies whether transfer has to to be done in scatter gather mode or simple mode.
|
| [in] | Mode | is the type of the mode in which data has to be initiated
|
References XZDma_Config::BaseAddress, XZDma::ChannelState, XZDma::Config, XZDma::IsSgDma, XZDma::Mode, XZDMA_CH_CTRL0_OFFSET, XZDMA_CTRL0_MODE_MASK, XZDMA_CTRL0_POINT_TYPE_MASK, XZDMA_CTRL0_RDONLY_MASK, XZDMA_CTRL0_WRONLY_MASK, XZDMA_IDLE, XZDMA_NORMAL_MODE, XZDMA_RDONLY_MODE, XZDma_ReadReg, XZDma_WriteReg, and XZDMA_WRONLY_MODE.
Referenced by XZDma_LinearExample(), XZDma_LinkedListExample(), XZDma_SimpleExample(), XZDma_SimpleReadOnlyExample(), and XZDma_WriteOnlyExample().
| int XZDma_SimpleExample | ( | XZDma * | ZdmaInstPtr, |
| UINTPTR | BaseAddress | ||
| ) |
This function does a test of the data transfer in simple mode of normal mode on the ZDMA driver.
| [in] | ZdmaInstPtr | contains a pointer to the ZDMA instance which is going to be connected to the interrupt controller. |
| [in] | BaseAddress | contains the base address of the ZDMA device |
References XZDma_Config::BaseAddress, XZDma_Transfer::DstAddr, XZDma_DataConfig::DstBurstLen, XZDma_DataConfig::DstBurstType, XZDma_DataConfig::DstCache, XZDma_Transfer::DstCoherent, XZDma_DataConfig::DstQos, XZDma_Config::IntrId, XZDma_Config::IntrParent, XZDma_Config::IsCacheCoherent, NUM_OF_EVENTS, XZDma_DataConfig::OverFetch, XZDma_Transfer::Pause, POLL_TIMEOUT_COUNTER, 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(), XZDma_Start(), ZDmaDstBuf, and ZDmaSrcBuf.
| int XZDma_SimpleReadOnlyExample | ( | UINTPTR | BaseAddress | ) |
This function does a test of the data transfer in simple mode of read only mode on the ZDMA driver.
| [in] | BaseAddress | contains the base address of the ZDMA device |
References XZDma_Config::BaseAddress, XZDma_Transfer::DstAddr, XZDma_DataConfig::DstBurstLen, XZDma_DataConfig::DstBurstType, XZDma_DataConfig::DstCache, XZDma_Transfer::DstCoherent, XZDma_Config::IntrId, XZDma_Config::IntrParent, XZDma_Config::IsCacheCoherent, NUM_OF_EVENTS, XZDma_DataConfig::OverFetch, XZDma_Transfer::Pause, POLL_TIMEOUT_COUNTER, 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_EnableIntr, XZDMA_HANDLER_DONE, XZDMA_INCR_BURST, XZDma_IntrHandler(), XZDMA_IXR_DMA_DONE_MASK, XZDma_LookupConfig(), XZDMA_RDONLY_MODE, XZDma_SelfTest(), XZDma_SetCallBack(), XZDma_SetChDataConfig(), XZDma_SetMode(), and XZDma_Start().
| s32 XZDma_Start | ( | XZDma * | InstancePtr, |
| XZDma_Transfer * | Data, | ||
| u32 | Num | ||
| ) |
This function sets all the required fields for initiating data transfer.
Data transfer elements needs to be passed through structure pointer. Data transfer can be done in any of the three modes (simple, Linear or Linked List) based on the selected mode but before calling this API make sure that ZDMA is in Idle state.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| [in] | Data | is a pointer to an array of XZDma_Transfer structure which has all the configuration fields for initiating data transfer. The fields of the structure are:
|
| [in] | Num | specifies number of array elements of Data pointer.
|
References XZDma::ChannelState, XZDma::Descriptor, XZDma_Descriptor::DscrCount, XZDma::IsSgDma, XZDMA_BUSY, XZDma_Enable(), and XZDma_ScatterGather().
Referenced by XZDma_LinearExample(), XZDma_LinkedListExample(), XZDma_SimpleExample(), XZDma_SimpleReadOnlyExample(), and XZDma_WriteOnlyExample().
| s32 XZDma_Stop | ( | XZDma * | InstancePtr | ) |
Stops the ZDMA engine and releases power management resources if supported.
This function asserts the validity of the input instance pointer. If power management (XPM_SUPPORT) is enabled, it releases the power management node associated with the ZDMA instance. If the release fails, an error message is printed. The function returns the status of the operation.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
References XZDma_Config::BaseAddress, and XZDma::Config.
Referenced by XZDma_WriteOnlyExample().
| void XZDma_WOData | ( | XZDma * | InstancePtr, |
| u32 * | Buffer | ||
| ) |
This function preloads the buffers which will be used in write only mode.
In write only mode the data in the provided buffer will be written in destination address for specified size.
| [in] | InstancePtr | is a pointer to the XZDma instance. |
| [in] | Buffer | is a pointer to an array of 64/128 bit data. i.e. pointer to 32-bit array of size 2/4
|
References XZDma_Config::BaseAddress, XZDma::Config, XZDma_Config::DmaType, XZDMA_CH_WR_ONLY_WORD0_OFFSET, XZDMA_CH_WR_ONLY_WORD1_OFFSET, XZDMA_CH_WR_ONLY_WORD2_OFFSET, XZDMA_CH_WR_ONLY_WORD3_OFFSET, and XZDma_WriteReg.
Referenced by XZDma_WriteOnlyExample().
| int XZDma_WriteOnlyExample | ( | UINTPTR | BaseAddress | ) |
This function does a test of the data transfer in simple mode of write only mode on the ZDMA driver.
| [in] | BaseAddress | contains the base address of the ZDMA device |
References XZDma_Config::BaseAddress, XZDma::Config, XZDma_Config::DmaType, 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, NUM_OF_EVENTS, XZDma_DataConfig::OverFetch, XZDma_Transfer::Pause, POLL_TIMEOUT_COUNTER, 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_Stop(), XZDma_WOData(), and XZDMA_WRONLY_MODE.
| 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[300] |
Destination buffer.
| 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.
| u32 SrcBuf[4] |
Source buffer.
| u32 SrcBuf[256] |
Source buffer.
Referenced by XZDma_LinearExample(), XZDma_LinkedListExample(), XZDma_SimpleReadOnlyExample(), and XZDma_WriteOnlyExample().
| XZDma_Config XZDma_ConfigTable[] |
Configuration table for each ZDMA instance in the system.
| XZDma ZDma |
Instance of the ZDMA Device.
| XZDma ZDma |
Instance of the ZDMA Device.
| XZDma ZDma |
Instance of the ZDMA Device.
| XZDma ZDma |
Instance of the ZDMA Device.
| XZDma ZDma |
Instance of the ZDMA Device.
| XZDma ZDma |
Instance of the ZDMA Device.
| u8 ZDmaDstBuf[SIZE] |
Destination buffer.
Referenced by XZDma_SimpleExample().
| u8 ZDmaSrcBuf[SIZE] |
Source buffer.
Referenced by XZDma_SimpleExample().