DDM Data Fields

Network Interface Modules

Platform
Napatech SmartNIC
Content Type
User Guide

In this section

In the example in Example of Real I2C NIM Data DDM is implemented. This section describes some DDM data fields, which are both static and dynamic.

Temperature

The temperature field is an example of a dynamic field, which is constantly updated by the module firmware. This field is located at address 0x160 as a two-byte value in big-endian two's-complement format. The unit is 1/256 °C.

The bytes in the example are 0x35 and 0x4C, and since the format is big endian, the most significant byte is found at the lowest address. So the two bytes represent the value 0x354C (13644 in decimal notation). In decimal notation, the temperature is therefore 1/256 × 13644 °C = 53.297 °C. Thus the first of the two bytes represents the integer part of the value, and the second byte represents the fraction part.

If the data is to be used in an Intel machine, which uses little-endian format, the bytes must be swapped.

Temperature alarm limits

The temperature high alarm limit is static and is located at address 0x100 as a two-byte value. These bytes, 0x4B and 0x00, are interpreted exactly as described in Temperature, so the temperature high limit is 75 °C.

The temperature low alarm limit is located at address 0x102 as a two-byte value. These bytes, 0xFB and 0x00, are interpreted as for the temperature high alarm, except that the value is negative, because the most significant bit is set (the value of the first byte is higher than 0x7F). The temperature low limit is therefore 0x7B (123) °C to 0x80 (128) °C = –5 °C.