XilinxProcessorIPLib/drivers/axipmon/src/xaxipmon.c
void XAxiPmon_SetWrLatencyStart(XAxiPmon *InstancePtr, u8 Param)
{
	u32 RegVal;

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

	RegVal = XAxiPmon_ReadReg(InstancePtr->Config.BaseAddress,
							XAPM_CTL_OFFSET);
	if (Param == XAPM_LATENCY_ADDR_ACCEPT) {
		XAxiPmon_WriteReg(InstancePtr->Config.BaseAddress,
		  XAPM_CTL_OFFSET, RegVal | XAPM_CR_WRLATENCY_START_MASK);
	}
	else {
		XAxiPmon_WriteReg((InstancePtr)->Config.BaseAddress,
			XAPM_CTL_OFFSET,
			XAxiPmon_ReadReg((InstancePtr)->Config.BaseAddress,
			XAPM_CTL_OFFSET) & ~(XAPM_CR_WRLATENCY_START_MASK));
	}
}
/*****************************************************************************/
/**
*
* This function sets Latency Start point to calculate write latency.
*
* @param	InstancePtr is a pointer to the XAxiPmon instance.
* @param	Param is XAPM_LATENCY_ADDR_ISSUE or XAPM_LATENCY_ADDR_ACCEPT
*		in xaxipmon.h.
* @return	None
*
* @note		Param can be 0 - XAPM_LATENCY_ADDR_ISSUE
*		or 1 - XAPM_LATENCY_ADDR_ACCEPT
*
*******************************************************************************/
This function sets Latency Start point to calculate write latency.
This function sets Latency Start point to calculate write latency .
void XAxiPmon_SetWrLatencyStart(XAxiPmon *InstancePtr, u8 Param)
{
	u32 RegVal;
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	RegVal = XAxiPmon_ReadReg(InstancePtr->Config.BaseAddress,
							XAPM_CTL_OFFSET);
	if (Param == XAPM_LATENCY_ADDR_ACCEPT) {
		XAxiPmon_WriteReg(InstancePtr->Config.BaseAddress,
		  XAPM_CTL_OFFSET, RegVal | XAPM_CR_WRLATENCY_START_MASK);
	}
	else {
		XAxiPmon_WriteReg((InstancePtr)->Config.BaseAddress,
			XAPM_CTL_OFFSET,
			XAxiPmon_ReadReg((InstancePtr)->Config.BaseAddress,
			XAPM_CTL_OFFSET) & ~(XAPM_CR_WRLATENCY_START_MASK));
	}
}
void XAxiPmon_SetWrLatencyStart ( XAxiPmon * InstancePtr , u8 Param ) { u32 RegVal ; Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; RegVal = XAxiPmon_ReadReg ( InstancePtr -> Config . BaseAddress , XAPM_CTL_OFFSET ) ; if ( Param == XAPM_LATENCY_ADDR_ACCEPT ) { XAxiPmon_WriteReg ( InstancePtr -> Config . BaseAddress , XAPM_CTL_OFFSET , RegVal | XAPM_CR_WRLATENCY_START_MASK ) ; } else { XAxiPmon_WriteReg ( ( InstancePtr ) -> Config . BaseAddress , XAPM_CTL_OFFSET , XAxiPmon_ReadReg ( ( InstancePtr ) -> Config . BaseAddress , XAPM_CTL_OFFSET ) & ~ ( XAPM_CR_WRLATENCY_START_MASK ) ) ; } }
This function sets Latency Start point to calculate write latency.
This function sets Latency Start point to calculate write latency .
/*
	 * Assert the arguments.
	 */