XilinxProcessorIPLib/drivers/aienginev2/src/io_backend/ext/xaie_sim.c
static AieRC _XAie_SimIO_NpiMaskPoll(void *IOInst, u64 RegOff, u32 Mask,
		u32 Value, u32 TimeOutUs)
{
	AieRC Ret = XAIE_ERR;
	u32 RegVal;


	/* Increment Timeout value to 1 if user passed value is 1 */
	if(TimeOutUs == 0U)
		TimeOutUs++;

	while(TimeOutUs > 0U) {
		XAie_SimIO_NpiRead32(IOInst, RegOff, &RegVal);
		if((RegVal & Mask) == Value) {
			Ret = XAIE_OK;
			break;
		}
		usleep(1);
		TimeOutUs--;
	}

	return Ret;
}
/*****************************************************************************/
/**
*
* This is the memory IO function to mask poll a NPI address for a value.
*
* @param	IOInst: IO instance pointer
* @param	RegOff: Register offset to read from.
* @param	Mask: Mask to be applied to Data.
* @param	Value: 32-bit value to poll for
* @param	TimeOutUs: Timeout in micro seconds.
*
* @return	XAIE_OK or XAIE_ERR.
*
* @note		Internal only.
*
*******************************************************************************/
This is the memory IO function to mask poll a NPI address for a value.
This is the memory IO function to mask poll a NPI address for a value .
static AieRC _XAie_SimIO_NpiMaskPoll(void *IOInst, u64 RegOff, u32 Mask,
		u32 Value, u32 TimeOutUs)
{
	AieRC Ret = XAIE_ERR;
	u32 RegVal;
	if(TimeOutUs == 0U)
		TimeOutUs++;
	while(TimeOutUs > 0U) {
		XAie_SimIO_NpiRead32(IOInst, RegOff, &RegVal);
		if((RegVal & Mask) == Value) {
			Ret = XAIE_OK;
			break;
		}
		usleep(1);
		TimeOutUs--;
	}
	return Ret;
}
static AieRC _XAie_SimIO_NpiMaskPoll ( void * IOInst , u64 RegOff , u32 Mask , u32 Value , u32 TimeOutUs ) { AieRC Ret = XAIE_ERR ; u32 RegVal ; if ( TimeOutUs == 0U ) TimeOutUs ++ ; while ( TimeOutUs > 0U ) { XAie_SimIO_NpiRead32 ( IOInst , RegOff , & RegVal ) ; if ( ( RegVal & Mask ) == Value ) { Ret = XAIE_OK ; break ; } usleep ( 1 ) ; TimeOutUs -- ; } return Ret ; }
This is the memory IO function to mask poll a NPI address for a value.
This is the memory IO function to mask poll a NPI address for a value .
/* Increment Timeout value to 1 if user passed value is 1 */