1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-22 02:29:10 +00:00

instrumentation: Add support for Devlib's monsoon instrument

The parameter support is untested as the defaults match what my system
does.

Signed-off-by: Chris Redpath <chris.redpath@arm.com>
This commit is contained in:
Chris Redpath 2017-10-13 08:12:04 +01:00 committed by Brendan Jackman
parent 73f863f281
commit 85c39cd48e

View File

@ -24,6 +24,7 @@ from devlib.instrument import CONTINUOUS
from devlib.instrument.energy_probe import EnergyProbeInstrument from devlib.instrument.energy_probe import EnergyProbeInstrument
from devlib.instrument.daq import DaqInstrument from devlib.instrument.daq import DaqInstrument
from devlib.instrument.acmecape import AcmeCapeInstrument from devlib.instrument.acmecape import AcmeCapeInstrument
from devlib.instrument.monsoon import MonsoonInstrument
from devlib.utils.misc import which from devlib.utils.misc import which
from wa import Instrument, Parameter from wa import Instrument, Parameter
@ -200,6 +201,25 @@ class AcmeCapeBackend(EnergyInstrumentBackend):
iio_device=iio_device, buffer_size=buffer_size) iio_device=iio_device, buffer_size=buffer_size)
return ret return ret
class MonsoonBackend(EnergyInstrumentBackend):
name = 'monsoon'
parameters = [
Parameter('monsoon_bin', default=which('monsoon.py'),
description="""
Path to monsoon.py executable. If not provided,
``$PATH`` is searched.
"""),
Parameter('tty_device', default='/dev/ttyACM0',
description="""
TTY device to use to communicate with the Power
Monitor. If not provided, /dev/ttyACM0 is used.
""")
]
instrument = MonsoonInstrument
class EnergyMeasurement(Instrument): class EnergyMeasurement(Instrument):
@ -212,7 +232,7 @@ class EnergyMeasurement(Instrument):
parameters = [ parameters = [
Parameter('instrument', kind=str, mandatory=True, Parameter('instrument', kind=str, mandatory=True,
allowed_values=['daq', 'energy_probe', 'acme_cape'], allowed_values=['daq', 'energy_probe', 'acme_cape', 'monsoon'],
description=""" description="""
Specify the energy instrumentation to be enabled. Specify the energy instrumentation to be enabled.
"""), """),