Procedure to test Front-End electronics

 

This page explains how to run the program for debugging front-end electronics. You have to go through the following five steps:

Each of them is described in detail below.


Rebooting the ROMS and checking the status:

To perform the task of running calibrations we load on the ROMS the same data acquisition code that it is used during cosmic rays data taking. At present this code is loaded automatically on the ROMs at boot time. User intervention is not required.

Seldom the process can go wrong. Sometimes there can be problems loading files. Sometimes a FEE crate has been turned off. Sometime an optical fiber is not connected properly. These problems are not frequent and you can discover them at a later stage. So you may prefer to take the risk to do the job twice and try skipping the stage of rebooting the ROMS and checking the status altogether.

To get control of the three IFR ROMs log into a bbr-devXX machine or a bbr-conXX machine. If you want to run the forward endcap and the barrel detector type the following instruction at your terminal window:

setenv ODF_PLATFORM 127

Instead if you want to run the backward endcap then type:

setenv ODF_PLATFORM 4

In both cases then type:

$BFROOT/detector/ifr/bin/runConfig

The program will ask you if the platform number is correct. Type : y <Return> . At this point the program will open for you new windows on the screen. Each window is a serial port connection to one ROM. You will get four windows if the platform number has been set to 127. You will get only one in the other case. Typing <Return> in one of the windows it should appear the vxworks shell prompt there. Do this in all the new windows

If the shell prompt doesn't appear and in the window it is written something like Trying 134.79.158.14... it is possible that somebody else is using the ROMS. It is likely to be IR-2 shifters during babar datataking, daq experts for code development or other users. Please check with them and do not reboot the ROMS power cycling the IFR daq crate.

Then type <CTRL-X> to reboot the ROM. Repeat the operation in all the windows. For each windows wait until the code is loaded and running and check that the last few line that appear in the ROM windows are something like:

value = 30030592 = 0x1ca3b00

segmentIfr 0

detector = 5

platform = 127

module = 1

crate mask = 0x8000

Link speed scale factor A = 0, B = 0

slot number = 1

Initialising segment level (slave)

value = 0 = 0x0

Done executing startup script /dataflow/7F/05/dfs/startup

->

 

Instead if you see something like:

 

it means that one of the two FEE crate connected to that ROM is powered off or that one of the optical fiber has been disconnected from the ROM.


Starting the Oep task:

To start the Oep task you have to log into a bbr-odfXX machine or a bbr-farmXX machine. If you want to run the forward end-cap and the barrel detector type the following instruction at your terminal window:

setenv ODF_PLATFORM 127

Instead if you want to run the backward end-cap then type:

setenv ODF_PLATFORM 4

If you haven't done it yet issue

klog

and answer the question about your password.Then start the Oep at the event level typing the following command at the prompt:

$BFROOT/detector/ifr/bin/runOep

This script will open for you two X-terminal windows. In the window whose title is OepFSimpleShmReader you have to type: exit <Return> .

Do not cd in the $BFROOT/detector/ifr/bin otherwise there are good chances you won't be able to run. Check also that you don't have an "oeplog-1-C.xtc" file in your directory before starting the Oep. If you have it, you have to delete or rename it.

At the end of the calibration process the file "oeplog-1-C.xtc" should be present in the directory from where the Oep task has been started.

If you like, you can grab the commands from this page with the mouse and paste them into your window on the odf-bbrXX or odf-farmXX computer.


Starting the dataflow GUI:

To start the dataflow GUI you have to log into a bbr-odfXX machine or a bbr-farmXX machine. If you want to run the forward end-cap and the barrel detector type the following instruction at your terminal window:

setenv ODF_PLATFORM 127

Instead if you want to run the backward end-cap then type:

setenv ODF_PLATFORM 4

If you haven't done it yet issue

klog

and answer the question about your password. Then start the dataflow GUI using the following command:

$BFROOT/detector/ifr/bin/runGui

The program will ask you the crate list. Type: 8000 <Return>

At this point the program ask you if the Oep level is ready. Under usual conditions this is the case and you should replay with <Return> at the prompt. Now a new window should appear with the dataflow GUI.

If you like, you can grab the commands from this page with the mouse and paste them into your window on the odf-bbrXX or odf-farmXX computer.


Driving the FSM:

Click with the mouse on the text "Configuration" of the dataflow GUI. In the dialog screen that show up you must type 3 in the environment field and type 0 in the trigger field.

This tell the to the IFR code and to the system that we are in calibration mode so that all ICB channels are enabled as well as the sequencer.

Click with the mouse on the text "Begin Minor". In the dialog box type 0xB080 number.

This tells the system to send negative pulses to the front-end cards during the calibration cycle.

Click with the mouse on the text "Enable" of the dataflow GUI. In the dialog box type: nop as first command with 0 ticks delay, calib as second command with 0 ticks delay l1 as third command with 650 ticks delay, select the internal source, switch on all the three commands and require 5 events.

This sets all the parameters of the sequencers.

Now you can start driving the system through the calibration process. To drive the finite state machine from one state to another you must click on the arrow between the two states. An arrow is present only if the transition between the two states is possible in principle. The arrow is red for transitions that are allowed given the current state of the finite state machine. Go down in the list of states until you reach the "MinorCycle" state.

Repeat the "Enable" transition has many times as you like.

Then move back to the "MajorCycle" state. Click with the mouse on the red arrow on the screen. Click with the mouse on the text "BeginMinor". In the dialog box type an 0xB180 number.

This tells the system to send positive pulses to the front-end cards during the rest of the calibration cycle.

Again repeat the enable transition has many times as you like. Then move back through all the transition until you exit from the program. After the unmap transition and the window disappear.

If you have any problem and you have to force an exit from the program, ALWAYS press the green bottom "Reboot" to reboot the ROMS and the green button "Dissolve" to dissolve the partition. Otherwise the IFR crate will remain allocated and nobody else will be able to use it.

At this point the file "oeplog-1-C.xtc" should be present in the directory from where the Oep task has been started.


Running Fast Monitoring:

To produce the histograms with the result of the calibration process before cd in the directory where the oeplog-1-C.xtc file has been saved. Then give the command

$BFROOT/detector/ifr/bin/runFMon oeplog-1-C

and answer the questions. Usually you want to reprocess the xtc file. Instead if you want just to see again the plots previously done on the screen, give again the command shown above but skip reprocessing.


This page maintained by Maurizio Lo Vetere , ( lovetere@slac.stanford.edu )

Last modified: Thu Jan 22 18:13:11 PM 1999