forked from M-Labs/artiq
1
0
Fork 0

suservo: document class arguments

This commit is contained in:
Robert Jördens 2018-05-14 14:59:55 +02:00
parent 976bb5e935
commit 4ddb29fa02
1 changed files with 21 additions and 7 deletions

View File

@ -16,6 +16,18 @@ COEFF_SHIFT = 11
class SUServo: class SUServo:
"""Sampler-Urukul Servo configuration device.
:param channel: RTIO channel number
:param pgia_device: Name of the Sampler PGIA gain setting SPI bus
:param cpld0_device: Name of the first Urukul CPLD SPI bus
:param cpld1_device: Name of the second Urukul CPLD SPI bus
:param dds0_device: Name of the AD9910 device for the DDS on the first
Urukul
:param dds1_device: Name of the AD9910 device for the DDS on the second
Urukul
:param core_device: Core device name
"""
kernel_invariants = {"channel", "core", "pgia", "cpld0", "cpld1", kernel_invariants = {"channel", "core", "pgia", "cpld0", "cpld1",
"dds0", "dds1", "ref_period_mu"} "dds0", "dds1", "ref_period_mu"}
@ -162,14 +174,16 @@ class SUServo:
class Channel: class Channel:
"""SU-Servo channel""" """Sampler-Urukul Servo channel
:param channel: RTIO channel number
:param servo_device: Name of the parent SUServo device
"""
kernel_invariants = {"channel", "core", "servo", "servo_channel"} kernel_invariants = {"channel", "core", "servo", "servo_channel"}
def __init__(self, dmgr, channel, servo_device, def __init__(self, dmgr, channel, servo_device):
core_device="core"):
self.core = dmgr.get(core_device)
self.servo = dmgr.get(servo_device) self.servo = dmgr.get(servo_device)
self.core = self.servo.core
self.channel = channel self.channel = channel
# FIXME: this assumes the mem channel is right after the control # FIXME: this assumes the mem channel is right after the control
# channels # channels