Skip to content

3.2 VFB6 DISC

John Bieling edited this page Mar 18, 2016 · 11 revisions

This example implementation of the jTDC is designed for the VFB6 board from ELB using 3 DISCRIMINATER mezzanine cards. It's inputs and outputs are mapped as follows:

  • MEZA: analog input channel 01-16
  • MEZB: analog input channel 17-32
  • MEZC: analog input channel 33-48
  • NIM[0]: Channel 0 input (trigger and busy) input (frontpanel, left NIM socket)
  • NIM[1]: Trigger A output (frontpanel, right NIM socket)
  • NIM[2]: Channel 49 input (backpanel, left NIM socket)
  • NIM[3]: Trigger B output (backpanel, right NIM socket)

The FPGA only sees the discriminated time-over-threshold signals and samples BOTH edges. The trailing edges of input channels 01-48 are stored as tdc channels 51-98.

VME config and readout register

All registers are 32bit registers and you must read/write all 32bits, even if you want to change/set/get only a specific bit. Some registers are so called toggle registers, they toggle back to 0x00000000 after one clock cycle and are used to trigger events (for example resets). The read value from such a toggle register has mostly a completely different source (for example status information) and has nothing to do with the toggle state of the register.

Config Register A @ 0xbase0020

bits config value
4-0 Set GeoID of the module. This ID is written into the header data of each event.
5 Set to 1 to enable dutycycle count mode (check input state each clk cycle and count if state is high)
6 Set to 1 to invert all inputs
7 Set to 1 to use DISC_A_IN[0] instead of NIM[0] as trigger input
15-8 Set maximum trigger window size to (N*5) ns (max 1250 ns)

This is a configuration register, you can readback the current values at any given time.

Config Register B @ 0xbase0028

bits config value
8-0 busyshift (0-2500 ns in steps of 5 ns)
9 enable lifetime gate for counters (stop counting on busy)
15-11 busyextend (0-155 ns in steps of 5 ns, must not be larger than length of busy)
19-16 high time (length) setting for trigger output: (5*N + 10) ns
23-20 dead time setting for trigger output: (5*N + 10) ns
26-24 3bit mask for trigger output NIM[1] to select OR of DISC_C, DISC_B and/or DISC_A (0x7 will put the logical OR of all DISC inputs on NIM[1], 0x2 just those of DISC_B)
29-27 3bit mask for trigger output NIM[3] to select OR of DISC_C, DISC_B and/or DISC_A (0x7 will put the logical OR of all DISC inputs on NIM[3], 0x2 just those of DISC_B)
30 disable external latch (scalers will not be latched by the trigger input)

This is a configuration register, you can readback the current values at any given time.

Trigger Register @ 0xbase0024

bit toggle actions
0 TDC reset
1 counter reset
2 counter latch
3 output reset (must be called after changing the high- or dead time settings, and after initial fw load)

This is a toggle register, the readback value of this register contains the following information:

bit value
7-0 firmware version
15-8 module id
23-16 number of encoded bits per channel
31-24 number of tdc channels

Enable Registers

address 16bit bitmask to enable/disable channels (highest 16bit of 32bit registers are not used)
0xbase2000 DISC input channels 16 - 01
0xbase2004 DISC input channels 32 - 17
0xbase2008 DISC input channels 48 - 33

This is a configuration register, you can readback the current values at any given time.

Scaler Readout Registers

CAUTION! The scalers cannot be addressed directly! First read the clock counter and then read register 0xbase4000 98 times to get the 98 scaler values. For convenience, the addressbus is masked for register 0xbase4000, so one could also consecutively read address 0xbase4000 to 0xbase409B.

address value in read-only register
0xbase0044 clock counter (a read request sets the current readout scaler to channel 0)
0xbase4000 scaler value of the current readout scaler (auto incrementation of the current readout scaler)
Clone this wiki locally