XilinxProcessorIPLib/drivers/aiengine/src/lib/ext/xaieio.c
XAieIO_Mem *XAieIO_MemInit(u8 idx)
{
	XAieIO_Mem *IO_MemInstPtr;
	struct metal_io_region *io;

	XAieIO_Init();

	/* First io region is for register. Start from 1 */
	io = metal_device_io_region(IOInst.device, 1 + idx);
	if (!io)
		return NULL;

	IO_MemInstPtr = metal_allocate_memory(sizeof(*IO_MemInstPtr));
	IO_MemInstPtr->io = io;
	IO_MemInstPtr->io_base = metal_io_phys(io, 0);
	/* Set NULL to differentiate this memory */
	IO_MemInstPtr->shm = NULL;

	return IO_MemInstPtr;
}
/*****************************************************************************/
/**
*
* This is the IO memory function to initialize the IO memory instance.
*
* @param	idx: Index of the memory to initialize.
*
* @return	Pointer to the initialized IO memory instance.
*
* @note		None.
*
*******************************************************************************/
This is the IO memory function to initialize the IO memory instance.
This is the IO memory function to initialize the IO memory instance .
XAieIO_Mem *XAieIO_MemInit(u8 idx)
{
	XAieIO_Mem *IO_MemInstPtr;
	struct metal_io_region *io;
	XAieIO_Init();
	io = metal_device_io_region(IOInst.device, 1 + idx);
	if (!io)
		return NULL;
	IO_MemInstPtr = metal_allocate_memory(sizeof(*IO_MemInstPtr));
	IO_MemInstPtr->io = io;
	IO_MemInstPtr->io_base = metal_io_phys(io, 0);
	IO_MemInstPtr->shm = NULL;
	return IO_MemInstPtr;
}
XAieIO_Mem * XAieIO_MemInit ( u8 idx ) { XAieIO_Mem * IO_MemInstPtr ; struct metal_io_region * io ; XAieIO_Init ( ) ; io = metal_device_io_region ( IOInst . device , 1 + idx ) ; if ( ! io ) return NULL ; IO_MemInstPtr = metal_allocate_memory ( sizeof ( * IO_MemInstPtr ) ) ; IO_MemInstPtr -> io = io ; IO_MemInstPtr -> io_base = metal_io_phys ( io , 0 ) ; IO_MemInstPtr -> shm = NULL ; return IO_MemInstPtr ; }
This is the IO memory function to initialize the IO memory instance.
This is the IO memory function to initialize the IO memory instance .
/* First io region is for register. Start from 1 */ /* Set NULL to differentiate this memory */