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.
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.