aiengine
Xilinx SDK Drivers API Documentation
xaietile_core.c File Reference

Overview

This file contains routines for the AIE Tile core control.

MODIFICATION HISTORY:
Ver   Who     Date     Changes


1.0 Naresh 03/21/2018 Initial creation 1.1 Naresh 07/11/2018 Updated copyright info and addressed CR#1006573 1.2 Naresh 08/13/2018 Updated core wait done API to wait for Core_done status instead of Core_Enable and also added an API to read core done status 1.3 Nishad 12/05/2018 Renamed ME attributes to AIE 1.4 Hyun 01/08/2019 Use the poll function 1.5 Nishad 03/20/2019 Fix return statement for XAieTile_CoreWaitCycles 1.6 Nishad 03/20/2019 Fix the usage of unintialized variable in XAieTile_CoreWaitStatus 1.7 Hyun 06/27/2019 Use TimerReg

void XAieTile_CoreControl (XAieGbl_Tile *TileInstPtr, u8 Enable, u8 Reset)
 This API writes to the Core_control register to enable and/or reset the AIE core of the selected tile. More...
 
u8 XAieTile_CoreWaitStatus (XAieGbl_Tile *TileInstPtr, u32 TimeOut, u32 Status)
 This API implements a blocking wait function to check for the core status to be disabled or done. More...
 
u8 XAieTile_CoreReadStatusDone (XAieGbl_Tile *TileInstPtr)
 This API returns the current value of the Core status done bit. More...
 
u8 XAieTile_CoreWaitCycles (XAieGbl_Tile *TileInstPtr, u32 CycleCnt)
 This API implements a blocking wait function until the specified clock cyles are elapsed in the Core module 64-bit counter. More...
 
u64 XAieTile_CoreReadTimer (XAieGbl_Tile *TileInstPtr)
 This API returns the current value of the Core module 64-bit timer. More...
 

Function Documentation

void XAieTile_CoreControl ( XAieGbl_Tile TileInstPtr,
u8  Enable,
u8  Reset 
)

This API writes to the Core_control register to enable and/or reset the AIE core of the selected tile.

This API bluntly writes to the register and any gracefullness required in enabling/disabling and/or resetting/unresetting the core are required to be handled by the application layer.

Parameters
TileInstPtr- Pointer to the Tile instance.
Enable- Enable/Disable the core (1-Enable,0-Disable).
Reset- Reset/Unreset the core (1-Reset,0-Unreset).
Returns
None.
Note
None.

References XAieGbl_RegCoreCtrl::CtrlEn, XAieGbl_RegCoreCtrl::CtrlRst, XAieGbl_RegFldAttr::Lsb, XAieGbl_RegFldAttr::Mask, XAieGbl_RegCoreCtrl::RegOff, and XAieGbl_Tile::TileAddr.

Referenced by main().

u8 XAieTile_CoreReadStatusDone ( XAieGbl_Tile TileInstPtr)

This API returns the current value of the Core status done bit.

Parameters
TileInstPtr- Pointer to the Tile instance.
Returns
Core_Done status bit.
Note
None.

References XAieGbl_RegCoreSts::Done, XAieGbl_RegFldAttr::Lsb, XAieGbl_RegFldAttr::Mask, XAieGbl_RegCoreSts::RegOff, and XAieGbl_Tile::TileAddr.

u64 XAieTile_CoreReadTimer ( XAieGbl_Tile TileInstPtr)

This API returns the current value of the Core module 64-bit timer.

Parameters
TileInstPtr- Pointer to the Tile instance.
Returns
64-bit timer value.
Note
None.

References XAieGbl_RegTimer::HighOff, XAieGbl_RegTimer::LowOff, and XAieGbl_Tile::TileAddr.

u8 XAieTile_CoreWaitCycles ( XAieGbl_Tile TileInstPtr,
u32  CycleCnt 
)

This API implements a blocking wait function until the specified clock cyles are elapsed in the Core module 64-bit counter.

Parameters
TileInstPtr- Pointer to the Tile instance.
CycleCnt- No. of timer clock cycles to elapse.
Returns
XAIE_SUCCESS on success.
Note
None.

References XAieGbl_RegTimer::HighOff, XAieGbl_RegTimer::LowOff, and XAieGbl_Tile::TileAddr.

Referenced by main().

u8 XAieTile_CoreWaitStatus ( XAieGbl_Tile TileInstPtr,
u32  TimeOut,
u32  Status 
)

This API implements a blocking wait function to check for the core status to be disabled or done.

API comes out of the wait loop when core status changes to done/disable or the timeout elapses, whichever happens first.

Parameters
TileInstPtr- Pointer to the Tile instance.
TimeOut- TimeOut in usecs. If set to 0, the default timeout will be set to 500 usecs.
Status- 1 for Core_done and 0 for Disable Use macros XAIETILE_CORE_STATUS_DONE/XAIETILE_CORE_STATUS_DISABLE
Returns
The requested status if wait completes successful, or !Status.
Note
None.

References XAieGbl_RegCoreSts::Done, XAieGbl_RegCoreSts::En, XAieGbl_RegFldAttr::Lsb, XAieGbl_RegFldAttr::Mask, XAieGbl_RegCoreSts::RegOff, and XAieGbl_Tile::TileAddr.