Introduction
USB driver
bpi_device
Overview
Module Constants
FPGA Data structures
Controls
Statistics
Results
Histogram
List Mode
Oscilloscope Trace
Summation Weights
Time Slices
Two-bank List Mode
ARM Data structures
Version
Status
Controls
Calibration
API
Overview
|
MCA-3K Data Structure: fpga_lm_2b
Summary
The fpga_lm_2b data structure is available with a non-standard firmware. It is an enhanced list mode, but with the same event structure as regular list mode. There are two data banks each of which can hold 2730 events. While the active bank fills with new data, the client application can read and process data from the inactive bank. A brief description can be found here.
Data structure
For fpga_list_mode there are 4096 'register' and a number of 'fields' data in use. All register data are 16-bit unsigned int16 (uint16).
fpga_lm_2b registers and fields |
Register number and field name | Description |
LM0[15]: mode | Indicates event data format in the list mode data buffer. 0 → (16-bit energy, 32-bit time), 1 → (16-bit energy, 16-bit PID, 16-bit time). |
LM0[0:11]: num_events | Number of events stored in the list mode buffer. |
LM1 ... LM4095: | Data buffer. Its contents will be unpacked according to mode and num_events. |
The fpga_lm_2b registers; LMn means list mode register number n, with n=0...3 . Bitfields are indicated as [b_low:b_high] indicating bit numbers b_low to b_high, inclusive.
The list mode data buffer (LM) consists of a 16-bit header word (in LM0) followed by 4095 16-bit data words. Into these data words, the FPGA packs up 2730 3-word events. The structure of an event depends on 'mode' and is shown below.
Energies are shown with an extra 4-bit precision compared to Histogram entries: Energy = 16*MCA_bin.
For mode=0 the time unit is an ADC sampling clock cycle; ie 25ns for a 40MHz ADC sampling rate. For mode=1 the time unit 64 ADC sampling clock cycles; ie 40MHz → 1.6µs, 80MHz → 0.8µs, 120MHz → 0.533µs,
Listmode event structure |
mode | Event |
0 | energy, short_sum, time |
1 | energy, time_0, time_1 |
The fpga_lm_2b event structure for different modes. For mode=1, the arrival time is time_0+65536*time_1.
List mode data fields when mode=0 |
Field name | Description |
times | List of 32-bit event arrival times |
energies | List of 16-bit energies |
The fpga_lm_2b data fields when mode=0;
List mode data fields when mode=1 |
Field name | Description |
times | List of 16-bit event arrival times |
energies | List of 16-bit energies |
short_sums | List of energies measured over the shorter integration time of 'short_it'. |
The fpga_lm_2b data fields when mode=1;
List mode data user dictionary |
Field name | Description |
times | List of event arrival times measured in seconds |
energies | List of 12-bit energies; 1LSB = 1 MCA_bin |
short_sums | List of energies measured over the shorter integration time of 'short_it'. 1LSB = 1 MCA_bin |
The fpga_lm_2b data fields when mode=1;
|