XilinxProcessorIPLib/drivers/aienginev2/src/core/xaie_core.c
static AieRC _XAie_CoreWaitStatus(XAie_DevInst *DevInst, XAie_LocType Loc,
		u32 TimeOut, u32 Mask, u32 Value)
{

	u64 RegAddr;
	const XAie_CoreMod *CoreMod;
	u8 TileType;

	TileType = DevInst->DevOps->GetTTypefromLoc(DevInst, Loc);
	if(TileType != XAIEGBL_TILE_TYPE_AIETILE) {
		XAIE_ERROR("Invalid Tile Type\n");
		return XAIE_INVALID_TILE;
	}

	CoreMod = DevInst->DevProp.DevMod[TileType].CoreMod;

	/* TimeOut passed by the user is per Core */
	if(TimeOut == 0) {
		/* Set timeout to default value */
		TimeOut = XAIETILE_CORE_STATUS_DEF_WAIT_USECS;
	}


	RegAddr = CoreMod->CoreSts->RegOff +
		_XAie_GetTileAddr(DevInst, Loc.Row, Loc.Col);

	if(XAie_MaskPoll(DevInst, RegAddr, Mask, Value, TimeOut) !=
			XAIE_OK) {
		XAIE_DBG("Status poll time out\n");
		return XAIE_CORE_STATUS_TIMEOUT;
	}

	return XAIE_OK;

}
/************************** Function Definitions *****************************/
/*****************************************************************************/
/*
*
* This API implements a blocking wait function to check the core status for a
* range of AIE Tiles for a given Mask and Value. API comes out of the wait loop
* when the status changes to the Mask, Value pair or the timeout elapses,
* whichever happens first.
*
* @param	DevInst: Device Instance
* @param	Loc: Location of the AIE tile.
* @param	TimeOut: TimeOut in usecs. If set to 0, the default timeout will
*		be set to 500us.
* @param	Mask: Mask for the core status register.
* @param	Value: Value for the core status register.
*
* @return	XAIE_OK on success, Error code on failure.
*
* @note		Internal API only.
*
******************************************************************************/
Function Definitions
This API implements a blocking wait function to check the core status for a
range of AIE Tiles for a given Mask and Value. API comes out of the wait loop
when the status changes to the Mask, Value pair or the timeout elapses,
whichever happens first.
Function Definitions This API implements a blocking wait function to check the core status for a range of AIE Tiles for a given Mask and Value . API comes out of the wait loop when the status changes to the Mask Value pair or the timeout elapses whichever happens first .
static AieRC _XAie_CoreWaitStatus(XAie_DevInst *DevInst, XAie_LocType Loc,
		u32 TimeOut, u32 Mask, u32 Value)
{
	u64 RegAddr;
	const XAie_CoreMod *CoreMod;
	u8 TileType;
	TileType = DevInst->DevOps->GetTTypefromLoc(DevInst, Loc);
	if(TileType != XAIEGBL_TILE_TYPE_AIETILE) {
		XAIE_ERROR("Invalid Tile Type\n");
		return XAIE_INVALID_TILE;
	}
	CoreMod = DevInst->DevProp.DevMod[TileType].CoreMod;
	if(TimeOut == 0) {
		TimeOut = XAIETILE_CORE_STATUS_DEF_WAIT_USECS;
	}
	RegAddr = CoreMod->CoreSts->RegOff +
		_XAie_GetTileAddr(DevInst, Loc.Row, Loc.Col);
	if(XAie_MaskPoll(DevInst, RegAddr, Mask, Value, TimeOut) !=
			XAIE_OK) {
		XAIE_DBG("Status poll time out\n");
		return XAIE_CORE_STATUS_TIMEOUT;
	}
	return XAIE_OK;
}
static AieRC _XAie_CoreWaitStatus ( XAie_DevInst * DevInst , XAie_LocType Loc , u32 TimeOut , u32 Mask , u32 Value ) { u64 RegAddr ; const XAie_CoreMod * CoreMod ; u8 TileType ; TileType = DevInst -> DevOps -> GetTTypefromLoc ( DevInst , Loc ) ; if ( TileType != XAIEGBL_TILE_TYPE_AIETILE ) { XAIE_ERROR ( " \n " ) ; return XAIE_INVALID_TILE ; } CoreMod = DevInst -> DevProp . DevMod [ TileType ] . CoreMod ; if ( TimeOut == 0 ) { TimeOut = XAIETILE_CORE_STATUS_DEF_WAIT_USECS ; } RegAddr = CoreMod -> CoreSts -> RegOff + _XAie_GetTileAddr ( DevInst , Loc . Row , Loc . Col ) ; if ( XAie_MaskPoll ( DevInst , RegAddr , Mask , Value , TimeOut ) != XAIE_OK ) { XAIE_DBG ( " \n " ) ; return XAIE_CORE_STATUS_TIMEOUT ; } return XAIE_OK ; }
Function Definitions
This API implements a blocking wait function to check the core status for a
range of AIE Tiles for a given Mask and Value.
Function Definitions This API implements a blocking wait function to check the core status for a range of AIE Tiles for a given Mask and Value .
/* TimeOut passed by the user is per Core */ /* Set timeout to default value */