From b0c72028498813326544e27704103e7c383534c1 Mon Sep 17 00:00:00 2001 From: ECal Group Date: Thu, 24 Sep 2015 14:00:54 +0200 Subject: [PATCH] added padiwa option --- thresholds/write_thresholds.pl | 2 ++ users/gsi_dlab_cbmpc26/first.C | 5 ++-- users/gsi_dlab_cbmpc26/start_readout.pl | 4 +-- users/gsi_dlab_cbmpc26/startup_trb046.sh | 31 ++++++++++++++---------- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/thresholds/write_thresholds.pl b/thresholds/write_thresholds.pl index c0ef4f2..93a02c7 100755 --- a/thresholds/write_thresholds.pl +++ b/thresholds/write_thresholds.pl @@ -10,10 +10,12 @@ use POSIX qw(strftime); my $offset = 0; my $help; +my $mode="padiwa"; my $result = GetOptions ( "h|help" => \$help, "o|offset=s" => \$offset, + "m|mode=s" => \$mode, ); if($help) { diff --git a/users/gsi_dlab_cbmpc26/first.C b/users/gsi_dlab_cbmpc26/first.C index 8843847..ce4b0ab 100644 --- a/users/gsi_dlab_cbmpc26/first.C +++ b/users/gsi_dlab_cbmpc26/first.C @@ -60,7 +60,7 @@ void first() //tdc->SetRefChannel(36, 35, 0xffff, 10000, -500., 500., true); tdc->SetRefChannel(35, 33, 0xffff, 10000, -10., 400., true); - tdc->SetRefChannel(36, 35, 0xffff, 10000, -10., 400., true); + tdc->SetRefChannel(36, 33, 0xffff, 10000, -10., 400., true); // IMPORTANT: for both channels references should be already specified tdc->SetDoubleRefChannel(36, 35, 1000, -10., 500., 1000, -10., 200.); } @@ -70,7 +70,8 @@ void first() tdc->CreateHistograms( channels ); tdc->SetRefChannel(1, 3, 0xffff, 10000, -50., 50., true); tdc->SetRefChannel(2, 4, 0xffff, 10000, -50., 50., true); - + + tdc->SetDoubleRefChannel(1, 2, 1000, -100., 100., 1000, -100., 100.); } diff --git a/users/gsi_dlab_cbmpc26/start_readout.pl b/users/gsi_dlab_cbmpc26/start_readout.pl index 09b0c39..2f8d15a 100755 --- a/users/gsi_dlab_cbmpc26/start_readout.pl +++ b/users/gsi_dlab_cbmpc26/start_readout.pl @@ -12,8 +12,8 @@ $c=q|pkill -f "daq_netmem -m 1"|; qx($c); -$c=q|xterm -geometry 122x14-0+0 -e bash -c 'daq_evtbuild -m 1 -d file -o /tmp'|; +$c=q|xterm -geometry 122x14-0+0 -e bash -c 'daq_evtbuild -m 1 -xte -d file -o /data/daq/'|; system("$c &"); sleep 1; -$c="xterm -geometry 82x10-0+210 -e bash -c 'daq_netmem -m 1 -i UDP:127.0.0.1:50000'"; +$c="xterm -geometry 82x10-0+210 -e bash -c 'daq_netmem -m 1 -i UDP:127.0.0.1:50001'"; system("$c &"); diff --git a/users/gsi_dlab_cbmpc26/startup_trb046.sh b/users/gsi_dlab_cbmpc26/startup_trb046.sh index c1e08f3..0f2a696 100755 --- a/users/gsi_dlab_cbmpc26/startup_trb046.sh +++ b/users/gsi_dlab_cbmpc26/startup_trb046.sh @@ -7,11 +7,13 @@ xset -b ##### 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 +#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 + +~/trbsoft/daqtools/merge_serial_address.pl ~/trbsoft/daqtools/base/serials_trb3.db ~/trbsoft/daqtools/base/addresses_trb3.db > /dev/null ##### Ethernet and UDP ####### trbcmd w 0x8000 0x8300 0x8000 # SubeventId @@ -34,8 +36,8 @@ trbcmd w 0x8000 0x8101 0x90f6 #upper byte # destination port and source IP and so on -trbcmd w 0x8000 0x8102 0xc0a80001 # destination IP-address: 192.168.0.1 -trbcmd w 0x8000 0x8103 0xc350 # destination port +trbcmd w 0x8000 0x8102 0xc0a80002 # destination IP-address: 192.168.0.2 +trbcmd w 0x8000 0x8103 0xc351 # destination port trbcmd w 0x8000 0x8104 0xdead8001 # source MAC-address trbcmd w 0x8000 0x8105 0x0230 # source MAC: upper bytes trbcmd w 0x8000 0x8106 0xc0a80072 # source IP @@ -46,19 +48,21 @@ trbcmd w 0x8000 0x8108 0x0578 # MTU ##### TDC ####### # 0xfe48 is the broadcast address of TDC-endpoints in the system trbcmd w 0xfe48 0xc800 0x00000001 ## logic analyser control register -trbcmd w 0xfe48 0xc801 0x020f0205 ## trigger window enable & trigger window width +trbcmd w 0xfe48 0xc801 0x81000100 ## trigger window enable & trigger window width trbcmd w 0xfe48 0xc802 0x00000000 ## channel 01-31 enable trbcmd w 0xfe48 0xc803 0x00000000 ## channel 32-63 enable -trbcmd w 0xfe48 0xc804 0x00000008 ## enable number of words +trbcmd w 0xfe48 0xc804 0x00000080 ## enable number of words -trbcmd w 0x0200 0xc802 0x0000000f ## channel 01-4 enable +trbcmd w 0x8a00 0xc802 0x00000000 ## channel 01-4 enable +trbcmd w 0x8a00 0xc803 0xffffffff ## channel 32-63 enable -#trbcmd w 0x0200 0xc803 0xffffffff ## channel 32-63 enable +trbcmd w 0x8a03 0xc802 0x0000003f ## channel 01-4 enable +trbcmd w 0x8a03 0xc803 0x00000000 ## channel 32-63 enable trbcmd w 0x8000 0xa140 0xffff #set CTS pulser to 100Hz -trbcmd setbit 0x8000 0xa101 0x2 #enable pulser channel 0 +trbcmd setbit 0x8000 0xa101 0x80 #enable trigger3 ##### to disable/enable specific peripheral FPGAs #### # trbcmd w 0x8000 0xc0 0xf1 @@ -67,6 +71,7 @@ trbcmd setbit 0x8000 0xa101 0x2 #enable pulser channel 0 # invert inputs, as input pulse is negative -~/trbsoft/daqtools/tools/padiwa.pl 0x200 1 invert 0xaaaa +~/trbsoft/daqtools/tools/padiwa.pl 0x8a00 0 invert 0xaaaa +~/trbsoft/daqtools/tools/padiwa.pl 0x8a00 1 invert 0xaaaa -- 2.43.0