3.1.2. qupulse._program.seqc¶
This module contains the ZI HDAWG compatible description of programs. There is no code in here that interacts with hardware directly.
The public interface to all functionality is given by HDAWGProgramManager. This class can create seqc source code which contains multiple programs and allows switching between these with the user registers of a device,
Furthermore: - SEQCNode: AST of a subset of sequencing C - loop_to_seqc: conversion of Loop objects to this subset in a clever way - BinaryWaveform: Bundles functionality of handling segments in a native way. - WaveformMemory: Functionality to sync waveforms to the device (via the LabOne user folder) - ProgramWaveformManager and HDAWGProgramEntry: Program wise handling of waveforms and seqc-code classes that convert Loop objects
- class qupulse._program.seqc.HDAWGProgramManager[source]¶
Bases:
object
This class contains everything that is needed to create the final seqc program and provides an interface to write the required waveforms to the file system. It does not talk to the device.
- class Constants[source]¶
Bases:
object
- IDLE_WAIT_CYCLES = 300¶
- INVERTED_PROG_SEL_MASK = '0b11000000000000000000000000000000'¶
- NO_RESET_MASK = '0b10000000000000000000000000000000'¶
- PLAYBACK_FINISHED_MASK = '0b1000000000000000000000000000000'¶
- PROG_SEL_MASK = '0b111111111111111111111111111111'¶
- PROG_SEL_NONE = 0¶
- PROG_SEL_REGISTER = UserRegister(zero_based_value=0)¶
- TRIGGER_REGISTER = UserRegister(zero_based_value=1)¶
- TRIGGER_RESET_MASK = '0b10000000000000000000000000000000'¶
- DEFAULT_COMPILER_SETTINGS = {'indentation': ' ', 'min_repetitions_for_for_loop': 20, 'min_repetitions_for_shared_wf': 1000, 'trigger_wait_code': 'waitForSoftwareTrigger();'}¶
- class GlobalVariables[source]¶
Bases:
object
Global variables of the program together with their (multiline) doc string. The python names are uppercase.
- NEW_PROG_SEL = (('Value that gets written back to program selection register.', 'Used to signal that at least one program was played completely.'), 0)¶
- PLAYBACK_FINISHED = (("Is OR'ed to new_prog_sel.", 'Set to PLAYBACK_FINISHED_MASK if a program was played completely.'), 0)¶
- PROG_SEL = (['Selected program index (0 -> None)'], 0)¶
- SOFTWARE_WAIT_FOR_TRIGGER_FUNCTION_DEFINITION = 'void waitForSoftwareTrigger() {\n while (true) {\n var trigger_register = getUserReg(TRIGGER_REGISTER);\n if (trigger_register & TRIGGER_RESET_MASK) setUserReg(TRIGGER_REGISTER, 0);\n if (trigger_register) return;\n }\n}\n'¶
- WAIT_FOR_SOFTWARE_TRIGGER = 'waitForSoftwareTrigger();'¶
- add_program(name, loop, channels, markers, amplitudes, offsets, voltage_transformations, sample_rate)[source]¶
Register the given program and translate it to seqc.
TODO: Add an interface to change the trigger mode
- property programs: Mapping[str, qupulse._program.seqc.HDAWGProgramEntry]¶
- property waveform_memory¶