![Teledyne SP Devices ADQ7 User Manual Download Page 4](http://html1.mh-extra.com/html/teledyne-sp-devices/adq7/adq7_user-manual_1081089004.webp)
Classification
Revision
Public
PA1
Document ID
Print date
19-2241
2019-05-02
3.1
Trigger and Data Alignment
A data collection is specified by a record length
M
and a line length. Where each line consists of
N
records. The A-scan trigger starts collection of a record. Each record is consecutively written directly to
GPU memory. In the normal case a line therefore takes up
M
×
N
samples of memory. When a line is
full records are continued at the next line immediately after the last.
A B-scan trigger indicates the start of a new line. At the detection of a B-scan trigger the next record
will be written at the start of the next line. If a B-scan trigger arrives before
N
records have been written
this means one or several records are missing. In this case the line is marked as invalid but the next line
will automatically be properly aligned in memory as if the previous line had been fully written.
Fig.
shows an example of the memory layout after a successful data collection. Each record is
represented by a dash and corresponding A- and B-triggers are labeled. In this example the line length
N
would be four, meaning four A-triggers are followed by one B-trigger. At the right hand side of the data
buffer, the
data valid buffer
is shown containing the number one for each valid line.
A
A
A
A
A
A
A
A
B
B
A
A
A
A
A
A
A
A
B
B
A
A
A
A
A
A
A
A
B
B
1
1
1
1
1
1
Figure 1: Records in GPU memory with labels indicating triggers. The data valid buffer indicates that all
lines are valid.
Information about invalid lines is written as metadata to a separate part of the memory in the GPU.
Fig.
shows the GPU memory with several A-scans missing, the B-scan has moved the following record
to the next line and the data valid buffer indicates that the second line is not valid. The digitizer will write
a zero to the buffer only when an invalid line is encountered, the buffer is expected to initially be filled
with ones.
The resulting data buffer in GPU memory will always contain consistent data aligned in records and
lines according to the trigger information received by the ADQ7, ready to be processed by the GPU.
3.2
Double Buffering and Kernel Scheduling
The example program employs a double buffering scheme when transferring data to GPU. The digitizer
will write to one buffer and signal the host when the buffer is completely filled. At that signal the host may
schedule processing of the data in the first buffer. Simultaneously the digitizer can start writing data to a
ADQ7 GPU Peer-To-Peer – User Guide
Page 3 of 11