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

class of AI engine event tracing. An XAieTracing object contains AI engine trace control and events to trace. More...

#include <xaiefal-trace.hpp>

Inheritance diagram for xaiefal::XAieTracing:
xaiefal::XAieSingleTileRsc xaiefal::XAieRsc

Public Member Functions

 XAieTracing ()=delete
 XAieTracing (std::shared_ptr< XAieDevHandle > DevHd, XAie_LocType Loc, XAie_ModuleType Mod, std::shared_ptr< XAieTraceCntr > TCntr)
 XAieTracing (XAieDev &Dev, XAie_LocType Loc, XAie_ModuleType Mod)
 ~XAieTracing ()
AieRC addEvent (XAie_ModuleType Module, XAie_Events TraceEvent)
AieRC removeEvent (XAie_ModuleType Module, XAie_Events TraceEvent)
AieRC setCntrEvent (XAie_Events StartE, XAie_Events StopE)
AieRC setMode (XAie_TraceMode TraceMode)
AieRC setPkt (const XAie_Packet &Packet)
uint32_t getTraceControlAvailTraceSlots () const
uint32_t getMaxTraceEvents () 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)
virtual XAieRscStat getRscStat (const std::string &GName) const
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 Member Functions

AieRC _reserve ()
AieRC _release ()
AieRC _start ()
AieRC _stop ()

Protected Attributes

std::shared_ptr< XAieTraceCntr > TraceCntr
std::vector< XAieTraceEvent > Events
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 of AI engine event tracing. An XAieTracing object contains AI engine trace control and events to trace.

Constructor & Destructor Documentation

◆ XAieTracing() [1/3]

xaiefal::XAieTracing::XAieTracing ( )
delete

◆ XAieTracing() [2/3]

xaiefal::XAieTracing::XAieTracing ( std::shared_ptr< XAieDevHandle > DevHd,
XAie_LocType Loc,
XAie_ModuleType Mod,
std::shared_ptr< XAieTraceCntr > TCntr )
inline

◆ XAieTracing() [3/3]

xaiefal::XAieTracing::XAieTracing ( XAieDev & Dev,
XAie_LocType Loc,
XAie_ModuleType Mod )
inline

◆ ~XAieTracing()

xaiefal::XAieTracing::~XAieTracing ( )
inline

Member Function Documentation

◆ _release()

AieRC xaiefal::XAieTracing::_release ( )
inlineprotectedvirtual

This function will be called by release(). It allows child class to implement its own resource release.

Returns
XAIE_OK for success, error code for failure.

Reimplemented from xaiefal::XAieRsc.

◆ _reserve()

AieRC xaiefal::XAieTracing::_reserve ( )
inlineprotectedvirtual

This function will be called by reserve(). It allows child class to implement its own resource reservation.

Returns
XAIE_OK for success, error code for failure.

Reimplemented from xaiefal::XAieRsc.

◆ _start()

AieRC xaiefal::XAieTracing::_start ( )
inlineprotectedvirtual

This function will be called by start(). It allows child class to implement its own resource start.

Returns
XAIE_OK for success, error code for failure.

Reimplemented from xaiefal::XAieRsc.

◆ _stop()

AieRC xaiefal::XAieTracing::_stop ( )
inlineprotectedvirtual

This function will be called by stop(). It allows child class to implement its own resource stop.

Returns
XAIE_OK for success, error code for failure.

Reimplemented from xaiefal::XAieRsc.

◆ addEvent()

AieRC xaiefal::XAieTracing::addEvent ( XAie_ModuleType Module,
XAie_Events TraceEvent )
inline

This function adds an event to trace. This function will needs to be called before the trace control is configured in hardware. That is it needs to be called before start().

Parameters
Modulemodule of the event
TraceEventevent to trace
Returns
XAIE_OK for success, error code for failure.

◆ getMaxTraceEvents()

uint32_t xaiefal::XAieTracing::getMaxTraceEvents ( ) const
inline

This functinon returns the max number of trace events supported by the trace control.

Returns
supported max trace events

◆ getTraceControlAvailTraceSlots()

uint32_t xaiefal::XAieTracing::getTraceControlAvailTraceSlots ( ) const
inline

This functinon returns the number of available free trace slots on the trace control.

Returns
number of reserved events.

◆ removeEvent()

AieRC xaiefal::XAieTracing::removeEvent ( XAie_ModuleType Module,
XAie_Events TraceEvent )
inline

This function removes an event. It needs to be called before start().

Parameters
Modulemodule of the event
TraceEventevent to remove
Returns
XAIE_OK for success, error code for failure

◆ setCntrEvent()

AieRC xaiefal::XAieTracing::setCntrEvent ( XAie_Events StartE,
XAie_Events StopE )
inline

This function sets start event of the trace control. No hardware configuration is changed. It will check if trace control is already configured. If yes, it will fail the setting. That is it needs to be called before start().

Parameters
StartEstart event to set
StopEstop event to set
Returns
XAIE_OK for success, error code for failure

◆ setMode()

AieRC xaiefal::XAieTracing::setMode ( XAie_TraceMode TraceMode)
inline

This function sets trace control mode. This function needs to be called before trace control is configured in hardware. That is it needs to be called before start().

Parameters
TraceModetrace control mode
Returns
XAIE_OK for success, error code for failure.

◆ setPkt()

AieRC xaiefal::XAieTracing::setPkt ( const XAie_Packet & Packet)
inline

This function sets trace control packet config. This function needs to be called before trace control is configured in hardware. That is it needs to be called before start().

Parameters
Packettrace control packet setting
Returns
XAIE_OK for success, error code for failure.

Field Documentation

◆ Events

std::vector<XAieTraceEvent> xaiefal::XAieTracing::Events
protected

◆ TraceCntr

std::shared_ptr<XAieTraceCntr> xaiefal::XAieTracing::TraceCntr
protected

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