echo "Doing CTS configuration"
-trbcmd w 0x8000 0xa140 0x000f4240 # pulser freq
+#trbcmd w 0x8000 0xa140 0x000f4240 # pulser freq 100 Hz
+trbcmd w 0x8000 0xa140 0x05f5e0ff # pulser freq 1 Hz
trbcmd setbit 0x8000 0xa101 0x2 # turn on pulser
+
+trbcmd loadbit 0x8000 0xa13d 0x7f 0xa # setting multiplexer input
+trbcmd loadbit 0x8000 0xa13e 0x7f 0xb # setting multiplexer input
+
+trbcmd loadbit 0x8000 0xa129 0x100 0x100 # setting multiplexer input invert
+
+trbcmd w 0x8000 0xc801 0x000f000f
+
# Address # S/N # FPGA
-0x3800 33 0
-0x3801 33 1
+0x3800 33 1
+0x3801 33 0
0x3802 33 2
0x3803 33 3
0x8900 33 5
# 0x8800 0 0x607bf78c 0x001d 0x0a9b3b46 0xc350 0xdead8800 0x0230 0x0a9b3b12 0xc350 0x0578
- 0x8000 0 0x4c80c43e 0xd85d 0xc0a80001 0xc350 0xdead8000 0x0230 0xc0a80216 0xc350 0x0578
- 0x8800 0 0x4c80c43e 0xd85d 0xc0a80001 0xc358 0xdead8800 0x0230 0xc0a80216 0xc358 0x0578
- 0x8900 0 0x4c80c43e 0xd85d 0xc0a80001 0xc359 0xdead8900 0x0230 0xc0a80216 0xc359 0x0578
+ 0x8000 0 0x4c80c43e 0xd85d 0xc0a86401 0xc350 0xdead8000 0x0230 0xc0a86416 0xc350 0x0578
+ 0x8800 0 0x4c80c43e 0xd85d 0xc0a86401 0xc358 0xdead8800 0x0230 0xc0a86416 0xc358 0x0578
+ 0x8900 0 0x4c80c43e 0xd85d 0xc0a86401 0xc359 0xdead8900 0x0230 0xc0a86416 0xc359 0x0578
0x00000000 # 15 Channel Masks END
0x000000a0 # 16
0x000000ff # 17
-0x00000041 # 18 Common Threshold, default 0x80
+0x00000028 # 18 Common Threshold, default 0x80
0x0000001e # 19
0x0000005f # 20
-0x00000074 # 21
+0x0000008a # 21
0x00000064 # 22
0x00000089 # 23
0x000000ff # 24 Testpulse Strength, default 0x80
0x00000000 # 15 Channel Masks END
0x000000a0 # 16
0x000000ff # 17
-0x0000005a # 18 Common Threshold, default 0x80
+0x00000028 # 18 Common Threshold, default 0x80
0x0000001e # 19
0x0000005f # 20
-0x00000088 # 21
+0x0000008e # 21
0x00000064 # 22
0x00000089 # 23
0x000000ff # 24 Testpulse Strength, default 0x80
0x00000000 # 15 Channel Masks END
0x000000a0 # 16
0x000000ff # 17
-0x00000041 # 18 Common Threshold, default 0x80
+0x00000028 # 18 Common Threshold, default 0x80
0x0000001e # 19
0x0000005f # 20
-0x0000008c # 21
+0x0000009b # 21
0x00000064 # 22
0x00000089 # 23
0x000000ff # 24 Testpulse Strength, default 0x80
0x00000000 # 15 Channel Masks END
0x000000a0 # 16
0x000000ff # 17
-0x0000005a # 18 Common Threshold, default 0x80
+0x00000028 # 18 Common Threshold, default 0x80
0x0000001e # 19
0x0000005f # 20
-0x0000008c # 21
+0x000000a8 # 21
0x00000064 # 22
0x00000089 # 23
0x000000ff # 24 Testpulse Strength, default 0x80
trbcmd w $board 0x8402 250 # window width 800ns
trbcmd w $board 0x8403 125 # CTS-Delay 400ns
+trbcmd w $board 0x8140 100 # test pulse length 400 ns
+
# Decoder Settings
trbcmd w $board 0x8120 0 # reset all counters
#!/bin/bash
-echo "Programming FPGAs"
-#Start
-../../../tools/command_client.pl -e etraxp129 -c "jam_trbv2 --trb -aRUN_XILINX_PROC /home/hadaq/tof/fpga/20120305_tof.stapl " &
+trb2/program_hub.sh &
+trb2/program_start.sh &
-#Hub
-../../../tools/command_client.pl -e etraxp022 -c "jam_trbv2 --addon -aFP /home/hadaq/hub/hub2_fpga1_full_20110517.stp"
-echo "Second FPGA"
-../../../tools/command_client.pl -e etraxp022 -c "jam_trbv2 --addon -aFP /home/hadaq/hub/hub2_fpga2_full_20110523.stp"
+wait
-echo "Finished"
\ No newline at end of file
./nxyter.sh
echo "++ CTS"
./cts.sh
+echo "++ Scalers"
+./scalers.sh
+
echo "================================"
trbcmd i 0xffff
echo "================================"
#!/bin/bash
-echo "Programming FPGAs - HUB"
+echo "HUB: Programming FPGA #1"
#Hub
-../../../tools/command_client.pl -e etraxp022 -c "jam_trbv2 --addon -aFP /home/hadaq/hub/hub2_fpga1_full_20110517.stp"
-echo "Second FPGA"
-../../../tools/command_client.pl -e etraxp022 -c "jam_trbv2 --addon -aFP /home/hadaq/hub/hub2_fpga2_full_20110523.stp"
+cmd="../../../tools/command_client.pl -e etraxp022 -c 'jam_trbv2 --addon -aFP /home/hadaq/hub/hub2_fpga1_full_20110517.stp'"
+echo ${cmd}
+#{cmd}
+../../../tools/command_client.pl -e etraxp022 -c 'jam_trbv2 --addon -aFP /home/hadaq/hub/hub2_fpga1_full_20110517.stp'
+echo "HUB: Programming FPGA #2"
+cmd="../../../tools/command_client.pl -e etraxp022 -c 'jam_trbv2 --addon -aFP /home/hadaq/hub/hub2_fpga2_full_20110523.stp'"
+echo ${cmd}
+#${cmd}
+../../../tools/command_client.pl -e etraxp022 -c 'jam_trbv2 --addon -aFP /home/hadaq/hub/hub2_fpga2_full_20110523.stp'
echo "Finished HUB"
#!/bin/bash
-echo "Programming FPGAs - START"
-#Start
+echo "START: Programming FPGAs"
+
+cmd="../../../tools/command_client.pl -e etraxp129 -c 'jam_trbv2 --trb -aRUN_XILINX_PROC /home/hadaq/tof/fpga/20120305_tof.stapl'"
+
+echo "${cmd}"
+
+#${cmd}
+
../../../tools/command_client.pl -e etraxp129 -c "jam_trbv2 --trb -aRUN_XILINX_PROC /home/hadaq/tof/fpga/20120305_tof.stapl "
echo "Finished START"
#../../../tools/command_client.pl -e etraxp$TRBNUM -c 'spi_trbv2_rl /home/hadaq/start_and_veto/thresholds_test'
#../../../tools/command_client.pl -e etraxp$TRBNUM -c 'spi_trbv2_rl /home/hadaq/start/run.cfg'
-../../../tools/command_client.pl -e etraxp$TRBNUM -c 'spi_trbv2_rl /home/hadaq/start/all_pmt.cfg'
+#../../../tools/command_client.pl -e etraxp$TRBNUM -c 'spi_trbv2_rl /home/hadaq/start/all_pmt.cfg'
+../../../tools/command_client.pl -e etraxp$TRBNUM -c 'spi_trbv2_3 /home/hadaq/start_and_veto/thresholds_juelich_129_12_2013'
../../../tools/command_client.pl -e etraxp$TRBNUM -c "cd /home/hadaq/scripts/; ./trbv2_TDCs_configure.sh ${TRBNUM}"
trbcmd clearbit $addr $(( 0x8200 + 32 )) 0x01
trbcmd clearbit $addr $(( 0x8200 + 32 )) 0x08
+trbcmd w $addr 0x8218 0
+
trbcmd w $addr 0x8160 0
trbcmd w $addr 0x8160 1
trbcmd w $addr 0x8140 100
+
+trbcmd w $addr 0x8218 0
trbcmd setbit $addr $(( 0x8200 + 32 )) 0x01
trbcmd setbit $addr $(( 0x8200 + 32 )) 0x08
+trbcmd w $addr 0x8218 0xff
+
trbcmd w $addr 0x8160 1
trbcmd w $addr 0x8140 100
echo "================================"
echo ""
-PS1=${COLOR_YELLOW}'\u@\h\[\033[01;34m\] \w$(parse_git_branch)'${COLOR_NC}' '
+#PS1=${COLOR_YELLOW}'\u@\h\[\033[01;34m\] \w$(parse_git_branch)'${COLOR_NC}' '
-[ -z "$(pidof trbnetd)" ] && /home/hadaq/trbsoft/trbnettools/binlocal/trbnetd
+[ -z "$(pidof trbnetd)" ] && /home/hadaq/trbsoft/trbnettools/bin/trbnetd
export TRB3_SERVER=trb3069
if [ -z "$(pidof trbnetd)" ]; then
- /home/hadaq/trbsoft/trbnettools_trb3/binlocal/trbnetd
+ /home/hadaq/trbsoft/trbnettools_trb3/bin/trbnetd
fi
. /home/hadaq/trbsoft/daqtools/users/cosy_test/trbnet_env_pexor.sh