1. CSM MiniDAQ2.0.0 Quickstart Guide
    1. University of Michigan
      1. Contents
        1. Section Page
          1. Appendixes
          2. B. Data Formats . . . . . . . 30
          3. C. Programmable Parameters of AMT Mezzanine Card . 33
      2. 1 Introduction to the CSM MiniDAQ and Installation
      3. 2 Installation and Starting the CSM MiniDAQ
      4. JTAG Programming
          1. Applying individual setting to mezzanine card:
      5. Acquisition Runs
      6. 5  Diagnostic Tools
            1. Loop on Register: It allows user to read/write any VME address with any wanted data and it is also allowed to check read data to expected values, where the corresponding LED will indicate the compared results (green = OK, red = Error). The loop on register panel is shown in Figure 16.
            2. There are three ways to select desired register by its name, address or address given by user. To active wished the way, click on corresponding area and select wanted register or VME address, other two will be automatically in idle mode. Push to start loop and to stop loop, and loop time is also displayed. Exit the loop on register panel by hitting button.
          1. Examples for CSM-0 Board Diagnostics
          2. DAQ Diagnostics
          3. Trigger Controls à Read VME FIFO will ask user to give number of data words to be read from VME FIFO, and read VME FIFO word by word, i.e., block transfer is not used. The data words are written to standard output.
      7. Appendix A.  References
            1. [1] “ATLAS MiniDAQ Reference Guide”, B. Ball, J. Chapman, J. Hollar, J. Kuah, J. Gregory. University of Michigan. June, 2001.
      8. Appendix B.  Data Formats
            1. B.1 CSM Words
            2. CSM HEADER
            3. *** The CSM parity error word is only available by using new CSM-0 boards that are manufactured in February of 2002, where the PROM in CSM daughter board with version number 0x10006 or higher must be used. Only the CSM error word is sent out if an event has both detected event error (for instance EVID mismatch) and parity error at same time. In other word, the CSM error word takes priority.
            4. B.2 TDC Words
            5. TRAILING EDGE DATA
      9. Appendix C.  Programmable Parameters of AMT Mezzanine Card
            1. C.1 AMT Main Setup Panel
          1. Name in AMT Main Setup Panel (AMT Name) [DEFAULT] Description
            1. C.2 AMT Error Control Panel
          2. Name in AMT Error Control Panel (AMT Name) [DEFAULT] Description
            1. C.3 ASD Setup Panel
          3. Name in ASD Setup Panel [DEFAULT] Description

CSM MiniDAQ2.0.0 Quickstart Guide

 

 

 

 

 

 

 

 

 

 

CSM MiniDAQ2.0.0 Quickstart Guide

 

 

University of Michigan

March 21, 2002

 

T.S. Dai and J. Gregory

 

 

 

 

 



Contents

 

Section  Page

 

1.   Introduction to the CSM MiniDAQ  .  .  .  .  3

2.   Installation and Starting the CSM MiniDAQ  .  .  .  4

3.   JTAG Programming  .  .  .  .  .  .  6

    1. Connecting the hardware  .  .  .  .  .  6
    2. JTAG Menu  .  .  .  .  .  .  .  6
    3. Programming AMT Mezzanine Cards Using JTAG menu  .  8
    4. Programming AMT Mezzanine Cards Using Saved Profile  .  10
    5. Copy Mezzanine Card Settings  .  .  .  .  11

4.  Acquisition Runs  .  .  .  .  .  .  .  12

    1. CSM Input Channel Control (TDC Enable and Control)  .  12
    2. Run Settings  .  .  .  .  .  .  .  13
    3. Starting run and Collecting Data  .  .  .  .  17

5.   Diagnostic Tools  .  .  .  .  .  .  .  18

 5.1   Using Board Test Menu  .  .  .  .  .  18

 5.2   Using the JTAG Diagnostics panel  .  .  .  .  19

 5.3   Using the CSM-0 Diagnostic panel  .  .  .  .  24

 5.4   Run DAQ with Software Trigger  .  .  .  .  27

 5.5   Other useful tools  .   .  .  .  .  .  27

Appendixes

A.  References  .  .  .  .  .  .  .  29

B.  Data Formats  .  .  .  .  .  .  .  30

 B.1   CSM Words  .  .  .  .  .  .  .  30

 B.2   TDC Words  .  .  .  .  .  .  .  31

 B.3   Data buffer  .  .  .  .  .  .  .  32

C.   Programmable Parameters of AMT Mezzanine Card  .  33

 C.1   AMT Main Setup Panel  .  .  .  .  .  33

 C.2 AMT Error Control Panel  .  .  .  .  .  35

 C.3   ASD Setup Panel   .  .  .  .  .  .  36



1   Introduction to the CSM MiniDAQ and Installation

CSM MiniDAQ is software developed at the University of Michigan using National Instruments LabWindows/CVI (part of Measurement Studio) and is a specialized version of the ATLAS MiniDAQ software for use with the CSM-0 Module also developed at the University of Michigan. The purpose of the ATLAS MiniDAQ is to provide access to the CSM and AMT hardware in an easy to use windows interface. The ATLAS MiniDAQ has three major functions: JTAG programming, data acquisition, and hardware diagnostics.

 

The MiniDAQ2.0.0 is developed for Octal Mezzanine Card where AMT2 is used. More detailed information on the CSM and ATLAS MiniDAQ [1], the AMT [2] and the CSM project [3] can be found in their respective manuals. This guide is designed to be a guide to users new to the CSM MiniDAQ and combine the most commonly needed aspects of several sources into one concise guide.

 

The distribution version of the CSM MiniDAQ is version 2.0.0, which is developed from CSM MiniDAQ version 1.3.3 with many upgrades and is not compatible with version 1.3.3. The screen shots in this guide are from versions 2.0.0 only.

 

This guide assumes you are using a National Instruments VME interface for the CSM card. If you are not using a National Instruments compatible controller card, the standard CSM MiniDAQ distribution will not work and the code will need to be modified to take into account the different driver.

 

Any suggestion and comment are welcome. Also if you have any problem, please contact J. Wehrley Chapman at umjwc@umich.edu or T.S. Dai at daits@umich.edu .



2  Installation and Starting the CSM MiniDAQ

 

Installation and Build Option:

 

To install the CSM MiniDAQ2.0.0, first get the MiniDAQ2.0.0 distribution kit from http://atlas.physics.lsa.umich.edu/docushare/dscgi/ds.py/View/Collection-178/ . Then run the setup.exe where user is able to modify the installation path.

 

A file <constant.h> is included in the 2.0.0 distributions of CSM MiniDAQ. This file contains build options and parameters that can be changed to reflect hardware upgrades. The main build options are FIREWIRE , PDT_ONLY , and ENVIRO_CHECK . If a FIREWIRE (IEEE 1394) VME interface is in use, the diagnostic menu does not print the VME FIFO correctly unless the line #define FIREWIRE is uncommented. PDT_ONLY tells the CSM MiniDAQ to use only programmed IO instead of block transfers when collecting data (note: this does not affect the diagnostics panel which uses block transfers). To use block transfers, comment out the line #define PDT_ONLY . Finally, ENVIRO_CHECK includes support for using an ADC card to take measurements of temperature, pressure, and humidity and also to use these as a feedback control on the chamber. The calibration is specific to the Univ ersity of Michigan cosmic ray test, but the code can be easily modified to use different ADC and DAC cards. To enable the environment checking software, comment out the line #define ENVIRO_CHECK.

 

Starting the CSM MiniDAQ:

 

Figure 1. The CSM MiniDAQ main window

   

Before running the CSM MiniDAQ program, make sure that the VME hardware has been initialized with the NI Resource Manager and that all CSM-0 Modules are include in the device list. CSM-0 Cards require A32 address space with an address that agrees with the address set by the dipswitches on the CSM-0 Card.

 

The CSM MiniDAQ program is started with the file csm0.exe, which brings up the main CSM MiniDAQ window. The program will automatically scan all available CSM-0 cards in the VME crate. If only one CSM-0 card is found, the card will be used. Otherwise user will be asked to provide additional information (normally BASE address). When user quit the program, several parameters (BASE, run #, # used mezzanine cards, BCID/EVID preset value and BCID rollover) are recorded in the file <DAQpara.txt> which is used by the CSM MiniDAQ program.

 

For normal data acquisition with AMT mezzanine cards, the first step is to use JTAG to program the AMT cards. All of the necessary commands for JTAG programming are in the JTAG pull-down menu, including the JTAG diagnostic panel. The mezzanine card setups can be saved and be recalled from the File menu. Once JTAG programming is finished, standard data acquisition commands are all located on the main window. Diagnostic tools are located in BoardTest pull-down menu for CSM board functionality tests, in JTAG pull-down menu of “Diagnostics” for JTAG tests and in the Execute pull-down menu of “Diagnostic Run” for data acquisition diagnostics.

 

 

 

Use Help pull-down menu to obtain online help for command buttons and menu items. After select the menu item Help on Buttons , click on any wanted command button or menu item, where a brief description of the item functionality will be popped out for user to view.



  1. JTAG Programming
    1. Connecting the hardware

JTAG protocol requires all devices on the JTAG chain to be in series to work properly. There are two kinds of adapter boards used with the AMT-1 cards. The 4-channel adapter boards have jumpers that determine if a port to a mezzanine card is skipped or connected in series with the next port in the chain. Placing the jumper on the pins farther from the edge of the board includes the associated mezzanine card in the series connection; placing the jumper on the pins closer to the edge skips the mezzanine card. The 18-channel adapter card automatically includes each device plugged into it in the JTAG chain. The leftmost device on the 18-channel adapter card is the first device in the chain. The rightmost device on the 4-channel adapter card as seen from the card edge with jumpers is the first device in the chain.

 

There are two JTAG ports on the CSM-0 Module, JTAG IN and JTAG OUT. For the 4-channel adapter card, JTAG IN should be connected to JP1. JTAG OUT should be connected to JP3. The ports should be labeled on the 18-adapter board, but the left port is JTAG IN, the right port is JTAG OUT.

 

Be sure the power is applied before starting JTAG programming.

 

    1. JTAG Menu

The AMT mezzanine cards are programmed through their JTAG port connections by using the JTAG pull-down menu as shown in the right picture. Also diagnostics tool has been provided and will be discussed later. Most

JTAG menu items are grayed out (disabled) and are enabled after JTAG serial is turned on, loading individual mezzanine card (Setup Individual) is enabled only after mezzanine cards have been initialized with common settings.

Figure 2. The CSM Channel and Mezzanine Card Connection Map Window

 

Pay Attention: If mezzanine card connections are manually mapped, it is user responsibility to program mezzanine cards. Also it is user responsibility to make sure that individual mezzanine card has correct settings if the mezzanine card connection map has been changed.

 

    1. Programming AMT Mezzanine Cards Using JTAG Menu

It is important for user to gives correct number of mezzanine cards in the JTAG chain in order to program AMT mezzanine cards correctly. To program AMT mezzanine cards via JTAG menu, three steps are involved where one is optional:

  1. Enable the JTAG serial connection by JTAG à Enable JTAG Serial . The corresponding JTAG Serial Enabled LED on main CSM window should turn green if JTAG is enabled successfully.
  2. Programming AMT mezzanine cards by JTAG à Setup All OR JTAG à Setup send OR JTAG à Mezz.Connection Map OR JTAG à Change # Mezz. Cards.
  3. Programming individually AMT mezzanine card (optional) by JTAG à Setup Individual

Applying individual setting to mezzanine card:

Once a common setup has been applied to the attached mezzanine cards, any given AMT card can be individualized. To program an individual mezzanine card, select JTAG à Setup Individual à Mezzanine N , where N is the assigned mezzanine card ID. The individual setup panel is virtually identical to the common setup panel. If a profile was loaded with an individualized setting for a card, the panel corresponding to that card will hold the saved values. If there is any individualized mezzanine card settings, it is necessary to download individualized settings by issuing a Setup Send after the Setup All is applied.

 

The JTAG à Setup All and JTAG à Setup Individual will bring up an AMT mezzanine card setup window shown in Figure 3 (from JTAG à Setup All ), which contains switches, selection boxes and command buttons. The AMT Error Control Window (Figure 4) is invoked by clicking .

 

Figure 3. The Mezzanine Card Setup Window

 

Figure 4. The AMT Error Control Window

 

Each mezzanine card contains 24 channels which could be individually turn on/off by clicking on desired channel. Also each mezzanine card has three ASD chips which are programmable. The buttons of , and access the corresponding ASD setup window as shown in Figure 5 (example for ASD1).

Figure 5. The ASD Control Window for Mezzanine Card

 

 

Each ASD controls 8 calibration channels which can be turned on/off individually. In normal DAQ runs, ASD channel mode should be turned to Active mode. For detailed ASD programmable parameters, please see reference [4].

 

saves the current mezzanine card settings to a text file. recalls the mezzanine card default settings and closes the setup windows and reverts to previous settings. The mezzanine card settings are applied after the button on the Mezzanine Card Setup Window is selected.

 

All the mezzanine card settings are read back via JTAG and are compared with original setup array. If any error is detected, programming information Panel will be popped out automatically where the failed mezzanine cards will be shown. Also the mezzanine card setup status is shown in the CSM MiniDAQ Main Window. All of the AMT and ASD settings are explained in Appendix C, for more detailed information please refer to the AMT manual [2] and ASD manual [4]. For most applications, the default values should be sufficient. The values that will need the most tweaking are Trigger Offset, the Mask Window, Search and Match Windows in Mezzanine Card Setup Panel, Main Threshold and Chip Mode in ASD Control Panel.

 

    1. Programming AMT Mezzanine Cards Using Saved Profile

To load a saved profile, select File à Load Profile . This will bring up a file open dialog and display files with file extension .prf (prof ile). After selected profile is loaded, user will be asked whether to download the mezzanine card settings if number of mezzanine card in saved profile is not zero, a YES confirmation will enable the JTAG and download the mezzanine card settings to the hardware. An answer of NO implies that user will download mezzanine card settings later.

 

A file <default.prf> which contains standard settings is included with the CSM MiniDAQ, but these settings will need to be modified for the particular hardware. To save the mezzanine card settings for reuse, select File à Save Profile that brings up a file open dialog. User could provide a new file name with file extension .prf or pick up an exist profile to over write it. A saved profile contains both the common and the individual mezzanine card settings.

 

    1. Copy Mezzanine Card Settings

There is a command button in the mezzanine card setup window as shown in Figure 2. It brings up the copy mezzanine card setup window as shown in Figure 6 and it allows user to copy mezzanine card settings between mezzanine cards. The command button is disabled if there is only one on no mezzanine card for obvious reason.

 

Figure 6. The Copy Mezzanine Card Setup Window

 

Be copied mezzanine card is selected from selection box of From , and destinations are a group toggle buttons. The main threshold, AMT channel mask and ASD channel mask are controllable, therefore user can decided whether to copy them. If the mezzanine card settings are copied, it is assumed that those mezzanine cards settings is individualized. To start copy mezzanine card settings, click on button and click on to exit from the copy mezzanine card setup window.

 



  1. Acquisition Runs

To collect data, the right PROM in CSM daughter card should be used, where the XILINX and TTCEM version number is 0x5005 (Hexadecimal) or higher. If AMT mezzanine cards are used, the first step in a data acquisition is to download mezzanine card settings by using JTAG menu. If Demo boards (Emulator cards) are used, the reset button on Demo boards should be pushed before taking data.

 

Data acquisition is handled from the main CSM MiniDAQ panel, following steps involved in the run of data collection:

  1. Select wanted CSM input channels if it is not done yet;
  2. Modify run setups as user wishes, such as Auto Run Setup, Get BCID Preset Value, Data Monitor Controls and Storage Selection;
  3. Begin the run and accumulate data;
  4. End the run if automatically stopping run is not enabled.

4.1   CSM Input Channel Control (TDC Enable and Control)

 

To select wanted CSM input channels, click on the main CSM MiniDAQ panel which brings up the TDC Enable and Control panel as shown in Figure 7.

Figure 7. The TDC Enable and Control Window

 

To enable or disable an individual CSM input channel, click on TDC button where TDC number is the CSM input channel number. A green TDC button indicates that the CSM input channel is selected and a red TDC button indicates that the CSM input channel is disabled. If mezzanine card connection mapping has been done, click on button will enable all CSM input channels which are connected to mezzanine cards. If a connected CSM input channel is not enabled, the CSM will not expect to receive data from that input channel and will ignore any data from that CSM input channel. The TDC enable and Control panel is used to turn on or off the entire CSM input channel, therefore an unselected TDC will block all the data to that CSM input channel. To turn individual channel on/off for each mezzanine card, use JTAG menu as discussed in Section 3 JTAG Programming. If unconnected CSM input channels are enabled, it will hang the data acquisition system while the CSM is waiting for data from un-existing cards. User also is able to change trigger FIFO and WC FIFO limits which are maximum number of allowed events. For normal operations, it is sufficient to enable the desired TDCs and then push button. The TDC Enable Mask

 

 

on the CSM MiniDAQ Main Window indicates the CSM input channel selection, where 1/0 indicates on/off of the corresponding CSM input channel.

 

4.2  Run Settings

 

Before starting a new run, user has to decide whether to change the run settings for data acquisition, such as data storage, auto run setup and whether to monitor data etc. This section will discuss this in detail.

 

Storage Selection:

 

Figure 8. Storage section of the CSM Main Window    

 

To select data storage, use the Storage pull-down menu as shown in Figure 8. There are two main choices, either discard acquired data (select None) or store data into a disk file (select Disk). If Disk is selected, data will be stored in the file indicated by . There are two options for save data into a disk file:

  1. Disk (Auto Generated Filename) will automatically generate file name as run########_yyyymmdd.dat, where ######## is run number, yyyy is year, mm is month and dd is date.
  2. Disk (User Defined Filename) will let user to give a file name. The storage file can either be selected using the BROWSE button (which will bring up a standard windows file selection window) or the file name can be edited directly in the window. And the file will be checked to see if it is already in disk to avoid overwriting existing file after start the run.

The run number will be automatically incremented by one for new run if Disk option be selected, otherwise run number will stay as same. If auto restart run has been set, it is recommended to use Disk (Auto Generated Filename) if user wishes to save data into disk file. Select Disk (User Defined Filename) in auto restart run mode will result in overwrite data file.

 

Auto Run Setup:

 

To bring up auto run setup panel as shown in Figure 9, use Execute à Auto Run Setup on CSM main panel. User can turn on/off each setting by clicking on corresponding ON/OFF toggle button. Also if individual setting number is modified, it is assumed that user wants to turn on that setting. Each setting is explained following:

 

 

Figure 9. Auto Run Setup Window    

 

After finish the auto run setup, just click button.

 

Get BCID Preset Value:

 

To get a BCID preset value, use Execute à Get BCID Preset Value in CSM Main Window. It will automatically calculate the CSM BCID preset value and this works both for AMT mezzanine cards and Demo boards. Of course, different type boards should not be used at same time, otherwise CSM BCID preset value would not be obtained. If a valid BCID preset value is obtained, user is asked whether to enable CSM BCID match testing. Enable CSM BCID match testing may result in DAQ hang or data abortion in CSM if there are BCID mismatch. User is encouraged to use Execute à Get BCID Preset Value to obtain the CSM BCID preset value without enable CSM BCID match testing where BCID will be monitored by online data analysis. This will give additional validation of AMT mezzanine cards. To disable BCID online monitor, user first has to enabled the BCID match testing at CSM, then use Execute à Disable BCID Match.

 

Data Monitor Controls

 

Figure 10. Data Monitor Controls on the CSM Main Window    

 

It is always good to take data with online data monitor which is also a useful diagnostic tool. There are two toggle buttons to control data monitor as shown in Figure 10, one for DAQ information, such as DAQ rate, event size and data flow rate as shown in Figure 11, and another for the data quality checks. Both of DAQ information and data analysis are enabled by default. User could turn them on or off at any time, even during data taking by just click on the corresponding button. Because DAQ rate is limited by VME operations, enable DAQ monitor has no significantly impact on the DAQ rate.

 

Figure 11. DAQ Information Window    

 

The DAQ rate, event size and data flow rate are numerically and graphically displayed in DAQ information window. And DAQ time is shown also. By default, the current run DAQ plots are displayed, the most recent 15 minutes DAQ plots can be displayed by clicking on button. The background color has following means (not for DAQ plots): green indicates OK, red indicates error, yellow indicates a warning or run in pause and magenta indicates old values.

 

If data analysis is enabled, the data will be monitored and checked. If any error is found, data monitor error report window will be automatically popped out as in Figure 12. It is assumed that user wishes to close the data monitor error report window for rest of the run if user clicks on button. User can bring up the data monitor error report window by using Execute à Data Error Report at any time. The background color has following means: green = OK, red = error, yellow = warning and black = not checked.

 

Figure 12. Data Monitor Error Report Window    

 

4.3   Starting run and Collecting Data

To begin a run, just hit the button . Few things will be checked, such as event offset (another name EVID Preset Value), BCID Rollover and whether disk file will be overwritten if storage selected as Disk . If any problem is detected, user will be informed and will be asked to make decisions.

 

The basic DAQ information is displayed in the CSM MiniDAQ main window as shown in Figure 1. The Run No shows the current run number and the Evt No status box gives the number of accumulated events. To allow for faster data acquisition, multiple events are written into a single buffer that is stored to disk when it is full. The Buffers status box shows number of these buffers. Also DAQ time and current DAQ rate are shown. If data analysis is enabled, number of event with error is displayed in status box of # Error .

 

During the run, and on the CSM MiniDAQ main window allow user to suspend and resume data acquisition. Once enough events have been accumulated, click on command button to start the run termination process where the CSM MiniDAQ will ignore any new triggers, read the rest buffered events and flush the last storage buffer into disk. A run log file will be saved into disk with a file name <***.log> , and an error summary will be saved into a disk file with name <***.err> also if data monitor is enabled, where *** is the data file name without “ ;.dat”.



5     Diagnostic Tools

 

CSM MiniDAQ provides tools for diagnosing the CSM-0 hardware, JTAG programming, data acquisition. CSM-0 hardware diagnostic tools including the Board Test pull-down menu and Execute à Diagnostics Run. JTAG programming has a diagnostic panel that can be used when JTAG serial is enabled through JTAG à Diagnostics . The tools for data acquisition can be accessed with Execute à Diagnostics . Few useful tools are accessible via Execute pull-down menu.

 

    1. Using the Board Test Menu

Board Test pull-down menu provides an easy and quick way to check the functionality of CSM-0 VME board and daughter board, which including following tools:

Figure 13. Test CSM/Mezzanine Board Window    

 

It first checks whether the CSM VME board is functional by looking its Board ID   and will enable all CSM register tests if the Board ID is correct. Also it verifies the CSM mezzanine board and will enable all CSM mezzanine register tests if verification is passed. Click on a desired register test toggle button will enable or disable that register test. It is also possible to enable/disable register tests by group as shown in Figure 13. A green register item indicates that register test is on and a red register item indicates that register test is off. If the register passed the test, the corresponding LED indicator will turn to green, otherwise it stays on red (register test not passed or not selected). After all the tests have been performed, a test summary will be reported in the Message box.

 

It is worth to point out the test which checks whether master reset is functional as expected. At first same data word is written to all the CSM mezzanine card registers including VME address 96 for JTAG, then a master reset is issued and all used registers are checked against expected value where most of them should be zero. And the test is repeated 1000 times. To perform test which checks whether the CSM-0 receives trigger and flag event ready bit correctly, external trigger must be connected with an trigger rate at least 100Hz.

 

Figure 14. Look Read Address(9:13) Signal Window    

 

Figure 15. Measure CSM Received Trigger Rate Window    

 


Figure 16. Loop on Register Window    

 

There are three ways to select desired register by its name, address or address given by user. To active wished the way, click on corresponding area and select wanted register or VME address, other two will be automatically in idle mode. Push to start loop and to stop loop, and loop time is also displayed. Exit the loop on register panel by hitting button.

 

Figure 17. TDC On/Off Status Window    

 

 

 

    1. Using the JTAG Diagnostics Panel

The JTAG Diagnostics panel is brought up by click JTAG à Diagnostics where the JTAG Serial has to be enabled first, which is useful to check if the CSM JTAG port is functional and if the AMT mezzanine boards are configured correctly. Figure 18 is the JTAG diagnostics panel, where the following tools are provided:

Figure 18. JTAG Diagnostics Window

 

Figure 19. Programming Information Window

The number of mismatched bits of the setup array and the number of failed mezzanine cards are indicated in the Programming Information panel. The mezzanine card failure flags and the individualized mezzanine cards are displayed also.

Figure 20. Loop Test on JTAG Setup Window

 

The setup loop tests are done as following: 1) Zero all setup bits and only let 1 setup bit to be one and go through all setup bits (walk one test); 2) Put all setup bits are 1 and only let 1 setup bit be zero and go through all setup bits (walk zero test); 3) With certain fixed setup pattern (fixed pattern test); 4) Using random number generator to get “random” setup array. All loop test results are displayed in the loop test on JTAG setup window, and the failed mezzanine cards are indicated as well. Zooming on the error display plots is allowed and JTAG rate divisor could be changed at any time. If JTAG rate divisor is less than 3, most likely JTAG loop tests will be failed.

 

    1. Using the CSM-0 Diagnostic Panel

Execute à Diagnostics Run controls the CSM-0 diagnostic panel as shown in Figure 21. Due to the fact that user is able to write and read many CSM registers by using Global Controls, TTCem Controls and CSM0 Controls menus, and button, it is a powerful and robust tool for CSM-0 board diagnostics. Few examples will be illustrated below. It also can be used to debug the data acquisition problems and will be discussed in more details later.

 

Figure 21. CSM-0 Diagnostic Window

 

Click on button, the content of the selected register indicated by the Readback Register will be displayed. And controls how many times of next operation will be done and it will be reset back to 1 if the next operation is performed. For instance, the Repeat is set as 8 as shown in Figure 21, if button is pushed, the Board ID in Readback Register box will be read 8 times.

 

Examples for CSM-0 Board Diagnostics

 

Example 1: Check read-only register

Choose a desired register in Readback Register box to be read, for instance Board ID which should be 0x2332E31. Read that register repeated or read it after varies operations are performed such as Master Reset and read/write registers, the obtained data word should be always kept as 0x2332E31..

 

Example 2: Check a register that can be written and read

First write a data word to a selected register, a good example is TTCem Controls à Set Pipeline , then read that register by selecting it at Readback Register box. The read back value should agree with the written data word, otherwise something is wrong.

 

 

 

Example 3: Check master reset functionality

The Global Controls à Master Reset performs a master reset that zeroes most of CSM-0 registers. User also can write to varies registers, set DAQ active, and enable serial and diagnostic controls before applying a master reset to the system. After apply a master reset to the system, read back CSM registers and check if their value as expected. The master reset will turn control buttons of Set/Clear DAQ Active, Set/Clear Ext Trigger Enable and Enable/Disable Serials to RED.

 

For more information of CSM-0 registers and pull-down menu of CSM0 diagnostic panel, please see the references [5] and [1].

 

DAQ Diagnostics

 

Taking data with the diagnostic panel requires that the attached mezzanine cards have been properly programmed using JTAG. Once the system is ready, follow these steps:

  1. (Optional) Turn on/off desired TDCs using Trigger Controls à Enable TDCs or Ctrl^E .
  2. Click on for event read preparation. It will reset the CSM-0 and attached mezzanine cards, set used CSM-0 registers and enable selected TDCs, where in default, EVID match testing at CSM-0 is enabled and BCID matching test is disabled. It will set DAQ active if any TDC has been selected.
  3. (Optional) Set registers. As an example, disable EVID match testing at CSM-0 by using CSM0 Controls à Disable EVID Match to get data even the EVID of TDC data received by CSM-0 does not match its internal EVID (if EVID match testing is enabled, unmatched event will be discarded by CSM-0).
  4. Select trigger by clicking on toggle button of Set/Clear Ext Trigger Enable , if user selects , external trigger will be used. And means to use software trigger, where user has to issue software trigger by selecting Trigger Controls à Software Trigger in Trigger Controls pull-down menu. No more than 16 software triggers can be issued at same time (the repeat counter should be no more than 16), otherwise data error will occur.
  5. Read events: Before reading events, user should decide whether to include decipher of the hex words read from the CSM-0 VME FIFO to a more readable form by using switch control Expand FIFO Print, which is Yes at default. Several methods are available for reading the VME FIFO, and user can choose any one to read the VME FIFO. In most case, the block transfer is used in reading VME FIFO if it is not explicitly mentioned.

 

 

Trigger Controls à Read FIFO All à Print will read the EVID/WC register of the CSM-0 and grab the indicated number of words and write them to the standard output. If the EVID/WC register is empty, the CSM-0 either did not receive a trigger, or is waiting for a missing header or trailer from enabled input cards.

 

Trigger Controls à Read FIFO All à No Print has same reading sequence as previous one. And only the content of EVID/WC will be printed and no VME data write to the standard output.

 

Trigger Controls à BlkRd VME FIFO will ask user to give number of data words to be read from VME FIFO, and grab them and write to the standard output.

 

Trigger Controls à Mty VME FIFO (print) dumps the contents of the CSM-0 VME FIFO to the standard output without checking the EVID/WC register. There will probably be an extra zero between events. The word is there to counteract a problem with the VME chip used by the CSM-0 where the chip grabs an extra word. This zero word is discarded in data acquisition runs.

 

Trigger Controls à Mty VME FIFO (no print) empties the VME FIFO without printing. Only total number of dumped data words will be printed at end.

 

Trigger Controls à Read VME FIFO will ask user to give number of data words to be read from VME FIFO, and read VME FIFO word by word, i.e., block transfer is not used. The data words are written to standard output.

 

If software trigger is used, a combined command button for steps 4 and 5 is provided to read event where issuing software triggers is not required. Warning: Repeat counter should be no more than 16, otherwise it will result in data error. If external trigger is in use, the same button with name can be used to read event directly. Here the event is read by using same way as Trigger Controls à Read FIFO All à Print.

 

The most useful registers for general diagnostics of data acquisition are TDC stop bits in the FIFO Threshold, the Stop & Full Flags, the received headers and received trailers registers which are selected by the Readback Register box and read by clicking on button. The received headers and trailers registers can also be read with Trigger Controls -> Received Hdrs and Trigger Controls -> Received Trls. These are 3 byte registers where each byte is on if the header or trailer for that CSM-0 input channel has been received. When a full set of headers and trailers have been received these registers reset back to all zeroes until the next trigger.

 

It is worth to point out the command button , which will let user to turn on/off whether to reset other CSMs during data taking if there are at least 2 CSM boards in the VME crate. This is used to demonstrate that the multiple CSM boards in same VME crate are functional normally.

 

    1. Run DAQ with Software Trigger

 

 

It is allowed to take data with software trigger where the number of issued software triggers before reading data is known, therefore it provides a controlled way for user to debug data acquisition system and to study the noise problem in the readout since the software trigger has no time relationship with respect to the data signals (= random trigger). To enable the software trigger for a run, use Global Controls à Use Software Trigger for DAQ in CSM0 Diagnostic window. Due to the fact the trigger FIFO limit is not used to constrain the software trigger and its length is 16, the maximum allowed number of software triggers in a row without reading out the data is 16 to avoid EVID in CSM (counted by number of trigger) mismatching EVID in data (from CSM input cards).

 

If the software trigger is enabled for the data taking, user will be asked to confirm it for every run in case the run is not started automatically since the software trigger should not be used in most cases for data taking. Also that is the reason why there is no easy access to enable the usage of software trigger from the run control window (main CSM window), instead it is controlled in the CSM0 diagnostic window. After enable the software trigger for the DAQ, quit from the CSM0 diagnostic window and take data from the main CSM window as normal data taking.

    1. Other Useful Tools

Figure 22. CSM Register Setup Window

 


Appendix A.    References

 

[1]   “ATLAS MiniDAQ Reference Guide”, B. Ball, J. Chapman, J. Hollar, J. Kuah, J. Gregory. University of Michigan. June, 2001.

[2]   “AMT-1 & 2 (ATLAS Muon TDC version 1 & 2) User’s Manual” , Yasuo Arai. KEK, National High Energy Accelerator Research Organization, Japan. Rev 0.88, November 14, 2001.

[3]   “CSM Design & CSM-0 Production”, B. Ball, J. Chapman, J. Kuah, J. Mann, J. Hollar. University of Michigan. October, 2000.

[4]   “MDT-ASD: Serial data I/O and programmable parameters”, http://bmc.bu.edu/bmc/asd/octal/spec/ASD00A_Prog.PDF .

[5]   “CSM Users Manual”, B. Ball, J. Chapman, J. Gregory, J. Mann and J. Hollar. University of Michigan, February 27, 2002.



Appendix B.    Data Formats

 

The following charts are adopted from the references of [5] and [2].

 

B.1  CSM Words

 

CSM HEADER
3

1

3

0

2

9

2

8

2

7

2

6

2

5

2

4

2

3

2

2

2

1

2

0

1

9

1

8

1

7

1

6

1

5

1

4

1

3

1

2

1

1

1

0

9 8 7 6 5 4 3 2 1 0
0x5
0x9
EVID
BCID

CSM TRAILER
3

1

3

0

2

9

2

8

2

7

2

6

2

5

2

4

2

3

2

2

2

1

2

0

1

9

1

8

1

7

1

6

1

5

1

4

1

3

1

2

1

1

1

0

9 8 7 6 5 4 3 2 1 0

0x5
0xb
EVID
Word count

CSM Abort Word
3

1

3

0

2

9

2

8

2

7

2

6

2

5

2

4

2

3

2

2

2

1

2

0

1

9

1

8

1

7

1

6

1

5

1

4

1

3

1

2

1

1

1

0

9 8 7 6 5 4 3 2 1 0

0x5
0xc
EVID
Word count

CSM Error Word
3

1

3

0

2

9

2

8

2

7

2

6

2

5

2

4

2

3

2

2

2

1

2

0

1

9

1

8

1

7

1

6

1

5

1

4

1

3

1

2

1

1

1

0

9 8 7 6 5 4 3 2 1 0

0x5
0x0
Unused
Abnormal TDC

CSM Parity Error Word (***)
3

1

3

0

2

9

2

8

2

7

2

6

2

5

2

4

2

3

2

2

2

1

2

0

1

9

1

8

1

7

1

6

1

5

1

4

1

3

1

2

1

1

1

0

9 8 7 6 5 4 3 2 1 0

0x5
0x1
Unused
TDC with parity error

 

*** The CSM parity error word is only available by using new CSM-0 boards that are manufactured in February of 2002, where the PROM in CSM daughter board with version number 0x10006 or higher must be used. Only the CSM error word is sent out if an event has both detected event error (for instance EVID mismatch) and parity error at same time. In other word, the CSM error word takes priority.



B.2  TDC Words

 

TDC HEADER
3

1

3

0

2

9

2

8

2

7

2

6

2

5

2

4

2

3

2

2

2

1

2

0

1

9

1

8

1

7

1

6

1

5

1

4

1

3

1

2

1

1

1

0

9 8 7 6 5 4 3 2 1 0

0xa
TDC ID
EVID
BCID

TDC TRAILER
3

1

3

0

2

9

2

8

2

7

2

6

2

5

2

4

2

3

2

2

2

1

2

0

1

9

1

8

1

7

1

6

1

5

1

4

1

3

1

2

1

1

1

0

9 8 7 6 5 4 3 2 1 0

0xc
TDC ID
EVID
Word count

LEADING EDGE DATA
3 1
3 0
2 9
2 8
2 7
2 6
2 5
2 4
2 3
2 2
2 1
2 0
1 9
1 8
1 7
1 6
1 5
1 4
1 3
1 2
1 1
1 0
9
8
7
6
5
4
3
2
1
0
0x3
TDC ID
Channel
1
E
Coarse time
Fine time

TRAILING EDGE DATA
3 1
3 0
2 9
2 8
2 7
2 6
2 5
2 4
2 3
2 2
2 1
2 0
1 9
1 8
1 7
1 6
1 5
1 4
1 3
1 2
1 1
1 0
9
8
7
6
5
4
3
2
1
0