Structures#

struct fifo_worker_config#

Warning

This object name will be renamed to module_fifo_config on November 30, 2024.

See module_fifo_config.

struct module_config#

A data structure used to provide users information about the module.

Members

unsigned short adc_bit_resolution#
unsigned short adc_sampling_frequency#
char fw_revision[PIXIE16_API_MOD_CONFIG_MAX_STRING];#
char fw_tag[PIXIE16_API_MOD_CONFIG_MAX_STRING];#
char fw_type[PIXIE16_API_MOD_CONFIG_MAX_STRING];#
char fw_device[PIXIE16_API_MOD_CONFIG_MAX_DEVICES][PIXIE16_API_MOD_CONFIG_MAX_DEVICE_STRING];#
char fw_device_file[PIXIE16_API_MOD_CONFIG_MAX_DEVICES][PIXIE16_API_MOD_CONFIG_MAX_STRING];#
unsigned short number#
unsigned short number_of_channels#
unsigned short revision#
unsigned int serial_number#
unsigned short slot#
struct module_fifo_config#

Defines a data structure used to configure the List-mode data FIFO worker. XIA recommends asynchronous mode and the XIA list-mode decoder for optimal system performance.

Members

size_t bandwidth_mb_per_sec#

The maximum bandwidth available in a PCI bus is 100 MB / s. When using the default bandwidth value (0) the individual modules will use the maximum data rate available. This rate can vary depending on the type of crate (PCI vs PCIe) and the trigger rates in the module.

By default, the system will balance the data rate approximately equally amongst all the modules in the system. One could use this value to adjust the bandwidth for a low-count rate module could be reduced to give preference to a module that’s got a higher rate.

Units

Min

Max

Default

MB/s

1

100

0

size_t buffers#

Defines the number of buffers available to the worker. Each worker has a buffer pool that it uses to migrate data from the hardware. The worker will periodically attempt to compact the buffer pool to ensure that there is always a buffer available to read data from the hardware.

Units

Min

Max

Default

None

10

10,000,000

100

size_t dma_trigger_level_bytes#

The threshold that the on-board FIFO must reach before we execute a read. This value works in tandem with fifo_worker_config.hold_usecs to ensure that we’re reading data out of the module before it can overflow.

Warning

Adjusting this value incorrectly may result in a loss of data.

Units

Min

Max

Default

bytes

512

8192

1024

size_t hold_usecs#

The amount of time that data waits in the on-board fifo before being read out. The hold time is reset on every transfer from the FIFO no matter the run task state. If we are idle and reading data the hold time is reset so the waiting period only starts to decay once we do not see data.

This value works in tandem with fifo_worker_config.dma_trigger_level_bytes to ensure that we’re reading data out of the module before it can overflow.

Warning

Adjusting this value incorrectly may result in a loss of data.

Units

Min

Max

Default

microseconds

1000

100,000

10,000

size_t idle_wait_usecs#

The amount of time the worker will sit idle before checking the hardware for data.

Note

This value is ignored during list-mode data runs, see run_wait_usecs.

Units

Min

Max

Default

microseconds

10,000

1,000,000

150,000

size_t run_wait_usecs#

Specifies the amount of time that worker will wait after successfully reading data from the External FIFO. Data movement through the system is asynchronous by nature of the hardware design. Any apparent data alignment is purely coincidental.

Note

XIA recommends list-mode data be treated as a stream and the XIA decoder API be used to ensure smooth and fast decoding of the read buffers.

A value of 0 enables synchronous FIFO reading. In this mode, data from the External FIFO is ready only upon request.

Warning

XIA does not recommend using synchronous data readout. XIA may remove this mode in the future without warning due to the high probability of data loss.

In synchronous readout, the user’s application determines the effective throughput of the system. Those values may not reflect XIA’s performance figures. If your application is not able to meet the required timing, list-mode data may be lost to External FIFO memory overflow.

Units

Min

Max

Default

microseconds

500

200,000

5000

struct module_fifo_stats#

A data structure used to provide users list-mode data FIFO statistics information.

size_t in#

The amount of data the Worker FIFO read into the queue in bytes.

size_t out#

The amount of data read out of the Worker FIFO in bytes.

size_t dma_in#

The amount of data read from the DMA connection in bytes.

size_t overflows#

The number of times the Worker FIFO queue overflowed.

size_t dropped#

The amount of data the the module’s Worker FIFO queue dropped in units of words.

size_t hw_overflows#

An estimate of the number of times the on-board External FIFO overflowed. This value cannot be determined precisely, so we make a good-faith effort do determine its value.