Frame

Trigger Source

class openlabctrl.io.sync.TriggerSource(value)[source]

IO Sync Frame execution trigger source.

NONE = 0
EXT_HIGH = 1
EXT_LOW = 2
EXT_RISE = 3
EXT_FALL = 4
EXT_RISE_FALL = 5

Frame Classes

class openlabctrl.frame.IoSyncFrame(device_type, trig=None)[source]

IO instruction container with independent time-base.

At instantiation, an IO instance is created for each entry in device_type.IO_DICT and exposed as an attribute with the same name. The exact set of attributes therefore depends on the device type passed (e.g. see RP 125-14 Base IO_DICT).

Parameters:
  • device_type – Device class (not instance)

  • trig (TriggerSource | None) – Trigger source to initiate frame execution. If None or TriggerSource.NONE, frame is triggered immediately.

reset()[source]

Reset all IOs (instruction lists and time-base).

set_time(t)[source]

Set new time for all IOs of this frame, see set_time().

Parameters:

t (int) – time (in units of clk cycles).

set_time_increment(t_incr)[source]

Set new time increment for all IOs of this frame, see set_time_increment().

Parameters:

t_incr (int)

rsync()[source]

Time-aligns all IOs of this frame. The backend retrieves the current time of all IOs and sets them to the latest (largest) value.

delay(val)[source]

Delay all IOs of this frame, see delay().

Parameters:

val (int) – Delay time (in units of clk cycles).

class openlabctrl.frame.ParamIoSyncFrame(device_type, trig=None)[source]

Parameterized version of IoSyncFrame, which builds upon a frame function and a frame parameter set. To reduce overall compilation time, parameterized IO sync frames are (re-)compiled only when changes in the frame function or the frame parameter set are detected.

Parameters:

trig (int | None)

reset()[source]

Reset frame function and parameter set.

set_frame_parameter(*args, **kwargs)[source]

Set the parameters passed to the frame function..

Parameters:
  • args – Positional arguments forwarded to the frame function.

  • kwargs – Keyword arguments forwarded to the frame function.

set_frame_function(func)[source]

Set the function that builds the IO sequence.

The function must accept an IoSyncFrame as its first argument followed by any positional and/or keyword arguments defined in set_frame_parameter().

Parameters:

func – Callable with signature func(frame, *args, **kwargs).