Device management task description

The goal of the Device Management task is to:

  • Read, monitor and record the sensor values:

    • Sensor values are read every second via the AVED Management Interface (AMI) APIs.

    • Measurements can be checked against provided thresholds. A Critical Warning is only issue once if the value goes out of range throughout the entire test.

    • Measurements are recorded in an output CSV file when enabled.

  • Configure the HW watchdog (disable or extend it). When the watchdog reaches its duration, it stops all xbtest hardware IP (xbtIP) present in the Alveo Versal Example Design (AVED). Xbtest SW resets the HW watchdog on a regular basis (half the HW duration).

By default, the following sensors are monitored (this list can be amended by other sensors defined in Card definition).

  • FPGA temperature.

  • Board power.

  • 3v3_pex: power, current and voltage.

  • 12v_pex: power, current and voltage.

  • vccint: power, current and voltage.

  • 12v_aux: power, current and voltage (when auxiliary power cable is present).

You can use this task to monitor other sensors or change the behaviour of sensor warnings (threshold or severity).

Note

This task is always running and does not require any parameters. So, there is no need to include it inside your test JSON file unless you want to modify the default behaviour. For more information, see Device management test JSON members.

Sensor source definition

A sensor source is defined by a type and an ID.

The following table presents the different types of sensor that can monitored by xbtest and for each type, the ID of the sources monitored by default:

Sensor source IDs are defined like those found when using the following command:

$ ami_tool sensors -d <BDF>
Sensor Source Definition

Sensor type

Description

Default sensor IDs

Sensor unit

thermal

Thermal sensors present on the device.

Typically, thermal measurements are temperatures.

Device

C

electrical

Electrical and power sensors present on the device.

Typically, electrical measurements are currents, voltages and powers.

12V_PEX, 12V_AUX, 3V3_PEX, VCCINT, Total_Power

A, V, W

Refer to the documentation for your card for more information on the sensors.

The sources monitored by default are defined in the Card definition JSON file (see Card definition). Other sources can be monitored when specified using sensor parameter.

The supported sources are also reported depending on targeted card using the following command:

$ xbtest -d <BDF> -g device_mgmt

Device management test JSON members

The following is an example of a device management task parameter definition:

"tasks": {
    "device_mgmt": {
        "sensor" : [
            {
                "id"   : "12V_PEX",
                "type" : "electrical",
                "warning_threshold" : {
                    "min": 1.0,
                    "max": 65.0
                },
                "error_threshold" : {
                    "min": 0.1,
                    "max": 70.0
                },
                "abort_threshold" : {
                    "min": 0.0,
                    "max": 75.0
                }
            }
        ],
        "watchdog_duration": 32,
        "dump_duration_alarm": 6
    }
}

Definition

The following table shows all members available for this task. More details are provided for each member in the subsequent sections.

Device management task members

Member

JSON format

Mandatory / Optional

Description

sensor

List

Optional

List of sensors definitions.

type

Value

Mandatory

Sensor type.

id

Value

Mandatory

Sensor ID.

warning_threshold

Object

Optional

Warning limits.

min

Value

Mandatory

Minimum warning limit.

max

Value

Mandatory

Maximum warning limit.

error_threshold

Object

Optional

Error limits.

min

Value

Mandatory

Minimum error limit.

max

Value

Mandatory

Maximum error limit.

abort_threshold

Object

Optional

Abort limits.

min

Value

Mandatory

Minimum abort limit.

max

Value

Mandatory

Maximum abort limit.

use_output_file

Value

Optional

Store in a file all measurements of the task.

watchdog_duration

Value

Optional

Control watchdog behaviour.

dump_duration_alarm

Value

Optional

Specify the maximum sensor reading duration in seconds for which a critical warning is displayed.

sensor

Optional; Type: List of objects.

Define list of sensors definitions (JSON objects). Override existing sensor definition or define new sensor sources.

type

Mandatory if sensor was provided; Type : string; Possible values: mechanical, thermal or electrical;

id

Mandatory if sensor was provided; Type : string; Possible values: depend on targeted card;

ID of the sensor source to monitor. See Sensor source definition for more information on the supported sensor sources.

warning_threshold

Optional; Type: Object.

Warning limits: if measurement is out of range, a critical warning is displayed (once), the test cases are not stopped and global result is pass.

warning_threshold.min

Optional; Type : double; Possible values: any double value provided as max > min.

Minimum warning limit.

warning_threshold.max

Optional; Type : double; Possible values: any double value provided as max > min.

Maximum warning limit.

error_threshold

Optional; Type: Object.

Error limits: if measurement is out of range, an error is displayed (once), the test cases are not stopped and global result is failure.

error_threshold.min

Optional; Type : double; Possible values: any double value provided as max > min.

Minimum error limit.

error_threshold.max

Optional; Type : double; Possible values: any double value provided as max > min.

Maximum error limit.

abort_threshold

Optional; Type: Object.

Abort limits: if measurement is out of range, a failure is displayed (once), all test cases are stopped and global result is failure.

abort_threshold.min

Optional; Type : double; Possible values: any double value provided as max > min.

Minimum abort limit.

abort_threshold.max

Optional; Type : double; Possible values: any double value provided as max > min.

Maximum abort limit.

use_output_file

Optional; Type : boolean; Possible values: true or false. Default : false.

By default, when not specified, the output CSV file is only generated if any sensor parameter is specified.

Based on use_output_file parameters:

  • When set to true, the output CSV file is generated.

  • When set to false, the output CSV file is not generated.

The Device Management can store all measurements in an output CSV file (see Output files).

watchdog_duration

Optional; Type : integer; Possible values: 0 (disable), 16, 32, 64 and 128. Default : 16.

Controls the HW watchdog duration.

dump_duration_alarm

Optional; Type : integer; Range : [1, 232-1]; Default: 10.

This parameter defines the maximum sensor reading duration in seconds. A critical warning is displayed when the time taken to get sensor values via the AVED Management Interface (AMI) APIs is greater than this limit.

Output files

All sensor measurements are stored in output CSV file named sensor.csv which is generated in xbtest logging directory. The values are stored in CSV type format with one column for each information type. By default, this file is not generated.

Important

If the command line option -L is used while calling xbtest application software (xbtSW), no output file is generated.

A new line is written in this file every second. At a minimum, the following values are recorded:

  • time (s): Timestamp of the measurement.

  • measurement ID: Measurement identifier. ID of first measurement is 1.

  • measurement valid: Set to OK if xbtest application software (xbtSW) was able to successfully gets power and temperature measurements via the AVED Management Interface (AMI) APIs, otherwise set to KO.

  • sensor reading duration (s): Duration in seconds of the AVED Management Interface (AMI) APIs commands execution. This value is rounded, for example a value of 0 means that the AVED Management Interface (AMI) APIs commands took less than 1 second.

  • Thermal measurements: Group of one or more columns recording measurements and status for each thermal sensor source monitored by xbtest.

  • Electrical measurements: Group of one or more columns recording detailed measurements and status for each electrical sensor source monitored by xbtest.

See Sensor source definition for more information on the sensor sources monitored by xbtest.