XilinxProcessorIPLib/drivers/axipmon/src/xaxipmon.c
s32 XAxiPmon_StartEventLog(XAxiPmon *InstancePtr, u32 FlagEnables)
{
	u32 RegValue;

	/*
	 * Assert the arguments.
	 */
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertNonvoid((InstancePtr->Mode == XAPM_MODE_TRACE) ||
				((InstancePtr->Mode == XAPM_MODE_ADVANCED) &&
			(InstancePtr->Config.IsEventLog == 1U)));

	/* Read current register value */
	RegValue = XAxiPmon_ReadReg(InstancePtr->Config.BaseAddress,
							(u32)XAPM_CTL_OFFSET);
	/* Flag Enable register is present only in Advanced Mode */
	if(InstancePtr->Mode == XAPM_MODE_ADVANCED)
	{
		/* Now write to flag enables register */
		XAxiPmon_WriteReg(InstancePtr->Config.BaseAddress,
				(u32)XAPM_FEC_OFFSET, FlagEnables);
	}

	/* Write the new value to the Control register to
	 *	enable event logging */
	XAxiPmon_WriteReg(InstancePtr->Config.BaseAddress, (u32)XAPM_CTL_OFFSET,
		                  RegValue | XAPM_CR_EVENTLOG_ENABLE_MASK);

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function enables the following in the AXI Performance Monitor:
*   - Event logging
*
* @param        InstancePtr is a pointer to the XAxiPmon instance.
* @param        FlagEnables is a value to write to the flag enables
*               register defined by XAPM_FEC_OFFSET. It is recommended
*               to use the XAPM_FEC_*_MASK mask bits to generate.
*               A value of 0x0 will disable all events to the event
*               log streaming FIFO.
*
* @return       XST_SUCCESS
*
* @note         None
*
******************************************************************************/
This function enables the following in the AXI Performance Monitor:
Event logging
This function enables the following in the AXI Performance Monitor : Event logging
s32 XAxiPmon_StartEventLog(XAxiPmon *InstancePtr, u32 FlagEnables)
{
	u32 RegValue;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertNonvoid((InstancePtr->Mode == XAPM_MODE_TRACE) ||
				((InstancePtr->Mode == XAPM_MODE_ADVANCED) &&
			(InstancePtr->Config.IsEventLog == 1U)));
	RegValue = XAxiPmon_ReadReg(InstancePtr->Config.BaseAddress,
							(u32)XAPM_CTL_OFFSET);
	if(InstancePtr->Mode == XAPM_MODE_ADVANCED)
	{
		XAxiPmon_WriteReg(InstancePtr->Config.BaseAddress,
				(u32)XAPM_FEC_OFFSET, FlagEnables);
	}
	XAxiPmon_WriteReg(InstancePtr->Config.BaseAddress, (u32)XAPM_CTL_OFFSET,
		                  RegValue | XAPM_CR_EVENTLOG_ENABLE_MASK);
	return XST_SUCCESS;
}
s32 XAxiPmon_StartEventLog ( XAxiPmon * InstancePtr , u32 FlagEnables ) { u32 RegValue ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Xil_AssertNonvoid ( ( InstancePtr -> Mode == XAPM_MODE_TRACE ) || ( ( InstancePtr -> Mode == XAPM_MODE_ADVANCED ) && ( InstancePtr -> Config . IsEventLog == 1U ) ) ) ; RegValue = XAxiPmon_ReadReg ( InstancePtr -> Config . BaseAddress , ( u32 ) XAPM_CTL_OFFSET ) ; if ( InstancePtr -> Mode == XAPM_MODE_ADVANCED ) { XAxiPmon_WriteReg ( InstancePtr -> Config . BaseAddress , ( u32 ) XAPM_FEC_OFFSET , FlagEnables ) ; } XAxiPmon_WriteReg ( InstancePtr -> Config . BaseAddress , ( u32 ) XAPM_CTL_OFFSET , RegValue | XAPM_CR_EVENTLOG_ENABLE_MASK ) ; return XST_SUCCESS ; }
This function enables the following in the AXI Performance Monitor:
 Event logging
This function enables the following in the AXI Performance Monitor : Event logging
/*
	 * Assert the arguments.
	 */ /* Read current register value */ /* Flag Enable register is present only in Advanced Mode */ /* Now write to flag enables register */ /* Write the new value to the Control register to
	 *	enable event logging */