Skip to main content

Control software for AIDA-2020 TLU

Project description

AIDA-TLU

tests pre-commit documentation

Repository for controlling the AIDA-2020 Trigger Logic Unit (TLU) with Python using uHAL bindings from IPbus. The Python control software is based on EUDAQ2. The software is a lightweight version written in Python with a focus on readability and user-friendliness. Most user cases can be set with a .yaml configuration file and started by executing a single Python script. For a more in-depth look at the hardware components please take a look at the official AIDA-2020 TLU project. Additionally, take a look at the documentation for this software.

Installation

IPbus

You need to install the ControlHub from the IPbus software. Follow the linked tutorial for prerequisites and general installation. Install prerequisites.

sudo apt-get install -y make erlang

Checkout from git and compile the repository.

git clone --depth=1 -b v2.8.22 https://github.com/ipbus/ipbus-software.git
cd ipbus-software
make Set=controlhub
sudo make Set=controlhub install

In case they are errors about missing man pages, you need to create them.

sudo touch /usr/lib/erlang/man/man1/gcov-tool.1.gz # example

The default install location is located in /opt/cactus/. Then start the ControlHub.

/opt/cactus/bin/controlhub_start

The contolhub needs to run for the working of the AIDA TLU, so needs to be started again each time the controlhub is stopped. The default IP address of the TLU is:

192.168.200.30

Python packages

Install the Python package as usual.

pip install -e .

To connect to the hardware, you need to install the hw component as well.

pip install -e .[hw]

Usage

There are multiple ways to use the control software of the AIDA 2020 TLU. If one executes tlu.py in the main directory, the TLU is initialized, configured and starts a run automatically.

    python tlu.py

The TLU is configured with the standard tlu_configuration file. To stop the run use ctrl+c.

While configuring the TLU outputs are powered on and off. This leads to problems in AIDA mode where the clock is powered off shortly during configuration. To avoid this at the start of runs in AIDA mode the best way is to use the aidatlu_run.py script. This is started and controlled with the terminal input:

    python -i aidatlu_run.py

This initializes the main tlu.py script. One is now able to control the TLU through the Python terminal interface, with the following commands:

    tlu.configure()
    tlu.run()
    tlu.help()

Naturally, this also works for any EUDET mode runs. Runs are stopped with the keyboard interrupt ctr+c. For more commands take a look at the python script aidatlu.py.

All configurations are done by the use of a yaml file (tlu_configuration.yaml).

Tests

With pytest the AIDA TLU control program can be tested. There is also an implemented AIDA-TLU mock, to allow tests and software development without hardware, which also allows software development and testing without a working IPbus installation. The mock is used as a default.

    pytest -sv

To test with connected hardware set an environment variable ```HW=True````:

    HW=True pytest -sv

You can also set the variable ```HW=False```` to test the mock TLU:

    HW=False pytest -sv

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aidatlu-1.3.0.tar.gz (52.1 kB view details)

Uploaded Source

File details

Details for the file aidatlu-1.3.0.tar.gz.

File metadata

  • Download URL: aidatlu-1.3.0.tar.gz
  • Upload date:
  • Size: 52.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aidatlu-1.3.0.tar.gz
Algorithm Hash digest
SHA256 4fd5ecdd612e609d793e2dfe3c5a12e5ec55cd81d77acd0f628bb4ad837860da
MD5 31a7aa94ffffcd334c2d4ea3e1c6f420
BLAKE2b-256 632dd26d6908922a460dad87890772c9cd4271077ce054472828039f79e9457e

See more details on using hashes here.

Provenance

The following attestation bundles were made for aidatlu-1.3.0.tar.gz:

Publisher: wheels.yml on SiLab-Bonn/aidatlu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page