Teledyne SP Devices ADQ7-FWATD User Manual Download Page 16

Classification

Revision

Public

PA6

Document Number

Date

17-1957

2018-06-07

way, e.g. by automatically changing the experiment parameters, since the data is returned to the user

once the measurement has completed.

Since the single-shot mode is quite straight-forward to grasp and use, most of the discussion in this

document is centered around the streaming mode. Any mention of

queues

should indicate to the reader

that the streaming mode is being discussed.

4.8.2

Streaming Mode

The streaming mode is centered around the use of a queue interface to transfer data between the device

and the user, see Fig.

3

. The user is responsible for keeping the queue filled with references to available

memory. The reuse of memory locations enables an unlimited amount of data using a limited amount of

memory.

Additionally, due to the continuous nature of the streaming mode, it is well suited for applications

which require a feedback mechanism to control devices placed earlier in the signal chain. However, the

loop delay cannot be given a constant value and will in practice depend on several factors, many of which

are beyond the control of the digitizer since the host computer is rarely using a real-time OS.

Data Collection Flowchart

Figure

4

presents a flowchart of the data collection loop in the streaming mode. Entering the loop,

the digitizer is assumed to be configured according to the user’s specification in regards to the trigger

configuration, clock source, filter coefficients etc. In the text below

buffer

is synonymous to a

user space

record

but specifically means the host memory allocated to hold the data.

1.

The first step in the outer loop is to set up the WFA engine by calling

ATDSetupWFA()

, specifying the

horizontal settings of the acquisition, i.e. the record length and any pre-trigger or trigger hold-off

values. Additionally, the number of accumulations per user space record as well as the number of

times to repeat the accumulation process, i.e. the number of user space records, is supplied as

arguments to this function. Furthermore, the memory allocated for the target buffers are registered

in the queue by calling

ATDRegisterWFABuffer()

.

2.

At this point, the WFA engine is primed and ready to collect data. The acquisition process is started

by calling

ATDStartWFA()

, arming the device. This function call launches a thread in the ADQAPI

which assumes control of the digitizer. Therefore, from this point on, it is crucial that the user only

calls supported

thread-safe

functions. Please refer to Section

4.11

for further details on threading.

3.

Once the WFA engine is running, the application enters the inner loop, repeating until the expected

amount of data has been received and processed or some unexpected event occurs.

When data is ready to be transferred to user space, the function

ATDWaitForWFABuffer()

will

return a reference to one of the registered buffers, informing the user which buffer has updated

contents. At this point, the memory reference is forgotten by the ADQAPI. The user is expected

to manipulate the data in whatever way mandated by the use case and then register the memory

reference as available memory once again. Thus, the memory is reused and in theory enables

observation of an unlimited amount of data using a limited amount of memory.

4.

Halting the WFA engine is carried out by calling

ATDStopWFA()

and then waiting for the internal

thread to close. The wait state is implemented by the function

ATDWaitForWFACompletion()

which

ADQ7-FWATD User Guide

www.teledyne-spdevices.com

Page 15 of 26

Summary of Contents for ADQ7-FWATD

Page 1: ...ADQ7 FWATD User Guide Author s Teledyne SP Devices Document no 17 1957 Classification Public Revision PA6 Date 2018 06 07...

Page 2: ...er 7 4 1 3 Internal Trigger 8 4 1 4 External Trigger 8 4 2 Configurable FIR Filter 8 4 3 Sample Skip 8 4 4 Advanced Threshold 9 4 4 1 Threshold Logic 9 4 4 2 Filter 9 4 5 Waveform Accumulator 10 4 5 1...

Page 3: ...07 5 4 Default Behavior 19 5 5 Interpreting the Data 20 5 6 MATLAB 20 6 Troubleshooting 21 6 1 Managing License Files 21 6 1 1 Reading the DNA 21 6 1 2 Updating the Digitizer License 21 A Linux SDK R...

Page 4: ...in firmware option DRAM Dynamic random access memory FIR Finite impulse response FW Firmware digitizer feature set GSPS 109 samples per second RAM Random access memory SDK Software development kit WFA...

Page 5: ...ty 1CH 32 samples Length granularity 2CH 16 samples Length granularity 3 2 n s Waveform dead time 32 ns Accumulation dead time 32 ns Number of accumulations 1 262 1441 Accumulation granularity 1 Advan...

Page 6: ...vely increasing the dynamic range of the system WFA firmware software The waveform accumulator resides partly in firmware and partly in software inside the ADQAPI This structure offers flexibility and...

Page 7: ...llation directory C_examples and the documentation in Path to installation directory Documentation 3 1 2 Installing the SDK Linux The SDK is supported for a number of Linux distributions and versions...

Page 8: ...ith SetTriggerMode Please refer to the ADQAPI reference guide 3 for informa tion on the argument list 4 1 1 Software Trigger The software trigger is issued by calling the API function SWTrig and its m...

Page 9: ...to update the filter coefficients and expects exactly 9 coefficients up to and including the point of symmetry It is possible to specify the coefficients using a floating point representation However...

Page 10: ...ltiplexer which selects between the baseline and the original data on a sample by sample basis The decision logic compares the user defined threshold value to the filter output and depending on the po...

Page 11: ...least 9 elements otherwise a memory access violation will occur 4 5 Waveform Accumulator The WFA on ADQ7 FWATD is partitioned meaning that the work load is split between the digitizer and the host co...

Page 12: ...grid at the next grid point in the current grid Note The grid refers to the accumulation grid which is equivalent to the trigger grid downsampled with a factor equal to the number of accumulations For...

Page 13: ...core concept is to discard data in a well defined manner such that the overall accumulation grid is preserved and corrupted records are prevented from propagating to the user space The digitizer firmw...

Page 14: ...scarded in a well defined manner What well defined means in detail is beyond the scope of this document However the resulting user space behavior is worth commenting on An overflow will manifest itsel...

Page 15: ...red enough buffers 4 8 Collection Modes ADQ7 FWATD features two collection modes single shot and streaming The modes are geared to wards different use cases however the streaming mode is more general...

Page 16: ...the WFA engine by calling ATDSetupWFA specifying the horizontal settings of the acquisition i e the record length and any pre trigger or trigger hold off values Additionally the number of accumulation...

Page 17: ...data Reinsert buffer into queue ATDRegisterWFABuffer Stop collection 1 Pointer value 0 Timeout Shut down WFA engine ATDStopWFA ATDWaitForWFACompletion N Y 2 Streaming thread not running Restart Digit...

Page 18: ...there will be difference of a factor of four between the configured level trigger threshold value and the corresponding sample value in the user space record Note Vertical settings in theADQAPI are d...

Page 19: ...d for ADQ7 FWATD as well This includes functions handling trigger configuration adjustable bias in the analog front end di gital baseline stabilization clocking etc The exceptions are the data managem...

Page 20: ...ult the test pattern generator and level trigger are activated This means that the example can be run out of the box and data will be received even without connecting any input signals or triggers The...

Page 21: ...ntly Volts see Section 4 9 5 6 MATLAB On Windows systems the ADQAPI has support for MATLAB through the use of a MEX file This interme diate layer handles among other things the memory allocation and d...

Page 22: ...ttings as well as the specification for both the trigger and data signals Make sure to include a trace log file from a run where the error appears 6 1 Managing License Files ADQ7 FWATD requires a vali...

Page 23: ...nical Ma nual 2 Teledyne Signal Processing Devices Sweden AB 16 1692 ADQ7 datasheet Technical Specification 3 Teledyne Signal Processing Devices Sweden AB 14 1351 ADQAPI Reference Guide Technical Manu...

Page 24: ...tall packagename make kernel devel gcc The version of kernel devel must match your current kernel Install delivered versions of our packages using rpm U packagename Use the following order dkms spd ad...

Page 25: ...ault udev setting is to add read write access to the user group adq The libadq0 package will create a user group called adq if that group doesn t already exist in the system To be able to access the d...

Page 26: ...sification Revision Public PA6 Document Number Date 17 1957 2018 06 07 EXAMPLE CODE Some example code can be found in the examples directory ADQ7 FWATD User Guide www teledyne spdevices com Page 25 of...

Page 27: ...kringen 6 SE 583 30 Link ping Sweden Phone 46 0 13 645 0600 Fax 46 0 13 991 3044 Email info teledyne spdevices com Copyright 2018 Teledyne Signal Processing Devices Sweden AB All rights reserved inclu...

Reviews: