xaiefal
Loading...
Searching...
No Matches
xaiefal::XAiePerfCounter Class Reference

class for Perfcounter resource. Each perfcounter resources contains the resource ID of in a module of a tile, start, stop, and reset events, and counter value for the counter event. If there is not enough perfcounter of the specified module, it will check if there is counter available from the adjacent module if it is core tile. If there is available counter in the adjacent module of the same tile, broadcast channels within the tile of the start/stop/reset events will be reserved. More...

#include <xaiefal-perf.hpp>

Inheritance diagram for xaiefal::XAiePerfCounter:
xaiefal::XAieSingleTileRsc xaiefal::XAieRsc xaiefal::XAieActiveCycles xaiefal::XAieStallCycles xaiefal::XAieStallOccurrences

Public Member Functions

 XAiePerfCounter ()=delete
 XAiePerfCounter (std::shared_ptr< XAieDevHandle > DevHd, XAie_LocType Loc, XAie_ModuleType Mod, bool CrossM=false, uint32_t Threshold=0)
 XAiePerfCounter (XAieDev &Dev, XAie_LocType Loc, XAie_ModuleType Mod, bool CrossM=false)
 ~XAiePerfCounter ()
AieRC initialize (XAie_ModuleType StartM, XAie_Events StartE, XAie_ModuleType StopM, XAie_Events StopE, XAie_ModuleType RstM=XAIE_CORE_MOD, XAie_Events RstE=XAIE_EVENT_NONE_CORE)
bool getCrossMod ()
AieRC changeRstEvent (XAie_ModuleType Module, XAie_Events Event)
AieRC changeThreshold (uint32_t Val)
AieRC changeStartEvent (XAie_ModuleType Module, XAie_Events Event)
AieRC changeStopEvent (XAie_ModuleType Module, XAie_Events Event)
AieRC readResult (uint32_t &Result)
AieRC getCounterEvent (XAie_ModuleType &Module, XAie_Events &Event) const
XAieRscStat getRscStat (const std::string &GName) const
Public Member Functions inherited from xaiefal::XAieSingleTileRsc
 XAieSingleTileRsc ()=delete
 XAieSingleTileRsc (std::shared_ptr< XAieDevHandle > DevHd, XAie_LocType Loc, XAie_ModuleType Mod)
 XAieSingleTileRsc (std::shared_ptr< XAieDevHandle > DevHd, XAie_LocType Loc, XAie_ModuleType Mod, XAieRscType Type)
 XAieSingleTileRsc (XAieDev &Dev, XAie_LocType Loc, XAie_ModuleType Mod)
 XAieSingleTileRsc (XAieDev &Dev, XAie_LocType Loc, XAie_ModuleType Mod, XAieRscType Type)
 XAieSingleTileRsc (std::shared_ptr< XAieDevHandle > DevHd, XAie_LocType Loc)
 XAieSingleTileRsc (std::shared_ptr< XAieDevHandle > DevHd, XAie_LocType Loc, XAieRscType Type)
 XAieSingleTileRsc (XAieDev &Dev, XAie_LocType Loc, XAieRscType Type)
virtual ~XAieSingleTileRsc ()
XAie_LocType loc () const
XAie_ModuleType mod () const
AieRC getRscId (XAie_LocType &OutLoc, XAie_ModuleType &OutMod, uint32_t &OutRscId)
Public Member Functions inherited from xaiefal::XAieRsc
 XAieRsc ()=delete
 XAieRsc (std::shared_ptr< XAieDevHandle > DevHd)
 XAieRsc (std::shared_ptr< XAieDevHandle > DevHd, XAieRscType Type)
 XAieRsc (XAieDev &Dev)
virtual ~XAieRsc ()
AieRC setPreferredId (uint32_t id, bool isStaticAllocated=false)
uint32_t getPreferredId ()
AieRC reserve ()
AieRC release ()
AieRC free ()
AieRC start ()
AieRC stop ()
bool isInitialized () const
bool isReserved () const
bool isConfigured () const
bool isRunning () const
void getReservedRscs (std::vector< XAieUserRsc > &vOutRscs) const
AieRC getRscs (std::vector< XAieUserRsc > &vOutRscs)
AieRC setRscs (std::vector< XAieUserRsc > &vInRscs)
virtual XAieRscType getRscType () const
XAie_DevInst * dev ()
virtual uint32_t getAvailManagedRscs ()
virtual XAieRscType getManagedRscsType ()

Protected Attributes

XAie_Events StartEvent
XAie_Events StopEvent
XAie_Events RstEvent
XAie_ModuleType StartMod
XAie_ModuleType StopMod
XAie_ModuleType RstMod
uint32_t EventVal
bool CrossMod
XAieBroadcast * StartBC
XAieBroadcast * StopBC
XAieBroadcast * RstBC
Protected Attributes inherited from xaiefal::XAieSingleTileRsc
XAie_LocType Loc
XAie_ModuleType Mod
Protected Attributes inherited from xaiefal::XAieRsc
XAieRscState State
XAieRscType Type
std::shared_ptr< XAieDevHandle > AieHd
uint32_t preferredId
uint32_t reservedId
std::vector< XAieUserRsc > vRscs

Detailed Description

class for Perfcounter resource. Each perfcounter resources contains the resource ID of in a module of a tile, start, stop, and reset events, and counter value for the counter event. If there is not enough perfcounter of the specified module, it will check if there is counter available from the adjacent module if it is core tile. If there is available counter in the adjacent module of the same tile, broadcast channels within the tile of the start/stop/reset events will be reserved.

Constructor & Destructor Documentation

◆ XAiePerfCounter() [1/3]

xaiefal::XAiePerfCounter::XAiePerfCounter ( )
delete

◆ XAiePerfCounter() [2/3]

xaiefal::XAiePerfCounter::XAiePerfCounter ( std::shared_ptr< XAieDevHandle > DevHd,
XAie_LocType Loc,
XAie_ModuleType Mod,
bool CrossM = false,
uint32_t Threshold = 0 )
inline

◆ XAiePerfCounter() [3/3]

xaiefal::XAiePerfCounter::XAiePerfCounter ( XAieDev & Dev,
XAie_LocType Loc,
XAie_ModuleType Mod,
bool CrossM = false )
inline

◆ ~XAiePerfCounter()

xaiefal::XAiePerfCounter::~XAiePerfCounter ( )
inline

Member Function Documentation

◆ changeRstEvent()

AieRC xaiefal::XAiePerfCounter::changeRstEvent ( XAie_ModuleType Module,
XAie_Events Event )
inline

This function change the reset event. It needs to be called before counter is configured in hardware. That is it needs to be called before start().

Parameters
Modulereset event module
Eventreset event
Returns
XAIE_OK for success, error code for failure

◆ changeStartEvent()

AieRC xaiefal::XAiePerfCounter::changeStartEvent ( XAie_ModuleType Module,
XAie_Events Event )
inline

This function change the start event. It needs to be called before counter is configured in hardware. That is it needs to be called before start().

Parameters
Modulereset event module
Eventstart event
Returns
XAIE_OK for success, error code for failure

◆ changeStopEvent()

AieRC xaiefal::XAiePerfCounter::changeStopEvent ( XAie_ModuleType Module,
XAie_Events Event )
inline

This function change the stop event. It needs to be called before counter is configured in hardware. That is it needs to be called before start().

Parameters
Modulemodule type of the event
Eventstop event
Returns
XAIE_OK for success, error code for failure

◆ changeThreshold()

AieRC xaiefal::XAiePerfCounter::changeThreshold ( uint32_t Val)
inline

This function change threshold to generate counter event. It needs to be called before counter is configured in hardware. That is it needs to be called before start().

Parameters
Valcounter value to generate counter event
Returns
XAIE_OK for success, error code for failure

◆ getCounterEvent()

AieRC xaiefal::XAiePerfCounter::getCounterEvent ( XAie_ModuleType & Module,
XAie_Events & Event ) const
inline

This function returns the counter event and the event module.

Parameters
Modulemodule of the counter
Eventcounter event
Returns
XAIE_OK for success, error code for failure

◆ getCrossMod()

bool xaiefal::XAiePerfCounter::getCrossMod ( )
inline

This function gets if allow to allocate perfcounter from a different module than the expected one in the same tile.

Returns
true if cross module is enabled, false otherwise.

◆ getRscStat()

XAieRscStat xaiefal::XAiePerfCounter::getRscStat ( const std::string & GName) const
inlinevirtual

This function returns resources static for a specific group of this type of resource.

Parameters
GNameresource group name
Returns
resource group resource statistics of this type of resource of specific tiles/module

Reimplemented from xaiefal::XAieSingleTileRsc.

◆ initialize()

AieRC xaiefal::XAiePerfCounter::initialize ( XAie_ModuleType StartM,
XAie_Events StartE,
XAie_ModuleType StopM,
XAie_Events StopE,
XAie_ModuleType RstM = XAIE_CORE_MOD,
XAie_Events RstE = XAIE_EVENT_NONE_CORE )
inline

This function sets the perfcounter start, stop, reset events.

Parameters
StartMstart event module type
StartEstart event
StopMstop event module type
StopEstop event
RstMreset event module type
RstEreset event, default is XAIE_EVENT_NONE_CORE, that is no reset event.
Returns
XAIE_OK for success, error code for failure

◆ readResult()

AieRC xaiefal::XAiePerfCounter::readResult ( uint32_t & Result)
inline

This function reads the perfcounter value if counter is in use.

Parameters
Resultcounter value if counter is in use.
Returns
XAIE_OK for success, error code for failure

Field Documentation

◆ CrossMod

bool xaiefal::XAiePerfCounter::CrossMod
protected

true to indicate can try allocating counter from different module in the same tile

◆ EventVal

uint32_t xaiefal::XAiePerfCounter::EventVal
protected

counter event value

◆ RstBC

XAieBroadcast* xaiefal::XAiePerfCounter::RstBC
protected

reset Event braodcast resource

◆ RstEvent

XAie_Events xaiefal::XAiePerfCounter::RstEvent
protected

reset event

◆ RstMod

XAie_ModuleType xaiefal::XAiePerfCounter::RstMod
protected

Reset event module

◆ StartBC

XAieBroadcast* xaiefal::XAiePerfCounter::StartBC
protected

start Event braodcast resource

◆ StartEvent

XAie_Events xaiefal::XAiePerfCounter::StartEvent
protected

start event

◆ StartMod

XAie_ModuleType xaiefal::XAiePerfCounter::StartMod
protected

start event module

◆ StopBC

XAieBroadcast* xaiefal::XAiePerfCounter::StopBC
protected

stop Event braodcast resource

◆ StopEvent

XAie_Events xaiefal::XAiePerfCounter::StopEvent
protected

stop event

◆ StopMod

XAie_ModuleType xaiefal::XAiePerfCounter::StopMod
protected

stop event module


The documentation for this class was generated from the following file: