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.DerivedPowerSensor(name, voltage, current)[source]

Bases: object

value
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

Name of the power rail

Type:str
voltage

Voltage sensor for the rail or None if not available

Type:Sensor or None
current

Current sensor for the rail or None if not available

Type:Sensor or None
power

Power sensor for the rail or None if not available

Type:Sensor or None
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

The name of the sensor

Type:str
value

The current value of the sensor

Type:float
value

Read the current value of the sensor

class pynq.pmbus.SysFSSensor(path, unit, name, scale)[source]

Bases: object

value
class pynq.pmbus.XrtRail(name, base_file)[source]

Bases: object

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}
pynq.pmbus.get_xrt_sysfs_rails(device=None)[source]