Front-End Assembly Test Bench

This document defines the test procedure of the Drift Chamber Front-End Assemblies (FEAs).

Version 0.3: 13-Nov-1997 by Masahiro Morii


Test Procedure

The test procedure for one FEA consists of:


Power Check

First thing is to turn it on and see if it smokes.

Procedure

  1. Plug on the FEA to the Test Bench.
  2. Tighten the cap screws to secure the FEA on the radial bars, which provides cooling as well as the mechanical support.
  3. Connect the power cable and the signal cable to the FEA.
  4. Turn on the power (8V nominal). Measure the current.

Initialization

Try to set up all the registers in the FEA and see if it works.

Procedure

  1. Send command sequence for FEA reset, Elefant reset, TDC reset. Note that FEA reset must be followed by a few miliseconds of wait.
  2. Read status. Check if Elefants locked.
  3. Load all registers with default values. See below for list of registers and their default values.
  4. Read back registers. Check all registers are correctly read back.
  5. Reload all registers with default values.

Note: All registers must be loaded with the default values prior to each tests described below.

Elefant Test Mode

Use the test mode of the Elefants to check the data transfer logic. In the test mode, the Elefant fills the event buffer using its internal clock counter. The data content should therefore be a series of increasing 32 8-bit numbers.

Procedure

  1. Set TestMode = 1 and ReadAll = 1.
  2. Send Clear.
  3. Repeat 4 times:
    1. Send L1Acc + Read.
    2. Read data.
    3. Check the data format and content. Make sure the buffer number is changing from 0 to 3.

FADC Pedestal

Read FADC with no signal to measure the pedestal.

Procedure

  1. Set ReadAll = 1.
  2. Set discriminator threshold high, e.g. 500mV, to shut off the TDCs.
  3. Repeat 10 times:
    1. Send L1Acc + Read.
    2. Read data and check the format.
    3. Calculate FADC pedestal and its rms. Check if the values are reasonable. Accumulate them in histograms.
  4. Check the histograms for bad (e.g. unstable) pedestals.

Discriminator Offset

Measure the offset of the discriminator by turning down the digital gain to zero and look for the noise floor.

Procedure

  1. Set DGain = 1. This reduces the digital gain to zero.
  2. Scan the discriminator threshold from 40mV to 120mV in 5mV steps and repeat:
    1. Repeat 100 times:
      1. Send L1Acc + Read.
      2. Read data and check the format.
      3. Count the number of TDC hits in each channel. Accumulate it.
    2. Calculate average number of hits/event for each channel. Accumulate it as a function of threshold.
  3. Find the threshold where the Nhit/event becomes less than 1. This should be close to the discriminator offset. Check if the values are within limits.

Noise Floor

Count the number of noise hit per event to measure the noise floor.

Procedure

  1. Scan the discriminator threshold from 100mV to 200mV in 10mV steps and repeat:
    1. Repeat 100 times:
      1. Send L1Acc + Read.
      2. Read data and check the format.
      3. Count the number of TDC hits in each channel. Accumulate it.
    2. Calculate average number of hits/event for each channel. Accumulate it as a function of threshold.
  2. Find the threshold where the Nhit/event becomes less than 0.1. This corresponds to the 45kHz noise floor. Check if the value is within limits.
  3. Subtract the discriminator offset from the noise floor. This corresponds to 3 sigma noise amplitude. Check if the value is within limits.

Analog Gain (External Calibration)

Use the external calibration pulser to measure the analog gain.

The gain should be measured by integrating the waveform for 600ns = 9 FADC samples. The FADC is used in bilinear mode, i.e. the gain changes at code 32. Taking the nonlinearity of the preamplifier into account, we should parametrize the gain as a combination of 4-5 straight lines. Here, I assume that the gain is parametrized by two parameters A (below 32) and B (above 32).

Procedure

The external calibration pulser must be enabled for one channel per preamplifier chip at a time. The following sequence must be repeated 4 times to calibrate all the channels.
  1. Set discriminator threshold high, e.g. 500mV, and DGain = 1 to shut off the TDC.
  2. Set ReadAll = 1.
  3. Scan the external calibration amplitude from 10% to 100% of the expected FADC dynamic range in 10% steps and repeat:
    1. Scan the external calibration delay from 0 and 60ns in 6.67ns steps and repeat:
      1. Send L1Acc + Read.
      2. Read data and check the format.
      3. Calculate the charge integrated over 9 samples (600ns) as a function of A and B. The result must be a linear combination of A and B. Accumulate the coefficients.
    2. Calculate the average coefficients for A and B. Accumulate them as a function of external calibration amplitude.
  4. Determine A and B by fitting.

Analog Gain (Internal Calibration)

Measure the analog gain using the internal calibration circuit in order to ``calibrate the calibrator.''

By comparing the integrated charge measured by Elefant using the external and internal calibration, it is possible to correlate the CalDac value to the equivalent external input charge. The `gain' of the calibration circuit is then expressed as a capacitance (input charge / CalDAC voltage).

Procedure

The internal calibration circuit must be enabled for one channel per preamplifier chip at a time. The following sequence must be repeated 4 times to calibrate all the channels.
  1. Set discriminator threshold high, e.g. 500mV, and DGain = 1 to shut off the TDC.
  2. Set ReadAll = 1.
  3. Set CanRange = 0 (large signal).
  4. Scan CalDac from 0 to 500mV in 50mV steps and repeat:
    1. Repeat 12 (must be a multiple of 4) times:
      1. Send Strobe + L1Acc + Read. For each cycle, change the delay between the Strobe and L1Accept by 1 sysclk.
      2. Read data and check the format.
      3. Calculate the charge integrated over 9 samples (600ns) as a function of A and B. The result must be a linear combination of A and B. Accumulate the coefficients.
    2. Calculate the average coefficients for A and B. Accumulate them as a function of external calibration amplitude.
  5. Determine A and B by fitting. Compare the results with the values measured using the external calibration pulser. This should give two measurements of the internal calibration capacitor. Check the consistency.

Digital Gain (External Calibration)

Use the external calibration pulser to measure the digital gain. The gain is measured at several fixed threshold voltages by scanning the amplitude of the calibration pulses.

Procedure

The external calibration pulser must be enabled for one channel per preamplifier chip at a time. The following sequence must be repeated 4 times to calibrate all the channels.
  1. Scanning the digital threshold from 200mV to 400mV in 50mV steps and repeat:
    1. Scan the external calibration amplitude at 10 points around the expected threshold level and repeat.
      1. Repeat 100 times:
        1. Send L1Acc + Read.
        2. Read data and check the format.
        3. Look for a TDC hit at the expected timing. Accumulate number of hits for each channel.
      2. Calculate the efficiency. Accumulate it as a function of external calibration amplitude.
    2. Determine 50% efficiency point by interpolating. Record it as a function of threshold voltage.

Digital Gain (Internal Calibration)

Measure the digital gain using the internal calibration circuit in order to ``calibrate the calibrator.''

This calibration gives another capacitance value for the calibrator circuit. The value is, however, not the same as what was measured for the analog gain, because CalRange is set to small signal for this test.

Procedure

The internal calibration circuit must be enabled for one channel per preamplifier chip at a time. The following sequence must be repeated 4 times to calibrate all the channels.
  1. Set CalRange = 1 (small signal).
  2. Scanning the digital threshold from 200mV to 400mV in 50mV steps and repeat:
    1. Scan CalDac from 0 to 500mV in 50mV steps and repeat:
      1. Repeat 100 times:
        1. Send L1Acc + Read.
        2. Read data and check the format.
        3. Look for a TDC hit at the expected timing. Accumulate number of hits for each channel.
      2. Calculate the efficiency. Accumulate it as a function of external calibration amplitude.
    2. Determine 50% efficiency point by interpolating. Record it as a function of threshold voltage.
  3. Compare the gain curve with what was measured using the external calibration pulser. This should give 5 mesurements of the internal calibration capacitance. Check the consistency.

TDC Resolution

Use the external calibration pulser to measure the resolution of the TDC. The measurement should be made for small signals (2 × threshold) and large signals (10 × threshold).

Procedure

The external calibration pulser must be enabled for one channel per preamplifier chip at a time. The following sequence must be repeated 4 times to test all the channels.
  1. Set the discriminator threshold at nominal value.
  2. Repeat with external calibration amplitude at roughly 2 and 10 times the threshold level:
    1. Scanning the external calibration delay from 0 to 67ns and repeat:
      1. Repeat 100 times:
        1. Send L1Acc + Read.
        2. Look for a TDC hit at the expected time ±10ns.
        3. Accumulate the measured time if there is a hit.
      2. Calculate efficiency, average time and rms of the TDC hit.
    2. Calculate overall efficiency and average rms.

TDC Linearity

Use the external calibration pulser to measure the linearity of the TDC. The measurement should be made for large signals (10 × threshold).

Procedure

The external calibration pulser must be enabled for one channel per preamplifier chip at a time. The following sequence must be repeated 4 times to test all the channels.
  1. Set the discriminator threshold at nominal value.
  2. Set the external calibration amplitude to roughly 10 times the threshold level.
  3. Scan the external calibration delay from 0 to 67ns in 0.01ns steps and repeat:
    1. Send L1Acc + Read Event.
    2. Look for a TDC hit at the expected time ±10ns.
    3. If there is a hit:
      1. Accumulate the TDC code (0..63) in a hitogram.
      2. Accumulate the time residual, i.e. difference between the measured time (using 1.0417 ns/count) and the input delay.
  4. Calculate the efficiency.
  5. Calculate the frequency of each TDC code (0..63).
  6. Plot the time residual vs the input delay. Calculate the spread and the rms.

Trigger

Use the external calibration pulser to test the trigger stream.

Procedure

The external calibration circuit must be enabled for one channel per preamplifier chip at a time. The following sequence must be repeated 4 times to test all the channels.
  1. Set TrigMode = 0 (TDC).
  2. Set the threshold high (300mV) to reduce the accidental hits.
  3. Set the external calibration amplitude to roughly 10 times the threshold level.
  4. Repeat 10 times:
    1. Send NoOp.
    2. Read Trigger FIFO.
    3. Look for a trigger bit at the expected timing. Accumulate the hit.
  5. Calculate efficiency for each channel. Check if it is consistent with the setting of the external calibration channel selection.
  6. Set TrigMode = 1 (TDC).
  7. Set FadcThr = 3 to reduce accidental hits.
  8. Set the external calibration amplitude to roughly half the FADC dynamic range.
  9. Repeat 10 times:
    1. Send NoOp.
    2. Read Trigger FIFO.
    3. Look for a trigger bit at the expected timing. Accumulate the hit.
  10. Calculate efficiency for each channel. Check if it is consistent with the setting of the external calibration channel selection.

FEA Registers and Their Default Values

Address Name Size (bits) Default
0 CalMask 128/144/192* all 0 Calibration mask (1 = enable)
1 CalDac 12 0 Calibration DAC (1mV/count)
1 FetBias 12 1800 FET bias for Elefant (1800 = 1.8V)
1 CalRange 1 1 Calibration range select (1 = small signal)
2 DVT2 12 2200 Discriminator threshold low (2200 = 2.2V)
2 DVT1 12 2500 Discriminator threshold high (2500 = 2.5V)
2 DGain 1 0 Digital gain (0 = normal)
3 Vtop 12 4000 FADC top (4000 = 4.0V)
3 Vmid 12 1750 FADC middle (1750 = 1.75V)
3 Vbot 12 1000 FADC bottom (1000 = 1.0V)
3 Vref 12 1000 FADC pedestal (1000 = 1.0V)
3 ReadAll 1 0 Elefant sparce read out switch (0 = sparce read out; 1 = full read out)
3 TestMode 1 0 Elefant test mode switch (0 = normal mode; 1 = test mode)
3 Sparse 1 0 Elefant sparse readout source (0 = TDC; 1 = FADC)
3 TrigMode 1 1 Elefant trigger source (0 = TDC; 1 = FADC)
3 FadcThr 2 1 FADC delta trigger threshold (0..3 = more than 0..3 FADC counts)
3 AnaGain 2 0 FADC gain (0 = 5x; 1 = 10x; 2 = 20x; 4 = 40x)
4 Inhibit 18/18/24* all 0 Elefant read out mask (0 = enable read out; 1 = inhibit read out)
*Sizes for inner/middle/outer FEA boxes.

Data Format

The data structure read from vROM's Data FIFO:
Size Content
1 byte vROM clock counter
4 bytes 1st Elefant header
32 bytes 1st channel of 1st Elefant data
32 bytes 2nd channel of 1st Elefant data
...
32 bytes last channel of 1st Elefant data
4 bytes 2nd Elefant header
32 bytes 1st channel of 2nd Elefant data
...
32 bytes last channel of last Elefant data
Each Elefant header consists of:
Byte Content
0 Bit 7 = unused;
Bit 6:5 = TDC lock sum - Should be 0;
Bit 4:3 = Board address (0..3);
Bit 2:0 = Elefant address (0..5).
1 Hit map - 1 in bit 0..7 indicates at least one hit was recorded in channel 0..7. A hit can be either a TDC hit (Sparce = 0) or a FADC delta greater than FadcThr (Sparce = 1).
2 Elefant clock counter - This should be equal to the vROM clock counter + 1.
3 Bit 7 = unused;
Bit 6:5 = Buffer number (0..3);
Bit 4:0 = Trigger tag - This should be equal to the trigger tag sent with the L1Acc command.
The Elefant header is followed by at most 8 channels × 32 bytes of data. The number of channels should normally be equal to the number of active (1) bits in the hit map if ReadAll register is set to 0. If ReadAll is set to 1, data from all 8 channels are read out regardless of the hit map.

Each byte in the 32-byte data consists of:

Bit Contents
7 FADC delta 0 if FADC delta > FadcThr.
6 Data type 1 = TDC data; 0 = FADC data.
5:0 Value 6-bit Gray code if TDC data;
6-bit binary if FADC data.
The data format, including the clock and trigger tag consistencies, must be checked at every data read. The checklist includes, among other things:


Masahiro Morii