axipmon
Vitis Drivers API Documentation
 All Data Structures Files Functions Variables Macros Groups Pages
xaxipmon.h File Reference
#include "xil_types.h"
#include "xil_assert.h"
#include "xstatus.h"
#include "xaxipmon_hw.h"

Data Structures

struct  XAxiPmon_Config
 Configuration structure for the AXI Performance Monitor device. More...
 
struct  XAxiPmon
 Driver instance data for the AXI Performance Monitor. More...
 

Macros

#define XAxiPmon_IntrGlobalEnable(InstancePtr)
 Enables the Global Interrupt. More...
 
#define XAxiPmon_IntrGlobalDisable(InstancePtr)
 Disables the Global Interrupt. More...
 
#define XAxiPmon_IntrEnable(InstancePtr, Mask)
 Enables the specified interrupts. More...
 
#define XAxiPmon_IntrDisable(InstancePtr, Mask)
 Disables the specified interrupts. More...
 
#define XAxiPmon_IntrClear(InstancePtr, Mask)
 Clears the specified interrupts. More...
 
#define XAxiPmon_IntrGetStatus(InstancePtr)
 Returns the Interrupt Status Register contents. More...
 
#define XAxiPmon_EnableGlobalClkCounter(InstancePtr)
 Enables the Global Clock Counter. More...
 
#define XAxiPmon_DisableGlobalClkCounter(InstancePtr)
 Disables the Global Clock Counter. More...
 
#define XAxiPmon_EnableFlag(InstancePtr, Flag)
 Enables the specified flag in the Flag Control Register. More...
 
#define XAxiPmon_DisableFlag(InstancePtr, Flag)
 Disables the specified flag in the Flag Control Register. More...
 
#define XAxiPmon_LoadSampleIntervalCounter(InstancePtr)
 Loads the sample interval register value into the sample interval counter. More...
 
#define XAxiPmon_EnableSampleIntervalCounter(InstancePtr)
 Enables the down count of the sample interval counter. More...
 
#define XAxiPmon_DisableSampleIntervalCounter(InstancePtr)
 Disables the down count of the sample interval counter. More...
 
#define XAxiPmon_EnableMetricCounterReset(InstancePtr)
 Enables reset of Metric Counters when Sample Interval Counter lapses. More...
 
#define XAxiPmon_DisableMetricCounterReset(InstancePtr)
 Disables the Metric Counter reset. More...
 
#define XAxiPmon_EnableIDFilter(InstancePtr)
 Enables the ID Filter masking. More...
 
#define XAxiPmon_DisableIDFilter(InstancePtr)
 Disables the ID Filter masking. More...
 
#define XAxiPmon_SampleMetrics(InstancePtr)   XAxiPmon_ReadReg((InstancePtr)->Config.BaseAddress, XAPM_SR_OFFSET);
 Samples Metric Counters to Sampled Metric Counters. More...
 
Macro for Maximum number of Counters
#define XAPM_MAX_COUNTERS   10U
 Maximum number of Counters. More...
 
#define XAPM_MAX_COUNTERS_PROFILE   48U
 Maximum number of Counters in Profile mode. More...
 
Indices for Metric Counters and Sampled Metric Counters used with
     XAxiPmon_GetMetricCounter and XAxiPmon_GetSampledMetricCounter APIs
#define XAPM_METRIC_COUNTER_0   0U
 Metric Counter 0 Register Index. More...
 
#define XAPM_METRIC_COUNTER_1   1U
 Metric Counter 1 Register Index. More...
 
#define XAPM_METRIC_COUNTER_2   2U
 Metric Counter 2 Register Index. More...
 
#define XAPM_METRIC_COUNTER_3   3U
 Metric Counter 3 Register Index. More...
 
#define XAPM_METRIC_COUNTER_4   4U
 Metric Counter 4 Register Index. More...
 
#define XAPM_METRIC_COUNTER_5   5U
 Metric Counter 5 Register Index. More...
 
#define XAPM_METRIC_COUNTER_6   6U
 Metric Counter 6 Register Index. More...
 
#define XAPM_METRIC_COUNTER_7   7U
 Metric Counter 7 Register Index. More...
 
#define XAPM_METRIC_COUNTER_8   8U
 Metric Counter 8 Register Index. More...
 
#define XAPM_METRIC_COUNTER_9   9U
 Metric Counter 9 Register Index. More...
 
Indices for Incrementers and Sampled Incrementers used with
     XAxiPmon_GetIncrementer and XAxiPmon_GetSampledIncrementer APIs
#define XAPM_INCREMENTER_0   0U
 Incrementer 0 Register Index. More...
 
#define XAPM_INCREMENTER_1   1U
 Incrementer 1 Register Index. More...
 
#define XAPM_INCREMENTER_2   2U
 Incrementer 2 Register Index. More...
 
#define XAPM_INCREMENTER_3   3U
 Incrementer 3 Register Index. More...
 
#define XAPM_INCREMENTER_4   4U
 Incrementer 4 Register Index. More...
 
#define XAPM_INCREMENTER_5   5U
 Incrementer 5 Register Index. More...
 
#define XAPM_INCREMENTER_6   6U
 Incrementer 6 Register Index. More...
 
#define XAPM_INCREMENTER_7   7U
 Incrementer 7 Register Index. More...
 
#define XAPM_INCREMENTER_8   8U
 Incrementer 8 Register Index. More...
 
#define XAPM_INCREMENTER_9   9U
 Incrementer 9 Register Index. More...
 
Macros for Metric Selector Settings
#define XAPM_METRIC_SET_0   0U
 Write Transaction Count. More...
 
#define XAPM_METRIC_SET_1   1U
 Read Transaction Count. More...
 
#define XAPM_METRIC_SET_2   2U
 Write Byte Count. More...
 
#define XAPM_METRIC_SET_3   3U
 Read Byte Count. More...
 
#define XAPM_METRIC_SET_4   4U
 Write Beat Count. More...
 
#define XAPM_METRIC_SET_5   5U
 Total Read Latency. More...
 
#define XAPM_METRIC_SET_6   6U
 Total Write Latency. More...
 
#define XAPM_METRIC_SET_7   7U
 Slv_Wr_Idle_Cnt. More...
 
#define XAPM_METRIC_SET_8   8U
 Mst_Rd_Idle_Cnt. More...
 
#define XAPM_METRIC_SET_9   9U
 Num_BValids. More...
 
#define XAPM_METRIC_SET_10   10U
 Num_WLasts. More...
 
#define XAPM_METRIC_SET_11   11U
 Num_RLasts. More...
 
#define XAPM_METRIC_SET_12   12U
 Minimum Write Latency. More...
 
#define XAPM_METRIC_SET_13   13U
 Maximum Write Latency. More...
 
#define XAPM_METRIC_SET_14   14U
 Minimum Read Latency. More...
 
#define XAPM_METRIC_SET_15   15U
 Maximum Read Latency. More...
 
#define XAPM_METRIC_SET_16   16U
 Transfer Cycle Count. More...
 
#define XAPM_METRIC_SET_17   17U
 Packet Count. More...
 
#define XAPM_METRIC_SET_18   18U
 Data Byte Count. More...
 
#define XAPM_METRIC_SET_19   19U
 Position Byte Count. More...
 
#define XAPM_METRIC_SET_20   20U
 Null Byte Count. More...
 
#define XAPM_METRIC_SET_21   21U
 Slv_Idle_Cnt. More...
 
#define XAPM_METRIC_SET_22   22U
 Mst_Idle_Cnt. More...
 
#define XAPM_METRIC_SET_30   30U
 External event count. More...
 
Macros for Maximum number of Agents
#define XAPM_MAX_AGENTS   8U
 Maximum number of Agents. More...
 
Macros for Flags in Flag Enable Control Register
#define XAPM_FLAG_WRADDR   0x00000001
 Write Address Flag. More...
 
#define XAPM_FLAG_FIRSTWR   0x00000002
 First Write Flag. More...
 
#define XAPM_FLAG_LASTWR   0x00000004
 Last Write Flag. More...
 
#define XAPM_FLAG_RESPONSE   0x00000008
 Response Flag. More...
 
#define XAPM_FLAG_RDADDR   0x00000010
 Read Address Flag. More...
 
#define XAPM_FLAG_FIRSTRD   0x00000020
 First Read Flag. More...
 
#define XAPM_FLAG_LASTRD   0x00000040
 Last Read Flag. More...
 
#define XAPM_FLAG_SWDATA   0x00010000
 Software-written Data Flag. More...
 
#define XAPM_FLAG_EVENT   0x00020000
 Event Flag. More...
 
#define XAPM_FLAG_EVNTSTOP   0x00040000
 Event Stop Flag. More...
 
#define XAPM_FLAG_EVNTSTART   0x00080000
 Event Start Flag. More...
 
#define XAPM_FLAG_GCCOVF   0x00100000
 Global Clock Counter Overflow Flag. More...
 
#define XAPM_FLAG_SCLAPSE   0x00200000
 Sample Counter Lapse Flag. More...
 
#define XAPM_FLAG_MC0   0x00400000U
 Metric Counter 0 Flag. More...
 
#define XAPM_FLAG_MC1   0x00800000U
 Metric Counter 1 Flag. More...
 
#define XAPM_FLAG_MC2   0x01000000U
 Metric Counter 2 Flag. More...
 
#define XAPM_FLAG_MC3   0x02000000U
 Metric Counter 3 Flag. More...
 
#define XAPM_FLAG_MC4   0x04000000U
 Metric Counter 4 Flag. More...
 
#define XAPM_FLAG_MC5   0x08000000U
 Metric Counter 5 Flag. More...
 
#define XAPM_FLAG_MC6   0x10000000U
 Metric Counter 6 Flag. More...
 
#define XAPM_FLAG_MC7   0x20000000U
 Metric Counter 7 Flag. More...
 
#define XAPM_FLAG_MC8   0x40000000U
 Metric Counter 8 Flag. More...
 
#define XAPM_FLAG_MC9   0x80000000U
 Metric Counter 9 Flag. More...
 
Macros for Read/Write Latency Start and End points
#define XAPM_LATENCY_ADDR_ISSUE   0U
 Address Issue as start point for Latency calculation. More...
 
#define XAPM_LATENCY_ADDR_ACCEPT   1U
 Address Acceptance as start point for Latency calculation. More...
 
#define XAPM_LATENCY_LASTRD   0U
 Last Read as end point for Latency calculation. More...
 
#define XAPM_LATENCY_LASTWR   0U
 Last Write as end point for Latency calculation. More...
 
#define XAPM_LATENCY_FIRSTRD   1U
 First Read as end point for Latency calculation. More...
 
#define XAPM_LATENCY_FIRSTWR   1U
 First Write as end point for Latency calculation. More...
 
Macros for Modes of APM
#define XAPM_MODE_TRACE   2U
 APM in Trace mode. More...
 
#define XAPM_MODE_PROFILE   1U
 APM in Profile mode. More...
 
#define XAPM_MODE_ADVANCED   0U
 APM in Advanced mode. More...
 

Functions

XAxiPmon_Config * XAxiPmon_LookupConfig (UINTPTR BaseAddress)
 Provides lookup and initialization functions from xaxipmon_sinit.c. More...
 
s32 XAxiPmon_CfgInitialize (XAxiPmon *InstancePtr, XAxiPmon_Config *ConfigPtr, UINTPTR EffectiveAddr)
 Initializes a specific XAxiPmon device/instance. More...
 
s32 XAxiPmon_ResetMetricCounter (XAxiPmon *InstancePtr)
 Resets all Metric Counters and Sampled Metric Counters. More...
 
void XAxiPmon_ResetGlobalClkCounter (XAxiPmon *InstancePtr)
 Resets the Global Clock Counter of the AXI Performance Monitor. More...
 
s32 XAxiPmon_ResetFifo (XAxiPmon *InstancePtr)
 Resets the Streaming FIFO of the AXI Performance Monitor. More...
 
void XAxiPmon_SetIncrementerRange (XAxiPmon *InstancePtr, u8 IncrementerNum, u16 RangeUpper, u16 RangeLower)
 Sets ranges for the specified Incrementer. More...
 
void XAxiPmon_GetIncrementerRange (XAxiPmon *InstancePtr, u8 IncrementerNum, u16 *RangeUpper, u16 *RangeLower)
 Returns the ranges of the specified Incrementer Register. More...
 
void XAxiPmon_SetSampleInterval (XAxiPmon *InstancePtr, u32 SampleInterval)
 Sets the Sample Interval Register value. More...
 
void XAxiPmon_GetSampleInterval (XAxiPmon *InstancePtr, u32 *SampleInterval)
 Returns the contents of the Sample Interval Register. More...
 
s32 XAxiPmon_SetMetrics (XAxiPmon *InstancePtr, u8 Slot, u8 Metrics, u8 CounterNum)
 Sets metrics for the specified Counter in the Metric Selector Register. More...
 
s32 XAxiPmon_GetMetrics (XAxiPmon *InstancePtr, u8 CounterNum, u8 *Metrics, u8 *Slot)
 Returns metrics from the specified Counter in the Metric Selector Register. More...
 
void XAxiPmon_GetGlobalClkCounter (XAxiPmon *InstancePtr, u32 *CntHighValue, u32 *CntLowValue)
 Returns the contents of the Global Clock Counter Register. More...
 
u32 XAxiPmon_GetMetricCounter (XAxiPmon *InstancePtr, u32 CounterNum)
 Returns the contents of the specified Metric Counter Register. More...
 
u32 XAxiPmon_GetSampledMetricCounter (XAxiPmon *InstancePtr, u32 CounterNum)
 Returns the contents of the specified Sampled Metric Counter Register. More...
 
u32 XAxiPmon_GetIncrementer (XAxiPmon *InstancePtr, u32 IncrementerNum)
 Returns the contents of the specified Incrementer Register. More...
 
u32 XAxiPmon_GetSampledIncrementer (XAxiPmon *InstancePtr, u32 IncrementerNum)
 Returns the contents of the specified Sampled Incrementer Register. More...
 
void XAxiPmon_SetSwDataReg (XAxiPmon *InstancePtr, u32 SwData)
 Sets the Software-written Data Register value. More...
 
u32 XAxiPmon_GetSwDataReg (XAxiPmon *InstancePtr)
 Returns the contents of the Software-written Data Register. More...
 
s32 XAxiPmon_StartEventLog (XAxiPmon *InstancePtr, u32 FlagEnables)
 Starts event logging in the AXI Performance Monitor. More...
 
s32 XAxiPmon_StopEventLog (XAxiPmon *InstancePtr)
 Stops event logging in the AXI Performance Monitor. More...
 
s32 XAxiPmon_StartCounters (XAxiPmon *InstancePtr, u32 SampleInterval)
 Starts all counters in the AXI Performance Monitor. More...
 
s32 XAxiPmon_StopCounters (XAxiPmon *InstancePtr)
 Stops all counters in the AXI Performance Monitor. More...
 
void XAxiPmon_EnableMetricsCounter (XAxiPmon *InstancePtr)
 Enables Metric Counters. More...
 
void XAxiPmon_DisableMetricsCounter (XAxiPmon *InstancePtr)
 Disables the Metric Counters. More...
 
void XAxiPmon_SetLogEnableRanges (XAxiPmon *InstancePtr, u32 CounterNum, u16 RangeUpper, u16 RangeLower)
 Sets the ranges for the specified Metric Counter Log Enable Register. More...
 
void XAxiPmon_GetLogEnableRanges (XAxiPmon *InstancePtr, u32 CounterNum, u16 *RangeUpper, u16 *RangeLower)
 Returns the ranges of the specified Metric Counter Log Enable Register. More...
 
void XAxiPmon_EnableEventLog (XAxiPmon *InstancePtr)
 Enables Event Logging. More...
 
void XAxiPmon_EnableMetricCounterTrigger (XAxiPmon *InstancePtr)
 Enables external trigger for Metric Counters. More...
 
void XAxiPmon_DisableMetricCounterTrigger (XAxiPmon *InstancePtr)
 Disables external trigger for Metric Counters. More...
 
void XAxiPmon_EnableEventLogTrigger (XAxiPmon *InstancePtr)
 Enables external trigger for Event Log. More...
 
void XAxiPmon_DisableEventLogTrigger (XAxiPmon *InstancePtr)
 Disables external trigger for Event Log. More...
 
const char * XAxiPmon_GetMetricName (u8 Metrics)
 Returns the name string for a given Metric. More...
 
void XAxiPmon_SetWriteId (XAxiPmon *InstancePtr, u32 WriteId)
 Sets the Write ID in the ID register. More...
 
void XAxiPmon_SetReadId (XAxiPmon *InstancePtr, u32 ReadId)
 Sets the Read ID in the ID register. More...
 
u32 XAxiPmon_GetWriteId (XAxiPmon *InstancePtr)
 Returns the Write ID from the ID register. More...
 
u32 XAxiPmon_GetReadId (XAxiPmon *InstancePtr)
 Returns the Read ID from the ID register. More...
 
void XAxiPmon_SetWrLatencyStart (XAxiPmon *InstancePtr, u8 Param)
 Sets the write latency start point. More...
 
void XAxiPmon_SetWrLatencyEnd (XAxiPmon *InstancePtr, u8 Param)
 Sets the write latency end point. More...
 
void XAxiPmon_SetRdLatencyStart (XAxiPmon *InstancePtr, u8 Param)
 Sets the read latency start point. More...
 
void XAxiPmon_SetRdLatencyEnd (XAxiPmon *InstancePtr, u8 Param)
 Sets the read latency end point. More...
 
u8 XAxiPmon_GetWrLatencyStart (XAxiPmon *InstancePtr)
 Returns the write latency start point. More...
 
u8 XAxiPmon_GetWrLatencyEnd (XAxiPmon *InstancePtr)
 Returns the write latency end point. More...
 
u8 XAxiPmon_GetRdLatencyStart (XAxiPmon *InstancePtr)
 Returns the read latency start point. More...
 
u8 XAxiPmon_GetRdLatencyEnd (XAxiPmon *InstancePtr)
 Returns the read latency end point. More...
 
void XAxiPmon_SetWriteIdMask (XAxiPmon *InstancePtr, u32 WrMask)
 Sets the Write ID Mask in the ID Mask register. More...
 
void XAxiPmon_SetReadIdMask (XAxiPmon *InstancePtr, u32 RdMask)
 Sets the Read ID Mask in the ID Mask register. More...
 
u32 XAxiPmon_GetWriteIdMask (XAxiPmon *InstancePtr)
 Returns the Write ID Mask from the ID Mask register. More...
 
u32 XAxiPmon_GetReadIdMask (XAxiPmon *InstancePtr)
 Returns the Read ID Mask from the ID Mask register. More...
 
s32 XAxiPmon_SelfTest (XAxiPmon *InstancePtr)
 Provides self-test functions from xaxipmon_selftest.c. More...