Low Latency 40G Ethernet Intel® FPGA IP User Guide: Agilex™ 5 FPGAs and SoCs

ID 813652
Date 7/22/2024
Public
Document Table of Contents

7.5. Statistics Counters

The stats module receives vector inputs from the MAC/status vector module and accumulates them into 64-bit Read Only registers. The statistics module provides for the following functions.

Accumulation of Packet Classifications into 64-bit Read Only Registers

The stats module accumulates the following events and packet classification signals into individual 64-bit Read Only registers.

The MAC TX module does not check FCS error for outgoing frames, so it does not report FCS error for outgoing frames. All FCS error related register should be 0. Also, MAC TX does not check outgoing frames for “undersize” error. So, register “Fragments” and “Rnt” should keep value 0.

Statistic counters are implemented with MLAB. After system is powered up in the beginning, the statistic counters have random values. The counter values are not meaningful, and parity error bits could be high. The counter values and parity bits should be cleared before using them.

The address range of these counters in MLAB are from 0x0 to 0x3F and from 0x60 to 0x7F. Some of the addresses in this range are not used. The read access to these unused addresses return random values.

Also, the statistic Counter values are not meaningful if it is read when system is not stable. The read out values should be ignored in this case.

For VLAN or Stacked VLAN frames, if "VLAN detection” is disabled, the VLAN/Stacked VLAN header bytes (4 for VLAN and 8 for Stacked VLAN) are counted into payload bytes.

The following table summarizes the stat counter offsets and their descriptions. The addresses listed give the address of the lower 32 bits of a counter. The upper 32 bits are accessed by adding 1 to the listed address offset.

The TX stats counters have a base address of 0x0800 and the RX counters have a base address of 0x0900.

For example: read address 0x092A to access the RX unicast data packet count.

Table 32.  Statistics and Error Registers
Word Offset Name Typ Default Value Description
0x0 FRAGMENTS RO NA A count of frames which are undersized with a FCS error.
0x2 JABBERS RO NA

A count of oversized frames with an FCS error.

0x4 FCSERR RO NA A count of all packets with an FCS error.
0x6 CRCERR_OKPKT RO NA A count of all packets at least 64 bytes with an FCS error.
0x8 MCAST_DATA_ERR RO NA

A count of multicast data frames with FCS error.

0xa BCAST_DATA_ERR RO NA A count of broadcast data frames with FCS error.
0xc UCAST_DATA_ERR RO NA A count of unicast data frames with FCS error.
0xe MCAST_CTRL_ERR RO NA

A count of multicast control frames with FCS error.

0x10 BCAST_CTRL_ERR RO NA A count of broadcast control frames with FCS error.
0x12 UCAST_CTRL_ERR RO NA A count of unicast control frames with FCS error.
0x14 PAUSE_ERR RO NA A count of pause control frames with an FCS error.
0x16 64B RO NA This counts all packets with length equal to 64 Bytes.
0x18 65to127B RO NA This counts all packets with length from 65 Bytes up-to 127 Bytes.
0x1a 128to255B RO NA This counts all packets with length from 128 Bytes up-to 255 Bytes.
0x1c 256to511B RO NA This counts all packets with length from 256 Bytes up-to 511 Bytes.
0x1e 512to1023B RO NA This counts all packets with length 512 Bytes to 1023 Bytes.
0x20 1024to1518B RO NA This counts all packets with length 1024 Bytes to 1518 Bytes.
0x22 1519toMAXB RO NA This counts all packets with length from 1519 to size specified in the size specified in the max packet size register.
0x24 OVERSIZE RO NA This counts all packets with length more than the size specified in the max frame size register.
0x26 MCAST_DATA_OK RO NA A count of multicast data frames without an FCS error.
0x28 BCAST_DATA_OK RO NA A count of broadcast data frames without an FCS error.
0x2a UCAST_DATA_OK RO NA A count of unicast data frames without an FCS error.
0x2c MCAST_CTRL_OK RO NA A count of multicast control frames without an FCS error.
0x23 BCAST_CTRL_OK RO NA A count of broadcast control frames without an FCS error.
0x30 UCAST_CTRL_OK RO NA A count of unicast control frames without an FCS error.
0x32 PAUSE RO NA A count of pause control frames without an FCS error.
0x34 RNT RO NA This counts all packets with length less than64 Bytes.
0x45 CNTR_CONFIG RO NA

This is a stats counter control register.

  • Set bit 0 to clear the stats counters. This is self-clearing.
  • Set bit 1 to clear parity errors in counter memory. This is self-clearing.
  • Set bit 2 to assert a shadow request.
0x46 CNTR_STATUS RO NA

This is a status register.

  • Bit 0 indicates a counter memory parity error.
  • Bit 1 indicates that the shadow request has been granted.
0x60 Payload OctetsOK RO NA This is a 64-bits register. It represents the cumulative value of Payload Octets for good frames Transmitted/Received.
0x62 Frame OctetsOK RO NA This is a 64-bits register. It represents the cumulative value of Frame Octets for good frames Transmitted/Received.