Project

General

Profile

ALTI Usage Atlas TDAQ Lab

An ALTI module has been installed in the ATLAS playground ; this page documents how to use it.

Photo of ALTI module in temporary VME crate

LOCAL NIKHEF SCRIPTS

The series of commands illustrated in the sections below, while ultimately allowing one to configure the ALTI for the automatic generation of random or periodic TTC patterns, is quite cumbersome and requires a certain level of understanding of the TTC and of the ALTI systems. To simplify the usage of that series of commands, I created a simple bash script that:
  • checks that the TDAQ drivers cmem_rcc and vme_rcc are running
  • checks that the ATLAS TDAQ software repository is reachable via CVMFS
  • checks that the VME bus is configured and an ALTI module is present in slot 2
  • resets and initializes the ALTI module
  • configure the ALTI modules for some basic task, like the generation of periodic or random L1A's.

The script is /project/atlas/antonio/bin/alti.sh.

The script is still a work-in-progress; it provides the very basic functionality of choosing either a periodic trigger or a random trigger with a specified average frequency.

$ alti.sh -h
-h   print this help message 
-o         periodic L1A      (once per orbit)         
-p Rate periodic L1A (with rate ~ Rate)
-r Rate random L1A (with average rate ~ Rate)

Introduction to TTC and ALTI

The Atlas Local Trigger Interface (ALTI) is a replacement of the old TTC system based on the TTCvi board (more specifically, it merges the functionalities of the TTCvi, TTCex, LTP and LTPi boards).

The TTC system has been described in several documents, among the others: The ALTI system itself has been documented in detail in several documents, among the others:

The ALTI is a 6U VME64x module and therefore needs to be inserted in a crate with a VME64x backplane. The crate we use in N221 at Nikhef is on loan from CERN; to aid the re-booting of the SBC we control its power via a remotely controllable device, that can be controlled via a web interface reachable from a browser running on rother at the address 192.168.0.100

Pre-Requisites

To keep the compatibility with the ATLAS VME software, we use a crate-controller SBC of CCT. The SBC currently in use has been configured with the host name alhama.

In addition, a number of ATLAS TDAQ software components need to be installed:
  • a number of device drivers (most notably vme_rcc), started by the script /etc/drivers_tdaq/drivers_tdaq.sh, which is invoked at boot time by a systemd service, /usr/lib/systemd/system/drivers_tdaq.service (symbolically linked in /etc/systemd/system/multi-user.target.wants/). The version of the vme_rcc driver used with CentOS was /cvmfs/atlas.cern.ch/repo/sw/tdaq/tdaq/tdaq-09-04-00; with Alma Linux 9.2 is /cvmfs/atlas.cern.ch/repo/sw/tdaq/tdaq/tdaq-11-01-00.
    • N.B. It is crucial that, during the boot sequence, cvmfs be already running before systemd attempts to load the ATLAS TDAQ drivers. This has been achieved by modifying the /etc/drivers_tdaq/drivers_tdaq.sh script, but I cannot say that I consider it a robust solution.
    • N.B. In addition to loading the drivers, the /etc/drivers_tdaq/drivers_tdaq.sh script also configures the VME bus invoking vmeconfig.
  • the user bash environment must be properly configured by sourcing the ATLAS TDAQ setup, e.g. source /cvmfs/atlas.cern.ch/repo/sw/tdaq/tools/cmake_tdaq/bin/cm_setup.sh.

Configuring the ALTI module

Having set up the ATLAS TDAQ environment (currently tdaq-09-04-00), gives access to the installed tools necessary to configure the ALTI module.

The ALTI can be fully configured and controlled with the interactive program menuAltiModule. While this program gives access to all ALTI features, it is more of an expert tool and not the best choice for a quick configuration of a desired TTC sequence.

For an automatic configuration, the recommended tool is testAltiInitial:

$ testAltiInitial -h
-s   ALTI slot number            (def = 13) 
-R         Reset  ALTI                  (def = "NO")
-S Setup ALTI (def = "NO")
-C Config ALTI (def = "NO")
-f file Config ALTI file (def = "NO" => default config)
-B Change ALTI VME base address (def = "NO")
-b ALTI VME base address (def = 0x10000000)
-c         Check  ALTI                  (def = "NO")
-r Read ALTI config (def = "NO")
-o file Read ALTI config file (def = "NO" => terminal printout)

The first operation to be performed is to initialize the ALTI (currently in slot 2) by executing:
$ testAltiInitial -s 2 -R -S -c

The ALTI can then be configured by loading the appropriate file:
$ testAltiInitial -s 2 -C -f ConfigurationFileName

Alti Configuration File

Several examples of ALTI configuration files can be found in /cvmfs/atlas.cern.ch/repo/sw/tdaq/tdaq/tdaq-09-04-00/installed/share/data/ALTI.

For usage in the laboratory, typically is recommended a configuration file like AltiModule_Pattern_Generator_cfg.dat:
$ testAltiInitial -s 2 -C -f /cvmfs/atlas.cern.ch/repo/sw/tdaq/tdaq/tdaq-09-04-00/installed/share/data/ALTI/AltiModule_Pattern_Generator_cfg.dat

This configuration file is compatible with firmware version FW#1, while the configuration file in https://gitlab.cern.ch/atlas-tdaq-software/ALTI/-/tree/master/data is compatible with firmware version FW#2. The gitlab master-branch configuration file is kept up to date, and it contains useful features (e.g. automatic ECR generation CTP_ECR_GENERATION = INTERNAL,LEN=4,FRQ=200000000,BEF=40000,AFT=40000,OFF=1000) that may be imported manually into the file used locally in our test setup.

In the configuration specified in AltiModule_Pattern_Generator_cfg.dat, the ALTI generates all signals internally (as opposed to receiving them from a local trigger processor), repeatedly generating the sequence loaded in its memory by the testAltiInitial program, which in turn is content of the file specified by the MEM_PG_FILE variable in the configuration file.

Examples of these memory-programming files are also provided in /cvmfs/atlas.cern.ch/repo/sw/tdaq/tdaq/tdaq-09-04-00/installed/share/data/ALTI and their syntax is described in the ALTI Module Documentation. E.g. the file /cvmfs/atlas.cern.ch/repo/sw/tdaq/tdaq/tdaq-09-04-00/installed/share/data/ALTI/pg_alti.dat will lead to the generation of periodic L1 Accepts, one per LHC orbit. Such memory-programming files can be created by hands, but in the ALTI software repository is also provided some tools to aid the creation of files performing typical TTC signal sequence.

E.g. the program testPatternGenerator can be used to generate a memory-programming file that will cause the ALTI to generate L1 Accepts with a random pattern, and configurable deadtime and bunch-groups. The testPatternGenerator program must be provided an input file, like /cvmfs/atlas.cern.ch/repo/sw/tdaq/tdaq/tdaq-09-04-00/installed/share/data/ALTI/testPatternGenerator_cfg.dat, specifying the average L1A rate, the name of the output memory-programming file, etc. For example, executing

$ testPatternGenerator /cvmfs/atlas.cern.ch/repo/sw/tdaq/tdaq/tdaq-09-04-00/installed/share/data/ALTI/testPatternGenerator_cfg.dat

will generate an output file pg_alti_1kHz.dat. The file name pg_alti_1kHz.dat can then be inserted in the MEM_PG_FILE variable of the AltiModule_Pattern_Generator_cfg.dat configuration file.

Implementation of local Nikhef ALTI script

The script is based on the programs in the TDAQ ALTI repository, and it creates on the fly some configuration files starting from some templates that are then modified on the fly before invoking testAltiInitial.

For the generation of a random L1A, it relies on the testPatternGenerator program (see above).

For the generation of a periodic L1A, I wrote a dedicated program /project/atlas/antonio/sw/alti/periodic_L1A.

Manual configuration using low-level tools

Here we list a number of options for the low-level control of the ALTI that may be useful for the purpose of debugging.

$ source /cvmfs/atlas.cern.ch/repo/sw/tdaq/tdaq/tdaq-09-04-00/installed/setup.sh
$ testAltiInitial -s 2 -c
$ menuAltiModule

Change of ALTI firmware

On March 3 2024, Antonio and Frans changed the ALTI firmware following the instructions of Antoine Marzin. These are summarized below:
  • we connected a Xilinx programmer to the Xilinx Artix 7 FPGA on the ALTI module, through a flat cable connector located on the right side of the module
    • for this you need access to the ALTI module right side while the module is in the VME crate, so we removed the aluminium cap and moved the ALTI to slot 3;
  • the ALTI firmware is located in https://gitlab.cern.ch/atlas-ttc-firmware/alti-firmware
    • I had no access to that and so Antoine provided me the two files alti_top_16701220.bit and alti_top_update_FW2_0x16701220.bin
    • I saved the two files in /project/atlas/antonio/sw/alti/firmware;
  • we used Vivado to download alti_top_16701220.bit;
  • following Antoine's instructions, we flashed it with testAltiQuickBoot -s 3 -f ./alti_top_update_FW2_0x16701220.bin -L YES
    • to use testAltiQuickBoot we had to configure the environment as follows:
      • source /cvmfs/atlas.cern.ch/repo/sw/tdaq/tools/cmake_tdaq/bin/cm_setup.sh
      • mkdir /user/antonio/afs.cern.ch
      • add the following lines to ~antonio/.ssh/config
      • sshfs {:/afs/cern.ch/atlas/project/tdaq/level1/ctp} /user/antonio/afs.cern.ch
      • source /user/antonio/afs.cern.ch/l1ct-11-02-02/installed/setup.sh
Add picture from clipboard (Maximum size: 244 MB)