Paper: https://arxiv.org/abs/2510.11165
AlfIPbus was developed as a temporary Detector Control System (DCS) solution for the Fast Interaction Trigger (FIT) detector in the ALICE experiment. Its primary purpose is to serve as a software translator between the IPbus protocol, used in the previous DCS setup, and the new custom SWT FIT protocol in the updated system. AlfIPbus provides a fast and reliable translation mechanism and is fully compatible with FRED software.
- BOOST 1.83.0
- DIM
git submodule update --recursive --init \
mkdir build \
cmake3 -S . -B build \
cmake3 --build build \
-
Copy the Service File
First, copy thealfipbus.servicefile to the systemd unit file directory (the default is/etc/systemd/system). You can do this with the following command:sudo cp alfipbus.service /etc/systemd/system/ -
Edit the Service Configuration Next, you need to set the necessary environment variables and other options in the service file. Use the command below to open the file for editing:
sudo systemctl edit alfipbus.serviceIn the editor, define the following environment variables:
- NAME: Set the name of the service.
- DEVICE_ADDRESS: Specify the device address.
- LOG_FILE: Provide the path where the log file should be stored.
- TIMEOUT: Define the timeout period for the service.
- DIM_DNS_NODE: Set the DNS node details.
Additionally, configure the following options:
- User: Specify the user that should run the service by setting the User option.
- WorkingDirectory: Set the directory where the log file will be created by setting the WorkingDirectory option.
AlfIPbus executable file is expected to be located within /usr/local/bin. You may move it there or specify another ExecStart path.
-
Enable the Service Once the service configuration is complete, enable the service to start at boot with this command:
sudo systemctl enable alfipbus.service -
Reload the Systemd Daemon After editing and enabling the service, reload the systemd daemon to apply the changes:
sudo systemctl daemon-reload
name/n [name]- ALFIPbus server namelog_file/f [filename](f)- Log file name (if not specified, logs will be sent to std::cout)link/l [IP address]:[remote port](l) - set the IP address and port for consecutive links (can be used multiple times)t [time in miliseconds]- IPbus request timeout (in miliseconds)v- verbose
SwtLink is compatible with SWT frame designed for ALICE's FIT detector.
| SWT ID (4b) | NOT USED (8b) | Transaction type (4b) | ADDRESS (32b) | DATA (32b) |
| Transaction type code | Transaction |
|---|---|
| 0x0 | read |
| 0x1 | write |
| 0x2 | RMWbits AND |
| 0x3 | RMWbits OR |
| 0x4 | RMW sum |
| 0x8 | block read |
| 0x9 | block read non-increment |
| SWT ID (4b) | NOT USED (8b) | Transaction type (4b) | ADDRESS (32b) | DATA (32b) |
|---|---|---|---|---|
| 0011 | 00000000 | 0000 | addresss | ignored |
| SWT ID (4b) | NOT USED (8b) | Transaction type (4b) | ADDRESS (32b) | DATA (32b) |
|---|---|---|---|---|
| 0011 | 00000000 | 0000 | addresss | data |
| SWT ID (4b) | NOT USED (8b) | Transaction type (4b) | ADDRESS (32b) | DATA (32b) |
|---|---|---|---|---|
| 0011 | 00000000 | 0001 | addresss | data |
None
| SWT ID (4b) | NOT USED (8b) | Transaction type (4b) | ADDRESS (32b) | DATA (32b) |
|---|---|---|---|---|
| 0011 | 00000000 | 0010 | address | AND mask |
| 0011 | 00000000 | 0011 | address | OR mask |
Only to first frame
| SWT ID (4b) | NOT USED (8b) | Transaction type (4b) | ADDRESS (32b) | DATA (32b) |
|---|---|---|---|---|
| 0011 | 00000000 | 0010 | address | data before operation |
| SWT ID (4b) | NOT USED (8b) | Transaction type (4b) | ADDRESS (32b) | DATA (32b) |
|---|---|---|---|---|
| 0011 | 00000000 | 0100 | address | data to sum |
| SWT ID (4b) | NOT USED (8b) | Transaction type (4b) | ADDRESS (32b) | DATA (32b) |
|---|---|---|---|---|
| 0011 | 00000000 | 0100 | address | data before operation |
| SWT ID (4b) | NOT USED (8b) | Transaction type (4b) | ADDRESS (32b) | DATA (32b) |
|---|---|---|---|---|
| 0011 | 00000000 | 1000 | address | number of words |
Each word is send in separate frame
| SWT ID (4b) | NOT USED (8b) | Transaction type (4b) | ADDRESS (32b) | DATA (32b) |
|---|---|---|---|---|
| 0011 | 00000000 | 1000 | word address | data |
| SWT ID (4b) | NOT USED (8b) | Transaction type (4b) | ADDRESS (32b) | DATA (32b) |
|---|---|---|---|---|
| 0011 | 00000000 | 1001 | address | number of words |
Each word is send in separate frame
| SWT ID (4b) | NOT USED (8b) | Transaction type (4b) | ADDRESS (32b) | DATA (32b) |
|---|---|---|---|---|
| 0011 | 00000000 | 1001 | address | data |
Testing framework was provided by frun36 and is available here.
The test for developers is available within the test/in-container-test directory and can be executed using the in-container-test.sh script. Running this test requires the DIM DNS server to be running on your machine. The script builds the AlfIPbus within a container and subsequently builds a container for the testing framework.
The test is conducted using three containers: ALF, Mock, and Generator. The configuration for the test is stored in test/in-container-test/common-storage/test-configuration.sh. Logs from all three containers are output to the test/in-container-test/common-storage/output directory. If all tests pass, a message will be displayed at the end of the Generator log file.