DUNE-DAQ / timinglibs

0 stars 1 forks source link
dunedaq-common dunedaq-online dunedaq-team-timing dunedaq-team-udaq

timinglibs

Overview

In a single sentence

timinglibs is a repository containing a collection of DUNE DAQ modules, which together form the timing control and monitoring DAQ application.

In a bit more detail:

The DUNE DAQ modules in timnglibs can be split in two groups:

timinglibs also provides a set of python scripts to generate the necessary json configuration files to run the aforementioned DUNE DAQ modules.

Each of the different aspects of timinglibs are described in more detail in the following sections.

DUNE DAQ Modules

Control, configuration, and monitoring

The general principle of the modules providing the timing CCM interface is that there is one hardware interface module which handles all interactions between CCM and the timing hardware. This hardware interface module receives its low level commands from controller modules, which receive higher level commands from CCM, and translate them into the low level instructions consumed by the hardware interface. Each controller module is responsible for indepdently managing a particular logical entity within the timng system, e.g. timing master, timing partition, or timing endpoint. An illustration of the envisioned timing software stack can be found below.

timing software

A diagram of the connections between timinglibs DUNE DAQ modules inside of an example timing control application is shown below.

example timing app modules

A list of the currently implemented control mdoules, along with their function, can be found below.

TimingHardwareManagerPDI

It receives hardware commands from timing controller modules, and makes the appropriate calls to PD-I timing hardware over IPBus. The interface to the timing hardware is provided by the timing package. It is also responsible for extracting operational monitoring information from timing devices, e.g. timing master, timing HSI, timing endpoint.

The module currently supports the following timing firmware and hardware combinations.

TimingMasterController

controller module providing an interface to timing master devices. It receives commands from an external source, e.g. a timing system operator or CCM, and translates those commands to timing hardware commands which are then sent to the hardware interface module. Each instance of this module is responsible for managing one particular physical timing master. The commands currently supported by the module are:

TimingPartitionController

It receives timing partition commands from an external source, e.g. a timing system operator or CCM, and translates those commands to timing hardware commands which are then sent to the hardware interface module. Each instance of this module is responsible for managing one particular logical timing partition. The commands currently supported by the module are:

TimingEndpointController

It receives timing endpoint commands from an external source, e.g. a timing system operator or CCM, and translates those commands to timing hardware commands which are then sent to the hardware interface module. The endpoint hardware commands issued by this module are addressed endpoint 0 on the timing endpint device. The commands currently supported by the module are:

HSIController

A module for controlling the HD timing implementation of an HSI. The HSI may or may not be in the same physical device as the timing master. The controller current accepts the following timing commands:

HSI readout and emulation

HSIReadout

A DUNE DAQ module for reading HSIEvent from HSI hardware. The module periodically polls the HSI firmware, and checks if there are complete events in the buffer. If there is at least one such event, the event is read out, a dfmessages::HSIEvent is constructed and sent out on the HSIEvent output queue. The interval between polls is configurable via the parameter readout_period.

FakeHSIEventGeneratorModule

In the absence of real HSI hardware, this module can be used to emululate an HSI, and act as a source of HSIEvents. The timestamp of the emulated HSIEvents is obtained from timestamp estimates provided by TimestampEstimator. The distribution of signals in the HSIEvent bitmap along with their rate are configurable via the following parameters.

Python configuration generation

The timinglibs/python/timinglibs/timing_app_confgen.py script generates a json configuration file for instantiation of timing control and monitoring application. The script takes in one argument which is the name of the produced json file. The default file name is timing_app.json. The script is also able to accept the following command line options: