pynq.pmbus Module

class pynq.pmbus.DataRecorder(*sensors)[source]

Bases: object

Class to record sensors during an execution

The DataRecorder provides a way of recording sensor data using a with block.


Return a pandas DataFrame of the recorded data

The frame consists of the following fields Index : The timestamp of the measurement Mark : counts the number of times that record or mark was called Sensors* : one column per sensor


Increment the Invocation count


Start recording


Clear the internal state of the data recorder without forgetting which sensors to record


Stops recording

class pynq.pmbus.Rail(name)[source]

Bases: object

Bundles up to three sensors monitoring the same power rail

Represents a power rail in the system monitored by up to three sensors for voltage, current and power.


str – Name of the power rail


Sensor or None – Voltage sensor for the rail or None if not available


Sensor or None – Current sensor for the rail or None if not available


Sensor or None – Power sensor for the rail or None if not available

class pynq.pmbus.Sensor(chip, number, unit, name)[source]

Bases: object

Interacts with a sensor exposed by libsensors

The value of the sensor is determined by the unit of the underlying sensor API - that is generally Volts for potential difference, Amperes for current, Watts for power and degrees Centigrade for temperature


str – The name of the sensor


float – The current value of the sensor


Read the current value of the sensor


Returns a dictionary of power rails

Parameters:config_file (str) – Path to a configuration file for libsensors to use in place of the the system-wide default
Returns:dict {str – Dictionary of power rails with the name of the rail as the key and a Rail object as the value
Return type:Rail}