cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
1,647 Views
Registered: ‎01-10-2014

Xilinx native VDMA test fails

Hello everyone!

 

I am trying to create a simple design in Zynq using AXI VDMA. The design is attached in .pdf.

I tried to launch the Xilinx VDMA test on this platform (see below), but it fails on the line 

 

Status = XAxiVdma_CfgInitialize(&AxiVdma, Config, Config->BaseAddress);

Here is the entire code:

#include "xaxivdma.h"
#include "xparameters.h"
#include "xdebug.h"
#include "xil_printf.h"
/******************** Constant Definitions **********************************/
/*
* Device hardware build related constants.
*/
#ifndef TESTAPP_GEN
#define DMA_DEVICE_ID XPAR_AXIVDMA_0_DEVICE_ID
#endif

/**************************** Type Definitions *******************************/

/***************** Macros (Inline Functions) Definitions *********************/

/************************** Function Prototypes ******************************/
int AxiVDMASelfTestExample(u16 DeviceId);
/************************** Variable Definitions *****************************/
/*
* Device instance definitions
*/
XAxiVdma AxiVdma;

/*****************************************************************************/
/*
* The entry point for this example. It invokes the example function,
* and reports the execution status.
*
* @param None.
*
* @return
* - XST_SUCCESS if example finishes successfully
* - XST_FAILURE if example fails.
*
* @note None.
*
******************************************************************************/
#ifndef TESTAPP_GEN
int main()
{
int Status;
xil_printf("\r\n--- Entering main() --- \r\n");
/* Run the poll example for simple transfer */
Status = AxiVDMASelfTestExample(DMA_DEVICE_ID);
if (Status != XST_SUCCESS) {
xil_printf("AxiVDMASelfTest Example Failed\r\n");
return XST_FAILURE;
}
xil_printf("Successfully ran AxiVDMASelfTest Example\r\n");
xil_printf("--- Exiting main() --- \r\n");
return XST_SUCCESS;
}
#endif
/*****************************************************************************/
/*
* This function performance a reset of the VDMA device and checks the device is
* coming out of reset or not.
*
* @param DeviceId is the DMA device id.
*
* @return - XST_SUCCESS if channel reset is successful
* - XST_FAILURE if channel reset fails.
*
* @note None.
*
******************************************************************************/
int AxiVDMASelfTestExample(u16 DeviceId)
{
XAxiVdma_Config *Config;
int Status = XST_SUCCESS;
Config = XAxiVdma_LookupConfig(DeviceId);
if (!Config) {
return XST_FAILURE;
}
/* Initialize DMA engine */
Status = XAxiVdma_CfgInitialize(&AxiVdma, Config, Config->BaseAddress);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
Status = XAxiVdma_Selftest(&AxiVdma);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
return Status;
}

I'm not sure the problem is in my reference design. What am I doing wrong?

 

0 Kudos
1 Reply
Highlighted
Xilinx Employee
Xilinx Employee
1,570 Views
Registered: ‎08-02-2011

Re: Xilinx native VDMA test fails

First thing is that you can remove the AXI Protocol Converter. The AXI Interconnect will use one internally as needed.

I'd also check your clocks and resets. Did you run ps7_init?
www.xilinx.com
0 Kudos