Cicero Opal-Kelly XEM3001

A pseudoclocking labscript device based on the OpalKelly XEM3001 integration module, which uses a Xilinx Spartan-3 FPGA.

Installation

Firmware (.bit) files for the FPGA are available here and should be placed in the labscript_devices folder along with the CiceroOpalKellyXEM3001.py file. The Opal Kelly SDK, which provides the python bindings, is also required. The python bindings will need to either be added to the PATH or manually copied to the site-packages of the virtual environment that BLACS is running in.

Detailed Documentation

class labscript_devices.CiceroOpalKellyXEM3001.CiceroOpalKellyXEM3001(name, trigger_device=None, trigger_connection=None, serial='', reference_clock='internal', clock_frequency=100000000.0, use_wait_monitor=False, trigger_debounce_clock_ticks=10)[source]

Bases: PseudoclockDevice

Instantiates a pseudoclock device.

Parameters:
  • name (str) – python variable to assign to this device.

  • trigger_device (DigitalOut) – Sets the parent triggering output. If None, this is considered the master pseudoclock.

  • trigger_connection (str, optional) – Must be provided if trigger_device is provided. Specifies the channel of the parent device.

  • **kwargs – Passed to TriggerableDevice.__init__().

add_device(device)[source]

Adds a child device to this device.

Parameters:

device (Device) – Device to add.

Raises:

LabscriptError – If device is not an allowed child of this device.

allowed_children = [<class 'labscript_devices.CiceroOpalKellyXEM3001.CiceroOpalKellyXEM3001Pseudoclock'>, <class 'labscript_devices.CiceroOpalKellyXEM3001.CiceroOpalKellyXEM3001DummyPseudoclock'>]

Defines types of devices that are allowed to be children of this device.

Type:

list

property clockline
description = 'CiceroOpalKellyXEM3001'

Brief description of the device.

generate_code(hdf5_file)[source]

Generate hardware instructions for device and children, then save to h5 file.

Will recursively call generate_code for all children devices.

Parameters:

hdf5_file (h5py.File) – Handle to shot file.

property internal_wait_monitor_outputs
max_instructions = 2048
property pseudoclock
trigger_edge_type = 'rising'

Type of trigger. Must be 'rising' or 'falling'.

Type:

str

class labscript_devices.CiceroOpalKellyXEM3001.CiceroOpalKellyXEM3001DummyClockLine(name, pseudoclock, connection, ramping_allowed=True, **kwargs)[source]

Bases: ClockLine

Creates a Device.

Parameters:
  • name (str) – python variable name to assign this device to.

  • parent_device (Device) – Parent of this device.

  • connection (str) – Connection on this device that links to parent.

  • call_parents_add_device (bool, optional) – Flag to command device to call its parent device’s add_device when adding a device.

  • added_properties (dict, optional) –

  • gui

  • worker

  • start_order (int, optional) – Priority when starting, sorted with all devices.

  • stop_order (int, optional) – Priority when stopping, sorted with all devices.

  • **kwargs – Other options to pass to parent.

add_device(device)[source]

Adds a child device to this device.

Parameters:

device (Device) – Device to add.

Raises:

LabscriptError – If device is not an allowed child of this device.

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

Generate hardware instructions for device and children, then save to h5 file.

Will recursively call generate_code for all children devices.

Parameters:

hdf5_file (h5py.File) – Handle to shot file.

class labscript_devices.CiceroOpalKellyXEM3001.CiceroOpalKellyXEM3001DummyIntermediateDevice(name, parent_device, **kwargs)[source]

Bases: IntermediateDevice

Provides some error checking to ensure parent_device is a ClockLine.

Calls Device.__init__().

Parameters:
  • name (str) – python variable name to assign to device

  • parent_device (ClockLine) – Parent ClockLine device.

add_device(device)[source]

Adds a child device to this device.

Parameters:

device (Device) – Device to add.

Raises:

LabscriptError – If device is not an allowed child of this device.

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

Generate hardware instructions for device and children, then save to h5 file.

Will recursively call generate_code for all children devices.

Parameters:

hdf5_file (h5py.File) – Handle to shot file.

class labscript_devices.CiceroOpalKellyXEM3001.CiceroOpalKellyXEM3001DummyPseudoclock(name, pseudoclock_device, connection, **kwargs)[source]

Bases: Pseudoclock

Creates a Pseudoclock.

Parameters:
  • name (str) – python variable name to assign the device instance to.

  • pseudoclock_device (PseudoclockDevice) – Parent pseudoclock device

  • connection (str) – Connection on this device that links to parent

  • **kwargs – Passed to Device().

add_device(device)[source]

Adds a child device to this device.

Parameters:

device (Device) – Device to add.

Raises:

LabscriptError – If device is not an allowed child of this device.

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

Generate hardware instructions for device and children, then save to h5 file.

Will recursively call generate_code for all children devices.

Parameters:

hdf5_file (h5py.File) – Handle to shot file.

class labscript_devices.CiceroOpalKellyXEM3001.CiceroOpalKellyXEM3001Pseudoclock(name, pseudoclock_device, connection, **kwargs)[source]

Bases: Pseudoclock

Creates a Pseudoclock.

Parameters:
  • name (str) – python variable name to assign the device instance to.

  • pseudoclock_device (PseudoclockDevice) – Parent pseudoclock device

  • connection (str) – Connection on this device that links to parent

  • **kwargs – Passed to Device().

add_device(device)[source]

Adds a child device to this device.

Parameters:

device (Device) – Device to add.

Raises:

LabscriptError – If device is not an allowed child of this device.

class labscript_devices.CiceroOpalKellyXEM3001.CiceroOpalKellyXEM3001Tab(notebook, settings, restart=False)[source]

Bases: DeviceTab

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

Close the tab, terminate subprocesses and join the mainloop thread. If finalise=False, then do not terminate subprocesses or join the mainloop. In this case, callers must manually call finalise_close_tab() to perform these potentially blocking operations

flash_fpga(*args, **kwargs)
get_child_from_connection_table(parent_device_name, port)[source]
get_save_data()[source]
initialise_GUI()[source]
labscript_device_class_name = 'CiceroOpalKellyXEM3001'
restore_save_data(data)[source]
start_run(*args, **kwargs)
status_monitor(*args, **kwargs)
class labscript_devices.CiceroOpalKellyXEM3001.CiceroOpalKellyXEM3001Worker(*args, **kwargs)[source]

Bases: Worker

abort()[source]
abort_buffered()[source]
abort_transition_to_buffered()[source]
flash_FPGA()[source]
init()[source]
program_manual(values)[source]
shutdown()[source]
start_run()[source]
status_monitor()[source]
transition_to_buffered(device_name, h5file, initial_values, fresh)[source]
transition_to_manual()[source]
class labscript_devices.CiceroOpalKellyXEM3001.RunviewerClass(path, device)[source]

Bases: object

get_traces(add_trace, clock=None)[source]
labscript_device_class_name = 'CiceroOpalKellyXEM3001'
labscript_devices.CiceroOpalKellyXEM3001.add_instruction_to_bytearray(data, instruction, on, off, reps)[source]
labscript_devices.CiceroOpalKellyXEM3001.bits_to_int(m, *args)[source]
labscript_devices.CiceroOpalKellyXEM3001.int_to_bytes(n, m)[source]