IXP1200 Network Processor Family ATM
•On hardware, counters.c is compiled into the atm_utils.o
4.8.1Global Parameters
Parameter | Description | |
|
| |
COUNTERS_BASE | Base address of the scratchpad counter array (mandatory) | |
|
| |
COUNTER_LOCATIONS | Size of the counter array (optional). Default is 64 | |
|
| |
COUNTER_STRINGn | String to print for counter n, where n is from 0 until | |
COUNTER_LOCATIONS | ||
| ||
|
|
4.8.2Use of the Counter Subsystem
In this design, system_config.h controls the counter subsystem and defines a handle for each counter. This handle provides the parameters to counter_inc() in the microcode. For example, counter_inc(ATM_RX_CELL_DROP_VC_CLOSED) is invoked in ATM Receive threads every time a cell is discarded because it arrived on a VC that is not open.
#define ATM_RX_CELL_DROP_VC_CLOSED COUNTERS_BASE, 5, COUNT_CELL_DROP
The counter handle has three members:
•The base address of the counter array.
•The index of the counter in the array.
•The flags to determine at
4.8.2.1Counter Base Address
The base address of the counter array is defined so that it starts immediately after the
#define COUNTERS_BASE 0xc3
4.8.2.2Counter Index
The index of the counter is simply entered directly into the list of counter handle definitions. Be careful not to duplicate any counter indexes, because it would cause multiple handles to increment the same location.
Application Note | 47 |
Modified on: 3/20/02,