| aiengine Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

Data Structures
xaiegbl.h File Reference

## Overview

}

Header to include type definitions for the register bit field definitions of Core, Memory, NoC and PL module registers.

    MODIFICATION HISTORY:

    Ver   Who     Date     Changes

    1.0  Naresh  03/14/2018  Initial creation
    1.1  Naresh  07/11/2018  Updated copyright info
    1.2  Naresh  08/13/2018  Added Done attributes to CoreStsReg
    1.3  Hyun    10/02/2018  Added performance counter registers
    1.4  Hyun    10/02/2018  Added event registers
    1.5  Hyun    10/03/2018  Added event port select registers
    1.6  Hyun    10/12/2018  Added the column reset register
    1.7  Nishad  12/05/2018  Renamed ME attributes to AIE
    1.6  Hyun    12/13/2018  Added the core PC event registers
    1.9  Jubaer  02/26/2019  Added the Group Event registers
    2.0  Hyun    07/01/2019  Added XAIETILE_TIMER_MODULE_* macros
    2.1  Wendy   12/18/2019  Added timer control and timer events macros

## Data Structures
struct | XAieGbl_Tile
| This typedef contains configuration information of the tiles. More...
struct | XAieGbl_Config
| This typedef contains configuration information for the device. More...
struct | XAieGbl_EventHandlerSt
| struct XAieGbl_EventHandler - AIE event handler More...
struct | XAieGbl_ErrorHandlerSt
| struct XAieGbl_ErrorHandler - AIE error handler More...
struct | XAieGbl
| The XAie driver instance data. More...
struct | XAieGbl_HwCfg
| This typedef contains the HW configuration data for the AIE array. More...
enum | XAieGbl_ErrorHandleStatus
| enum XAieGbl_ErrorHandleStatus - error handled status More...
typedef struct XAieGbl_Tile | XAieGbl_Tile
| This typedef contains configuration information of the tiles. More...
typedef struct XAieGbl | XAieGbl
| The XAie driver instance data. More...
typedef void(* | XAieTile_EventCallBack )(XAieGbl *AieInst, XAie_LocType Loc, u8 Module, u8 Event, void *Priv)
| This function type defines event callback. More...
typedef struct XAieGbl_EventHandlerSt | XAieGbl_EventHandler
| struct XAieGbl_EventHandler - AIE event handler More...
typedef XAieGbl_ErrorHandleStatus(* | XAieTile_ErrorCallBack )(XAieGbl *AieInst, XAie_LocType Loc, u8 Module, u8 Error, void *Priv)
| This function type defines the error callback. More...
typedef struct XAieGbl_ErrorHandlerSt | XAieGbl_ErrorHandler
| struct XAieGbl_ErrorHandler - AIE error handler More...
void | XAieGbl_HwInit (XAieGbl_HwCfg *CfgPtr)
| This is the routine to initialize the HW configuration. More...
void | XAieGbl_CfgInitialize (XAieGbl *InstancePtr, XAieGbl_Tile *TileInstPtr, XAieGbl_Config *ConfigPtr)
| This is the global initialization function for all the tiles of the AIE array and also for the Shim tiles. More...
XAieGbl_Config * | XAieGbl_LookupConfig (u16 DeviceId)
| Looks up the device configuration based on the unique device ID. More...

## Typedef Documentation

typedef struct XAieGbl XAieGbl

The XAie driver instance data.

The user is required to allocate a variable of this type for the AIE instance.

typedef struct XAieGbl_ErrorHandlerSt XAieGbl_ErrorHandler

struct XAieGbl_ErrorHandler - AIE error handler

: Linux only, pthread ID of the user thread which registers for the callback. : Error event user callback : User registered argument which will be passed to the callback

typedef struct XAieGbl_EventHandlerSt XAieGbl_EventHandler

struct XAieGbl_EventHandler - AIE event handler

: Reference count to indicate how many tiles registered for the handler : Error event user callback : User registered argument which will be passed to the callback

typedef struct XAieGbl_Tile XAieGbl_Tile

This typedef contains configuration information of the tiles.

typedef XAieGbl_ErrorHandleStatus(* XAieTile_ErrorCallBack)(XAieGbl *AieInst, XAie_LocType Loc, u8 Module, u8 Error, void *Priv)

This function type defines the error callback.

Parameters

  AieInst | - pointer to the AIE instance which the error is from.
  Loc | - Tile location. Indicates which tile the error is from.
  Module | - Module type XAIEGBL_MODULE_CORE, XAIEGBL_MODULE_PL, XAIEGBL_MODULE_MEM
  Error | - Error event id 48 - 69 for Core module 87 - 100 for Memory module 62 - 72 for SHIM PL module
  Priv | - Argument of the callback which has been registered by applicaiton.

Returns
  Indicate if the error has been handled or not. XAIETILE_ERROR_HANDLED, XAIETILE_ERROR_NOTHANDLED If it returns XAIETILE_ERROR_HANDLED, AIE driver will not take further action, otherwise, AIE driver will trap the application.

typedef void(* XAieTile_EventCallBack)(XAieGbl *AieInst, XAie_LocType Loc, u8 Module, u8 Event, void *Priv)

This function type defines event callback.

Parameters

  AieInst | - pointer to the AIE instance which the event is from.
  Loc | - Tile location. Indicates which tile the event is from.
  Module | - Module type XAIEGBL_MODULE_CORE, XAIEGBL_MODULE_PL, XAIEGBL_MODULE_MEM
  Error | - Error event id 48 - 69 for Core module 87 - 100 for Memory module 62 - 72 for SHIM PL module
  Priv | - Argument of the callback which has been registered by applicaiton.

Returns
  Indicate if the error has been handled or not. XAIETILE_ERROR_HANDLED, XAIETILE_ERROR_NOTHANDLED If it returns XAIETILE_ERROR_HANDLED, AIE driver will not take further action, otherwise, AIE driver will trap the application.

## Enumeration Type Documentation

enum XAieGbl_ErrorHandleStatus

enum XAieGbl_ErrorHandleStatus - error handled status

: error has handled : error has not handled completely, expect driver default action.

## Function Documentation

void XAieGbl_CfgInitialize | ( | XAieGbl * | InstancePtr,
|  | XAieGbl_Tile * | TileInstPtr,
|  | XAieGbl_Config * | ConfigPtr
| ) |  |

This is the global initialization function for all the tiles of the AIE array and also for the Shim tiles.

The initialization involves programming the Tile instance data structure with the required parameters of the tile, like base addresses for Core module/Memory module/NoC module/Pl module, Stream switch configuration, Lock configuration etc.

Parameters

  InstancePtr | - Global AIE instance structure.
  ConfigPtr | - Global AIE configuration pointer.

Returns
  void.

Note
  None.

References XAieGbl_Config::ArrOffset, XAieGbl_Tile::ColId, XAieGbl::Config, XAieGbl_Tile::CoreModAddr, XAieGbl_Tile::IsReady, XAieGbl::IsReady, XAieGbl_Tile::LockAddr, XAieGbl_Tile::MemModAddr, XAieGbl_Tile::NocModAddr, XAieGbl_Config::NumCols, XAieGbl_Config::NumRows, XAieGbl_Tile::PlModAddr, XAieGbl_Tile::RowId, XAieGbl_Tile::StrmSwAddr, XAieGbl_Tile::TileAddr, XAieGbl::Tiles, XAieGbl_Tile::TileType, XAieLib_InitDev(), XAieLib_InitTile(), and XAieTile_EventsSetupDefaultHandlers().

Referenced by main().

void XAieGbl_HwInit | ( | XAieGbl_HwCfg * | CfgPtr | ) |

This is the routine to initialize the HW configuration.

Parameters

  CfgPtr,: | Pointer to the HW configuration data structure.

Returns
  None.

Note
  None.

References XAieGbl_HwCfg::ArrayOff, XAieGbl_Config::ArrOffset, XAieGbl_Config::NumCols, XAieGbl_HwCfg::NumCols, XAieGbl_Config::NumRows, and XAieGbl_HwCfg::NumRows.

Referenced by main().

XAieGbl_Config* XAieGbl_LookupConfig | ( | u16 | DeviceId | ) |

Looks up the device configuration based on the unique device ID.

A table contains the configuration info for each device in the system.

Parameters

  DeviceId | is the unique identifier for a device.

Returns
  A pointer to the XAieGbl configuration structure for the specified device, or NULL if the device was not found.

Note
  None.

Referenced by main().