UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
239 Views
Registered: ‎03-29-2017

ZYNQ Ultrascale+ and Axi Performance monitor

Hi,

I want to measue real-time performance metrics for throughput and latency for connected AXI interfaces (i.e. Axi4 Stream interface). From the Axi Performance monitor user guide, i understood little bit but not completely.

Advance mode will support AXI4-Stream interface. But i don`t know the programming sequence in XSDK.

 

 

Through  some guide reference, i wrote below code to execute  real-time performance metrics measurement. But It`s not working. Any correction please suggest me or Any example design with programming sequence in XSDK. Please share to me.

static XAxiPmon monitor;

void init_pmon();

void init_pmon()
{
	XAxiPmon_Config *ConfigPtr;
	s32 Status;

	ConfigPtr = XAxiPmon_LookupConfig(XPAR_AXIPMON_0_DEVICE_ID);
	Status  = XAxiPmon_CfgInitialize(&monitor, ConfigPtr, ConfigPtr->BaseAddress);

	if (Status != XST_SUCCESS)
    {
         xil_printf("Initialization failed\n\r");
    }
    xil_printf("\n\r Axi Performance Monitor Initialized");
}


int main()
{
	int status;
	u32 PacketCount;
	u32 DataByteCount;
	init_platform();

	//Initializing performance monitor
	init_pmon();
	Xil_DCacheDisable();

	XAxiPmon_ResetMetricCounter(&monitor);
	XAxiPmon_ResetGlobalClkCounter(&monitor);

	status = XAxiPmon_SetMetrics(&monitor, 2, XAPM_METRIC_SET_17,XAPM_METRIC_COUNTER_0);
	if (status == XST_FAILURE)
    {
        xil_printf("Metric Setting failed\n\r");
    }


	status = XAxiPmon_SetMetrics(&monitor, 2, XAPM_METRIC_SET_18,XAPM_METRIC_COUNTER_1);
	if (status == XST_FAILURE)
	{
	     xil_printf("Metric Setting failed\n\r");
	}

	XAxiPmon_EnableMetricsCounter(&monitor);
	XAxiPmon_StartCounters(&monitor, 400000000);

	Xil_Out32(XPAR_AXI_PERF_MON_0_BASEADDR,  0x16111210);

	XAxiPmon_StopCounters(&monitor);

	PacketCount = XAxiPmon_GetMetricCounter(&monitor, XAPM_METRIC_COUNTER_0);
	DataByteCount = XAxiPmon_GetMetricCounter(&monitor, XAPM_METRIC_COUNTER_1);
	xil_printf("\n\r Packet Count of Packet Generator = %d", PacketCount);
	xil_printf("\n\r Data Byte Count of Packet Generator = %d", DataByteCount);
	return 0;
}

 

0 Kudos
3 Replies
Explorer
Explorer
225 Views
Registered: ‎03-29-2017

Re: ZYNQ Ultrascale+ and Axi Performance monitor

APM.png

 

I have attached the screenshot.

 

Design

 

APM_1.png

0 Kudos
Highlighted
Voyager
Voyager
203 Views
Registered: ‎03-28-2016

Re: ZYNQ Ultrascale+ and Axi Performance monitor

@thaus_015,

If you haven't already looked at the examples provided for the axipmon driver, they can be found in the SDK installation at:

...\SDK\2018.3\data\embeddedsw\XilinxProcessorIPLib\drivers\axipmon_v6_7\examples

The actual path may vary depending upon your install and operating system.

Ted Booth - Tech. Lead FPGA Design Engineer
www.designlinxhs.com
0 Kudos
Explorer
Explorer
186 Views
Registered: ‎03-29-2017

Re: ZYNQ Ultrascale+ and Axi Performance monitor

Thanks for your response.

I have already gone through that link. But eventhough i am unable to get output from APM. Any idea please. 

0 Kudos