25–29 Sept 2006
Valencia, Spain
Europe/Zurich timezone

System tests and debugging using Python

27 Sept 2006, 16:20
1h 40m
Valencia, Spain

Valencia, Spain

IFIC – Instituto de Fisica Corpuscular Edificio Institutos de Investgación Apartado de Correos 22085 E-46071 València SPAIN

Speaker

Jim Brooke (H.H. Wills Physics Laboratory)

Description

The CMS Global Calorimeter Trigger (GCT) control and test software is described. An object-oriented model of the GCT hardware, based on the CMS Hardware Access Library (HAL), was written in C++. The SWIG software interface generator was then used to produce a python interface to the model. This allows the hardware to be controlled from a python script or shell, providing a flexible environment for rapid development of hardware and firmware tests without requiring detailed knowledge of software.

Summary

The CMS Global Calorimeter Trigger control and test
software is based on an object
model of the hardware and firmware, that is itself based on
the CMS Hardware Access
Library (HAL). Classes are included to represent boards,
devices, busses, links and
firmware blocks. Each class contains methods to build and
navigate the model, and
methods to initiate operations on the hardware or firmware
component represented by
the class. A single GlobalCaloTrigger object provides a point
of entry for the user
that automatically initiates building of the model, hidden
from the user. The
navigation methods follow the physical structure of the
hardware, and the logical
structure of the firmware. For example, one may obtain
(pointers to) the module
objects from the crate object, or the firmware blocks within
an FPGA from the object
representing the FPGA. The operation methods include low-
level register read/write
commands that are generally common to all objects, and
higher-level methods that are
generally specific to the component being represented, eg.
the Link object has a
method that initiates a self-test.

A SWIG header is written for each class, including the
navigation and operation
methods, but not the build methods, as they are only
required internally. The
resulting python library allows the user to navigate and
control the hardware from a
python script, or interactively from the python shell. The user
then requires very
little software knowledge to write scripts to perform complex
operations and tests,
or to access and debug the hardware interactively. Python
scripts are also envisaged
to be the main mode of initialising the system for all modes
of operation, include
running tests and taking data.

The control software is integrated with CMS run control by
including the object model
in a XDAQ application. This allows a SOAP interface to the
object model to be
defined, which generally uses the highest-level methods on
the GlobalCaloTrigger
object. The XDAQ application also includes an embedded
python interpreter, allowing
the use of python scripts within the run control framework.

Primary author

Jim Brooke (H.H. Wills Physics Laboratory)

Co-authors

Mr Benedict Huckvale (H.H. Wills Physics Laboratory) Dr Dave Newbold (H.H. Wills Physics Laboratory) Prof. Gregory Heath (H.H. Wills Physics Laboratory) Mr Robert Frazier (H.H. Wills Physics Laboratory)

Presentation materials