XilinxProcessorIPLib/drivers/axipmon/src/xaxipmon.c
const char * XAxiPmon_GetMetricName(u8 Metrics)
{
	if (Metrics == XAPM_METRIC_SET_0 ){
		return "Write Transaction Count";
	}
	if (Metrics == XAPM_METRIC_SET_1 ){
			return "Read Transaction Count";
	}
	if (Metrics == XAPM_METRIC_SET_2 ){
			return "Write Byte Count";
	}
	if (Metrics == XAPM_METRIC_SET_3 ){
			return "Read Byte Count";
	}
	if (Metrics == XAPM_METRIC_SET_4 ){
			return "Write Beat Count";
	}
	if (Metrics == XAPM_METRIC_SET_5 ){
			return "Total Read Latency";
	}
	if (Metrics == XAPM_METRIC_SET_6 ){
			return "Total Write Latency";
	}
	if (Metrics == XAPM_METRIC_SET_7 ){
		return "Slv_Wr_Idle_Cnt";
	}
	if (Metrics == XAPM_METRIC_SET_8 ){
			return "Mst_Rd_Idle_Cnt";
	}
	if (Metrics == XAPM_METRIC_SET_9 ){
			return "Num_BValids";
	}
	if (Metrics == XAPM_METRIC_SET_10){
		return "Num_WLasts";
	}
	if (Metrics == XAPM_METRIC_SET_11){
			return "Num_RLasts";
	}
	if (Metrics == XAPM_METRIC_SET_12){
			return "Minimum Write Latency";
	}
	if (Metrics == XAPM_METRIC_SET_13){
			return "Maximum Write Latency";
	}
	if (Metrics == XAPM_METRIC_SET_14){
			return "Minimum Read Latency";
	}
	if (Metrics == XAPM_METRIC_SET_15){
			return "Maximum Read Latency";
	}
	if (Metrics == XAPM_METRIC_SET_16){
			return "Transfer Cycle Count";
	}
	if (Metrics == XAPM_METRIC_SET_17){
			return "Packet Count";
	}
	if (Metrics == XAPM_METRIC_SET_18){
			return "Data Byte Count";
	}
	if (Metrics == XAPM_METRIC_SET_19){
			return "Position Byte Count";
	}
	if (Metrics == XAPM_METRIC_SET_20){
			return "Null Byte Count";
	}
	if (Metrics == XAPM_METRIC_SET_21){
			return "Slv_Idle_Cnt";
	}
	if (Metrics == XAPM_METRIC_SET_22){
			return "Mst_Idle_Cnt";
	}
	if (Metrics == XAPM_METRIC_SET_30){
			return "External event count";
	}
	return "Unsupported";
}
/****************************************************************************/
/**
*
* This function returns a name for a given Metric.
*
* @param        Metrics is one of the Metric Sets. User has to use
*               XAPM_METRIC_SET_* macros in xaxipmon.h for this parameter
*
* @return       const char *
*
* @note         None
*
*****************************************************************************/
This function returns a name for a given Metric.
This function returns a name for a given Metric .
const char * XAxiPmon_GetMetricName(u8 Metrics)
{
	if (Metrics == XAPM_METRIC_SET_0 ){
		return "Write Transaction Count";
	}
	if (Metrics == XAPM_METRIC_SET_1 ){
			return "Read Transaction Count";
	}
	if (Metrics == XAPM_METRIC_SET_2 ){
			return "Write Byte Count";
	}
	if (Metrics == XAPM_METRIC_SET_3 ){
			return "Read Byte Count";
	}
	if (Metrics == XAPM_METRIC_SET_4 ){
			return "Write Beat Count";
	}
	if (Metrics == XAPM_METRIC_SET_5 ){
			return "Total Read Latency";
	}
	if (Metrics == XAPM_METRIC_SET_6 ){
			return "Total Write Latency";
	}
	if (Metrics == XAPM_METRIC_SET_7 ){
		return "Slv_Wr_Idle_Cnt";
	}
	if (Metrics == XAPM_METRIC_SET_8 ){
			return "Mst_Rd_Idle_Cnt";
	}
	if (Metrics == XAPM_METRIC_SET_9 ){
			return "Num_BValids";
	}
	if (Metrics == XAPM_METRIC_SET_10){
		return "Num_WLasts";
	}
	if (Metrics == XAPM_METRIC_SET_11){
			return "Num_RLasts";
	}
	if (Metrics == XAPM_METRIC_SET_12){
			return "Minimum Write Latency";
	}
	if (Metrics == XAPM_METRIC_SET_13){
			return "Maximum Write Latency";
	}
	if (Metrics == XAPM_METRIC_SET_14){
			return "Minimum Read Latency";
	}
	if (Metrics == XAPM_METRIC_SET_15){
			return "Maximum Read Latency";
	}
	if (Metrics == XAPM_METRIC_SET_16){
			return "Transfer Cycle Count";
	}
	if (Metrics == XAPM_METRIC_SET_17){
			return "Packet Count";
	}
	if (Metrics == XAPM_METRIC_SET_18){
			return "Data Byte Count";
	}
	if (Metrics == XAPM_METRIC_SET_19){
			return "Position Byte Count";
	}
	if (Metrics == XAPM_METRIC_SET_20){
			return "Null Byte Count";
	}
	if (Metrics == XAPM_METRIC_SET_21){
			return "Slv_Idle_Cnt";
	}
	if (Metrics == XAPM_METRIC_SET_22){
			return "Mst_Idle_Cnt";
	}
	if (Metrics == XAPM_METRIC_SET_30){
			return "External event count";
	}
	return "Unsupported";
}
const char * XAxiPmon_GetMetricName ( u8 Metrics ) { if ( Metrics == XAPM_METRIC_SET_0 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_1 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_2 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_3 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_4 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_5 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_6 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_7 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_8 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_9 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_10 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_11 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_12 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_13 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_14 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_15 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_16 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_17 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_18 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_19 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_20 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_21 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_22 ) { return " " ; } if ( Metrics == XAPM_METRIC_SET_30 ) { return " " ; } return " " ; }
This function returns a name for a given Metric.
This function returns a name for a given Metric .