Alibava Satellite#
Name |
Alibava |
|---|---|
Description |
Satellite to control the Alibava Classic DAQ System |
Category |
Readout Systems |
Language |
C++ |
Website |
Description#
This satellite operates the Alibava System Classic readout system, which hosts two Beetle Readout Chips for the analog sampling of silicon strip sensor signals.
The satellite provides direct Constellation integration for RadSource, Pedestal and Laser runs, offering an alternative to the graphical user interface shipped with the system and enabling automated runs, synchronous with other detectors.
Prerequisites#
This satellite requires an installation of the AlibavaGUI program, which can be obtained from Alibava Systems. The satellite has been tested with AlibavaGUI version 0.8.0-1.
When installing from the self-installing binary, the program is installed in/opt/Alibava and will be found automatically.
For AlibavaGUI versions compiled from source, the installation path has to be provided manually to meson via
meson setup build -Dalibava:alibava_dir=/path/to/alibava/
In addition, an installation of the glibc-2.0 development headers is required since AlibavaGUI depends on them.
They can be installed via
sudo apt install libglib2.0-dev
sudo dnf install glib2-devel
sudo dnf install glib2-devel
Configuration#
The configuration of this satellite is very similar to that of the AlibavaGUI program, with a few key differences explained below. The AlibavaGUI configuration can be stored via the βFile->Save Asβ menu entry.
The differences with respect to the GUI program are:
Only data runs are supported, i.e. the run types
RadSource,LaserandPedestal.Beetle registers are directly assigned to each chip as described below. This also concerns the comparator-related registers
Ithmain,Ithdelta,VrsandIcompfound in the[Chip.x]sections of the GUI program.The
polaritysetting needs to be configured directly via theCompCtrlregister.Mask bits (
mask) and trim values (trim) are also set directly in thebeetle_0andbeetle_1sections instead of the[Chip.x]subsections.Mask bits (
mask) and trim values (trim) need to be provided as arrays instead of semicolon-separated strings. For example the AlibavaGUI configurationmask=0;0;<...>needs to be changed intomask = [0, 0, <...>].The trigger setup has to be provided as directly as
"TriggerIn"or"TriggerPulse"instead oftrigger_pulse = falseandtrigger_pulse = true, respectively.The trigger type has to be provided as directly as
"TriggerAND"or"TriggerOR"instead oftrigger_and = trueandtrigger_and = false, respectively.Parameters from the sections
[calibration],[charge_scan],[laser_sync],[plugin]and[analysis]are unused.The trimming offset, slope and gain parameters concern the analysis of data and consequently are not read or used.
In Constellation, satellites receive commands for initialization as well as start and stop from a controller.
Therefore, the duration or number of samples cannot be configured and imposed by this satellite. Instead, consecutive runs with the configured sample_size are started, and only when a stop command from the Constellation arrives, the current sample run is finished and the Constellation run is ended.
Note
Since the Alibava System DAQ works in blocks set by the parameter sample_size, the data taking can only be stopped between those blocks. For this purpose, the trigger source should be configured such that it only stops when this satellite has stopped operation.
This can be achieved with conditions transitions, e.g. configuring a trigger logic unit with _conditions.require_stopping_after = ["Alibava.MySetup"].
In contrast to the AlibavaGUI program, which sets many registers to the same value on both Beetle chips, this satellite addresses and configures both chips independently via the beetle_0 and beetle_1 configuration sections.
For any register not present in the configuration, the default values taken from AlibavaGUI are used and configured.
The presence or absence of the beetle_0 and beetle_1 configuration sections will enable or disable the respective chips, allowing to take data with either both or only one of them active.
Note
It should be noted that with the two Beetle being configured independently, some settings such as the latency register will have to be set to the same value for both chips.
Alibava System Emulation#
The AlibavaGUI program contains emulation code which allows to run the code without a physical Alibava Classic System attached to the machine.
To enable this emulation, the parameter emulate_usb needs to be set to true and the alibavad executable either needs to be in $PATH or the environment variable ALIBAVA_DAEMON has to be set, pointing to the executable.
Data Format#
Data are send via the Constellation data transmission protocol. The begin-of-run message contains the satellite configuration, including all chip registers. In addition, the following tags are set by this satellite:
run_type- the type of the current run, e.g.RadSourceorPedestalnchips- the number of active Beetle chips, either 1 or 2.chip_mask- The binary chip mask indicating which of the chips is activefirmware- The firmware version of the Alibava System Classic motherboard.
In addition, the tags eudaq_event and write_as_blocks are set for backwards-compatibility with the EudaqNativeWriter satellite.
Each Alibava sample is stored as individual data record in constellation. The data record holds three header tags, temp, tdc and clock, containing the respective information. All are the values read directly from the motherboard firmware, so any adjustments such as temperature calibration have to be performed at analysis level.
Each data record contains two data blocks per chip, stored as arrays of 16-bit integer words. The first data block is 16 words long and contains the Beetle chip header. The second data block contains 128 data words, one for each of the 128 channels of the respective Beetle chip. Data words are written to the stream as received from the motherboard firmware and without altering the byte order.
The order of the Beetle chips is always obeyed. This means in case of data taking with Beetle 0, the data from this chip will always appear first. In case of data taking with only Beetle 1 enabled, only the two blocks from this chip are added to the record.
Parameters#
The following parameters are read and interpreted by this satellite. Parameters without a default value are required.
Parameter |
Description |
Type |
Default Value |
|---|---|---|---|
|
Device descriptor for the USB-to-serial connection to the Alibava motherboard. It is strongly recommended to use the serial ID from |
String |
- |
|
Type of run to be started. Possible values are |
String |
- |
|
Switch to enable device emulation instead of connecting to a physical motherboard |
Boolean |
|
|
Switch to enable connection via the FTD2XX library instead of FTDI |
Boolean |
|
|
Setting to enable sending of a |
Boolean |
|
|
Setting to enable the pulse shape reconstruction in the firmware. |
Boolean |
|
|
Number of samples (e.g. triggers) acquired internally by the motherboard firmware before reading the full buffer out via USB. A sample size of 1000 has shown to have the highest overall trigger rate, while for lower values the operation cycle will be dominated by the readout and higher values do not improve the situation significantly. |
Integer |
100 |
|
Timeout in seconds after which the DAQ is aborted if no triggers have been recorded. This value is scaled with the sample size automatically by the ALibava library. |
Integer |
1 |
|
Delay between sending the laser trigger pulse on the LaserPulse LEMO connector and sampling the Beetle chips. This is the value optimized by the |
Integer |
- |
|
Section for trigger configuration. Only relevant for |
Section |
- |
|
Section for Beetle 0 register configuration. |
Section |
- |
|
Section for Beetle 1 register configuration. |
Section |
- |
Trigger Configuration#
The trigger section holds the configuration parameter for the RadSource trigger setup. The following parameters are interpreted:
Parameter |
Description |
Type |
Default Value |
|---|---|---|---|
|
Type of the trigger to be used, can be either |
String |
- |
|
Setup of the selected trigger, can be either |
String |
- |
|
Threshold level in millivolts for the Trigger In 1 channel. Only used for |
Integer |
-200 |
|
Threshold level in millivolts for the Trigger In 2 channel. Only used for |
Integer |
-200 |
|
Negative threshold level in millivolts for the Trigger Pulse channel. Only used for |
Integer |
-1000 |
|
Positive threshold level in millivolts for the Trigger Pulse channel. Only used for |
Integer |
1000 |
Beetle Chip Configuration#
The beetle_0 and beetle_1 sections hold the registers for the first and second Beetle chip on the daughter board, respectively. The functionality of each register can be inferred from the Beetle Chip Manual. The following configuration settings and register names are read from the configuration, the default values are used for all registers not present in the configuration section. Register names are interpreted in a case-insensitive manner.
Parameter |
Description |
Type |
Default Value |
|---|---|---|---|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Beetle register at address |
Integer |
|
|
Mask configuration for the comparator of the 128 channels. |
Boolean array |
all |
|
Trim configuration for the channel comparators, 128 values. |
Integer array |
all 0 |
Configuration Example#
An example configuration for this satellite which could be dropped into a Constellation configuration as a starting point
[Alibava.MySetup]
device = "/dev/serial/by-id/"
run_type = "RadSource"
[Alibava.MySetup.trigger]
type = "TriggerPulse"
setup = "TriggerOR"
dac_pulse_neg = -200
[Alibava.MySetup.beetle_0]
latency = 134
[Alibava.MySetup.beetle_1]
latency = 134
or, in YAML format:
Alibava:
MySetup:
device: "/dev/ttyUSB0"
run_type: "RadSource"
trigger:
type: "TriggerPulse"
setup: "TriggerOR"
dac_pulse_neg: -200
beetle_0:
latency: 134
beetle_1:
latency: 134
Metrics#
The following metrics are distributed by this satellite and can be subscribed to.
Metric |
Description |
Value Type |
Interval |
|---|---|---|---|
|
Number of triggers received since the start of the run. This number is only updated with the granularity set by the |
Integer |
3s |
Custom Commands#
This section describes all custom commands the satellite exposes to the command interface.
Command |
Description |
Arguments |
Return Value |
Allowed States |
|---|---|---|---|---|
|
Reset board and Beetle chips |
- |
0 on success, error code otherwise |
|
Framework Parameters#
This satellite inherits the following framework parameters from its base classes:
Parameters inherited from TransmitterSatellite#
Parameters to control data transmission in the _data section:
Parameter |
Type |
Description |
Default Value |
|---|---|---|---|
|
Unsigned integer |
Timeout in seconds to send the BOR message. The satellite will attempt for this interval to send the message and goes into |
10 |
|
Unsigned integer |
Timeout in seconds to send the EOR message. The satellite will attempt for this interval to send the message and goes into |
10 |
|
Unsigned integer |
Timeout in seconds to send the data message. The satellite will attempt for this interval to send the message and goes into |
10 |
|
Unsigned integer |
Threshold for sending data messages in KiB. The satellite will only send queued data records after the combined payload size of the data records has reached this threshold. |
128 |
|
Unsigned integer |
Size of the queue for the data records. Small values might lead to performance issues, large values lead to larger memory usage. |
32768 |
|
String |
License this data is recorded under. Defaults to the Open Data Commons Attribution License. This information will be added to the run metadata. |
|
Parameters inherited from Satellite#
Autonomous Operation#
Parameters to control autonomy in the _autonomy section:
Parameter |
Type |
Description |
Default Value |
|---|---|---|---|
|
Role name |
Role this satellite should take in the Constellation. Accepted values are |
|
|
Unsigned integer |
Maximum interval in seconds between heartbeats to be sent to other Constellation components. The time between heartbeat is adjusted automatically according to the number of nodes in the Constellation but will never exceed this value. |
|
Conditional Transitions#
Parameters to control conditional transitions in the _conditions section:
Parameter |
Type |
Description |
Default Value |
|---|---|---|---|
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
List of strings |
List of canonical names of remote satellites for conditional transitioning in |
- |
|
Unsigned integer |
Timeout in seconds to wait for all conditions to be satisfied for conditional transitioning |
|
Framework Metrics#
This satellite inherits the following framework metrics from its base classes:
Metrics inherited from TransmitterSatellite#
Metric |
Description |
Value Type |
Interval |
|---|---|---|---|
|
Amount of bytes transmitted during current run |
Integer |
10s |
|
Number of data blocks transmitted during current run |
Integer |
10s |
|
Number of data records transmitted during current run |
Integer |
10s |
Metrics inherited from Satellite#
Metric |
Description |
Value Type |
Interval |
|---|---|---|---|
|
Current run identifier. Updated whenever it changes. |
String |
- |