XilinxProcessorIPLib/drivers/aiengine/src/tile/xaietile_strm.c
void XAieTile_StrmConfigSlv(XAieGbl_Tile *TileInstPtr, u8 Slave, u8 Enable,
								u8 PktEnable)
{
	u64 RegAddr;
	u32 RegVal = 0U;
        XAieGbl_RegStrmSlv *RegPtr;

	XAie_AssertNonvoid(TileInstPtr != XAIE_NULL);

       	if(TileInstPtr->TileType == XAIEGBL_TILE_TYPE_AIETILE) {
                RegPtr = &TileStrmSlv[Slave];
        } else {
                RegPtr = &ShimStrmSlv[Slave];
        }

	/* Get the address of Slave port config reg */
	RegAddr = TileInstPtr->TileAddr + RegPtr->RegOff;

	if(Enable == XAIE_ENABLE) {
		/* Frame the 32-bit reg value */
		RegVal = XAie_SetField(Enable, RegPtr->SlvEn.Lsb,
						RegPtr->SlvEn.Mask) |
			XAie_SetField(PktEnable, RegPtr->PktEn.Lsb,
						RegPtr->PktEn.Mask);
	}
	XAieGbl_Write32(RegAddr, RegVal);
}
/*****************************************************************************/
/**
*
* This API is used to configure the selected slave port of the stream switch
* in the corresponding tile.
*
* @param	TileInstPtr - Pointer to the Tile instance.
* @param	Slave - Slave port ID value.
* @param	Enable - Enable/Disable the slave port (1-Enable,0-Disable).
* @param	PktEnable - Enable/Disable the packet switching mode
*		(1-Enable,0-Disable).
*
* @return	None.
*
* @note		None.
*
*******************************************************************************/
This API is used to configure the selected slave port of the stream switch
in the corresponding tile.
This API is used to configure the selected slave port of the stream switch in the corresponding tile .
void XAieTile_StrmConfigSlv(XAieGbl_Tile *TileInstPtr, u8 Slave, u8 Enable,
								u8 PktEnable)
{
	u64 RegAddr;
	u32 RegVal = 0U;
        XAieGbl_RegStrmSlv *RegPtr;
	XAie_AssertNonvoid(TileInstPtr != XAIE_NULL);
       	if(TileInstPtr->TileType == XAIEGBL_TILE_TYPE_AIETILE) {
                RegPtr = &TileStrmSlv[Slave];
        } else {
                RegPtr = &ShimStrmSlv[Slave];
        }
	RegAddr = TileInstPtr->TileAddr + RegPtr->RegOff;
	if(Enable == XAIE_ENABLE) {
		RegVal = XAie_SetField(Enable, RegPtr->SlvEn.Lsb,
						RegPtr->SlvEn.Mask) |
			XAie_SetField(PktEnable, RegPtr->PktEn.Lsb,
						RegPtr->PktEn.Mask);
	}
	XAieGbl_Write32(RegAddr, RegVal);
}
void XAieTile_StrmConfigSlv ( XAieGbl_Tile * TileInstPtr , u8 Slave , u8 Enable , u8 PktEnable ) { u64 RegAddr ; u32 RegVal = 0U ; XAieGbl_RegStrmSlv * RegPtr ; XAie_AssertNonvoid ( TileInstPtr != XAIE_NULL ) ; if ( TileInstPtr -> TileType == XAIEGBL_TILE_TYPE_AIETILE ) { RegPtr = & TileStrmSlv [ Slave ] ; } else { RegPtr = & ShimStrmSlv [ Slave ] ; } RegAddr = TileInstPtr -> TileAddr + RegPtr -> RegOff ; if ( Enable == XAIE_ENABLE ) { RegVal = XAie_SetField ( Enable , RegPtr -> SlvEn . Lsb , RegPtr -> SlvEn . Mask ) | XAie_SetField ( PktEnable , RegPtr -> PktEn . Lsb , RegPtr -> PktEn . Mask ) ; } XAieGbl_Write32 ( RegAddr , RegVal ) ; }
This API is used to configure the selected slave port of the stream switch
in the corresponding tile.
This API is used to configure the selected slave port of the stream switch in the corresponding tile .
/* Get the address of Slave port config reg */ /* Frame the 32-bit reg value */