From: Michael Traxler Date: Tue, 4 Nov 2014 16:35:48 +0000 (+0100) Subject: new files from Wuppertal X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=727393dcaba9b94a0b4aa98c6b8c9ef80caeeb64;p=daqtools.git new files from Wuppertal --- diff --git a/.gitignore b/.gitignore index 86f9099..ea3922f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ web/htdocs/monitor .kateproject.d *swp logs +bitfiles diff --git a/dmon/scripts/dmon_heatmaprich.pl b/dmon/scripts/dmon_heatmaprich.pl index e25c9ee..542654c 100755 --- a/dmon/scripts/dmon_heatmaprich.pl +++ b/dmon/scripts/dmon_heatmaprich.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl -w use warnings; +use strict; use POSIX qw(strftime); use FileHandle; use lib "./code"; @@ -26,8 +27,8 @@ $plot2->{curves} = 33; $plot2->{type} = HPlot::TYPE_HEATMAP; $plot2->{output} = HPlot::OUT_PNG; $plot2->{zlabel} = "Hitrate"; -$plot2->{sizex} = 800; -$plot2->{sizey} = 750; +$plot2->{sizex} = 700; +$plot2->{sizey} = 650; $plot2->{nokey} = 1; $plot2->{buffer} = 1; $plot2->{xmin} = 0.5; @@ -39,7 +40,7 @@ $plot2->{xlabel} = "column"; $plot2->{ylabel} = "row"; HPlot::PlotInit($plot2); -my $str = Dmon::MakeTitle(12,12,"HeatmapRich",0); +my $str = Dmon::MakeTitle(10,15,"HeatmapRich",0); $str .= qq@@; $str .= Dmon::MakeFooter(); Dmon::WriteFile("HeatmapRich",$str); @@ -52,8 +53,7 @@ my $diff; while (1) { - my $t = trb_register_read_mem(0xfe48,0xc000,0,33); - + my $o = trb_register_read_mem(0xfe4c,0xc000,0,33); if (defined $old) { foreach my $b (keys %$o) { @@ -64,13 +64,12 @@ while (1) { $diff->{$b}->[$v] = $vdiff/($tdiff|1); } } - - - for my $x (0..31) { - for my $y (0..31) { +# print Dumper $diff; + for my $x (1..32) { + for my $y (1..32) { my $fpga = $ChannelMapping::chanmap->{fpga}->[$x]->[$y]; my $channel = $ChannelMapping::chanmap->{chan}->[$x]->[$y]; - HPlot::PlotFill('HeatmapRich',$diff->{$fpga}->[$channel],$x+1,$y+1); + HPlot::PlotFill('HeatmapRich',$diff->{$fpga}->[$channel],$x,$y); } } HPlot::PlotDraw('HeatmapRich'); diff --git a/dmon/scripts/dmon_qa.pl b/dmon/scripts/dmon_qa.pl index d380518..6248e3f 100755 --- a/dmon/scripts/dmon_qa.pl +++ b/dmon/scripts/dmon_qa.pl @@ -76,7 +76,8 @@ while($a = ) { $str .= "
".$title."
".$value."
\n"; + $str .= "onclick=\"openhelp('$link')\"" if $link ne ""; + $str .= "> ".$title."
".$value."\n"; } } diff --git a/dmon/scripts/dmon_trgrate.pl b/dmon/scripts/dmon_trgrate.pl index e05099b..9bb4a1d 100755 --- a/dmon/scripts/dmon_trgrate.pl +++ b/dmon/scripts/dmon_trgrate.pl @@ -1,4 +1,4 @@ -M#!/usr/bin/perl -w +#!/usr/bin/perl -w use warnings; use POSIX qw(strftime); diff --git a/tools/HPlot.pm b/tools/HPlot.pm index a4c55ff..5f4bf55 100755 --- a/tools/HPlot.pm +++ b/tools/HPlot.pm @@ -226,15 +226,16 @@ sub PlotDraw { if($p->{$name}->{type} == TYPE_HEATMAP) { - for(my $j=0; $j<$p->{$name}->{curves}; $j++) { - for(my $i=0; $i< $p->{$name}->{entries}; $i++) { - plot_write($p->{$name}->{fh},($p->{$name}->{value}->[$j]->[$i]||0)." ",1); + if($p->{$name}->{showvalues}) { + for(my $j=0; $j<$p->{$name}->{curves}; $j++) { + for(my $i=0; $i< $p->{$name}->{entries}; $i++) { + plot_write($p->{$name}->{fh},($p->{$name}->{value}->[$j]->[$i]||0)." ",1); + } + plot_write($p->{$name}->{fh}," ",0); } - plot_write($p->{$name}->{fh}," ",0); + plot_write($p->{$name}->{fh},"e"); + plot_write($p->{$name}->{fh},"e"); } - plot_write($p->{$name}->{fh},"e"); - plot_write($p->{$name}->{fh},"e"); -# } for(my $j=0; $j<$p->{$name}->{curves}; $j++) { for(my $i=0; $i< $p->{$name}->{entries}; $i++) { plot_write($p->{$name}->{fh},($p->{$name}->{value}->[$j]->[$i]||0)." ",1); diff --git a/users/cern_cbmrich/ChannelMapping.pm b/users/cern_cbmrich/ChannelMapping.pm index 580d690..d675007 100644 --- a/users/cern_cbmrich/ChannelMapping.pm +++ b/users/cern_cbmrich/ChannelMapping.pm @@ -1,4 +1,4 @@ -package channelmapping; +package ChannelMapping; use warnings; use strict; @@ -2060,4 +2060,4 @@ $chanmap->{chan}->[1 ]->[5 ]= 23; $chanmap->{chan}->[1 ]->[4 ]= 15; $chanmap->{chan}->[1 ]->[3 ]= 11; $chanmap->{chan}->[1 ]->[2 ]= 3 ; -$chanmap->{chan}->[1 ]->[1 ]= 1 ; \ No newline at end of file +$chanmap->{chan}->[1 ]->[1 ]= 1 ; diff --git a/users/cern_cbmrich/dmon_config.pl b/users/cern_cbmrich/dmon_config.pl index fc6268c..456fb71 100644 --- a/users/cern_cbmrich/dmon_config.pl +++ b/users/cern_cbmrich/dmon_config.pl @@ -58,7 +58,7 @@ BillboardAddress => 0xf30a, MBSAddress => 0xf30a, #Addresses of all TDCs. Either single or broadcast addresses -TdcAddress => [0xfe48,0xfe4e,0x7005], +TdcAddress => [0xfe4c,0xfe4e,0x7005], TrbIP => ["192.168.0.0", "192.168.0.1", diff --git a/users/cern_cbmrich/register_config_tdc.db b/users/cern_cbmrich/register_config_tdc.db index 8f73bbd..887d2b9 100644 --- a/users/cern_cbmrich/register_config_tdc.db +++ b/users/cern_cbmrich/register_config_tdc.db @@ -91,7 +91,7 @@ #for now: disable TDC for beam counter - 0x0110 0 0x00000000 0x00000000 + 0x0110 0 0x0000ffff 0x00000000 0x0111 0 0x00000000 0x00000000 0x0112 0 0x00000000 0x00000000 0x0113 0 0x00000000 0x00000000 diff --git a/users/cern_cbmrich/register_configgbe_ip.db b/users/cern_cbmrich/register_configgbe_ip.db index f1ac6a2..7b455fd 100644 --- a/users/cern_cbmrich/register_configgbe_ip.db +++ b/users/cern_cbmrich/register_configgbe_ip.db @@ -28,30 +28,30 @@ # Hub # Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # ######################################################################################################################################## - 0x7005 0 0x785a2602 0x001b 0xc0a80002 0xc350 0xdead8000 0x001b 0xc0a80000 0xc350 0x0578 - 0x8015 0 0x785a2602 0x001b 0xc0a80002 0xc351 0xdead8001 0x001b 0xc0a80001 0xc351 0x0578 - 0x8025 0 0x785a2602 0x001b 0xc0a80002 0xc352 0xdead8002 0x001b 0xc0a80002 0xc352 0x0578 - 0x8035 0 0x785a2602 0x001b 0xc0a80002 0xc353 0xdead8003 0x001b 0xc0a80003 0xc353 0x0578 - 0x8045 0 0x785a2602 0x001b 0xc0a80002 0xc354 0xdead8004 0x001b 0xc0a80004 0xc354 0x0578 - 0x8055 0 0x785a2602 0x001b 0xc0a80002 0xc355 0xdead8005 0x001b 0xc0a80005 0xc355 0x0578 - 0x8065 0 0x785a2602 0x001b 0xc0a80002 0xc356 0xdead8006 0x001b 0xc0a80006 0xc356 0x0578 - 0x8075 0 0x785a2602 0x001b 0xc0a80002 0xc357 0xdead8007 0x001b 0xc0a80007 0xc357 0x0578 - 0x8085 0 0x785a2602 0x001b 0xc0a80002 0xc358 0xdead8008 0x001b 0xc0a80008 0xc358 0x0578 - 0x8095 0 0x785a2602 0x001b 0xc0a80002 0xc359 0xdead8009 0x001b 0xc0a80009 0xc359 0x0578 - 0x80a5 0 0x785a2602 0x001b 0xc0a80002 0xc35a 0xdead8010 0x001b 0xc0a80010 0xc35a 0x0578 - 0x80b5 0 0x785a2602 0x001b 0xc0a80002 0xc35b 0xdead8011 0x001b 0xc0a80011 0xc35b 0x0578 - 0x80c5 0 0x785a2602 0x001b 0xc0a80002 0xc35c 0xdead8012 0x001b 0xc0a80012 0xc35c 0x0578 - 0x80d5 0 0x785a2602 0x001b 0xc0a80002 0xc35d 0xdead8013 0x001b 0xc0a80013 0xc35d 0x0578 - 0x80e5 0 0x785a2602 0x001b 0xc0a80002 0xc35e 0xdead8014 0x001b 0xc0a80014 0xc35e 0x0578 - 0x80f5 0 0x785a2602 0x001b 0xc0a80002 0xc35f 0xdead8015 0x001b 0xc0a80015 0xc35f 0x0578 - 0x8105 0 0x785a2602 0x001b 0xc0a80002 0xc360 0xdead8016 0x001b 0xc0a80016 0xc360 0x0578 - 0x8115 0 0x785a2602 0x001b 0xc0a80002 0xc361 0xdead8017 0x001b 0xc0a80017 0xc361 0x0578 -#0x8125 0 0x785a2602 0x001b 0xc0a80002 0xc362 0xdead8018 0x001b 0xc0a80018 0xc362 0x0578 -#0x8135 0 0x785a2602 0x001b 0xc0a80002 0xc363 0xdead8019 0x001b 0xc0a80019 0xc363 0x0578 -#0x8145 0 0x785a2602 0x001b 0xc0a80002 0xc364 0xdead8020 0x001b 0xc0a80020 0xc364 0x0578 -#0x8155 0 0x785a2602 0x001b 0xc0a80002 0xc365 0xdead8021 0x001b 0xc0a80021 0xc365 0x0578 -#0x8165 0 0x785a2602 0x001b 0xc0a80002 0xc366 0xdead8022 0x001b 0xc0a80022 0xc366 0x0578 -#0x8175 0 0x785a2602 0x001b 0xc0a80002 0xc367 0xdead8023 0x001b 0xc0a80023 0xc367 0x0578 -#0x8185 0 0x785a2602 0x001b 0xc0a80002 0xc368 0xdead8024 0x001b 0xc0a80024 0xc368 0x0578 -#0x8195 0 0x785a2602 0x001b 0xc0a80002 0xc369 0xdead8025 0x001b 0xc0a80025 0xc369 0x0578 -#0x81a5 0 0x785a2602 0x001b 0xc0a80002 0xc36a 0xdead8026 0x001b 0xc0a80026 0xc36a 0x0578 + 0x7005 0 0x7e344bb9 0x4016 0xc0a80003 0xc350 0xdead8000 0x001b 0xc0a80000 0xc350 0x0578 + 0x8015 0 0x7e344bb9 0x4016 0xc0a80003 0xc351 0xdead8001 0x001b 0xc0a80001 0xc351 0x0578 + 0x8025 0 0x7e344bb9 0x4016 0xc0a80003 0xc352 0xdead8002 0x001b 0xc0a80002 0xc352 0x0578 + 0x8035 0 0x7e344bb9 0x4016 0xc0a80003 0xc353 0xdead8003 0x001b 0xc0a80003 0xc353 0x0578 + 0x8045 0 0x7e344bb9 0x4016 0xc0a80003 0xc354 0xdead8004 0x001b 0xc0a80004 0xc354 0x0578 + 0x8055 0 0x7e344bb9 0x4016 0xc0a80003 0xc355 0xdead8005 0x001b 0xc0a80005 0xc355 0x0578 + 0x8065 0 0x7e344bb9 0x4016 0xc0a80003 0xc356 0xdead8006 0x001b 0xc0a80006 0xc356 0x0578 + 0x8075 0 0x7e344bb9 0x4016 0xc0a80003 0xc357 0xdead8007 0x001b 0xc0a80007 0xc357 0x0578 + 0x8085 0 0x7e344bb9 0x4016 0xc0a80003 0xc358 0xdead8008 0x001b 0xc0a80008 0xc358 0x0578 + 0x8095 0 0x7e344bb9 0x4016 0xc0a80003 0xc359 0xdead8009 0x001b 0xc0a80009 0xc359 0x0578 + 0x80a5 0 0x7e344bb9 0x4016 0xc0a80003 0xc35a 0xdead8010 0x001b 0xc0a80010 0xc35a 0x0578 + 0x80b5 0 0x7e344bb9 0x4016 0xc0a80003 0xc35b 0xdead8011 0x001b 0xc0a80011 0xc35b 0x0578 + 0x80c5 0 0x7e344bb9 0x4016 0xc0a80003 0xc35c 0xdead8012 0x001b 0xc0a80012 0xc35c 0x0578 + 0x80d5 0 0x7e344bb9 0x4016 0xc0a80003 0xc35d 0xdead8013 0x001b 0xc0a80013 0xc35d 0x0578 + 0x80e5 0 0x7e344bb9 0x4016 0xc0a80003 0xc35e 0xdead8014 0x001b 0xc0a80014 0xc35e 0x0578 + 0x80f5 0 0x7e344bb9 0x4016 0xc0a80003 0xc35f 0xdead8015 0x001b 0xc0a80015 0xc35f 0x0578 + 0x8105 0 0x7e344bb9 0x4016 0xc0a80003 0xc360 0xdead8016 0x001b 0xc0a80016 0xc360 0x0578 + 0x8115 0 0x7e344bb9 0x4016 0xc0a80003 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 +#0x8155 0 0x7e344bb9 0x4016 0xc0a80002 0xc365 0xdead8021 0x001b 0xc0a80021 0xc365 0x0578 +#0x8165 0 0x7e344bb9 0x4016 0xc0a80002 0xc366 0xdead8022 0x001b 0xc0a80022 0xc366 0x0578 +#0x8175 0 0x7e344bb9 0x4016 0xc0a80002 0xc367 0xdead8023 0x001b 0xc0a80023 0xc367 0x0578 +#0x8185 0 0x7e344bb9 0x4016 0xc0a80002 0xc368 0xdead8024 0x001b 0xc0a80024 0xc368 0x0578 +#0x8195 0 0x7e344bb9 0x4016 0xc0a80002 0xc369 0xdead8025 0x001b 0xc0a80025 0xc369 0x0578 +#0x81a5 0 0x7e344bb9 0x4016 0xc0a80002 0xc36a 0xdead8026 0x001b 0xc0a80026 0xc36a 0x0578 diff --git a/users/cern_cbmrich/startup.sh b/users/cern_cbmrich/startup.sh index 3c87c61..139fc04 100755 --- a/users/cern_cbmrich/startup.sh +++ b/users/cern_cbmrich/startup.sh @@ -51,11 +51,13 @@ echo "XXX: Running script loadregisterdb.pl register_configgbe_ip.db" #trbcmd w 0xfe48 0xc800 0x00003000 ## Triggerless mode #trbcmd w 0xfe48 0xc801 0x000f0005 ## trigger window enable & trigger window width -trbcmd w 0xfe48 0xc800 0x00001001 ## logic analyser control register #tiggerless -trbcmd w 0xfe48 0xc801 0x00620062 ## no triggerwindow +/-490ns ;5ns granularity -trbcmd w 0xfe48 0xc802 0xffffffff ## channel 01-32 enable -trbcmd w 0xfe48 0xc803 0x00000000 ## channel 33-64 enable -trbcmd w 0xfe48 0xc804 0x00000080 ## data transfer limit (0x80 = off) +trbcmd w 0xfe4c 0xc800 0x00001001 ## logic analyser control register #tiggerless +trbcmd w 0xfe4c 0xc801 0x00620062 ## no triggerwindow +/-490ns ;5ns granularity +trbcmd w 0xfe4c 0xc804 0x00000080 ## data transfer limit (0x80 = off) + +trbcmd w 0xfe4a 0xc800 0x00001001 ## logic analyser control register #tiggerless +trbcmd w 0xfe4a 0xc801 0x00620062 ## no triggerwindow +/-490ns ;5ns granularity +trbcmd w 0xfe4a 0xc804 0x00000080 ## data transfer limit (0x80 = off) #trbcmd w 0x1510 0xc800 0x00001001 ## logic analyser control register @@ -112,12 +114,13 @@ echo "- setting trigger rate register in TDC"; trbcmd w 0x7005 0xa150 0x0001869f # pulser enable -trbcmd setbit 0x7005 0xa101 0x2 +trbcmd setbit 0x7005 0xa101 0x1 #trbcmd clearbit 0x8000 0xa101 0x3 # divert TDC inputs to the CTS for trigger echo "- divert TDC inputs to the CTS for trigger"; -trbcmd setbit 0xfe48 0xcf00 0x1 +trbcmd setbit 0xfe4c 0xcf00 0x1 +trbcmd setbit 0xfe4a 0xcf00 0x1