Skip to content

Extending SEQ to deal with positions

Tom Cobb edited this page May 29, 2018 · 9 revisions

Background

The sequencer currently lets you make a series of pulses, optionally waiting for a bit_bus value for each pulse. This can be used for a tomography scan with position based rotation and time based pulses within it like this:

+----------+       +-----------+      +---------------+     +-----------+
|      val +-------+ trig  out +------+ inpa     outa +-----+ val       |
|          |       | start=0   |      | repeats=6     |     |           |
|          |       | width=1   |      | wait for inpa |     |           |
|          |       | step=180  |      | 360 1ms pulses|     |           |
|          |       | num=6     |      |     on outa   |     |           |
+----------+       +-----------+      +---------------+     +-----------+
   INENC1              PCOMP                SEQ                 TTLOUT1

A grid scan can be accomplished with a second output of SEQ being used to gate the enable of PCOMP, and a snake scan can be accomplished with 2 PCOMP blocks or-ed together.

However, there is no way to do variable length rows

Proposal

Add position inputs to sequencer, so that each row contains the PCOMP information:

+----------+     +----------------+     +-----------+
|      val +-----+ posa      outa +-----+ val       |
|          |     |                |     |           |
|          |     | wait posa>0    |     |           |
|          |     | 360 1ms pulses |     |           |
|          |     |     on outa    |     |           |
+----------+     | wait posa>180  |     +-----------+
   INENC1        | 180 2ms pulses |         TTLOUT1
                 |     on outa    |
                 +----------------+
                        SEQ

This would also allow us to easily specify a snake and insert arbitrary intermediate points to control jitter in the turnaround. It is more powerful than table based position compare as it allows multiple axes to be used as the trigger.

For instance, a position compare on segments of a spiral with time based pulses could be:

 +---------+     +---------------+     +-----------+
 |     val +-----+ posa     outa +-----+ val       |
 +---------+     |               |     |           |
    INENC1    +--+ posb          |     |           |
              |  |               |     |           |
 +---------+  |  | wait posa>0   |     |           |
 |     val +--+  | 100 1ms pulses|     +-----------+
 +---------+     |     on outa   |         TTLOUT1
    INENC2       | wait posb>500 |
                 | 120 1ms pulses|
                 |     on outa   |
                 +---------------+
                       SEQ

Table specification

15:0 REPEATS (was 32 bit)
19:16 TRIGGER enum (was input mask and values)
    0 Immediate
    1 BITA=0
    2 BITA=1
    3 BITB=0
    4 BITB=1
    5 BITC=0
    6 BITC=1
    7 POSA>=POSITION
    8 POSA<=POSITION
    9 POSB>=POSITION
    10 POSB<=POSITION
    11 POSC>=POSITION
    12 POSC<=POSITION
63:32 POSITION (new)
95:64 TIME1 (was PH1_TIME)
20:20 OUTA1 (was PH1_OUTA)
21:21 OUTB1 (was PH1_OUTB)
22:22 OUTC1 (was PH1_OUTC)
23:23 OUTD1 (was PH1_OUTD)
24:24 OUTE1 (was PH1_OUTE)
25:25 OUTF1 (was PH1_OUTF)
127:96 TIME2 (was PH2_TIME)
26:26 OUTA2 (was PH2_OUTA)
27:27 OUTB2 (was PH2_OUTB)
28:28 OUTC2 (was PH2_OUTC)
29:29 OUTD2 (was PH2_OUTD)
30:30 OUTE2 (was PH2_OUTE)
31:31 OUTF2 (was PH2_OUTF)

Progress

  • For discussion on 01/09/2017
  • Soleil to send details about flyscan
  • Implemented in seq_pos branch
  • Reviewed by Soleil and merged into master