aiengine: xaietile_lock.h File Reference

| aiengine Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

xaietile_lock.h File Reference

## Overview

Header file lock acquire/release functions.

    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  Nishad  12/05/2018  Renamed ME attributes to AIE

u8 | XAieTile_LockAcquire (XAieGbl_Tile *TileInstPtr, u8 LockId, u8 LockVal, u32 TimeOut)
| This API is used to acquire the specified lock with or without value. More...
u8 | XAieTile_LockRelease (XAieGbl_Tile *TileInstPtr, u8 LockId, u8 LockVal, u32 TimeOut)
| This API is used to release the specified lock with or without value. More...

## Function Documentation

u8 XAieTile_LockAcquire | ( | XAieGbl_Tile * | TileInstPtr,
|  | u8 | LockId,
|  | u8 | LockVal,
|  | u32 | TimeOut
| ) |  |

This API is used to acquire the specified lock with or without value.

Lock acquired without value if LockVal==0xFF. This API can be blocking or non- blocking based on the TimeOut value. If TimeOut==0, then API behaves in a non-blocking fashion and returns immediately after the first read request. If TimeOut>0, then API becomes blocking and will issue the read request until the acquire is successful or time out happens, whichever occurs first.

Parameters

  TileInstPtr | - Pointer to the Tile instance.
  LockId | - Lock value index, ranging from 0-15.
  LockVal | - Lock value used for acquire. If set to 0xFF, lock acquired with no value.
  TimeOut | - Time-out value for which the read request needs to be repeated. Value to be specified in usecs.

Returns
  1 if acquire successful, else 0.

Note
  None.

References XAieGbl_RegLocks::AcqNv, XAieGbl_RegLocks::AcqNvOff, XAieGbl_RegLocks::AcqV0, XAieGbl_RegLocks::AcqV0Off, XAieGbl_RegLocks::AcqV1, XAieGbl_RegLocks::AcqV1Off, XAieGbl_RegFldAttr::Lsb, XAieGbl_RegFldAttr::Mask, XAieGbl_Tile::TileAddr, and XAieGbl_Tile::TileType.

Referenced by main().

u8 XAieTile_LockRelease | ( | XAieGbl_Tile * | TileInstPtr,
|  | u8 | LockId,
|  | u8 | LockVal,
|  | u32 | TimeOut
| ) |  |

This API is used to release the specified lock with or without value.

Lock released without value if LockVal==0xFF. This API can be blocking or non- blocking based on the TimeOut value. If TimeOut==0, then API behaves in a non-blocking fashion and returns immediately after the first read request. If TimeOut>0, then API becomes blocking and will issue the read request until the release is successful or time out happens, whichever occurs first.

Parameters

  TileInstPtr | - Pointer to the Tile instance.
  LockId | - Lock value index, ranging from 0-15.
  LockVal | - Lock value used for release. If set to 0xFF, lock released with no value.
  TimeOut | - Time-out value for which the read request needs to be repeated. Value to be specified in usecs.

Returns
  1 if release successful, else 0.

Note
  None.

References XAieGbl_RegFldAttr::Lsb, XAieGbl_RegFldAttr::Mask, XAieGbl_RegLocks::RelNv, XAieGbl_RegLocks::RelNvOff, XAieGbl_RegLocks::RelV0, XAieGbl_RegLocks::RelV0Off, XAieGbl_RegLocks::RelV1, XAieGbl_RegLocks::RelV1Off, XAieGbl_Tile::TileAddr, and XAieGbl_Tile::TileType.

Referenced by main().