User Tools

Site Tools


trigger

This is an old revision of the document!


Trigger

The main purpose of the trigger is to implement a coincidence between the S800 focal-plane fast timing scintillator E1 and a secondary detector generally located at the target location. This coincidence is often a mandatory requirement when the trigger rate of the S800 alone (S800 singles) is too high for the data acquisition and the resulting dead time is prohibitive.

The trigger logic is implemented in a LeCroy 2367 Universal Logic Module (ULM) by means of its XC4000E Xilinx FPGA. The main motivations for implementing the trigger logic in an FPGA driven module are the following:

  1. Simplify cabling and setup of the trigger
  2. Reduce the number of modules used to implement the trigger
  3. Ability to remotely control and inspect trigger signals
  4. Ability to save and restore the trigger configuration
  5. Direct visualization of the trigger logic and configuration

Probably the most appealing feature of this module is the possibility to remotely control the trigger timing and configuration while beam is present in the vault, since most experiments are nowadays locating their electronics close to the detectors. For more details on this detector check section “Trigger module”.

The S800 trigger from the E1 scintillator provides also the reference time for the CRDCs as well as time-of-flight measurements. Note that because the FPGA uses a 40 MHz internal clock, the time reference of the signals in the trigger circuit set the phase of that clock, and therefore jitter by 25 ns with respect to the source signals. This jitter is measured with a TDC and can be subtracted to the time measurements to recover the timing relative to the source signals.

Trigger schematics

The trigger schematic is shown on the Graphical User Interface (GUI) displayed in the figure below.

Trigger schematics of the S800

The two main trigger sources are labeled “S800” and “Secondary” in the GUI (the leftmost side of the layout). Each source is routed to a gate and delay generator before forming a coincidence in the following AND gate. The AND signal is then widened before being ANDed with the delayed S800 source signal. The purpose of the second AND gate is to reset the timing of the coincidence to the S800 timing. This is necessary in case the secondary detector has a slow timing and large jitter (Germanium detectors for instance). Single triggers from each trigger source are also available in a second branch, after going through a delay generator followed by a downscaler (used to take a reduced number of events from the trigger sources). Note that each gate and delay generator can be bypassed.

Trigger box

In addition to the singles and coincidence triggers, two separate trigger sources labeled “External 1” and “External 2” can be used. The various sources can be selected from the trigger box to define the raw trigger, which is then sent to a third AND gate for computer busy rejection. The busy latch (on the middle) is set by the raw trigger after a 50 ns delay, and prevents subsequent events to be accepted. It is reset by the computer once the current event has been processed. The live trigger signal feeds several gate generators which provide appropriate gates for the ADCs, QDCs, TDCs and an eventual coincidence register. Note that the trigger box contains its own coincidence register for which the input signals are delayed by 50 ns, and the gate width is set by the coincidence gate generator. The request event signal is latched before being sent to the computer.

Since more than one trigger source can be selected, it is possible that more than one pulse is generated at the output of the trigger box, depending on the timing and shape of the source signals. When both downscaled singles and coincidences are selected for instance, the “Raw trigger” output of the trigger box may generate two pulses for a single event. A scaler connected to the “Raw trigger” output will therefore not reflect the true number of events. For this reason scalers are also connected to individual inputs of the trigger box (for more details, check the section “Scalers and dead time”). A trigger register word (bit pattern) is written at each occurrence of a live trigger signal. This word is the first being read out from the trigger module, prior to the time stamp (check trigger packet tag 0x2367 in the DAQ section for more information).

More details about the trigger box module and its FPGA schematics can be found in section “Trigger module”.

Gate generation

All digitizer gates and start signals are derived from the live trigger signal, with the exception of the QDC gate which is directly generated from the S800 source signal. The reason is to avoid long analog delays on the scintillator signals. A fast clear circuit is provided to clear the QDC if no valid trigger was generated.

Inspect channels

A set of four inspect channels are patched out to the data-U6 panels. Each channel can be assigned to any connection drawn on the GUI, thereby providing a convenient way to diagnose and adjust the timings at each step of the trigger circuit.

Busy Circuit

As each controller and external data acquisition perform their readout sequence in parallel, they have different busy times. The busy circuit following the generation of raw triggers is mainly composed of a latch that is set by the “Raw trigger” signal, and cleared by the falling edge of the OR of the individual busy signals (Busy inputs) coming from individual crate controllers or other data acquisition systems. This way the “Live trigger” signal stays true as long as the longest busy signal. The “Live trigger” signal is therefore a “global busy” signal as well. In addition, the same busy signals of individual crate controllers or other data acquisition system are used to veto the “Raw trigger” signal and prevent the generation of a live trigger. This takes care of situations where separate triggers are generated for some of the crate controllers or other data acquisition systems (such as scaler readout sequences), during which no event readout sequence should be started.

Time Stamping Scheme

Because the USB-based S800 data acquisition uses independent crate controllers that perform the readout in parallel, time stamping schemes are incorporated in the trigger to synchronize events. Because of this modularity, the same synchronization scheme can be used when coupling external data acquisition systems to the S800.

More details about the time stamping module can be found in section “Time stamping”.

Trigger module

The S800 trigger logic is built in a FPGA LeCroy 2367 Universal Logic Module (ULM). Note that this module could be replaced in the future by another FPGA module provided it has enough NIM or ECL input/outputs (such as the VME XLM72 module for instance). This section contains the functionality of the S800 trigger module and the commands used to control its parameters.

CAMAC commands

A table with the list of the CAMAC commands recognized by the trigger module and their signification can be found here.

Inputs and outputs

A table with the list of inputs/outputs channels to/from the trigger module and their assignment can be found here.

FPGA firmware

The firmware of the trigger module is shown in the following files. The PDF file contains the schematic sheets, used for most of the design. The Verilog file contains the block dealing with CAMAC communications.

Time stamping

The S800 trigger provides a vetoed 10 MHz clock signal (derived from the 40 MHz FPGA clock) used for time stamping. An external clock can also be used, after selecting the appropriate check box in the GUI). The clock is inhibited by a “Go” signal controlled by the trigger module. While “Go” is false, all time stamp counters can be reset via CAMAC command, typically during the begin sequences of the controllers or data acquisitions (see section “Begin sequence”). The clock signal is released when the “Go” signal is set to true at the end of the begin sequence. This simple scheme insures that all time stamp counters are synchronized.

The time stamping clock is available as an output that can be distributed to other time stamp modules, such as the one located in the S800 VME crate, or in other data acquisition systems coupled to the S800.

The time stamp module is implemented in a XLM72 (SpartanXL) FPGA. The schematics of the firmware is available here. The inputs are the following:

E1: time stamp clock input

E2: latch input

E3: clear input

The clear can be done via software as well, and is usually done that way.

The Verilog file contains the code of the REGISTERS module of the FPGA configuration, responsible for the communication with the VME.

Configuration for S800 in tandem with other detectors

In its standard configuration, the S800 data acquisition uses one CAMAC crate and one VME crate only. The CC-USB and VM-USB crate controller modules performing the readout are connected to the latches number 1 and 2 of the trigger module, respectively. Each crate controller is configured to output their busy and end-of-event signals on their available NIM outputs, which are then connected to the appropriate inputs on the trigger module. To incorporate an external detector in the S800 trigger logic, the same busy and end-of-event signals are required from its data acquisition system. This is to ensure that no live trigger signal is generated when any of the partners is busy or still processing an event. The 5 signals necessary between the S800 trigger and an external data acquisition system are the following:

  1. Raw trigger from external detector to Secondary source
  2. Live trigger from S800 trigger to external data acquisition (trigger input)
  3. Time stamp clock from S800 trigger to external data acquisition (time stamp input)
  4. End-of-event from external data acquisition to S800 trigger
  5. Busy from external data acquisition to S800 trigger

Begin sequence

The internal “Go” state of the trigger module is controlled via CAMAC commands. When “Go” is false, the trigger and time stamp clock signals are vetoed and therefore absent. This way all time stamp counters can be safely zeroed during the beginning sequence of the data acquisition systems. The last command of the CAMAC beginning sequence sets the “Go” state to true, at which point both trigger and time stamp signals are released. This mechanism ensures that all time stamp counters are synchronized.

The data acquisition begin sequence of the trigger module is the following:

  1. reset time stamp counter to 0
  2. reset trigger register to 0
  3. after all modules in all crates have been initialized, send CAMAC command to set “Go” state to true
  4. after a preset delay of 200 to 300 microseconds, the “Go” level is set to true

The last step of the begin sequence allows enough time for the CC-USB crate controller to switch from its interactive mode to data acquisition mode. The end sequence script executed at the end of a run sets the “Go” state of the module back to false.

Scalers and dead time

The “D” connector of the trigger module is directly connected to 16 inputs of a scaler module (see mapping of the inputs and outputs of the trigger module in section Inputs and outputs). Scalers are connected to each of the trigger source inputs, as well as trigger box inputs. These scalers can be used to recover the number of trigger signals occurring on each of the source and trigger box inputs, in addition to the information coded for each event in the trigger register.

In addition, scalers are connected to the raw and live trigger signals. For the determination of the dead time, both a free running and vetoed 10 kHz pulser signal are also connected to scalers. This is the preferred method because the pulser is not subject to possible double triggering effects like the raw trigger.

The remining 16 scaler input channels (pins 17 to 32 in module) are connected to a 16-channel CFD CAEN C808, which sends the signals from the S800 detectors (E1 up, E1 down, CRDC1, CRDC2, OBJ_SCI, A1900 SCI, and OR Hodoscope).

The list below is a direct copy of the scaler description file for the s800. This file maps channel names to channel numbers, and in addition determines the layout.

Channel name Channel number Channel name Channel number
Live.Trigger 10 Raw.Trigger 9
Live.Clock 12 Raw.Clock 11
S800.Source 0 S800.Trigger 4
Second.Source 1 Second.Trigger 8
Ext1.Source 2 Ext1.Trigger 6
Ext2.Source 3 Ext2.Trigger 7
Coinc.Trigger 5
E1.Up 16 E1.Down 17
E2.Up 18 E2.Down 19
CRDC1.Anode 22 CRDC2.Anode 23
TPPAC1 27 TPPAC2 28
OBJ.Scint 24 XFP.Scint 25
TAR.Scint 26 XFP.Scint 25
S800.Source 0 OBJ.Si 26
S800.Source 0 OBJ.Scint 24
S800.Source 0 XFP.Scint 25
Hodo.OR 30

In principle, it is possible to include other signals into the scaler channels that are not used. This requires some manipulation of tcl scripts, according to the following steps:

  • Modify the scaler display script to include the new signals: Go to /user/s800/Documents/Run/scalers/USBDAQ and edit file s800scl.des to include the new channels (make sure that you make a copy of the old file so that it can be recovered when the new signals are not needed anymore). Save the new file.
  • Connect the new logic signals into the free input channels of the 16-ch CFD CAEN C808. Follow the output ribbon cable to know the corresponding scaler channel where the new signals from the CFD are sent.
  • Enable the new CFD CAEN C808 channels (if they are not yet enabled): Go to /user/s800/operations/daq/usb/Scripts and edit file CC0105Begin.tcl. There ist an array variable cfd EnableOnlyChannels that includes the list of enabled channels. Make sure that the new channels are included. Save the new file.
  • Start the scalers display script. You should see the new channels in the display counting. If they are zero, the CFD thresholds may be too high. If that is the case, you should lower them in file s800cfdini.tcl (directory /user/s800/operations/daq/usb/Configs).
trigger.1394551228.txt.gz · Last modified: 2014/03/11 11:20 by pereira