XilinxProcessorIPLib/drivers/aiengine/src/lib/xaielib.c
void XAieLib_MaskWrite32(u64 Addr, u32 Mask, u32 Data)
{
	u32 RegVal;

#ifdef __AIESIM__
	XAieSim_MaskWrite32(Addr, Mask, Data);
#elif defined __AIEBAREMTL__
        RegVal = Xil_In32(Addr);
	RegVal &= ~Mask;
	RegVal |= Data;
        Xil_Out32(Addr, RegVal);
#else
	RegVal = XAieIO_Read32(Addr);
	RegVal &= ~Mask;
	RegVal |= Data;
	XAieIO_Write32(Addr, RegVal);
#endif
}
/*****************************************************************************/
/**
*
* This is the memory IO function to write a masked 32bit data to
* the specified address.
*
* @param	Addr: Address to write to.
* @param	Mask: Mask to be applied to Data.
* @param	Data: 32-bit data to be written.
*
* @return	None.
*
* @note		None.
*
*******************************************************************************/
This is the memory IO function to write a masked 32bit data to
the specified address.
This is the memory IO function to write a masked 32bit data to the specified address .
void XAieLib_MaskWrite32(u64 Addr, u32 Mask, u32 Data)
{
	u32 RegVal;
#ifdef __AIESIM__
	XAieSim_MaskWrite32(Addr, Mask, Data);
#elif defined __AIEBAREMTL__
        RegVal = Xil_In32(Addr);
	RegVal &= ~Mask;
	RegVal |= Data;
        Xil_Out32(Addr, RegVal);
#else
	RegVal = XAieIO_Read32(Addr);
	RegVal &= ~Mask;
	RegVal |= Data;
	XAieIO_Write32(Addr, RegVal);
#endif
}
void XAieLib_MaskWrite32 ( u64 Addr , u32 Mask , u32 Data ) { u32 RegVal ; #ifdef __AIESIM__ XAieSim_MaskWrite32 ( Addr , Mask , Data ) ; #elif defined __AIEBAREMTL__ RegVal = Xil_In32 ( Addr ) ; RegVal &= ~ Mask ; RegVal |= Data ; Xil_Out32 ( Addr , RegVal ) ; #else RegVal = XAieIO_Read32 ( Addr ) ; RegVal &= ~ Mask ; RegVal |= Data ; XAieIO_Write32 ( Addr , RegVal ) ; #endif }
This is the memory IO function to write a masked 32bit data to
the specified address.
This is the memory IO function to write a masked 32bit data to the specified address .