XilinxProcessorIPLib/drivers/axipmon/src/xaxipmon.c
s32 XAxiPmon_ResetFifo(XAxiPmon *InstancePtr)
{

	u32 RegValue;

	/*
	 * Assert the arguments.
	 */
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertNonvoid(InstancePtr->Mode != XAPM_MODE_PROFILE);

	/* Check Event Logging is enabled in Hardware */
	if((InstancePtr->Config.IsEventLog == 0U) &&
			(InstancePtr->Mode == XAPM_MODE_ADVANCED))
	{
		/*Event logging not enabled in Hardware*/
		return XST_SUCCESS;
	}
	/*
	 * Write the reset value to the Control register to reset
	 * FIFO
	 */
	RegValue = XAxiPmon_ReadReg(InstancePtr->Config.BaseAddress,
							 XAPM_CTL_OFFSET);
	XAxiPmon_WriteReg(InstancePtr->Config.BaseAddress, XAPM_CTL_OFFSET,
					(RegValue | XAPM_CR_FIFO_RESET_MASK));
	/*
	 * Release from Reset
	 */
	XAxiPmon_WriteReg(InstancePtr->Config.BaseAddress, XAPM_CTL_OFFSET,
				(RegValue & ~(XAPM_CR_FIFO_RESET_MASK)));

	return XST_SUCCESS;

}
/*****************************************************************************/
/**
*
* This function resets Streaming FIFO of AXI Performance Monitor
*
* @param	InstancePtr is a pointer to the XAxiPmon instance.
*
* @return	XST_SUCCESS
*
* @note		None.
*
******************************************************************************/
This function resets Streaming FIFO of AXI Performance Monitor
This function resets Streaming FIFO of AXI Performance Monitor
s32 XAxiPmon_ResetFifo(XAxiPmon *InstancePtr)
{
	u32 RegValue;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertNonvoid(InstancePtr->Mode != XAPM_MODE_PROFILE);
	if((InstancePtr->Config.IsEventLog == 0U) &&
			(InstancePtr->Mode == XAPM_MODE_ADVANCED))
	{
		return XST_SUCCESS;
	}
	RegValue = XAxiPmon_ReadReg(InstancePtr->Config.BaseAddress,
							 XAPM_CTL_OFFSET);
	XAxiPmon_WriteReg(InstancePtr->Config.BaseAddress, XAPM_CTL_OFFSET,
					(RegValue | XAPM_CR_FIFO_RESET_MASK));
	XAxiPmon_WriteReg(InstancePtr->Config.BaseAddress, XAPM_CTL_OFFSET,
				(RegValue & ~(XAPM_CR_FIFO_RESET_MASK)));
	return XST_SUCCESS;
}
s32 XAxiPmon_ResetFifo ( XAxiPmon * InstancePtr ) { u32 RegValue ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Xil_AssertNonvoid ( InstancePtr -> Mode != XAPM_MODE_PROFILE ) ; if ( ( InstancePtr -> Config . IsEventLog == 0U ) && ( InstancePtr -> Mode == XAPM_MODE_ADVANCED ) ) { return XST_SUCCESS ; } RegValue = XAxiPmon_ReadReg ( InstancePtr -> Config . BaseAddress , XAPM_CTL_OFFSET ) ; XAxiPmon_WriteReg ( InstancePtr -> Config . BaseAddress , XAPM_CTL_OFFSET , ( RegValue | XAPM_CR_FIFO_RESET_MASK ) ) ; XAxiPmon_WriteReg ( InstancePtr -> Config . BaseAddress , XAPM_CTL_OFFSET , ( RegValue & ~ ( XAPM_CR_FIFO_RESET_MASK ) ) ) ; return XST_SUCCESS ; }
This function resets Streaming FIFO of AXI Performance Monitor
This function resets Streaming FIFO of AXI Performance Monitor
/*
	 * Assert the arguments.
	 */ /* Check Event Logging is enabled in Hardware */ /*Event logging not enabled in Hardware*/ /*
	 * Write the reset value to the Control register to reset
	 * FIFO
	 */ /*
	 * Release from Reset
	 */