XilinxProcessorIPLib/drivers/aienginev2/src/pm/xaie_clock.c
u8 _XAie_PmIsTileRequested(XAie_DevInst *DevInst, XAie_LocType Loc)
{
	u8 TileType;
	u32 TileBit;

	if((DevInst == XAIE_NULL) ||
		(DevInst->IsReady != XAIE_COMPONENT_IS_READY)) {
		XAIE_ERROR("Invalid Device Instance\n");
		return XAIE_DISABLE;
	}

	TileType = DevInst->DevOps->GetTTypefromLoc(DevInst, Loc);
	if (TileType == XAIEGBL_TILE_TYPE_MAX) {
		return XAIE_DISABLE;
	}

	if (TileType == XAIEGBL_TILE_TYPE_SHIMNOC ||
	    TileType == XAIEGBL_TILE_TYPE_SHIMPL) {
		return XAIE_ENABLE;
	}

	TileBit = Loc.Col * (DevInst->NumRows - 1) + Loc.Row - 1;
	if (CheckBit(DevInst->TilesInUse, TileBit)) {
		return XAIE_ENABLE;
	}

	return XAIE_DISABLE;
}
/*****************************************************************************/
/**
*
* This API checks if an AI engine tile is in use.
*
* @param	DevInst: Device Instance
* @param	Loc: tile location
*
* @return	XAIE_ENABLE if a tile is in use, otherwise XAIE_DISABLE.
*
* @note		This API is supposed to be called internal only.
*******************************************************************************/
This API checks if an AI engine tile is in use.
This API checks if an AI engine tile is in use .
u8 _XAie_PmIsTileRequested(XAie_DevInst *DevInst, XAie_LocType Loc)
{
	u8 TileType;
	u32 TileBit;
	if((DevInst == XAIE_NULL) ||
		(DevInst->IsReady != XAIE_COMPONENT_IS_READY)) {
		XAIE_ERROR("Invalid Device Instance\n");
		return XAIE_DISABLE;
	}
	TileType = DevInst->DevOps->GetTTypefromLoc(DevInst, Loc);
	if (TileType == XAIEGBL_TILE_TYPE_MAX) {
		return XAIE_DISABLE;
	}
	if (TileType == XAIEGBL_TILE_TYPE_SHIMNOC ||
	    TileType == XAIEGBL_TILE_TYPE_SHIMPL) {
		return XAIE_ENABLE;
	}
	TileBit = Loc.Col * (DevInst->NumRows - 1) + Loc.Row - 1;
	if (CheckBit(DevInst->TilesInUse, TileBit)) {
		return XAIE_ENABLE;
	}
	return XAIE_DISABLE;
}
u8 _XAie_PmIsTileRequested ( XAie_DevInst * DevInst , XAie_LocType Loc ) { u8 TileType ; u32 TileBit ; if ( ( DevInst == XAIE_NULL ) || ( DevInst -> IsReady != XAIE_COMPONENT_IS_READY ) ) { XAIE_ERROR ( " \n " ) ; return XAIE_DISABLE ; } TileType = DevInst -> DevOps -> GetTTypefromLoc ( DevInst , Loc ) ; if ( TileType == XAIEGBL_TILE_TYPE_MAX ) { return XAIE_DISABLE ; } if ( TileType == XAIEGBL_TILE_TYPE_SHIMNOC || TileType == XAIEGBL_TILE_TYPE_SHIMPL ) { return XAIE_ENABLE ; } TileBit = Loc . Col * ( DevInst -> NumRows - 1 ) + Loc . Row - 1 ; if ( CheckBit ( DevInst -> TilesInUse , TileBit ) ) { return XAIE_ENABLE ; } return XAIE_DISABLE ; }
This API checks if an AI engine tile is in use.
This API checks if an AI engine tile is in use .