From 7a85e4b8689ba98fcd94129e94ebba9ab5e2702e Mon Sep 17 00:00:00 2001 From: Hades DAQ Date: Fri, 1 Feb 2013 02:27:18 +0100 Subject: [PATCH] docu updates, mt --- trb3/trb3qs_software.tex | 127 ++++++++++++++++++++++++++------------- 1 file changed, 84 insertions(+), 43 deletions(-) diff --git a/trb3/trb3qs_software.tex b/trb3/trb3qs_software.tex index da31064..d7d33d8 100644 --- a/trb3/trb3qs_software.tex +++ b/trb3/trb3qs_software.tex @@ -6,17 +6,17 @@ next line. Lines starting with \verb+#+ are comments (in green). % \subsection{Preparation} -The software is keep in CVS repository in GSI. You must fetch a few mandatory -directories. This repository is closed and requires password. If you don't know it, -contact with Michael Traxler (Ask Michael Traxler$\to$ AMT). +The software is keep in a git repository with the master in Frankfurt. You must fetch a few mandatory +directories. This repository is open and you don't need a password. \begin{lstlisting}[label=,caption=Downloading the tools repositories] $ cd ~ -$ cvs -d :ext:hadaq@lxi001.gsi.de:/misc/hadesprojects/daq/cvsroot co trbsoft -$ cvs -d :ext:hadaq@lxi001.gsi.de:/misc/hadesprojects/daq/cvsroot co trb3/base -$ cvs -d :ext:hadaq@lxi001.gsi.de:/misc/hadesprojects/daq/cvsroot co trb3/README +$ git clone git://jspc29.x-matter.uni-frankfurt.de/projects/daqdocu +$ git clone git://jspc29.x-matter.uni-frankfurt.de/projects/trbnettools +$ git clone git://jspc29.x-matter.uni-frankfurt.de/projects/daqtools +$ git clone git://jspc29.x-matter.uni-frankfurt.de/projects/daqdata + \end{lstlisting} -% $ cvs -d :ext:hadaq@lxi001.gsi.de:/misc/hadesprojects/daq/cvsroot co hadaq \begin{lstlisting}[label=,caption=Preparation of TRB3 tools] $ cd ~/trbsoft/trbnettools @@ -24,35 +24,27 @@ $ cat HOWTO_COMPILE.TXT # now you can see all posible ways to compile software # we compile for TRB3 $ make distclean $ make TRB3=1 -$ make TRB3=1 install # if you get error here due to no permissions - # run it as a root -$ sudo make TRB3=1 install # if it doesn't work, - # contact your computer administrator for help +$ sudo make TRB3=1 install # you need root to install the perl library part # now export your binaries to PATH -$ export PATH=${HOME}/trbsoft/trbnettools/binlocal:${PATH} +$ export PATH=${HOME}/trbnettools/bin:${PATH} # to make life easier add this line above to your profile to to env script \end{lstlisting} -% $ ln -s ~/trbsoft/trbnettools/binlocal/trbnetd ~/trbsoft/trbnettools/bin -To prepare Event Builder you must fetch three directories from CVS, add -execution permissions to configure scripts, run thm with proper parameters and -compile and install libraries and binaries. On the end do not forget to export -your new locations to \verb+$PATH+. The full procedure is shown in following -snippet. +To prepare Event Builder you must fetch via git the ``daqdata'' repository, +run the build script. At the end do not forget to export your new locations to +\verb+$PATH+. The full procedure is shown in following snippet. % \begin{verbatim} \begin{lstlisting}[label=,caption=Preparation of Event Builder] -# mkdir ~/trbsoft/src -$ cd ~/trbsoft/src -$ cvs -d :ext:hadaq@lxi001.gsi.de:/misc/hadesprojects/daq/cvsroot co allParam hadaq compat -$ chmod +x {allParam,compat,hadaq}/configure -$ for ddd in allParam compat hadaq; do cd ~/trbsoft/src/${ddd}; CPPFLAGS="-I${HOME}/daqsoftware/include" LDFLAGS="-L${HOME}/daqsoftware/lib" ./configure --prefix=${HOME}/daqsoftware; make all install || break; done -$ export PATH=${HOME}/daqsoftware/bin:${PATH} -# this export salso can be add to profile or init script +$ cd ~/ +$ git clone git://jspc29.x-matter.uni-frankfurt.de/projects/daqdata +$ ./make_script.pl +$ export PATH=${PATH}:${HOME}/daqdata/bin +# this exports also can be added to profile or init script \end{lstlisting} % \end{verbatim} -If you get error +If you get errors like \verb+evtbuild.c:46:38: fatal error: rawapin.h: No such file or directory+ then edit file \verb+evtbuild.c+, comment out \verb+#define RFIO+ and repeat last command (the \verb+for+ loop). @@ -65,29 +57,78 @@ must run following \begin{lstlisting}[label=lst:trb3user,caption=User scripts preparation] $ cd ~ -$ wget http://www-linux.gsi.de/~rlalik/trb3userscripts.tar.gz -$ tar zxvf trb3userscripts.tar.gz +$ mkdir userscripts \end{lstlisting} -To adjust script to his system should edit file \verb+~/trb3user/setenv.sh+ and -adjust paths to trb3 software -\begin{lstlisting}[label=,caption=~/trb3user/setenv.sh - Variables to be adjusted] -# normally HOME variable should host proper value -#HOME=/home/hadaq # uncomment this line only if you kow what are you doing +\begin{lstlisting}[label=,caption=~/userscripts/startup.sh - Variables to be adjusted] + +export TRB3_SERVER=trb046 +pkill -f \"trbnetd -i 11\" +$HOME/trbnettools/trbnetd/server/trbnetd -i 11 -TRB3USER=${HOME}/trb3user -TRBSOFT=${HOME}/trbsoft -TRBNETTOOLS=${TRBSOFT}/trbnettools -DAQSOFT=${HOME}/daqsoftware \end{lstlisting} +This script only has to be started if the server you are using to communicate +with the TRB3 has been rebooted. + Usually no changes are required if all other software were installed in user's \verb+${$HOME}+ directory (recommended way). -This script should be run with command \verb+source ~/trb3user/setenv.sh+ in -each new terminal supposed to work for TRB3. +The following (as an example if your trbnetd runs with the id 11) should be +added to your shells .rc-script, so for example .basrc or .zshrc: -% \begin{lstlisting}[label=setenv,caption=\$\{HOME\}/trb3/setenv.sh] -% #!/bin/bash -% export PATH="${HOME}/daqsoftware/bin:${HOME}/trbsoft/trbnettools/binlocal:${PATH}" -% \end{lstlisting} \ No newline at end of file +\begin{lstlisting}[label=,caption=.rc-file for your shell] +export DAQOPSERVER=localhost:11 +export PATH=$PATH:~/trbnettools/bin +export PATH=$PATH:~/daqdata/bin +\end{lstlisting} + +The next task is to setup all necessary registers in the TRB3, which include +TRBNet addresses and Ethernet-MAC-destination addresses. +Example: + +\begin{lstlisting}[label=,caption=setup_trb46.sh] + +##### TRBNET ##### +# set the TRBNet addresses of the Endpoints +trbcmd s 0xb000000390381d28 0 0x0200 +trbcmd s 0xa300000390381328 1 0x0201 +trbcmd s 0x4800000390381628 2 0x0202 +trbcmd s 0x1700000390382028 3 0x0203 +trbcmd s 0xdc00000390380c28 5 0x8000 + +##### Ethernet and UDP ####### +trbcmd w 0x8000 0x8300 0x8000 +trbcmd w 0x8000 0x8301 0x00020001 +trbcmd w 0x8000 0x8302 0x00030062 +trbcmd w 0x8000 0x8303 0xea60 +trbcmd w 0x8000 0x8304 0x2260 +trbcmd w 0x8000 0x8305 0x1 +trbcmd w 0x8000 0x8306 0x0 +trbcmd w 0x8000 0x8307 0x0 +trbcmd w 0x8000 0x8308 0xffffff +trbcmd w 0x8000 0x830b 0x7 +trbcmd w 0x8000 0x830d 0x0 + +#mac address of the EB +# cbmpc026_eth0: 90:f6:52:03:8f:c4 +trbcmd w 0x8000 0x8100 0x52038fc4 # lower 4 bytes +trbcmd w 0x8000 0x8101 0x90f6 #upper byte + +# destination port and source IP and so on +trbcmd w 0x8000 0x8102 0xc0a80101 +trbcmd w 0x8000 0x8103 0xc350 +trbcmd w 0x8000 0x8104 0xdead8001 +trbcmd w 0x8000 0x8105 0x0230 +trbcmd w 0x8000 0x8106 0xc0a80072 +trbcmd w 0x8000 0x8107 0xc350 +trbcmd w 0x8000 0x8108 0x0578 + + +##### TDC ####### +#trbcmd w 0xfe45 0xc0 0x00000001 ## logic analyser control register +trbcmd w 0xfe45 0xc1 0x000f0005 ## trigger window enable & trigger window width +trbcmd w 0xfe45 0xc2 0xffffffff ## channel 01-31 enable +trbcmd w 0xfe45 0xc3 0xffffffff ## channel 32-63 enable + +\end{lstlisting} -- 2.43.0