Difference between revisions of "SBS DAQ: GEM TEDF BigBite setup"

From Hall A Wiki
Jump to: navigation, search
(CODA scripts)
Line 47: Line 47:
=== <tt>RunUserFpga</tt>===
=== <tt>RunUserFpga</tt>===
<code>$LINUXVME/mpd/libsrc/firmware/RunUserFpga -s <mpd_vme_slot> (-f)</code>
<code>$LINUXVME/mpd/libsrc/firmware/RunUserFpga -s <mpd_vme_slot> (-f)</code>
* Change between user and factor FPGA image.
* Change between user and factory FPGA image.
:- Described in https://hallaweb.jlab.org/dvcslog/SBS/251
:- Described in https://hallaweb.jlab.org/dvcslog/SBS/251

Revision as of 06:05, 4 December 2020

CODA scripts

Frontend scripts to use on tedbbdaq


  • executes each CODA component (platform, rcgui, PEB, all ROCs) in a separate xterm


  • kills and restarts the PEB and ROCs. The xterms are not killed with this script.


  • kills all CODA components


- github page
- Scripts locations:
  • daq@tedbbdaq
- ~/gem_scripts/setupCODA.bash
- ~/gem_scripts/coda_scripts/
  • sbs-onl@intelbbgem:
- ~/coda_scripts/

Useful stand-alone programs


$CODA_BIN/remex <remexHost> <function call>

  • Execute a function call on the specified remote Host
- Run without arguments for usage


$CODA_VME/ti/test/tiLibTest <TI slot number>

  • Test triggering capabilities of the local TI.
- Puts the local TI in master mode (with no slaves).
- Accepts triggers either from Front Panel TSinputs or Internal Random Pulser


$LINUXVME/mpd/libsrc/test/i2c_test <mpd slot number>

  • Test the initialization and configuration of the APVs in the specified MPD.
- Does the same initialization that is done in mpd_list.c:rocDownload()
- Also attempts the readback of the APV registers with mpdApvStatus(0xffff)


$LINUXVME/ssp/firmware/sspFirmwareUpdate <firmware .bin file> <SSP VME ADDRESS>

  • Update SSP at specified VME address.


$LINUXVME/mpd/libsrc/firmware/ProgramEpcs -s <mpd_vme_slot> -v <firmware .jic file>

  • Update MPD firmware at specified VME address.
- Described in https://hallaweb.jlab.org/dvcslog/SBS/251


$LINUXVME/mpd/libsrc/firmware/RunUserFpga -s <mpd_vme_slot> (-f)

  • Change between user and factory FPGA image.
- Described in https://hallaweb.jlab.org/dvcslog/SBS/251


$CODA_VME_BIN/vme_display <VME Address> <read size in bytes>

  • Display the read value of specified size from the specified VME address.
- Run without arguments for usage


$CODA_VME_BIN/vme_modmem <VME Address> <read/write size in bytes>

  • Modify the value of specified size of the specified VME address.
- Run without arguments for usage

MPD/SSP/APV Config files

  • Config files for configuration of APVs and MPD / SSP can be found in
- sbs-onl@intelbbgem:~/bbgem-cfg/

  • The SSP readout list (mpd5_ssp_list.so) uses
- sbs-onl@intelbbgem:~/bbgem-cfg/ssp_config.txt
- sbs-onl@intelbbgem:~/bbgem-cfg/ssp_apv_default.txt

  • The MPD readout list (mpd_list.so, mpd_slave_list.so) uses
- sbs-onl@intelbbgem:~/bbgem-cfg/mpd_config.txt
- sbs-onl@intelbbgem:~/bbgem-cfg/mpd_apv_default.txt

  • Both use common files to configure the MPDs/APVs given the MPD's slot number. For example, slot 5 MPD:
- sbs-onl@intelbbgem:~/bbgem-cfg/bbgem_crate_1/MPD_vmeSlot_5.cfg

Superbigbite Logbook Entries

  • Entry script:
- daq@tedbbdaq:~/gem_scripts/MakeEntry.sh %(rt) <START/END> %(rn)
- Executed by PEB1 before Prestart and after End

Machines in use


  • NFS server, tftp server for VME Controllers
  • CODA and hardware drivers : /data/disk2/SBS/coda/3.10_arm
  • sbs-onl home directory : /data/disk2/home/sbs-onl
  • Read-only permissions for all machines in 36 subnet
  • Read-Write permissions for a few select machines / vme controllers


  • DAQ Computer (RunControl, Event Building)
  • Mount atedf3:/data/disk2/SBS to /mnt/SBS
- Uses autofs. /etc/auto.SBS should be included in a line in /etc/auto.master
  • User: daq
  • CODA (3.10) : ~/coda3/3.10_arm/
- ~/.bashrc
# CODA 3 setup : SESSION=bbgem 01dec2020
export CODA=/mnt/SBS/coda/3.10_arm
export SESSION=bbgem
export EXPID=tedbbdaq
source ${HOME}/gem_scripts/setupCODA3.bash
- ~/gem_scripts/setupCODA.bash


  • XVR16 VME Controller
  • User: sbs-onl
  • home directory : atedf3:/data/disk2/home/sbs-onl/bbgem
  • CODA3 environment setup:
- ~/.bashrc
# CODA 3 using coda_scripts : SESSION=bbgem 01dec2020
export SESSION=bbgem
export EXPID=tedbbdaq
source ${HOME}/coda_scripts/setupCODA3.bash
- ~/coda_scripts/setupCODA.bash
  • Slots 6 : SSP - initial firmware: fe_ssp_mpd_v1_8_aug11_2020.bin
  • Slot 21: TI
  • LINUXVME (mpd,ssp)
- ~/linuxvme/
# LINUXVME for mpd and ssp
export LINUXVME=${HOME}/linuxvme
export LINUXVME_INC=${HOME}/linuxvme/include
export LINUXVME_LIB=${HOME}/linuxvme/${MACHINE}/lib
export LINUXVME_BIN=${HOME}/linuxvme/${MACHINE}/bin
  • readout lists
- ~/rol/


  • XVB601 VME Controller
  • 'daq' login
  • Slots 2-8, 10-16: MPDs
  • Slot 21: TI

Stuff to finish

Fix MPD Crate VME Controller Diskless OS

- Should be fixed with new host name

Check MPD library x86_64 compilation

- Run a program that configures and gets the status of the MPDs in the crate.

Update MPD firmware

- program with Fpga_4_Fiber_200811.jic

Check SSP-MPD Fiber connection

- Run a program that configures and gets the status of the MPDs in the crate (from the SSP)

Verify config files

- Need to input the APV - MPD map into the MPD/APV config files.

Setup data output path

- Find where we can put the data.

Setup CODA3 environment for MPD crate ?

- May be useful for debugging problems with MPD/APVs without the SSP crate.