Linear Addressing

Network Interface Modules

Napatech SmartNIC
Content Type
User Guide


The API provides access to NIM data via the Config stream interface. In order to cope with differences in addressing a special linear addressing scheme is used for reading the raw data.

Addressing areas

I2C NIMs can have several addressing areas, for instance at 0xA0 (the basic area that all NIMs use) and at 0xA2 (the area that some SFP modules use). Other NIMs use page mapping by mapping several 128-byte pages into the upper half of the basic area. This requires that a page selector is set in advance.

NIMs that use MDIO interface, for instance CFP4, have one large addressing area, but in contrast to I2C NIMs each entry is a 16-bit word instead of a byte. For most but not all of these words only the lower eight bits are used while the upper eight bits will be zero when read.

Accessing data on either type of interface requires a start address along with a specified length in bytes.

I2C linear address space

When the API is used for accessing data in a NIM that uses I2C interface, the individual I2C address areas are all mapped into one single linear address space according to these rules:

  • The basic 0xA0 address area is mapped to [0..0xFF].
  • The extended 0xA2 address area, if any, is mapped to [0x100..0x1FF].
  • If paging is used, for instance for QSFP+ modules, page 0 is mapped to [0x80..0xFF], page 1 is mapped to [0x100..0x17F] and so on, and the page select mechanism is handled automatically.
Note: The overlap between 0xA2 addresses and paged addressing is not a problem since they are not used concurrently.
Note: Paged addressing is handled by the API and no attempt must be made to control this explicitly.
Note: When page addressing is used, some pages might not be valid in which case the addressing wraps around to page 0.
Note: Some modules have a user-writable space, often found at 0x180 or 384 in decimal notation, which might be password-protected.

MDIO access

When the API is used for accessing data in a NIM that uses MDIO interface, the MDIO address is used as it is as the start address. The length in bytes must then in general be an even number since two bytes are associated with each MDIO address.
Note: It is possible to read an uneven number of bytes. The last byte will then be the lower part of the 16-bit word in the last MDIO address space.
Note: In general not all addresses are valid.