XilinxProcessorIPLib/drivers/aienginev2/src/stream_switch/xaie_ss_aieml.c
AieRC _XAieMl_AieTile_StrmSwCheckPortValidity(StrmSwPortType Slave,
		u8 SlvPortNum, StrmSwPortType Master, u8 MstrPortNum)
{
	AieRC RC = XAIE_OK;

	switch(Slave) {
	case TRACE:
		if(Master == FIFO || Master == SOUTH || (Master == DMA &&
			MstrPortNum == 0U)) {
			break;
		}
		RC = XAIE_ERR_STREAM_PORT;
		break;
	case CORE:
		if(Master == CORE) {
			RC = XAIE_ERR_STREAM_PORT;
		}
		break;
	case DMA:
		if((Master == DMA && SlvPortNum == MstrPortNum) ||
			Master != DMA){
			break;
		}
		RC = XAIE_ERR_STREAM_PORT;
		break;
	case CTRL:
		if(Master == DMA || Master == CTRL) {
			RC = XAIE_ERR_STREAM_PORT;
		}
		break;
	case FIFO:
		break;
	case SOUTH:
	case WEST:
	case NORTH:
	case EAST:
		if(Slave == Master && SlvPortNum != MstrPortNum) {
			RC = XAIE_ERR_STREAM_PORT;
		}
		break;
	default:
		RC = XAIE_ERR_STREAM_PORT;
		break;
	}

	return RC;
}
/************************** Constant Definitions *****************************/
/************************** Function Definitions *****************************/
/*****************************************************************************/
/**
*
* This api verifies if a stream switch connection exists within the ports.
* Numerous conditions exist to determine if the port combination is valid.
* The method assumes both ports exist, and the relevant tile is an AIE-Tile.
*
* @param	Slave: The type of the slave port.
* @param	SlvPortNum: The number of the slave port.
* @param	Master: The type of the master port.
* @param	MstrPortNum: The number of the master port.
*
* @return	XAIE_OK if a stream switch connection is possible.
*		XAIE_ERR_STREAM_PORT if the connection isn't possible.
*
* @note		Internal API for AIE-ML. This API shouldn't be called directly.
*		It is invoked using a function pointer within the Stream
*		Module data structure.
*
*****************************************************************************/
Constant Definitions
Function Definitions



This api verifies if a stream switch connection exists within the ports.
Numerous conditions exist to determine if the port combination is valid.
The method assumes both ports exist, and the relevant tile is an AIE-Tile.
Constant Definitions Function Definitions This api verifies if a stream switch connection exists within the ports . Numerous conditions exist to determine if the port combination is valid . The method assumes both ports exist and the relevant tile is an AIE - Tile .
AieRC _XAieMl_AieTile_StrmSwCheckPortValidity(StrmSwPortType Slave,
		u8 SlvPortNum, StrmSwPortType Master, u8 MstrPortNum)
{
	AieRC RC = XAIE_OK;
	switch(Slave) {
	case TRACE:
		if(Master == FIFO || Master == SOUTH || (Master == DMA &&
			MstrPortNum == 0U)) {
			break;
		}
		RC = XAIE_ERR_STREAM_PORT;
		break;
	case CORE:
		if(Master == CORE) {
			RC = XAIE_ERR_STREAM_PORT;
		}
		break;
	case DMA:
		if((Master == DMA && SlvPortNum == MstrPortNum) ||
			Master != DMA){
			break;
		}
		RC = XAIE_ERR_STREAM_PORT;
		break;
	case CTRL:
		if(Master == DMA || Master == CTRL) {
			RC = XAIE_ERR_STREAM_PORT;
		}
		break;
	case FIFO:
		break;
	case SOUTH:
	case WEST:
	case NORTH:
	case EAST:
		if(Slave == Master && SlvPortNum != MstrPortNum) {
			RC = XAIE_ERR_STREAM_PORT;
		}
		break;
	default:
		RC = XAIE_ERR_STREAM_PORT;
		break;
	}
	return RC;
}
AieRC _XAieMl_AieTile_StrmSwCheckPortValidity ( StrmSwPortType Slave , u8 SlvPortNum , StrmSwPortType Master , u8 MstrPortNum ) { AieRC RC = XAIE_OK ; switch ( Slave ) { case TRACE : if ( Master == FIFO || Master == SOUTH || ( Master == DMA && MstrPortNum == 0U ) ) { break ; } RC = XAIE_ERR_STREAM_PORT ; break ; case CORE : if ( Master == CORE ) { RC = XAIE_ERR_STREAM_PORT ; } break ; case DMA : if ( ( Master == DMA && SlvPortNum == MstrPortNum ) || Master != DMA ) { break ; } RC = XAIE_ERR_STREAM_PORT ; break ; case CTRL : if ( Master == DMA || Master == CTRL ) { RC = XAIE_ERR_STREAM_PORT ; } break ; case FIFO : break ; case SOUTH : case WEST : case NORTH : case EAST : if ( Slave == Master && SlvPortNum != MstrPortNum ) { RC = XAIE_ERR_STREAM_PORT ; } break ; default : RC = XAIE_ERR_STREAM_PORT ; break ; } return RC ; }
Constant Definitions
Function Definitions
Constant Definitions Function Definitions