
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
4. Acquisition Runs
. . . . . . . 12
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.
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.
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.
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:
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
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].
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.
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.
There is a command button
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
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:
4.1
CSM Input Channel Control (TDC Enable and Control)
To select wanted CSM input channels, click
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
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
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:
Figure 9. Auto Run Setup Window
After finish the auto run setup, just click
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
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
Figure 12. Data Monitor Error Report Window
4.3
Starting run and Collecting Data
To begin a run, just hit the button
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,
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.
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
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
Figure 17. TDC On/Off Status Window
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.
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
Figure 21. CSM-0 Diagnostic Window
Click on
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:
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
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
It is worth to point out the command button
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.
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) Users 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
1
0
9
8
7
6
5
4
3
2
1
0
9
8
7
6
5
4
3
2
1
0
CSM TRAILER
1
0
9
8
7
6
5
4
3
2
1
0
9
8
7
6
5
4
3
2
1
0
CSM Abort Word
1
0
9
8
7
6
5
4
3
2
1
0
9
8
7
6
5
4
3
2
1
0
CSM Error Word
1
0
9
8
7
6
5
4
3
2
1
0
9
8
7
6
5
4
3
2
1
0
CSM Parity Error Word (***)
1
0
9
8
7
6
5
4
3
2
1
0
9
8
7
6
5
4
3
2
1
0
*** 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
1
0
9
8
7
6
5
4
3
2
1
0
9
8
7
6
5
4
3
2
1
0
TDC TRAILER
1
0
9
8
7
6
5
4
3
2
1
0
9
8
7
6
5
4
3
2
1
0
LEADING EDGE DATA
TRAILING EDGE DATA



button will restart mapping the mezzanine card connection between mezzanine
cards and CSM input channels. A valid map is indicated by
as shown in Figure 2, where the first mezzanine card is connected to CSM
channel 17 (TDC 17) and second mezzanine card is connected to CSM channel 4
(TDC 4).
.

,
and
access the corresponding ASD setup window as shown in Figure 5 (example for
ASD1).
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.
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.

button and click on
to exit from the copy mezzanine card setup window.
on the main CSM MiniDAQ panel which brings up the TDC Enable and Control
panel as shown in Figure 7.
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
![]()

. There are two options for save data into a disk file:
window. And the file will be checked to see if it is already in disk to avoid
overwriting existing file after start the run.
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:
button.![]()

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.
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.
. 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.
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.

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.


to start loop and
to stop loop, and loop time is also displayed. Exit the loop on register panel
by hitting
button.
button allow user to rescan all the CSM input channels, and
to quit from the panel.


allows to select mezzanine card by its ID;
reads the AMT ID code and compared with expected AMT ID code;
performs a global reset to all connected mezzanine cards using the control
register of the AMT mezzanine card;
reads the status registers of the selected mezzanine card, where the AMT
mezzanine card ID follows the ID in
;
shows the selected mezzanine card settings;
shows the mezzanine card common settings used by Setup All (see
Section 3.2);
checks the settings of selected AMT mezzanine card, where the settings are
read back and compared with original one. The read back settings are displayed
in programming information panel as shown in Figure 19.

checks the mezzanine card common settings used by Setup All;
performs loop test on all mezzanine cards at same time with random
setup array. Figure 20 illustrates the window of loop test on JTAG setup. CSM
JTAG could be verified decently by performing that test.

performs loop test on the selected mezzanine card with random
setup array, test sequence is same as
;
performs loop test on all mezzanine cards one by one with random
setup array, test sequence is same as
;
provides a way to perform CSM JTAG test without AMT mezzanine card. A straight
RJ45 cable is used to connect CSM JTAG IN and JTAG OUT directly, where the
fixed data patterns are used in the test.
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.
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.
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.
, 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.

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.
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.
, 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.

button in the main CSM MiniDAQ window, where CSM register contents can be
modified and will be used for data taking. No all the CSM register settings
will be valid for data acquisition (for instance ID codes should never be
changed), therefore caution is absolutely necessary in changing CSM register
settings.

in the main CSM MiniDAQ window and by the command box CSM0 Base Address
of CSM0 diagnostic window.
3
3
2
2
2
2
2
2
2
2
2
2
1
1
1
1
1
1
1
1
1
1
9
8
7
6
5
4
3
2
1
0
3
3
2
2
2
2
2
2
2
2
2
2
1
1
1
1
1
1
1
1
1
1
9
8
7
6
5
4
3
2
1
0
3
3
2
2
2
2
2
2
2
2
2
2
1
1
1
1
1
1
1
1
1
1
9
8
7
6
5
4
3
2
1
0
3
3
2
2
2
2
2
2
2
2
2
2
1
1
1
1
1
1
1
1
1
1
9
8
7
6
5
4
3
2
1
0
3
3
2
2
2
2
2
2
2
2
2
2
1
1
1
1
1
1
1
1
1
1
9
8
7
6
5
4
3
2
1
0
3
3
2
2
2
2
2
2
2
2
2
2
1
1
1
1
1
1
1
1
1
1
9
8
7
6
5
4
3
2
1
0
3
3
2
2
2
2
2
2
2
2
2
2
1
1
1
1
1
1
1
1
1
1
9
8
7
6
5
4
3
2
1
0