| aiengine Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

xaietile_error.c File Reference

## Overview

This file contains routines for error handling.

There are three types of error events:

- Errors without notification, by default when this error happens, no notification is raised, user can register for events hadler for this type of errors.
- Errors for logging only, by default, when this error happens driver will be notified by the interrupt, the driver will log this error and clear it.
- Errors will notify users, by default, when this error happens, driver will call the registered error handler, based on the return value from the error handler, driver will kill the application or not. If there is no registered application error handler, driver will kill the application.

    MODIFICATION HISTORY:

    Ver   Who     Date     Changes

    1.0   Wendy   01/02/2020  Initial creation
    1.1   Dishita 03/29/2020  Add support for clock gating

#define | XAIETILE_ERROR_BROADCAST 0U
| Broadcast signal to broadcast errors. More...
#define | XAIETILE_ERROR_SHIM_INTEVENT 0x10U
| SHIM Internal event for errors. More...
#define | XAIETILE_1ST_IRQ_IDS_MASK 0x3FU
| 1st level interrupt output IRQ ids mask Event 1st level interrupt controller has its own irq IDs to the 2nd level interrupt controller. More...
int | XAieTile_ErrorRegisterNotification (XAieGbl *AieInst, u8 Module, u8 Error, XAieTile_ErrorCallBack Cb, void *Arg)
| This API sets user callback to the specified error. More...
void | XAieTile_ErrorUnregisterNotification (XAieGbl *AieInst, u8 Module, u8 Error, u8 Logging)
| This API sets user callback to the specified error. More...
void | XAieTile_ErrorsSetupDefaultHandler (XAieGbl *AieInst)
| This API initialize error default handlers. More...
int | XAieTile_ErrorsHandlingInitialize (XAieGbl *AieInst)
| This API initialize error handling. More...

## Macro Definition Documentation

#define XAIETILE_1ST_IRQ_IDS_MASK 0x3FU

1st level interrupt output IRQ ids mask Event 1st level interrupt controller has its own irq IDs to the 2nd level interrupt controller.

For column 0 to 43, the pattern is: 0 1 2 3 4 5 0 1, 0 1 2 3 4 5 0 1 for column 44 to 49, the pattern is: 0 1 2 3 4 5 0 1 2 3 4 5

#define XAIETILE_ERROR_BROADCAST 0U

Broadcast signal to broadcast errors.

#define XAIETILE_ERROR_SHIM_INTEVENT 0x10U

SHIM Internal event for errors.

## Function Documentation

int XAieTile_ErrorRegisterNotification | ( | XAieGbl * | AieInst,
|  | u8 | Module,
|  | u8 | Error,
|  | XAieTile_ErrorCallBack | Cb,
|  | void * | Arg
| ) |  |

This API sets user callback to the specified error.

Parameters

  AieInst | - Pointer to the AIE device instance
  Module | - Module type XAIEGBL_MODULE_CORE, XAIEGBL_MODULE_PL, XAIEGBL_MODULE_MEM, XAIEGBL_MODULE_ALL or any OR value of CORE, PL and MEM.
  Error | - Error event id 0 for any errors which will generate interrupt. 48 - 69 for Core module 87 - 100 for Memory module 62 - 72 for SHIM PL module
  Cb | - User error callback function pointer If callback is NULL, when this error happens, it will kill the application.
  Arg | - Argument which will be passed to callback function, it can be NULL.

Returns
  XAIE_SUCCESS if successful, else XAIE_FAILURE

Note
  None.

References XAieLib_IntPrint(), and XAIETILE_ERROR_ALL.

int XAieTile_ErrorsHandlingInitialize | ( | XAieGbl * | AieInst | ) |

This API initialize error handling.

It will setup the error broadcast network so that if error is raised, interrupt will be raised, and the interrupt will be captured by the AIE driver. When errors happens, the AIE driver will either take default action which will trap the application or call the user registered callback.

Parameters

  AieInst | - Pointer to the AIE device instance

Returns
  XAIE_SUCCESS if successful, else XAIE_FAILURE

Note
  None.

void XAieTile_ErrorsSetupDefaultHandler | ( | XAieGbl * | AieInst | ) |

This API initialize error default handlers.

When errors happens, the AIE driver will either take default action which will trap the application or call the user registered callback.

Parameters

  AieInst | - Pointer to the AIE device instance

Returns
  None.

Note
  None.

void XAieTile_ErrorUnregisterNotification | ( | XAieGbl * | AieInst,
|  | u8 | Module,
|  | u8 | Error,
|  | u8 | Logging
| ) |  |

This API sets user callback to the specified error.

Parameters

  AieInst | - Pointer to the AIE device instance
  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
  Logging | - Indicate if it needs to log. If it doesn't need to log, when the error happens, there will be no interrupt raised. XAIE_ENABLE - need to log, XAIE_DISABLE - no need to log

Returns
  None.

Note
  None.