]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
Changes to start-up script
authorCbm Rich <richdaq@wuppertal>
Sat, 15 Nov 2014 23:50:52 +0000 (00:50 +0100)
committerCbm Rich <richdaq@wuppertal>
Sat, 15 Nov 2014 23:50:52 +0000 (00:50 +0100)
users/cern_cbmrich/register_configgbe.db
users/cern_cbmrich/register_configgbe_ip.db
users/cern_cbmrich/startup.sh

index a7b7d2cd03f0b650696aa9c52f546cea0a6c5907..b782492d222cd9c478dcfedf75c0e04fe7109a48 100644 (file)
@@ -28,7 +28,7 @@
  0x80e5     0     0x80e5    0x00020001   0x00030064     0xFDE8       0x578         1          0           1            1                0x0 
  0x80f5     0     0x80f5    0x00020001   0x00030064     0xFDE8       0x578         1          0           1            1                0x0 
  0x8105     0     0x8105    0x00020001   0x00030064     0xFDE8       0x578         1          0           1            1                0x0 
- 0x8115     0     0x8115    0x00020001   0x00030064     0xFDE8       0x578         1          0           1            1                0x0 
+#0x8115     0     0x8115    0x00020001   0x00030064     0xFDE8       0x578         1          0           1            1                0x0 
 #0x8125     0     0x8125    0x00020001   0x00030064     0xFDE8       0x578         1          0           1            1                0x0 
 #0x8135     0     0x8135    0x00020001   0x00030064     0xFDE8       0x578         1          0           1            1                0x0 
 #0x8145     0     0x8145    0x00020001   0x00030064     0xFDE8       0x578         1          0           1            1                0x0 
index 455bcf988a02c6c2b0daaad0f7bf07c53aaf447a..579e68d5703d61fe15325e5756b82927d4ca5e14 100644 (file)
@@ -45,7 +45,7 @@
  0x80e5                0   0x7e344bb9    0x4016      0x0aa0004d      0xc35e     0xdead8014     0x001b   0xc0a80014      0xc35e     0x0578
  0x80f5                0   0x7e344bb9    0x4016      0x0aa0004d      0xc35f     0xdead8015     0x001b   0xc0a80015      0xc35f     0x0578
  0x8105                0   0x7e344bb9    0x4016      0x0aa0004d      0xc360     0xdead8016     0x001b   0xc0a80016      0xc360     0x0578
- 0x8115                0   0x7e344bb9    0x4016      0x0aa0004d      0xc361     0xdead8017     0x001b   0xc0a80017      0xc361     0x0578
+#0x8115                0   0x7e344bb9    0x4016      0x0aa0004d      0xc361     0xdead8017     0x001b   0xc0a80017      0xc361     0x0578
 #0x8125                0   0x7e344bb9    0x4016      0xc0a80002      0xc362     0xdead8018     0x001b   0xc0a80018      0xc362     0x0578
 #0x8135                0   0x7e344bb9    0x4016      0xc0a80002      0xc363     0xdead8019     0x001b   0xc0a80019      0xc363     0x0578
 #0x8145                0   0x7e344bb9    0x4016      0xc0a80002      0xc364     0xdead8020     0x001b   0xc0a80020      0xc364     0x0578
index 50aabda55cd608a962e274d83449a4cb721bed46..052666b24d908caab18c936a54a467b9c8b54881 100755 (executable)
@@ -3,32 +3,31 @@
 #PATH=${HOME}/trbsoft/bin:${PATH}
 #PATH=${HOME}/trbsoft/daqdata/bin:${PATH}
 #PATH=${HOME}/trbsoft/trbnettools/bin:${PATH}
-#export TRB3_SERVER=trb056:26000 
-
-#export TRBNETDPID=$(pgrep trbnetd)
-
-#echo "- trbnetd pid: $TRBNETDPID"
-#
-#if [[ -z "$TRBNETDPID" ]] 
-#then
-#    ~/bin/trbnetd -i 56
-#    #~/trbsoft/trbnettools/binlocal/trbnetd -i 56
-#fi
-#
-#export TRB3_SERVER=trb056
-#export DAQOPSERVER=10.160.0.78:56
+export TRB3_SERVER=trb056:26000 
+
+export TRBNETDPID=$(pgrep trbnetd)
+
+echo "- trbnetd pid: $TRBNETDPID"
 
+# if [[ -z "$TRBNETDPID" ]] 
+# then
+#     #~/bin/trbnetd -i 56
+#     #~/trbsoft/trbnettools/binlocal/trbnetd -i 56
+# fi
 
+#export TRB3_SERVER=trb056
+export DAQOPSERVER=10.160.0.77:56
 
 
 ##################################################
 ## System Reset
 ##################################################
 echo "Doing reset"
-trbcmd reset
+perl -e 'for(my $i=0; $i < 5; $i++) {`trbcmd reset`; my $n = `trbcmd i 0xffff | wc -l`; exit if $n == 90; print "found only $n fpgas. try it again";} print "Give up\n"'
 
 echo -n "- number of trb endpoints in the system: "
 trbcmd i 0xffff | wc -l
+
 ##################################################
 ## Set addresses
 ##################################################
@@ -113,7 +112,18 @@ trbcmd w 0xfffe 0xc5 0x800050ff
 
 echo "- setting trigger rate register in TDC";
 # trigger rate 10kHz
-trbcmd w 0x7005 0xa150 0x0001869f
+trbcmd w 0x7005 0xa150     9999 # 10 khz
+trbcmd w 0x7005 0xa151 99999990 # ~ 1 hz 
+trbcmd setbit 0x7005 0xa009 0x10 # include timestamp
+trbcmd w 0x7005 0xa155 0x111111e1
+
+
+# billboard
+trbcmd w 0x0112 0xb01e 0  # include billboard info with e-trigger
+
+#cbmnet
+trbcmd w 0x7005 0xa800 0x3   # enable CBMNet AND GbE
+trbcmd w 0x7005 0xa901 62500 # enable sync pulser with 2 khz ... prob. dont need it, but better safe thEn sorry
 
 # pulser enable
 #trbcmd setbit 0x7005 0xa101 0x1
@@ -130,17 +140,18 @@ trbcmd setbit 0xfe4a 0xcf00 0x1
 
 
 #set MAPMT Thresholds
-thresholdfile="thresh/stdthresh.thr"
-thresholdfile="thresh/dummythresholds.thr"
-offset="100"
+#thresholdfile="thresh/stdthresh.thr"
+#thresholdfile="thresh/dummythresholds.thr"
+#offset="100"
 echo
 echo "loading MAPMT thresholds: ${thresholdfile}"
 echo "offset is ${offset}   (200=1mv on input)"
-../../thresholds/write_thresholds.pl $thresholdfile -o $offset
+../../thresholds/write_thresholds.pl thresh/current_thresholds.thr -o 200
 
 echo "Loading Padiwa Amps Settings"
 /home/hadaq/trbsoft/daqtools/padiwa.pl 0x111 0 invert 0xaaaa
-../../thresholds/write_thresholds.pl thresh/thresholds_padiwa_amps.thr -o 0
+/home/hadaq/trbsoft/daqtools/padiwa.pl 0x113 0 invert 0xaaaa
+../../thresholds/write_thresholds.pl thresh/thresholds_padiwa_amps.thr
 
 
 echo "Disable noisy pixel in Padiwa"
@@ -154,4 +165,10 @@ echo "Disable noisy pixel in Padiwa"
 #trbcmd clearbit 0x8103 0xc0 0xf6
 #trbcmd clearbit 0x8103 0xc1 0xf6
 #trbcmd clearbit 0x8103 0xc3 0xf6
-echo "ready to go"
+
+sleep 1
+
+echo "Wait a sec (http://goo.gl/bdWW1g)"
+trbcmd w 0x7005 0xa101 0x3   # activate trigger
+
+echo "Trigger activated. I'm done"