chipscopy.sysmon

class chipscopy.api.sysmon.Sysmon(sysmon_tcf_node)[source]

Sysmon is the top level API for accessing System Monitor in Versal.

get_all_sensors(done=None)[source]

This function is identical to get_supported_sensors in customer releases. For VnC teams this API offers internal sensors. For information on how to use this API please contact @dkopelov or #chipscope.

Parameters

done (Optional[DoneHWCommand]) – Optional command callback that will be invoked when the response is received.

Return type

dict

Returns

A list of strings representing all sensors for the connected device.

get_measurements(done=None)[source]

Advanced API

Returns the measurement objects

Parameters

done (Optional[DoneHWCommand]) – Optional command callback that will be invoked when the response is received.

Return type

List[object]

Returns

Returns a list of measurement configuration objects

initialize_sensors(done=None)[source]

Initializes all of the server side constructs for sysmon, required for most subsequent APIs.

Parameters

done (Optional[DoneHWCommand]) – Optional command callback that will be invoked when the response is received.

Returns

No data is returned directly from this method.

read_sensor(sensor)[source]

Read single sensor value from hw :type sensor: str :param sensor: the name of the sensor to read

Return type

float

Returns

refreshed value of specific sensor (float) or None if sensor isn’t detected in design

read_sensors(sensors)[source]

Read a list of sensor values from hw :type sensors: List[str] :param sensors: list of the names of the sensors to read

Return type

Dict[str, float]

Returns

refreshed values of specific sensors (float) if the sensor isn’t sequenced in the design then a warning msg is printed and the sensor is dropped from the list

read_temp()[source]

Read temp values from hw :param None:

Return type

Dict[str, float]

Returns

refreshed value of device_temp, max, and min in Celsius

refresh_measurement_schedule(done=None)[source]

Dynamically scans the SysMon to determine the sensors scheduled into the system, in order.

Parameters

done (Optional[DoneHWCommand]) – Optional command callback that will be invoked when the response is received.

Return type

Dict[int, str]

Returns

Returns a dict where the keys are the root IDs and the values are the named sensors.

stream_sensor_data(interval, done=None)[source]

This API configures polling in hw_server to stream the data from the measurement schedule (including device temps) at the specified interval.

To process the incoming data, a dm.NodeListener must be declared and registered on this node.

node_listener = dm.NodeListener(sysmon)

session.chipscope_view.add_node_listener(node_listener)

Parameters
  • interval (int) – poll period (in ms)

  • done (Optional[DoneHWCommand]) – Optional command callback that will be invoked when the response is received.

Return type

None