the cms dt muon ddu: a pmc based interface between ...cds.cern.ch/record/479702/files/p410.pdfa pmc...

5
T h e C M S D T M u o n D D U : a P M C b a s e d i n t e r f a c e b e t w e e n f r o n t e n d a n d d a t a - a c q u i s i t i o n . B e n o t t o , F . B e r t o l i n o , F . C i r i o , R . D e l l a c a s a , G . I N F N , V i a G i u r i a 1 I - 1 0 1 2 5 T o r i n o , I t a l y c i r i o @ t o . i n f n . i t A b s t r a c t C M S w i l l u s e g a s D r i f t T u b e s ( D T ) a s a c t i v e p a r t o f t h e b a r r e l m u o n s u b - d e t e c t o r . I n t o t a l 2 0 0 . 0 0 0 w i r e s w i l l b e r e a d o u t b y T D C s a n d s i g n a l s w i l l b e s e n t t o D a t a A c q u i s i t i o n S y s t e m ( D A S ) . T h e e n t r a n c e d o o r t o t h e s t a n d a r d C M S D A S w i l l b e a b o a r d ( D e t e c t o r D e p e n d e n t U n i t - D D U ) t h a t w i l l b e s p e c i f i c t o e a c h s u b - d e t e c t o r . W e h a v e b u i l t a P C I M e z z a n i n e C a r d ( P M C ) b a s e d p r o t o t y p e o f t h e D T m u o n D D U t h a t f e a t u r e s t w o i n p u t c h a n n e l s w i t h O p t o l i n k , d a t a c h e c k a n d r e c o n s t r u c t i o n b y F P G A a n d P C I s l a v e o u t p u t t h r o u g h a F I F O . A d e s c r i p t i o n o f t h e b o a r d a n d t h e F P G A s c h e m a t i c s w i l l b e g i v e n t o g e t h e r w i t h t h e l a b s e t u p u s e d t o t e s t a n d d e b u g i t . I . I NTRODUCTION. T h e r e c o g n i t i o n a n d m e a s u r e m e n t o f m u o n s i n t h e b a r r e l p a r t o f t h e C M S d e t e c t o r i s p e r f o r m e d c o m b i n i n g d r i f t c h a m b e r s w i t h r e s i s t i v e p l a t e c h a m b e r s [ 1 ] . T h e d r i f t c h a m b e r s d e t e c t o r ( D T ) c o n s i s t s o f a s e t o f 4 8 c o n c e n t r i c l a y e r s o f d r i f t t u b e s a r r a n g e d i n 4 s t a t i o n s , e a c h w i t h 1 2 w i r e p l a n e s . T h i s p a r t o f d e t e c t o r a l l o w s f i r s t l e v e l t r i g g e r i n g a n d m e a s u r e m e n t o f t h e m o m e n t u m o f t h e i n c o m i n g m u o n s . T h e r e s i s t i v e p l a t e c h a m b e r s , a r r a n g e d i n f o u r l a y e r s a s f o r t h e D T s , a r e u s e d a s a n i n d e p e n d e n t t r i g g e r [ 2 ] . Figure 1: Transverse view of the CMS detector W i t h t h i s s y s t e m i t w i l l b e p o s s i b l e t o m e a s u r e t h e m o m e n t u m o f a m u o n w i t h 1 0 G e V < p T < 1 T e V , | η | < 1 w i t h a r e l a t i v e e r r o r o f 0 . 5 7 % . T h e D T p a r t o f t h e d e t e c t o r f e a t u r e s a t o t a l o f 2 0 0 . 0 0 0 w i r e s , e a c h c o n n e c t e d t o a V L S I T D C l o c a t e d a t t h e c h a m b e r s e n d . T h e T D C p r o v i d e s a m e a s u r e m e n t o f t h e t i m e o f a r r i v a l o f t h e c h a r g e s o n t h e w i r e w i t h a r e s o l u t i o n o f 1 2 b i t s . O n c e d a t a a r e d i g i t i s e d , a s e t o f b o a r d s m o u n t e d o n t h e c h a m b e r s e n d s g a t h e r s t h e m [ 3 ] ; d a t a a r e f i r s t a s s e m b l e d a t t h e c h a m b e r l e v e l ( e a c h c h a m b e r h a s 1 2 l a y e r s o f w i r e s ) b y t h e R e a d o u t B o a r d s ( R O B s ) , t h e n a t t h e s e c t o r l e v e l ( C M S i s d i v i d e d i n 1 2 φ a n d 5 R s e c t o r s , a d d i n g u p t o 6 0 o f t h e m ) b y t h e R e a d o u t S e r v e r ( R O S ) . F i g u r e 1 s h o w s t h e t r a n s v e r s e s e g m e n t a t i o n o f C M S ; p i n k r e c t a n g l e s a r e t h e 4 l a y e r s o f b a r r e l m u o n c h a m b e r s . O n l y d a t a t h a t p a s s t h e f i r s t l e v e l t r i g g e r a r e s e n t f r o m t h e d e t e c t o r f r o n t e n d b u f f e r s t o t h e D A S . T h e C M S D A S [ 4 ] i s o r g a n i z e d i n 3 l a y e r s , a s i t c a n b e s e e n i n F i g u r e 2 : a R e a d o u t S y s t e m t h a t r e c e i v e s d a t a f r o m t h e f r o n t e n d , a n E v e n t B u i l d e r t h a t r e c o n s t r u c t s t h e d a t a f r a g m e n t s a n d a F i l t e r S y s t e m w h e r e a l l h i g h l e v e l t r i g g e r a l g o r i t h m s a r e r u n . F r o m t h e R e a d o u t S y s t e m o n w a r d s , a l l t h e h a r d w a r e i s n o l o n g e r c u s t o m f o r t h e v a r i o u s s u b - d e t e c t o r s . T h e l a s t c u s t o m p a r t i s a n i n t e r f a c e b o a r d , l o c a t e d a t t h e v e r y e n t r a n c e o f t h e R e a d o u t S y s t e m , t h a t a l l o w s r e c e p t i o n o f d a t a f r o m t h e f r o n t e n d s a n d h a n d s h a k i n g w i t h t h e s t a n d a r d D A S : s u c h a b o a r d i s c a l l e d D e t e c t o r D e p e n d e n t U n i t ( D D U ) . Figure 2: Block diagram of the CMS data acquisition system I I . D RIFT T UBES D D U FUNCTIONALITIES. T h e D e t e c t o r D e p e n d e n t U n i t i s t h e l a s t c u s t o m m o d u l e t h a t w i l l b e u s e d i n t h e C M S d a t a a c q u i s i t i o n s y s t e m . I t h a s t o e n s u r e t h e c o r r e c t d a t a f l o w b e t w e e n f r o n t e n d a n d e v e n t b u i l d e r a n d i t h a s t o o f f e r t h e p o s s i b i l i t y o f r e a d i n g o u t d a t a i n a n i n d e p e n d e n t w a y ;

Upload: others

Post on 03-Jun-2020

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The CMS DT Muon DDU: a PMC based interface between ...cds.cern.ch/record/479702/files/p410.pdfa PMC based interface between frontend and data-acquisition. Benotto, F. Bertolino, F

The CMS DT Muon DDU:

a PMC based interface between frontend and data-acquisition.

Benotto, F. Bertolino, F. Cirio,R. Dellacasa,G.

INFN, Via Giuria 1 I-10125 Torino, Italy [email protected]

Abstract CMS will use gas Drift Tubes (DT) as active part of

the barrel muon sub-detector. In total 200.000 wires will be readout by TDCs and signals will be sent to Data Acquisition System (DAS). The entrance door to the standard CMS DAS will be a board (Detector Dependent Unit - DDU) that will be specific to each sub-detector. We have built a PCI Mezzanine Card (PMC) based prototype of the DT muon DDU that features two input channels with Optolink, data check and reconstruction by FPGA and PCI slave output through a FIFO. A description of the board and the FPGA schematics will be given together with the lab setup used to test and debug it.

I. INTRODUCTION. The recognition and measurement of muons in the

barrel part of the CMS detector is performed combining drift chambers with resistive plate chambers [1]. The drift chambers detector (DT) consists of a set of 48 concentric layers of drift tubes arranged in 4 stations, each with 12 wire planes. This part of detector allows first level triggering and measurement of the momentum of the incoming muons. The resistive plate chambers, arranged in four layers as for the DTs, are used as an independent trigger [2].

Figure 1: Transverse view of the CMS detector

With this system it will be possible to measure the momentum of a muon with 10 GeV < pT < 1 TeV, |η|<1 with a relative error of 0.5 – 7%.

The DT part of the detector features a total of 200.000 wires, each connected to a VLSI TDC located at the chamber’s end. The TDC provides a measurement of the time of arrival of the charges on the wire with a resolution of 12 bits. Once data are digitised, a set of boards mounted on the chambers’ ends gathers them [3]; data are first assembled at the chamber level (each chamber has 12 layers of wires) by the Readout Boards (ROBs), then at the sector level (CMS is divided in 12 φ and 5 R sectors, adding up to 60 of them) by the Readout Server (ROS). Figure 1 shows the transverse segmentation of CMS; pink rectangles are the 4 layers of barrel muon chambers.

Only data that pass the first level trigger are sent from the detector frontend buffers to the DAS. The CMS DAS [4] is organized in 3 layers, as it can be seen in Figure 2: a Readout System that receives data from the frontend, an Event Builder that reconstructs the data fragments and a Filter System where all high level trigger algorithms are run. From the Readout System onwards, all the hardware is no longer custom for the various sub-detectors. The last custom part is an interface board, located at the very entrance of the Readout System, that allows reception of data from the frontends and handshaking with the standard DAS: such a board is called Detector Dependent Unit (DDU).

Figure 2: Block diagram of the CMS data acquisition system

II. DRIFT TUBES DDU FUNCTIONALITIES. The Detector Dependent Unit is the last custom

module that will be used in the CMS data acquisition system. It has to ensure the correct data flow between frontend and event builder and it has to offer the possibility of reading out data in an independent way;

Page 2: The CMS DT Muon DDU: a PMC based interface between ...cds.cern.ch/record/479702/files/p410.pdfa PMC based interface between frontend and data-acquisition. Benotto, F. Bertolino, F

this last feature will be useful during the setup phase of the detector and, once the whole detector will be run, during periods when the general DAS will be not available. To summarize, the following are the services that the DDU has to implement:

• receive data from frontend and check consistency;

• store data in a memory readable from DAS;

• store data in a memory readable from a local CPU;

• look for errors and eventually take appropriate actions.

Data from the frontend are sent to the DDU via optical serial links; each of the 60 sectors in which CMS is divided leads one link. It is foreseen to have an occupancy of 1 track per sector per event. Each track has 48 space points for a total of 144 bytes plus some 22 overhead (header/trailer,…) bytes. The CMS DAS, at the DDU level, asks for a 2 kBytes event: this implies that the maximum number of channels per DDU for the drift tubes detector will be 2k/166≈12. If one builds boards with 12 channels each, 5 boards will be needed for the whole DT. The number of channels per board will be decided once the exact components will be available, allowing a correct estimate of the space occupied; cost matters will also be considered. The actual guess is to use VME standard; not yet decided is the dimension 9U or 6U. With any of the choices, the whole setup needed for DTs will be housed in a single crate.

Figure 3: The muon drift tubes DDU crate

The DDUs will be responsible for giving the chance of having an acquisitions system independent from the standard CMS DAS. The DDU crate will house a CPU that, using the VME bus, will allow readout of data in parallel with CMS DAS. This feature will be used for monitoring during standard operation (spying) or as unique readout when the CMS DAS will be unavailable or not yet mounted (during detector assembly in the ground hall, for example). Data read by the CPU can be

locally treated and results will be available to any concerned user via a link (say Ethernet).

The DT frontend gathers data from the various chambers within a sector and sends them to the DDU as a sequence of 9-bit words. DDUs will receive them via a serial optical link. The first DDU duty is to check that transmission and data consistency are correct. This is done using the error code of the link and checking that the header-data-trailer sequence is correct. The event is then re-formatted: 9-bit words are assembled into 32-bit words, new headers/trailers are substituted to the previous ones. At this stage it can be eventually performed a reordering of data words, to speed up high level triggers decision times; this has to be very carefully evaluated because purely hardware operations can be very difficult to be implemented in FPGAs.

Formatted data are stored in a memory that can be accessed both by DAS and by local readout. The memory has to be 32-bit wide and should have a depth that allows the storage of some hundred events. The memory should be readout in a FIFO-like mode using the fastest speed available by the output transfer bus. This reflects, for the actual prototype, in using a FIFO that can be readout with DMA in PCI.

The DDU has to be ready to react in case any error condition is reached both within the DDU itself and/or in the frontend electronics. Error messages are contained in the data received from the frontend; they are decoded and checked in the first actions taken by DDU. These errors include buffer-full, readout-error, chamber-malfunctioning. The locally generated errors include buffer-full, transmission-error, timeout-in-data-reception. The actions that DDU takes are twofold:

• include error code in data for further slow action;

• signal error with an interrupt for immediate fast action.

All the design of the DDU has to take into account the speed of data arrival: it is foreseen that on average each sector will send its data (166 Bytes) every 10µs, speed of the Level_1_accept (trigger). This adds up to a data throughput of 64 Mbits/s as DDU input. The output speed (essentially the speed needed for the output memory) has to be compatible with the data transfer rate allowed by data bus. The actual rate is 66 MHz obtainable with PCI.

III. PROTOTYPES AND LAB TEST SETUP. The development of the DDU and its related hardware

and software is being done on a several years span. The frontend is developed and built in the laboratories of Padova and Madrid, while the DAS (in particular the RUI) is being built at CERN. To allow debugging and test of the system in a standalone mode, we have built and assembled a number of boards that add up to a complete readout. The heart of the lab test setup is a VME CPU.

Page 3: The CMS DT Muon DDU: a PMC based interface between ...cds.cern.ch/record/479702/files/p410.pdfa PMC based interface between frontend and data-acquisition. Benotto, F. Bertolino, F

The data coming from the frontend are simulated with a PMC board nicknamed PTT. Two versions of the DDU have been built so far: a VME board housing a single input channel and a PMC board with two input channels. When using the PMC version of the DDU, the PCI bus of the CPU is expanded with Motorola PMC span boards. Figure 4 shows the lab setup that is used with the PMC version of the DDU.

Figure 4: The laboratory test setup block diagram

A. Frontend electronics simulator (PTT). Time of arrival is digitised with TDCs located at wire

ends. Data are then grouped at the chamber and at the sector level to be sent to the DDUs. As data are sent via 8-bit optical serial links, the format is structured in corresponding way. The data format for an event is listed in Tables 1a and 1b.

Table 1a: Frontend data format for an empty event

Table 1b: Frontend data format for a typical event

With data N.of bytes Type Start ROS 1 Control Event number TTC 3 Data Format=Data 3 –byte 1 Data Start ROB 1 Control ROB address 1 Data Datum 1 [23:16] 1 Data Datum 1 [15:8] 1 Data Datum 1 [7:0] 1 Data …

Datum n 3 Data Start ROB 1 Control ROB address 1 Data Datum 1 3 Data … Datum n 3 Data Start ROB 1 Control ROB address 1 Data Datum 1 3 Data … Datum n 3 Data Start ROB 1 Control ROB address 1 Data Datum 1 3 Data … Datum n 1 Data Start ROB 1 Control ROB address 1 Data Datum 1 3 Data … Datum n 1 Data End 1 Control Status 1 Data End Data 1 Control

Data (48 hits) 144 Overhead 22

Total 166

The PTT is a simple PMC board that houses a PCI bridge PLX 9050, a 2k*9-bit FIFO IDT72231-15-J and a serial link Cypress Hotlink CY7B923-JC run at 20 MHz. The FIFO can be written and read from PCI. This operation allows checking the correct behaviour of the board. Once data are being loaded on the FIFO, it can be started an asynchronous transfer toward the DDU via the serial link with a PCI command. The PPT has been used to test both the VME and the PMC versions of the DDU.

Figure 5: Block diagram of the PTT PMC board

Without data N.of bytes Type Start ROS 1 Control Event number TTC 3 Data End 1 Control

Data (0hits) 0 Overhead 5

Total 5

Page 4: The CMS DT Muon DDU: a PMC based interface between ...cds.cern.ch/record/479702/files/p410.pdfa PMC based interface between frontend and data-acquisition. Benotto, F. Bertolino, F

A description of the board can be found in [5].

B. VME version of the DDU prototype. The first version of the drift tubes DDU has been

realized implementing one input channel on a 6U VME board. The reason for such a choice was uniquely practical and related to the need of learning the FPGA programming and the PCI bridges use on two separate boards: it has been chosen to learn the former using the well known VME bus. The data are input on a Cypress Hotlink CY7B933, stored on a 2k*9-bit IDT72231 input FIFO. The Xilinx XC4005EPG156 is used to transform the 9-bit words in 32-bit output words. Data are then stored on two 256*18-bit CY7C4205 output FIFOs that can be readout in slave mode via VME. Both input and output FIFOs can be written by VME for debugging. The frequency of the Xilinx clock is 4 MHz and the frequency of the Hotlink clock is 20 MHz. The board has been successfully tested in a lab test bench that included a ROB prototype built in CIEMAT Madrid. A description of the board can be found in [6].

C. PMC version of the DDU prototype. During 2000 it has been built a PMC prototype of the

DDU. It has been decided to have two channels on the same board, to allow complete testing of the input protocol that the FPGA has to handle. Data can be received on an optical fibre by a Hewlett Packard HFBR5208 or on the electric input of the Cypress Hotlink CY7B933-SC, used at the frequency of 20 MHz. Then each channel stores them on a 2k*9-bit FIFO. At this stage data are checked for transmission errors (parity, interrupted link) and for the correct sequence header-trailer. As transmission is asynchronous, it is implemented a 200 µs timeout protocol that forbids DDU from being in an infinite waiting loop. Data are then merged in the two FPGAs Xilinx XCS40XL-4PQ240c. The appropriate header is written, error conditions from the frontend are checked and then, if no error is present, after having written all data from the first input-FIFO that showed data, the reading procedure passes to the second input-FIFO. If no errors are found, the event is closed with the appropriate trailer and the DDU is set again in a waiting state. If errors are found, the error code is written in the status word of the event and, if it is enabled, an interrupt is sent to the control CPU. Table 2 contains the format of the data as they are written on the output memory.

Table 2: Format of data at the DDU output

HEADER

Event Number

Data 1 - ROS 1

Data 2 - ROS 1

……………

Data n - ROS 2

STATUS

Word count

TRAILER

The DDU has a control register and a status register that allow the selection and the verification of the several features of the board. Table 3 shows the detail of the bits of the control register.

Table 3: Detail of the control register bits.

Bit name Action taken …if… Available in mode :

Bit 0 State SETUP/RUN

Always W

Bit 1 Reset STRG Always W Bit 2 Reset ITRG Always W Bit 3 Enable

Interrupt 0 In Fifo A Almost Full

W in Setup State

Bit 4 Enable Interrupt 1

In Fifo A Full “

Bit 5 Enable Interrupt 2

In Fifo B Almost Full

Bit 6 Enable Interrupt 3

In Fifo B Full “

Bit 7 Enable Interrupt 4

Event Number Mismatch

Bit 8 Enable Interrupt 5

Out Fifo Almost Full

Bit 9 Enable Interrupt 6

Out Fifo Full “

Bit 10 Enable Interrupt 7

Timeout 1 RosA

Bit 11 Enable Interrupt 8

Timeout 1 RosB

Bit 12 Enable Interrupt 9

Timeout 2 RosA

Bit 13 Enable Interrupt 10

Timeout 2 RosB

Bit 14 Enable Interrupt 11

Interrupted link in ROS A

Bit 15 Enable Interurpt 12

Parity error Link A

Bit 16 Enable Interrupt 13

Interrupted link in ROS B

Bit 17 Enable Interrupt 14

Parity error Link B

Page 5: The CMS DT Muon DDU: a PMC based interface between ...cds.cern.ch/record/479702/files/p410.pdfa PMC based interface between frontend and data-acquisition. Benotto, F. Bertolino, F

When an error is found, if the control register is set in such a way to allow it, an interrupt is issued. When the control CPU will look at this interrupt, it should read the Interrupt Register in such a way that the appropriate action is taken for the various cases that can cause an interrupt to be issued In Table 4 the bits of this register are shown.

Table 4: Detail of the Interrupt Register

Bit 0 In Fifo A Almost Full Interrupt 0 Bit 1 In Fifo A Full Interrupt 1 Bit 2 In Fifo B Almost Full Interrupt 2 Bit 3 In Fifo B Full Interrupt 3

Bit 4 Event Number Mismatch

Interrupt 4

Bit 5 Out Fifo Almost Full Interrupt 5 Bit 6 Out Fifo Full Interrupt 6

Bit 7 Timeout 1 Link A Interrupt 7 Bit 8 Timeout 2 Link A Interrupt 8 Bit 9 Timeout 1 Link B Interrupt 9 Bit 10 Timeout 2 Link B Interrupt 10 Bit 11 Link A interrupted Interrupt 11 Bit 12 Parity error Link A Interrupt 12 Bit 13 Link B interrupted Interrupt 13 Bit 14 Parity error Link B Interrupt 14

The PLX 9080 PCI bridge allows DMA transfers, 32-bits and 33 MHz clock; it is foreseen to use the board as a PCI slave. Figure 6 shows the block diagram of the board. It can be seen the parallel structure of the two channels up to the control and merge FPGAs. After the Xilinx, data proceed on an unique row. In a board with more than 2 input channels, the part to be modified would be the one ahead of the Xilinx.

Figure 6: PMC version of the muon DT DDU prototype

Details of the board can be found in reference [7].

D. Control CPU and operating system. The lab test setup uses a Motorola MVME2301 VME

CPU, with a PPC 603 processor. It can house up to two PMCs, thus allowing test and debug of two boards at one time without need of an extension. To be able to use 6 boards, the Motorola PMC-span VME boards are used. The operating system is VxWorks with the Tornado 2 development environment. All programs are written in C and C++.

IV. CONCLUSIONS. The entrance door for frontend data of the CMS barrel

muon drift tubes detector will be made using a board, named Detector Dependent Unit in the CMS DAS jargon, that will allow merging of data, re-formatting, error check, data monitoring and spying. Two prototypes have been realized, in VME and PMC form factors; to test them in the lab other boards have been built. The prototypes have been and are being used with the prototypes of frontend boards realized in CIEMAT Madrid. It is foreseen to build the final DT DDUs in VME, either 6 or 9U.

V. REFERENCES 1. The Compact Muon Solenoid technical proposal

CERN/LHCC 94-38, 15 December 1994

2. The muon project technical design report CERN/LHCC 97-32, 15 December 1997

3. Properties and performances of a frontend ASIC prototype for the readout of the CMS Barrel Muon Drift Tubes Chambers – CMS Note 1999/033

4. http://cmsdoc.cern.ch/cms/TRIDAS/html/tridas.html

5. http://www.to.infn.it/esperimenti/CMS/electronics/PTT

6. http://www.to.infn.it/esperimenti/CMS/electronics/pDDU

7. http://www.to.infn.it/esperimenti/CMS/electronics/DDU2000