XilinxProcessorIPLib/drivers/aienginev2/src/core/xaie_core.c
AieRC XAie_CoreReset(XAie_DevInst *DevInst, XAie_LocType Loc)
{
	u8 TileType;
	u32 Mask, Value;
	u64 RegAddr;
	const XAie_CoreMod *CoreMod;

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

	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[XAIEGBL_TILE_TYPE_AIETILE].CoreMod;
	Mask = CoreMod->CoreCtrl->CtrlRst.Mask;
	Value = 1U << CoreMod->CoreCtrl->CtrlRst.Lsb;
	RegAddr = CoreMod->CoreCtrl->RegOff +
		_XAie_GetTileAddr(DevInst, Loc.Row, Loc.Col);

	return XAie_MaskWrite32(DevInst, RegAddr, Mask, Value);
}
/*****************************************************************************/
/*
*
* This API writes to the Core control register of a tile to reset the core.
* Any gracefulness required in reset/unreset of the core are required to be
* handled by the application layer.
*
* @param	DevInst: Device Instance
* @param	Loc: Location of the AIE tile.
*
* @return	XAIE_OK on success, Error code on failure.
*
* @note		None.
*
******************************************************************************/
This API writes to the Core control register of a tile to reset the core.
Any gracefulness required in reset/unreset of the core are required to be
handled by the application layer.
This API writes to the Core control register of a tile to reset the core . Any gracefulness required in reset / unreset of the core are required to be handled by the application layer .
AieRC XAie_CoreReset(XAie_DevInst *DevInst, XAie_LocType Loc)
{
	u8 TileType;
	u32 Mask, Value;
	u64 RegAddr;
	const XAie_CoreMod *CoreMod;
	if((DevInst == XAIE_NULL) ||
			(DevInst->IsReady != XAIE_COMPONENT_IS_READY)) {
		XAIE_ERROR("Invalid Device Instance\n");
		return XAIE_INVALID_ARGS;
	}
	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[XAIEGBL_TILE_TYPE_AIETILE].CoreMod;
	Mask = CoreMod->CoreCtrl->CtrlRst.Mask;
	Value = 1U << CoreMod->CoreCtrl->CtrlRst.Lsb;
	RegAddr = CoreMod->CoreCtrl->RegOff +
		_XAie_GetTileAddr(DevInst, Loc.Row, Loc.Col);
	return XAie_MaskWrite32(DevInst, RegAddr, Mask, Value);
}
AieRC XAie_CoreReset ( XAie_DevInst * DevInst , XAie_LocType Loc ) { u8 TileType ; u32 Mask , Value ; u64 RegAddr ; const XAie_CoreMod * CoreMod ; if ( ( DevInst == XAIE_NULL ) || ( DevInst -> IsReady != XAIE_COMPONENT_IS_READY ) ) { XAIE_ERROR ( " \n " ) ; return XAIE_INVALID_ARGS ; } TileType = DevInst -> DevOps -> GetTTypefromLoc ( DevInst , Loc ) ; if ( TileType != XAIEGBL_TILE_TYPE_AIETILE ) { XAIE_ERROR ( " \n " ) ; return XAIE_INVALID_TILE ; } CoreMod = DevInst -> DevProp . DevMod [ XAIEGBL_TILE_TYPE_AIETILE ] . CoreMod ; Mask = CoreMod -> CoreCtrl -> CtrlRst . Mask ; Value = 1U << CoreMod -> CoreCtrl -> CtrlRst . Lsb ; RegAddr = CoreMod -> CoreCtrl -> RegOff + _XAie_GetTileAddr ( DevInst , Loc . Row , Loc . Col ) ; return XAie_MaskWrite32 ( DevInst , RegAddr , Mask , Value ) ; }
This API writes to the Core control register of a tile to reset the core.
This API writes to the Core control register of a tile to reset the core .