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

From Hall A Wiki
Jump to: navigation, search
(intelbbgem)
(remex)
(42 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
== CODA scripts ==
 
== CODA scripts ==
:- [https://github.com/JeffersonLab/coda_scripts github page]
 
:- Scripts locations:
 
* daq@tedbbdaq
 
:- <code>~/gem_scripts/setupCODA.bash</code>
 
:- <code>~/gem_scripts/coda_scripts/</code>
 
* sbs-onl@intelbbgem:
 
:- <code>~/coda_scripts/</code>
 
  
 
=== Frontend scripts to use on tedbbdaq ===
 
=== Frontend scripts to use on tedbbdaq ===
Line 16: Line 9:
 
* kills all CODA components
 
* kills all CODA components
  
 +
=== <tt>coda_scripts</tt> ===
 +
:- [https://github.com/JeffersonLab/coda_scripts github page]
 +
:- Scripts locations:
 +
:* '''daq@tedbbdaq'''
 +
::- <tt>~/sbs-onl/coda_scripts/</tt>
 +
:* '''sbs-onl@intelbbgem'''
 +
::- <tt>~/coda_scripts/</tt>
  
 
== Useful stand-alone programs ==
 
== Useful stand-alone programs ==
Line 22: Line 22:
 
* Execute a function call on the specified remote Host
 
* Execute a function call on the specified remote Host
 
:- Run without arguments for usage
 
:- Run without arguments for usage
 +
==== Usage for setting trigger source (BBGEM only) ====
 +
* TSINPUT
 +
<code>remex ROC1 "rocSetTriggerSource(0)"</code>
 +
* Random Pulser
 +
<code>remex ROC1 "rocSetTriggerSource(1)"</code>
 +
* Fixed Pulser
 +
<code>remex ROC1 "rocSetTriggerSource(2)"</code>
  
 
=== <tt>tiLibTest</tt> ===
 
=== <tt>tiLibTest</tt> ===
Line 28: Line 35:
 
:- Puts the local TI in master mode (with no slaves).
 
:- Puts the local TI in master mode (with no slaves).
 
:- Accepts triggers either from Front Panel TSinputs or Internal Random Pulser
 
:- Accepts triggers either from Front Panel TSinputs or Internal Random Pulser
 +
 +
=== <tt>mpdStatus</tt> ===
 +
<code>$LINUXVME/mpd/libsrc/test/mpdStatus <mpd slot number></code>
 +
* Show the status of MPD at slot <code><mpd slot number></code>
 +
:- Run without <code><mpd slot number></code> to scan all slots.
 +
 +
=== <tt>sspMpdStatus</tt> ===
 +
<code>$LINUXVME/ssp/test/sspMpdStatus <ssp slot number></code>
 +
* Show the status of SSP at slot <code><sp slot number></code>, as well as their fiber connected MPDs
 +
:- Run without <code><ssp slot number></code> to scan all slots.
  
 
=== <tt>i2c_test</tt>===
 
=== <tt>i2c_test</tt>===
Line 34: Line 51:
 
:- Does the same initialization that is done in <code>mpd_list.c:rocDownload()</code>
 
:- Does the same initialization that is done in <code>mpd_list.c:rocDownload()</code>
 
:- Also attempts the readback of the APV registers with <code>mpdApvStatus(0xffff)</code>
 
:- Also attempts the readback of the APV registers with <code>mpdApvStatus(0xffff)</code>
 +
 +
=== <tt>mpdI2CScan</tt>===
 +
<code>$LINUXVME/mpd/libsrc/test/mpdI2CScan <mpd slot number></code>
 +
* Scan i2c addresses for any APVs from MPD in specified slot number
 +
:- Configure those found APVs with some default register values
 +
:- Display the APV registers
 +
 +
=== <tt>sspMpdInit</tt>===
 +
<code>~/linuxvme/ssp/test/sspMpdInit</code>
 +
* Same function as ssp_mpd_setup() in the readout list without running CODA
 +
 +
=== <tt>sspFirmwareUpdate</tt>===
 +
<code>$LINUXVME/ssp/firmware/sspFirmwareUpdate <firmware .bin file> <SSP VME ADDRESS></code>
 +
* Update SSP at specified VME address.
 +
 +
=== <tt>ProgramEpcs</tt>===
 +
<code>$LINUXVME/mpd/libsrc/firmware/ProgramEpcs -s <mpd_vme_slot> -v <firmware .jic file></code>
 +
* Update MPD firmware at specified VME address.
 +
:- Described in https://hallaweb.jlab.org/dvcslog/SBS/251
 +
 +
=== <tt>RunUserFpga</tt>===
 +
<code>$LINUXVME/mpd/libsrc/firmware/RunUserFpga -s <mpd_vme_slot> (-f)</code>
 +
* Change between user and factory FPGA image.
 +
:- Described in https://hallaweb.jlab.org/dvcslog/SBS/251
  
 
=== <tt>vme_display</tt> ===
 
=== <tt>vme_display</tt> ===
Line 44: Line 85:
 
* Modify the value of specified size of the specified VME address.
 
* Modify the value of specified size of the specified VME address.
 
:- Run without arguments for usage
 
:- Run without arguments for usage
 +
 +
=== <tt>sudo systemctl restart platform</tt> ===
 +
<code>sudo systemctl restart platform</code>
 +
* Restart the CODA 3 platform systemd service.
 +
:- Can be run from any account in the 'coda' group on tedbbdaq
 +
::- bbshower, bbhodo, bbgem, daq
  
 
== MPD/SSP/APV Config files ==
 
== MPD/SSP/APV Config files ==
 
* Config files for configuration of APVs and MPD / SSP can be found in
 
* Config files for configuration of APVs and MPD / SSP can be found in
:- <code>sbs-onl@intelbbgem:~/bbgem-cfg/</code>
+
:- <tt>sbs-onl@intelbbgem:~/bbgem-cfg/</tt>
  
 +
:* The '''SSP''' readout list (<tt>mpd5_ssp_list.so</tt>) uses
 +
::- <tt>sbs-onl@intelbbgem:~/bbgem-cfg/ssp_config.txt</tt>
 +
::- <tt>sbs-onl@intelbbgem:~/bbgem-cfg/ssp_apv_default.txt</tt>
  
:* The '''SSP''' readout list (<code>mpd5_ssp_list.so</code>) uses
+
:* The '''MPD''' readout list (<tt>mpd_list.so, mpd_slave_list.so</tt>) uses
::- <code>sbs-onl@intelbbgem:~/bbgem-cfg/ssp_config.txt</code>
+
::- <tt>sbs-onl@intelbbgem:~/bbgem-cfg/mpd_config.txt</tt>
::- <code>sbs-onl@intelbbgem:~/bbgem-cfg/ssp_apv_default.txt</code>
+
::- <tt>sbs-onl@intelbbgem:~/bbgem-cfg/mpd_apv_default.txt</tt>
  
 +
:* '''Both''' use common files to configure the MPDs/APVs given the MPD's slot number.  For example, slot 5 MPD:
 +
::- <tt>sbs-onl@intelbbgem:~/bbgem-cfg/bbgem_crate_1/MPD_vmeSlot_5.cfg</tt>
  
:* The '''MPD''' readout list (<code>mpd_list.so, mpd_slave_list.so</code>) uses
+
:* Programs useful for debugging config file format
::- <code>sbs-onl@intelbbgem:~/bbgem-cfg/mpd_config.txt</code>
+
::- <tt>$LINUXVME/mpd/libsrc/test/mpdConfigTest <config filename></tt>
::- <code>sbs-onl@intelbbgem:~/bbgem-cfg/mpd_apv_default.txt</code>
+
::- <tt>$LINUXVME/mpd/libsrc/test/sspMpdConfigTest <config filename></tt>
  
 
+
== Superbigbite Logbook Entries ==
:* '''Both''' use common files to configure the MPDs/APVs given the MPD's slot number.  For example, slot 5 MPD:
+
* Entry script:
::- <code>sbs-onl@intelbbgem:~/bbgem-cfg/bbgem_crate_1/MPD_vmeSlot_5.cfg</code>
+
:- <tt>daq@tedbbdaq:~/gem_scripts/MakeEntry.sh %(rt) <START/END> %(rn)</tt>
 +
::- <tt>DAQNAME='''BBGEM'''</tt>
 +
:- Executed by PEB1 '''before''' Prestart and '''after''' End
  
 
== Machines in use ==
 
== Machines in use ==
Line 67: Line 121:
 
==== atedf3 ====
 
==== atedf3 ====
 
* NFS server, tftp server for VME Controllers
 
* NFS server, tftp server for VME Controllers
:* CODA and hardware drivers in <code>/data/disk2/SBS/</code>
+
:* CODA and hardware drivers : <tt>/data/disk2/SBS/coda/3.10_arm</tt>
 +
:* <tt>sbs-onl</tt> home directory : <tt>/data/disk2/home/sbs-onl</tt>
  
 
:* Read-only permissions for all machines in 36 subnet
 
:* Read-only permissions for all machines in 36 subnet
:* Read-Write permissions for '''hallavme12pc''','''sbsvme25'''
+
:* Read-Write permissions for a few select machines / vme controllers
  
 
==== tedbbdaq ====
 
==== tedbbdaq ====
 
* DAQ Computer (RunControl, Event Building)
 
* DAQ Computer (RunControl, Event Building)
:* Mount <code>atedf3:/data/disk2/SBS</code> to <code>/mnt/SBS</code>
+
:* Mount <tt>atedf3:/data/disk2/SBS</tt> to <tt>/mnt/SBS</tt>
::- Uses autofs.  <code>/etc/auto.SBS</code> should be included in a line in <code>/etc/auto.master</code>
+
::- Uses autofs.  <tt>/etc/auto.SBS</tt> should be included in a line in <tt>/etc/auto.master</tt>
  
::* <code>coda/</code> CODA (3.10)
 
 
:* User: daq
 
:* User: daq
::* CODA3 environment setup:
+
::* CODA (3.10) : <tt>~/coda3/3.10_arm/</tt>
::- <code>~/.bashrc</code>
+
:::- <tt>~/.bashrc</tt>
 
<pre>
 
<pre>
 
# CODA 3 setup : SESSION=bbgem 01dec2020
 
# CODA 3 setup : SESSION=bbgem 01dec2020
Line 88: Line 142:
 
source ${HOME}/gem_scripts/setupCODA3.bash
 
source ${HOME}/gem_scripts/setupCODA3.bash
 
</pre>
 
</pre>
::- <code>~/gem_scripts/setupCODA.bash</code>
+
:::- <tt>~/gem_scripts/setupCODA3.bash</tt>
  
 
==== intelbbgem ====
 
==== intelbbgem ====
 
* XVR16 VME Controller
 
* XVR16 VME Controller
 
:* User: sbs-onl
 
:* User: sbs-onl
 +
::* home directory : <tt>atedf3:/data/disk2/home/sbs-onl/bbgem</tt>
 
::* CODA3 environment setup:
 
::* CODA3 environment setup:
::- <code>~/.bashrc</code>
+
::- <tt>~/.bashrc</tt>
 
<pre>
 
<pre>
 
# CODA 3 using coda_scripts : SESSION=bbgem 01dec2020
 
# CODA 3 using coda_scripts : SESSION=bbgem 01dec2020
Line 100: Line 155:
 
export EXPID=tedbbdaq
 
export EXPID=tedbbdaq
 
source ${HOME}/coda_scripts/setupCODA3.bash
 
source ${HOME}/coda_scripts/setupCODA3.bash
 +
</pre>
  
 +
::- <tt>~/coda_scripts/setupCODA.bash</tt>
 +
 +
:* Slots 6 : SSP - initial firmware: <tt>fe_ssp_mpd_v1_8_aug11_2020.bin</tt>
 +
:* Slot 21: TI
 +
:* LINUXVME (mpd,ssp)
 +
::- <tt>~/linuxvme/</tt>
 +
<pre>
 
# LINUXVME for mpd and ssp
 
# LINUXVME for mpd and ssp
 
export LINUXVME=${HOME}/linuxvme
 
export LINUXVME=${HOME}/linuxvme
Line 110: Line 173:
 
</pre>
 
</pre>
  
::- <code>~/coda_scripts/setupCODA.bash</code>
+
:* readout lists
 
+
::- <tt>~/rol/</tt>
:* Slots ? : SSP
+
:* Slot 21: TI
+
:* LINUXVME (mpd,ssp): <code>~/linuxvme/</code>
+
:* readout lists : <code>~/rol/</code>
+
  
 
==== hatsv48 ====
 
==== hatsv48 ====
Line 123: Line 182:
 
::* Slot 21: TI
 
::* Slot 21: TI
  
== CODA environment setup script ==
+
==== bbgemvxs ====
 +
VXS crate with intelbbgem and SSP
  
Using BASH, source the environment setup script:
+
==== bbhodovme ====
 +
*VME crate with intelbbhodo, two 1190s and two v792s
 +
* can power cycle through web interface
  
source ~/SBS-GEM-Cleanroom/env/setupCODA
+
==== intelbbhodo ====
 +
* readout list
 +
<pre>
 +
The readout lists are in
 +
    sbs-onl@intelbbhodo:~/rol/
 +
with bbhodo_list.c as the one used in the current BBHODO_Readout config.
 +
The Makefile will build a readout list for using a TI_MASTER
 +
(bbhodo_list.so) and TI_SLAVE (bbhodo_slave_list.so) with:
 +
    make bbhodo_list.so bbhodo_slave_list.so
 +
or to compile all
 +
    make
 +
</pre>
  
 
== Stuff to finish ==
 
== Stuff to finish ==
  
===Setup CODA3 environment for MPD crate ===
+
=== Fix MPD Crate VME Controller Diskless OS ===
===Log CODA runs to [https://logbooks.jlab.org/book/superbigbite logbooks/superbigbite]===
+
::- 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 <tt>Fpga_4_Fiber_200811.jic</tt>
 +
 
 +
=== 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.
 +
 
 +
=== SBS BBshower ===
 +
* Readout list sbs-onl@intelbbshower:~/rol/bb_shower
 +
=== SBS BBHodo ===
 +
* Power cycle bbhodo VXS crate. Connect to crate through local webbrowser as bbhodovme
 +
** In needed username: private and psd: private.
 +
* readout list
 +
<pre>
 +
The readout lists are in
 +
    sbs-onl@intelbbhodo:~/rol/
 +
with bbhodo_list.c as the one used in the current BBHODO_Readout config.
 +
The Makefile will build a readout list for using a TI_MASTER
 +
(bbhodo_list.so) and TI_SLAVE (bbhodo_slave_list.so) with:
 +
    make bbhodo_list.so bbhodo_slave_list.so
 +
or to compile all
 +
    make
 +
</pre>

Revision as of 08:25, 1 March 2021

CODA scripts

Frontend scripts to use on tedbbdaq

startCoda

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

restartStuff

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

kcoda

  • kills all CODA components

coda_scripts

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

Useful stand-alone programs

remex

$CODA_BIN/remex <remexHost> <function call>

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

Usage for setting trigger source (BBGEM only)

  • TSINPUT

remex ROC1 "rocSetTriggerSource(0)"

  • Random Pulser

remex ROC1 "rocSetTriggerSource(1)"

  • Fixed Pulser

remex ROC1 "rocSetTriggerSource(2)"

tiLibTest

$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

mpdStatus

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

  • Show the status of MPD at slot <mpd slot number>
- Run without <mpd slot number> to scan all slots.

sspMpdStatus

$LINUXVME/ssp/test/sspMpdStatus <ssp slot number>

  • Show the status of SSP at slot <sp slot number>, as well as their fiber connected MPDs
- Run without <ssp slot number> to scan all slots.

i2c_test

$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)

mpdI2CScan

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

  • Scan i2c addresses for any APVs from MPD in specified slot number
- Configure those found APVs with some default register values
- Display the APV registers

sspMpdInit

~/linuxvme/ssp/test/sspMpdInit

  • Same function as ssp_mpd_setup() in the readout list without running CODA

sspFirmwareUpdate

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

  • Update SSP at specified VME address.

ProgramEpcs

$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

RunUserFpga

$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

vme_display

$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

vme_modmem

$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

sudo systemctl restart platform

sudo systemctl restart platform

  • Restart the CODA 3 platform systemd service.
- Can be run from any account in the 'coda' group on tedbbdaq
- bbshower, bbhodo, bbgem, daq

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
  • Programs useful for debugging config file format
- $LINUXVME/mpd/libsrc/test/mpdConfigTest <config filename>
- $LINUXVME/mpd/libsrc/test/sspMpdConfigTest <config filename>

Superbigbite Logbook Entries

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

Machines in use

atedf3

  • 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

tedbbdaq

  • 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/setupCODA3.bash

intelbbgem

  • 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
export LD_LIBRARY_PATH=.:${LINUXVME_LIB}:${LD_LIBRARY_PATH}
export PATH=.:${LINUXVME_BIN}:${PATH}
  • readout lists
- ~/rol/

hatsv48

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

bbgemvxs

VXS crate with intelbbgem and SSP

bbhodovme

  • VME crate with intelbbhodo, two 1190s and two v792s
  • can power cycle through web interface

intelbbhodo

  • readout list
The readout lists are in
    sbs-onl@intelbbhodo:~/rol/
with bbhodo_list.c as the one used in the current BBHODO_Readout config.
The Makefile will build a readout list for using a TI_MASTER
(bbhodo_list.so) and TI_SLAVE (bbhodo_slave_list.so) with:
    make bbhodo_list.so bbhodo_slave_list.so
or to compile all
    make

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.

SBS BBshower

  • Readout list sbs-onl@intelbbshower:~/rol/bb_shower

SBS BBHodo

  • Power cycle bbhodo VXS crate. Connect to crate through local webbrowser as bbhodovme
    • In needed username: private and psd: private.
  • readout list
The readout lists are in
    sbs-onl@intelbbhodo:~/rol/
with bbhodo_list.c as the one used in the current BBHODO_Readout config.
The Makefile will build a readout list for using a TI_MASTER
(bbhodo_list.so) and TI_SLAVE (bbhodo_slave_list.so) with:
    make bbhodo_list.so bbhodo_slave_list.so
or to compile all
    make