XilinxProcessorIPLib/drivers/aiengine/src/tile/xaietile_strm.c
void XAieTile_StrmEventPortSelect(XAieGbl_Tile *TileInstPtr, u8 Port, u8 Master,
		u8 Id)
{
	u32 FldVal;
	u32 FldMask;
	u8 ModId;

	XAie_AssertNonvoid(TileInstPtr != XAIE_NULL);
	XAie_AssertNonvoid(Port < 8);
	XAie_AssertNonvoid(Master < 2);

	if (TileInstPtr->TileType == XAIEGBL_TILE_TYPE_AIETILE) {
		ModId = XAIETILE_STRM_MODULE_CORE;
	} else {
		ModId = XAIETILE_STRM_MODULE_PL;
	}

	FldMask = TileStrmEvtPort[ModId].Port[Port].Mask;
	FldVal = Id << TileStrmEvtPort[ModId].Port[Port].Lsb;
	FldMask |= TileStrmEvtPort[ModId].MstrSlv[Port].Mask;
	FldVal |= Master << TileStrmEvtPort[ModId].MstrSlv[Port].Lsb;
	XAieGbl_MaskWrite32(TileInstPtr->TileAddr + TileStrmEvtPort[ModId].RegOff[Port / 4],
			FldMask, FldVal);
}
/*****************************************************************************/
/**
*
* This API sets up the event port in stream switch
*
* @param	TileInstPtr - Pointer to the Tile instance.
* @param	Port: Port number. 0 to 7.
* @param	Master: 1 for master. 0 for slave.
* @param	Id: Port ID for event generation
*
* @return	None.
*
* @note		None.
*
*******************************************************************************/
This API sets up the event port in stream switch
This API sets up the event port in stream switch
void XAieTile_StrmEventPortSelect(XAieGbl_Tile *TileInstPtr, u8 Port, u8 Master,
		u8 Id)
{
	u32 FldVal;
	u32 FldMask;
	u8 ModId;
	XAie_AssertNonvoid(TileInstPtr != XAIE_NULL);
	XAie_AssertNonvoid(Port < 8);
	XAie_AssertNonvoid(Master < 2);
	if (TileInstPtr->TileType == XAIEGBL_TILE_TYPE_AIETILE) {
		ModId = XAIETILE_STRM_MODULE_CORE;
	} else {
		ModId = XAIETILE_STRM_MODULE_PL;
	}
	FldMask = TileStrmEvtPort[ModId].Port[Port].Mask;
	FldVal = Id << TileStrmEvtPort[ModId].Port[Port].Lsb;
	FldMask |= TileStrmEvtPort[ModId].MstrSlv[Port].Mask;
	FldVal |= Master << TileStrmEvtPort[ModId].MstrSlv[Port].Lsb;
	XAieGbl_MaskWrite32(TileInstPtr->TileAddr + TileStrmEvtPort[ModId].RegOff[Port / 4],
			FldMask, FldVal);
}
void XAieTile_StrmEventPortSelect ( XAieGbl_Tile * TileInstPtr , u8 Port , u8 Master , u8 Id ) { u32 FldVal ; u32 FldMask ; u8 ModId ; XAie_AssertNonvoid ( TileInstPtr != XAIE_NULL ) ; XAie_AssertNonvoid ( Port < 8 ) ; XAie_AssertNonvoid ( Master < 2 ) ; if ( TileInstPtr -> TileType == XAIEGBL_TILE_TYPE_AIETILE ) { ModId = XAIETILE_STRM_MODULE_CORE ; } else { ModId = XAIETILE_STRM_MODULE_PL ; } FldMask = TileStrmEvtPort [ ModId ] . Port [ Port ] . Mask ; FldVal = Id << TileStrmEvtPort [ ModId ] . Port [ Port ] . Lsb ; FldMask |= TileStrmEvtPort [ ModId ] . MstrSlv [ Port ] . Mask ; FldVal |= Master << TileStrmEvtPort [ ModId ] . MstrSlv [ Port ] . Lsb ; XAieGbl_MaskWrite32 ( TileInstPtr -> TileAddr + TileStrmEvtPort [ ModId ] . RegOff [ Port / 4 ] , FldMask , FldVal ) ; }
This API sets up the event port in stream switch
This API sets up the event port in stream switch