XilinxProcessorIPLib/drivers/aiengine/src/lib/xaielib.c
static void XAieLib_NPISetLock(u8 Lock)
{
	u32 RegAddr, RegVal;

	RegAddr = XAIE_NPI_PCSR_LOCK;
	if (Lock == 0) {
		RegVal = XAIE_NPI_PCSR_LOCK_STATE_UNLOCK_CODE <<
			 XAIE_NPI_PCSR_LOCK_STATE_LSB;
	} else {
		RegVal = XAIE_NPI_PCSR_LOCK_STATE_LOCK_CODE <<
			 XAIE_NPI_PCSR_LOCK_STATE_LSB;
	}
#ifdef __AIESIM__
	XAieSim_NPIWrite32(RegAddr, RegVal);
#elif defined __AIEBAREMTL__
        Xil_Out32(RegAddr, RegVal);
#else
	XAieIO_NPIWrite32(RegAddr, RegVal);
#endif
}
/*****************************************************************************/
/**
*
* This is the internal NPI function to set the lock of AIE NPI space
*
* @param	Lock: non 0 for lock, 0 for unlock
*
* @note		Used only in this file.
*		This only work if NPI is accessble.
*
*******************************************************************************/
This is the internal NPI function to set the lock of AIE NPI space
This is the internal NPI function to set the lock of AIE NPI space
static void XAieLib_NPISetLock(u8 Lock)
{
	u32 RegAddr, RegVal;
	RegAddr = XAIE_NPI_PCSR_LOCK;
	if (Lock == 0) {
		RegVal = XAIE_NPI_PCSR_LOCK_STATE_UNLOCK_CODE <<
			 XAIE_NPI_PCSR_LOCK_STATE_LSB;
	} else {
		RegVal = XAIE_NPI_PCSR_LOCK_STATE_LOCK_CODE <<
			 XAIE_NPI_PCSR_LOCK_STATE_LSB;
	}
#ifdef __AIESIM__
	XAieSim_NPIWrite32(RegAddr, RegVal);
#elif defined __AIEBAREMTL__
        Xil_Out32(RegAddr, RegVal);
#else
	XAieIO_NPIWrite32(RegAddr, RegVal);
#endif
}
static void XAieLib_NPISetLock ( u8 Lock ) { u32 RegAddr , RegVal ; RegAddr = XAIE_NPI_PCSR_LOCK ; if ( Lock == 0 ) { RegVal = XAIE_NPI_PCSR_LOCK_STATE_UNLOCK_CODE << XAIE_NPI_PCSR_LOCK_STATE_LSB ; } else { RegVal = XAIE_NPI_PCSR_LOCK_STATE_LOCK_CODE << XAIE_NPI_PCSR_LOCK_STATE_LSB ; } #ifdef __AIESIM__ XAieSim_NPIWrite32 ( RegAddr , RegVal ) ; #elif defined __AIEBAREMTL__ Xil_Out32 ( RegAddr , RegVal ) ; #else XAieIO_NPIWrite32 ( RegAddr , RegVal ) ; #endif }
This is the internal NPI function to set the lock of AIE NPI space
This is the internal NPI function to set the lock of AIE NPI space