Intel® IXP400 Software

Access-Layer Components: Performance Profiling (IxPerfProfAcc) API

For example:

If the user has declared a variable “IxPerfProfAccBusPmuResults busPmuResults,” the user may then print out the value of all seven of the PEC counters. The user should be aware that in the lower 27-bit counter, it only stores values up to 27 bits before causing an overflow. Therefore, in order to combine the lower 27-bit value with the upper, 32-bit value, the following calculations are done:

lower32Bits = (lower 27-bit counter value) +[(upper 32-bit counter value) & 0x1F ) << 27 ] upper32Bits = (upper 32-bit counter value) >> 5

Total PEC counter value = (upper32Bits<<32) lower32Bits

If the user declares variables “UINT32 lower32Bits” and “UINT32 upper32Bits,” and assigns them to the values calculated above, the user may print out the results as follows:

for (i = 0; i< IX_PERFPROF_ACC_BUS_PMU_MAX_PECS ; i++)

{

printf ("\n The value of PEC %d = 0x%8x%8x ", i, upper32Bits, lower32Bits);

}

This will print out the entire value of the PC in hexadecimal.

Note: For the ixPerfProfAccBusPmuPMSRGet() function, the user may refer to the codelet for a detailed description.

17.10.2.1Using the Internal Bus PMU Utility to Monitor Read/Write Activity on the North Bus

In this example, the user would like to monitor the number of cycles where the north bus is either idle, or is being written to or read from. In order to do so, the user selects the north mode. PECs 1, 2, and 3 will be set to monitor the number of cycles the bus is doing data writes/reads or is idle.

PEC 7 will be set to monitor the total number of cycles.

The remaining counters will not provide relevant results in this examples, therefore, they may be set to any appropriate north mode event.

1. To begin the measurements, call the start function with parameters:

ixPerfProfAccBusPmuStart (

IX_PERFPROF_ACC_BUS_PMU_MODE_NORTH,

IX_PERFPROF_ACC_BUS_PMU_PEC1_NORTH_BUS_IDLE_SELECT, IX_PERFPROF_ACC_BUS_PMU_PEC2_NORTH_BUS_WRITE_SELECT, IX_PERFPROF_ACC_BUS_PMU_PEC3_NORTH_BUS_READ_SELECT,

IX_PERFPROF_ACC_BUS_PMU_PEC4_NORTH_ABB_SPLIT_SELECT, IX_PERFPROF_ACC_BUS_PMU_PEC5_NORTH_PSMB_GRANT_SELECT, IX_PERFPROF_ACC_BUS_PMU_PEC6_NORTH_PSMC_GRANT_SELECT, IX_PERFPROF_ACC_BUS_PMU_PEC7_CYCLE_COUNT_SELECT)

2.After an appropriate amount of time, end the measurements by calling the stop function: ixPerfProfAccBusPmuStop(void)

3.Declare a variable for the results:

IxPerfProfAccBusPmuResults results

April 2005

IXP400 Software Version 2.0

Programmer’s Guide

262

Document Number: 252539, Revision: 007

 

Page 262
Image 262
Intel IXP400 manual IxPerfProfAccBusPmuStart