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.

frame

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

mark()[source]

Increment the Invocation count

record(interval)[source]

Start recording

reset()[source]

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

stop()[source]

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.

name

str – Name of the power rail

voltage

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

current

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

power

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

name

str – The name of the sensor

value

float – The current value of the sensor

value

Read the current value of the sensor

pynq.pmbus.get_rails(config_file=None)[source]

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}