HOW TO TEST A BYPASS BOARD

Description of the test

The ByPass receives two inputs (one from channel A and one from channel C) and outputs two identical streams (in normal SVT operations only one of the two outputs is used).


To test the board we need to provide the ByPass with the two inputs, to look at the output data and to compare them with what we expect in output from a board simulation.
So a minimum of two additional Mergers (the Senders) are needed to perform the test. The Receivers are instead optional. If no Receiver is present the test program checks if the data in the ByPass output spybuffer are correct.


Set up of the test in SVT crates

In SVT, the ByPass receives the inputs from two MRG boards, the XTFB splitter and the Final Merger, and it sends the output to the GhostBuster board. We need to set the input and output Dip Switches (DS) of the ByPass. This can be done using the command:
    python ~zanetti/python/mrg_setds.py <cratenumber> <slot> <DS configuration>

To check the status of the DS you can run
    python ~zanetti/python/mrg_status.py 'crate' 'slot'

The <DS configuration> is given in hexadecimal number. So the command:
    python ~zanetti/python/mrg_setds.py b0svt06 14 25    
sets the DS values to:
OUTPUT2
OUTPUT1
INPUTD
INPUTC
INPUTB
INPUTA
1
0
0
1
0
1


If the boards have the following locations:
  1. ByPass: b0svt06 slot 14
  2. XTFB splitter: b0svt07 slot 21
  3. Final Merger: b0svt06 slot 20
  4. Receiver of the ByPass output: b0svt06 slot 12
we have to run these commands:
  1. setup svtvme -d
  2. python ~zanetti/python/mrg_setds.py b0svt06 14 25
  3. python ~zanetti/python/mrg_setds.py b0svt07 21 18
  4. python ~zanetti/python/mrg_setds.py b0svt06 20 27
  5. python ~zanetti/python/mrg_setds.py b0svt06 12 08
If no receiver board is used, the DS of the ByPass have to be set to 05 (no output) otherwise the ByPass sets the output hold.



Configure the software

First of all, you need to copy in your directory the byp_random_test.c program (a frozen version of the source program is here). Then you have to compile it: This command produces in your directory the byp_random_test program.

Running: you get the syntax here reported: The first 3 options are the more frequently used ones.


Run the test in SVT crates

To run the test you need to have no data going through the boards and no  SVTMon running in the crates, because it checks the SpyBuffers and you are using them for the test. If the  SVTMon read the SpyBuffers  you can get an error just because  the  test doesn't find the data it expects in the SpyBuffer. So:
  1. Ask the ACE to remove SVT crates from the partition (In principle you need to control all the crates containing boards that are connected to the one you are testing - taking all of them is a good solution :-) )
  2. Start the RC and configure it for a FAKE_HITS run
  3. Then just partition
The first time you have to run
./byp_random_test 0 1 1 1
then a menu will ask you about the position of each board and the connections between them.
Beware that the most common mistake is to define a configuration not consistent with the setting of the DS: so, if the program exits with errors, first double check all the settings.
After you configured everything the test makes 1 cycle. In the directory you find the
MRG_RANDOM_TEST_CONFIGURATION
containing all the settings. From now on you can run
./byp_random_test 0 0 0
The absence of the fourth parameter allow for infinite cycles... let the test run for 1 hours and cross the fingers. When you are bored and feel confident that the board is good do ctrl-C.
The program produces the log file: log_mrg_test_random.txt.
Furthermore, in case of errors, the programs dumps several files *_data to help in debugging the problem.

REMEMBER TO FLAG THE BOARD AS BAD/GOOD, PUT A NOTE IN THE E-LOG and, IF THE BOARD IS BAD, SEND an E-MAIL to Anna Maria.

Stefano Torre & Anna Maria Zanetti
Last modified: Feb 20,2006