background image

3 Driver Programming API

The API is a DLL with C linkage. There exists also a .Net wrapper.

The functions provided by the DLL are declared in

xTDC4 interface.h

.

3.1 Constants

#define

xTDC4 CHANNEL COUNT 4

The number of analog input channels.

#define

xTDC4 TIGER COUNT 5

The number of timing generators.

#define

xTDC4 TRIGGER COUNT 16

The number of triggers. Two per analog input, one per digital input plus some specials.

3.2 Initialization

int

xtdc4 close(

xtdc4 device

*device)

Finalize the driver for this device.

int

xtdc4 count devices(

int

*error code

,

char

**error message)

Return the number of boards that are supported by this driver in the system.

int

xtdc4 get default init parameters(

xtdc4 init parameters

*init)

Sets up the standard parameters. Gets a set of default parameters for

xtdc4 init()

. This must

always be used to initialize the

xtdc4 init parameter()

structure.

xtdc4 device

*xtdc4 init(

xtdc4 init parameters

*params

,

int

*error code

,

char

**error message)

Open and initialize the XTDC4 board with the given index. With

error code

and

error message

the user must provide pointers where to buffers where error information should be written by
the driver.

Params is a structure of type

xtdc4 init parameters

that must be completely initialized.

3.2.1 Structure xtdc4 init parameters

int

version

The version number. Must be set to

XTDC4 API VERSION

int

card index

The index in the list of XTDC4 boards that should be initialized.
There might be multiple boards in the system that are handled by this driver as reported by

9

Содержание xTDC4

Страница 1: ...Revision 1 57 as of 2018 01 02 Firmware 2 build 834 Driver v1 2 0 cronologic GmbH Co KG Jahnstrae 49 60318 Frankfurt am Main Germany cronologic xTDC4 User Guide...

Страница 2: ......

Страница 3: ......

Страница 4: ...fo 11 3 3 3 Structure xtdc4 param info 12 3 3 4 Structure xtdc4 fast info 13 3 4 Configuration 13 3 4 1 Structure xtdc4 configuration 13 3 4 2 Structure xtdc4 trigger 15 3 4 3 Structure xtdc4 tiger bl...

Страница 5: ...nts 5 3 Information Required by DIN EN 61010 1 26 5 3 1 Manufacturer 26 5 3 2 Intended Use and System Integration 26 5 3 3 Cooling 27 5 3 4 Environmental Conditions 27 5 3 5 Inputs 27 5 3 6 Recycling...

Страница 6: ...vent i e the relative timestamps of all stop pulses that occur within the user defined range 1 1 Features 4 channel common start TDC with 8 ps resolution Standard Range 218 s 24 bit timestamp Extended...

Страница 7: ......

Страница 8: ...the PCIe bracket Figure 2 3 on page 4 shows the location of the start input S and the four stop inputs A to D Lemo 00 connectors are used for Stop A D Start Figure 2 1 Input connectors of the xTDC4 l...

Страница 9: ...enabling the acquisition of positive or negative pulses B C2 C1 S S C D A C3 Figure 2 3 Schematic view of a xTDC4 board showing inter board connectors C1 and C2 Furthermore three board interconnectio...

Страница 10: ...3 1 Grouping and Events In typical applications a start hit is followed by a manifold of hits on e g a detector The hits recorded are managed in groups which are called in some applications events Fi...

Страница 11: ...ortant note The new firmware will only be used after a power cycle i e after switching the PC or Ndigo crate off and back on A simple reboot is not sufficient Therefore the information shown in the up...

Страница 12: ...Figure 2 6 The xTDC4 Carry Chain TDC calibration tool cronologic GmbH Co KG 7 xTDC4 User Guide...

Страница 13: ...cronologic GmbH Co KG 8 xTDC4 User Guide...

Страница 14: ...efault init parameters xtdc4 init parameters init Sets up the standard parameters Gets a set of default parameters for xtdc4 init This must always be used to initialize the xtdc4 init parameter struct...

Страница 15: ...of buffer Can be either allocated only option currently or physical define XTDC4 BUFFER ALLOCATE 0 define XTDC4 BUFFER USE PHYSICAL 1 int64 buffer address The start address of the reserved memory The...

Страница 16: ...m flow can cope with an interruption of that magnitude int xtdc4 get static info xtdc4 device device xtdc4 static info info Contains static information Gets a structure that contains information about...

Страница 17: ...al high high 32 bits of 64 bit manufacturer serial number of the flash chip unsigned int flash serial low low 32 bits of 64 bit manufacturer serial number of the flash chip int flash valid If not 0 th...

Страница 18: ...ture that contains the default settings of the device read from an on board ROM than modify the structure as needed for the user application and use the result to configure the device int xtdc4 config...

Страница 19: ...1 18 define DC OFFSET P LVTTL 33 1 18 define DC OFFSET P LVTTL 25 1 18 define DC OFFSET P SSTL 3 1 18 define DC OFFSET P SSTL 2 1 18 define DC OFFSET N NIM 0 35 define DC OFFSET N CMOS 1 32 define DC...

Страница 20: ...are two parameters M trigger period and N random exponent that result in a distance between triggers of T clock cycles T 1 M 1 2N 3 1 0 M 232 3 2 0 N 32 3 3 There is no enable or reset as the usage o...

Страница 21: ...OURCE B 0x00000004 define XTDC4 TRIGGER SOURCE C 0x00000008 define XTDC4 TRIGGER SOURCE D 0x00000010 define XTDC4 TRIGGER SOURCE AUTO 0x00004000 define XTDC4 TRIGGER SOURCE ONE 0x00008000 3 4 4 Struct...

Страница 22: ...e early if there will be no call to xtdc4 read anytime soon It also allows to keep data over multiple calls to xtdc4 read to avoid unnecessary copying of data int xtdc4 get device type Returns the typ...

Страница 23: ...ta as signified by a value of 6 unsigned char flags define XTDC4 PACKET FLAG ODD HITS 1 The last data word in the data array consists of one timestamp only which is located in the lower 32 bits of the...

Страница 24: ...mestamp counter range 218 s If the timestamp counter range is exceeded before the next occurrence of a stop event a data element with bit 5 set which does not belong to a hit on any channel is added t...

Страница 25: ...cronologic GmbH Co KG 20 xTDC4 User Guide...

Страница 26: ...t xTDC4 s n err message 25 return 1 26 27 28 print bard information 29 x t d c 4 s t a t i c i n f o s t a t i c i n f o 30 x t d c 4 g e t s t a t i c i n f o device s t a t i c i n f o 31 p r i n t...

Страница 27: ...o d e CRONO OK 65 66 p r i n t f Could not c o n f i g u r e xTDC4 s n err message 67 return 1 68 69 70 configure readout behaviour 71 x t d c 4 r e a d i n r e a d c o n f i g 72 automatically acknow...

Страница 28: ...good idea at high data rates 125 so l e t s do that only f o r every 1000 th packet 126 print packet information 127 i f packet count 1000 0 128 p r i n t f Card d Flags d Length d Type d TS l l u n...

Страница 29: ...t packet p 159 packet count 160 161 162 163 164 shut down packet generation and DMA t r a n s f e r s 165 x t d c 4 s t o p c a p t u r e d e vic e 166 167 deactivate XTDC4 168 x t d c 4 c l o s e d e...

Страница 30: ...Resolution 8 ps 5 2 Electrical Characteristics 5 2 1 Oscillator The xTDC4 PCIe uses an oscillator with 25 ppb stability 5 2 2 Environmental Conditions for Operation The board is designed to be operate...

Страница 31: ...the application of the end user The device is provided to sys tem integrators to be built into measurement systems that are distributed to end users These systems usually consist of the xTDC4 a main...

Страница 32: ...the following conditions Symbol Parameter Min Typical Max Units T ambient temperature 30 60 C RH relative humidity at 31 C non condensing 10 70 5 3 5 Inputs All inputs are AC coupled The inputs have v...

Отзывы: