Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sequencing / Hardware Interface #27

Closed
lumip opened this issue Jun 30, 2015 · 2 comments
Closed

Sequencing / Hardware Interface #27

lumip opened this issue Jun 30, 2015 · 2 comments

Comments

@lumip
Copy link
Contributor

lumip commented Jun 30, 2015

The hardware interface to allow sequencing(/waveform generation) of pulses seems proposed in #20 is not powerful enough. A better solution is required.

A current approach, which seems to be working, consists of the following:
API: HardwareSequencingInterface, Sequencer

Internal: Class representations of an abstract hardware instruction set for waveform generation with the instructions

  • exec < waveform > - execute a single waveform from device memory
  • cjmp < condition/trigger > < target > - perform a conditional jump to a target instruction index
  • goto < target > - an unconditional jump
  • stop - stop playback

Change in PulseTemplate:
Removed generate_waveform(..).
Add build_sequence(Sequencer, Parameters, TargetInstructionBlock).

HardwareSequencingInterface:
Abstract, will be implemented by hardware specific classes. Methods:

  • register_waveform(..) gets a table definition of a waveform and returns a device specific handle for use in instructions. Will handle the upload of the waveform to the device in implementations.

Sequencer:
Used to convert the tree structure of pulse templates to a instruction sequence/block. Holds a HardwareSequencingInterface instance. Maintains a stack of pulse templates which are processed one by one. Subtemplates are pushed to the stack by their parent when it is processed.

The translation process is roughly as follows for the different PulseTemplate subtypes:

  • Table: register_waveform(); add instruction "exec " to block;
  • Sequence: push subtemplates in reverse order;
  • Loop: create subblock b; push body-template with target block b; add instruction "cjmp < b >"
  • Branch: create subblocks b1, b2; push if- and else-template with target block b1/b2; add instruction "cmp < condition > < b1 >" and "goto < b2 >"

Invoking Sequencer.build() "compiles" an instruction sequence covering all templates until either the stack is empty or the top-most stock element requires a stop. This sequence can then be easily interpreted by some interpreter to configure the specific hardware devices.

@lumip
Copy link
Contributor Author

lumip commented Jun 30, 2015

Somewhat related with #25 .

@lumip
Copy link
Contributor Author

lumip commented Jul 15, 2015

Concept generally approved during meeting 4.

@lumip lumip closed this as completed Jul 15, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant