XilinxProcessorIPLib/drivers/axipmon/src/xaxipmon.c
void XAxiPmon_GetGlobalClkCounter(XAxiPmon *InstancePtr,u32 *CntHighValue,
							u32 *CntLowValue)
{
	/*
	 * Assert the arguments.
	 */
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid(InstancePtr->Mode == XAPM_MODE_ADVANCED);

	*CntHighValue = 0x0U;
	*CntLowValue  = 0x0U;

	/*
	 * If Counter width is 64 bit then Counter Value has to be
	 * filled at CntHighValue address also.
	 */
	if(InstancePtr->Config.GlobalClkCounterWidth == 64) {

		/* Bits[63:32] exists at XAPM_GCC_HIGH_OFFSET */
		*CntHighValue = XAxiPmon_ReadReg(InstancePtr->
				Config.BaseAddress, XAPM_GCC_HIGH_OFFSET);
	}
	/* Bits[31:0] exists at XAPM_GCC_LOW_OFFSET */
	*CntLowValue = XAxiPmon_ReadReg(InstancePtr->
				Config.BaseAddress, XAPM_GCC_LOW_OFFSET);
}
/****************************************************************************/
/**
*
* This function returns the contents of the Global Clock Counter Register.
*
* @param	InstancePtr is a pointer to the XAxiPmon instance.
* @param	CntHighValue is the user space pointer with which upper 32 bits
*		of Global Clock Counter has to be filled
* @param	CntLowValue is the user space pointer with which lower 32 bits
*		of Global Clock Counter has to be filled
*
* @return	None.
*
* @note		None.
*
*****************************************************************************/
This function returns the contents of the Global Clock Counter Register.
This function returns the contents of the Global Clock Counter Register .
void XAxiPmon_GetGlobalClkCounter(XAxiPmon *InstancePtr,u32 *CntHighValue,
							u32 *CntLowValue)
{
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid(InstancePtr->Mode == XAPM_MODE_ADVANCED);
	*CntHighValue = 0x0U;
	*CntLowValue  = 0x0U;
	if(InstancePtr->Config.GlobalClkCounterWidth == 64) {
		*CntHighValue = XAxiPmon_ReadReg(InstancePtr->
				Config.BaseAddress, XAPM_GCC_HIGH_OFFSET);
	}
	*CntLowValue = XAxiPmon_ReadReg(InstancePtr->
				Config.BaseAddress, XAPM_GCC_LOW_OFFSET);
}
void XAxiPmon_GetGlobalClkCounter ( XAxiPmon * InstancePtr , u32 * CntHighValue , u32 * CntLowValue ) { Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Xil_AssertVoid ( InstancePtr -> Mode == XAPM_MODE_ADVANCED ) ; * CntHighValue = 0x0U ; * CntLowValue = 0x0U ; if ( InstancePtr -> Config . GlobalClkCounterWidth == 64 ) { * CntHighValue = XAxiPmon_ReadReg ( InstancePtr -> Config . BaseAddress , XAPM_GCC_HIGH_OFFSET ) ; } * CntLowValue = XAxiPmon_ReadReg ( InstancePtr -> Config . BaseAddress , XAPM_GCC_LOW_OFFSET ) ; }
This function returns the contents of the Global Clock Counter Register.
This function returns the contents of the Global Clock Counter Register .
/*
	 * Assert the arguments.
	 */ /*
	 * If Counter width is 64 bit then Counter Value has to be
	 * filled at CntHighValue address also.
	 */ /* Bits[63:32] exists at XAPM_GCC_HIGH_OFFSET */ /* Bits[31:0] exists at XAPM_GCC_LOW_OFFSET */