XilinxProcessorIPLib/drivers/aiengine/src/tile/xaietile_core.c
u8 XAieTile_CoreWaitCycles(XAieGbl_Tile *TileInstPtr, u32 CycleCnt)
{
        u64 StartVal;
        u64 EndVal;
        u64 CurVal = 0U;
	u32 StartHigh;
        u32 StartLow;
        u32 CurHigh;
        u32 CurLow;

	XAie_AssertNonvoid(TileInstPtr != XAIE_NULL);

        /* Read the timer high and low values before wait */
        StartLow = XAieGbl_Read32(TileInstPtr->TileAddr +
			TimerReg[XAIETILE_TIMER_MODULE_CORE].LowOff);
        StartHigh = XAieGbl_Read32(TileInstPtr->TileAddr +
			TimerReg[XAIETILE_TIMER_MODULE_CORE].HighOff);
        StartVal = ((u64)StartHigh << 0x20U) | StartLow;

        EndVal = StartVal + CycleCnt;

        while(CurVal < EndVal) {
                /* Read the timer high and low values */
                CurLow = XAieGbl_Read32(TileInstPtr->TileAddr +
				TimerReg[XAIETILE_TIMER_MODULE_CORE].LowOff);
                CurHigh = XAieGbl_Read32(TileInstPtr->TileAddr +
				TimerReg[XAIETILE_TIMER_MODULE_CORE].HighOff);
                CurVal = ((u64)CurHigh << 0x20U) | CurLow;
        }

	return XAIE_SUCCESS;
}
/*****************************************************************************/
/**
*
* This API implements a blocking wait function until the specified clock cyles
* are elapsed in the Core module 64-bit counter.
*
* @param	TileInstPtr - Pointer to the Tile instance.
* @param	CycleCnt - No. of timer clock cycles to elapse.
*
* @return	XAIE_SUCCESS on success.
*
* @note		None.
*
*******************************************************************************/
This API implements a blocking wait function until the specified clock cyles
are elapsed in the Core module 64-bit counter.
This API implements a blocking wait function until the specified clock cyles are elapsed in the Core module 64 - bit counter .
u8 XAieTile_CoreWaitCycles(XAieGbl_Tile *TileInstPtr, u32 CycleCnt)
{
        u64 StartVal;
        u64 EndVal;
        u64 CurVal = 0U;
	u32 StartHigh;
        u32 StartLow;
        u32 CurHigh;
        u32 CurLow;
	XAie_AssertNonvoid(TileInstPtr != XAIE_NULL);
        StartLow = XAieGbl_Read32(TileInstPtr->TileAddr +
			TimerReg[XAIETILE_TIMER_MODULE_CORE].LowOff);
        StartHigh = XAieGbl_Read32(TileInstPtr->TileAddr +
			TimerReg[XAIETILE_TIMER_MODULE_CORE].HighOff);
        StartVal = ((u64)StartHigh << 0x20U) | StartLow;
        EndVal = StartVal + CycleCnt;
        while(CurVal < EndVal) {
                CurLow = XAieGbl_Read32(TileInstPtr->TileAddr +
				TimerReg[XAIETILE_TIMER_MODULE_CORE].LowOff);
                CurHigh = XAieGbl_Read32(TileInstPtr->TileAddr +
				TimerReg[XAIETILE_TIMER_MODULE_CORE].HighOff);
                CurVal = ((u64)CurHigh << 0x20U) | CurLow;
        }
	return XAIE_SUCCESS;
}
u8 XAieTile_CoreWaitCycles ( XAieGbl_Tile * TileInstPtr , u32 CycleCnt ) { u64 StartVal ; u64 EndVal ; u64 CurVal = 0U ; u32 StartHigh ; u32 StartLow ; u32 CurHigh ; u32 CurLow ; XAie_AssertNonvoid ( TileInstPtr != XAIE_NULL ) ; StartLow = XAieGbl_Read32 ( TileInstPtr -> TileAddr + TimerReg [ XAIETILE_TIMER_MODULE_CORE ] . LowOff ) ; StartHigh = XAieGbl_Read32 ( TileInstPtr -> TileAddr + TimerReg [ XAIETILE_TIMER_MODULE_CORE ] . HighOff ) ; StartVal = ( ( u64 ) StartHigh << 0x20U ) | StartLow ; EndVal = StartVal + CycleCnt ; while ( CurVal < EndVal ) { CurLow = XAieGbl_Read32 ( TileInstPtr -> TileAddr + TimerReg [ XAIETILE_TIMER_MODULE_CORE ] . LowOff ) ; CurHigh = XAieGbl_Read32 ( TileInstPtr -> TileAddr + TimerReg [ XAIETILE_TIMER_MODULE_CORE ] . HighOff ) ; CurVal = ( ( u64 ) CurHigh << 0x20U ) | CurLow ; } return XAIE_SUCCESS ; }
This API implements a blocking wait function until the specified clock cyles
are elapsed in the Core module 64-bit counter.
This API implements a blocking wait function until the specified clock cyles are elapsed in the Core module 64 - bit counter .
/* Read the timer high and low values before wait */ /* Read the timer high and low values */