Running the IFR Teststand at IR2

(notes by cpo 02/03/2004)

To run dataflow, bring up two windows on on bbr-ifrtest100. In the first window "xyplex -f ifrtest-rom" (this connects you to the ROM serial port, and often there are useful messages displayed here). You will most likely want to run calibrations. Talk to David Lange to find out how he ran calibrations on the teststand previously. In the unlikely event you want to run "standalone dataflow", do the following in the second window:

setenv ODF_PLATFORM 4
setenv LD_LIBRARY_PATH /nfs/bbr-srv02/dataflow/package/shlib/${BFARCH}
/nfs/bbr-srv02/dataflow/04/15/release/bin/${BFARCH}/fcgui -c 0x20000 -t 0xffffffff&
/nfs/bbr-srv02/dataflow/04/15/release/bin/${BFARCH}/eventtest -c 0x20000 -i 0 -d&
  • Click "Allocate"
  • Click "Arguments"
  • In the arguments window set BeginMajor to 0xffffff (this is N, and tells eventtest to dump out damage statistics every N events).
  • In the arguments window set BeginMinor to 0x20000 (this tells eventtest to dump out damage statistics for crate mask 0x20000).
  • In the arguments window click Apply followed by Close.
  • Click "Enable"

    Damage statistics will be dumped by eventtest every time you Disable (by clicking on MinorCycle).

    You get a 1Hz events by plugging a loopback lemo cable on the FCPM (rightmost fast controlboard) from SYSCLK/N to TRIG28. You get 4kHz events by plugging it into TRIG29.

    To generate 5 2.7us spaced L1Accepts (a "recommended test"):

  • set the trigger mask in fcgui to 0
  • redo the configure transition
  • open the fcgui "calibration" menu
  • set "Counts" to 5
  • "Enable" the first command only, and select L1Accept
  • ensure that delay for the first command is set to 0
  • set "Cycle" to internal (the default)
  • now when you enable, 5 L1Accepts will be sent down.

    Dataflow prints out details information about which board was out-of-synch/out-of-order for a few events. After these few, you either have to reboot the ROM, or type

    odfOOSOOOPrint=1
    
    at the ROM prompt (this will print out the detail for the next damaged event).

    To shutdown you either click on Halted, or you can click Reboot, followed by Dissolve. After that you will have to restart eventtest (but fcgui will remain).


    Building IfrOdf

    
    gmake -f Makefile IfrOdf.segment
    
    creates:
    
    lib/segment/vxworks/libIfrApp.o
    
    The ROM loads:
    
    /nfs/bbr-srv02/dataflow/04/15/app/libIfrApp.o
    
    You need to be added to ir2 local group named ir2ifr in order to be able
    to write into the app directory.
    
    Some of the configuration (all?) is in IfrOdf/IfrCalActConfig.cc.
    This is the "dlink" mask of enabled IFBs.  It chooses the dlink mask
    based on the setting of backward-most dipswitch on the Controller Card
    on the ROM.
    
    

    Changing the IFR Configuration

    
    1) Set the controller card dipswitch to 1-5 for the teststand (1-4
       are used in the real IR2 system)
    2) plug IFB, ICB, ITB boards into any slots in FE crate allowed by
       IFR documentation.  Maurizio thinks any board can be put anywhere.
    3) change appropriate masks (with dLinks.set, onlyITB.set,
       onlyICB.set) in IfrCalActConfig.cc, IfrCalActTestCalMetaBegin.cc
       and IfrCalActTestCalMinorBegin.cc
    4) recompile IfrOdf and install in appropriate directory in
       /nfs/bbr-srv02/dataflow (ask dataflow experts about this)
    
    With these changes the following keys work:
    
    - 0x11a (physics, any dipswitch)
    - 0x11b (calibration, dipswitch set to roms 1-4)
    - 0x1e2 or 0x5f1 (calibration, dipswitch set to rom 5)
    
    Maurizio's answers to two questions that I
    asked him about the configuration:
    
    >- what is the "unchanging" information in the calCycle.xtc file?  is it
    >  just the description of the calibration cycles?
    >
    - the calCycle type is used to load the type of code: phyisic or 
      calibration (and which type of calibration).
    - for IfrCalActTestCal* the info coded into the calCycle is the number 
      of positive, negative pulses,
      the pulse hight for positive and negative pulses (it doesn't really matter).
    - but if I'm not wrong you can tell to the ConfigDB that some calCycle 
      may only be loaded on some
      specific ROM of some specific detectors and this is checked by the system.
      For example:
      - key 0x11b select four calCycle (the name I will send it to you; now I 
        don't have network access)
        that can be loaded only on ROM1-ROM4 respectively.
      - key 0x11a select a calCycle (the name I will send it to you) that can 
        be loaded on any Ifr ROM1.
    
    >- what do the calls onlyITB.set, onlyICB.set do?
    >
    
    Select the slots in which are present only ITBs or only ICBs before 
    sending specific commands to them.