Pulse Compiler

Here I describe a computer language that I developed for generating timing pulses. The language has a number of convenient features: names can be assigned to channels, events, and durations; pulses can be referenced to other pulses; and sequences of pulses can be iterated over. I developed the language in order to control the timing of a cavity QED experiment that I worked on as a graduate student, but it would probably be useful for other physics experiments as well.

I wrote a compiler that converts timing information specified in this language into commands that can be downloaded to a pulse generator. Although the compiler is designed for a specific pulse generator (the ADwin Gold), it would be relatively straightforward to adapt the compiler to other similar devices.


Files

pulse.c

Pulse compiler. This program inputs a timing file (a .in file) and outputs the file "foo.txt", which contains a list of basic commands and is used by the program "pulses.bas" to generate the pulses specified by the timing file. The compiler also produces a logfile "foo.log", which records the compiler's symbol table and displays the pulses specified by the timing file in table form.

pulses.bas

Timing program for the ADwin Gold pulse generator. This program uses the file "foo.txt" to generate timing pulses.

timing.in, foo.txt, foo.log

Example timing file that was used to specify the timing information for various cavity QED experiments.


Command syntax

The syntax for the language is as follows:

<cmd> --> p<name> : <cmd>
      --> invert <digital channel>
      --> define t<name> <time>
      --> define c<name> <int>
      --> define a<name> <int>
      --> begin_comment <cmds> end_comment
      --> [<time>, <time>] <digital channel>
      --> <time> aout <analog channel> > <float>
      --> <time> inline ' <string> '
      --> <time> loop <int> { <cmds> }

<time> --> <time> + <time>
       --> <time> - <time>
       --> ( <time> )
       --> start( p<name> )
       --> stop( p<name> )
       --> t<name>
       --> <float>

<digial channel> --> c<name>
                 --> <int>

<analog channel> --> a<name>
                 --> <int>


David Boozer

Last modified 25 January 2009
boozer at caltech dot edu