]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
new status, mt
authorHades DAQ <hadaq@hades39.gsi.de>
Mon, 27 Mar 2017 14:27:36 +0000 (16:27 +0200)
committerHades DAQ <hadaq@hades39.gsi.de>
Mon, 27 Mar 2017 14:27:36 +0000 (16:27 +0200)
12 files changed:
tools/determine_noiseband_dirich.pl
tools/flash_settings.pl
users/gsi_ee_trb84/TdcEventBuilder.xml
users/gsi_ee_trb84/check_ping.pl
users/gsi_ee_trb84/db/addresses_dirich.db
users/gsi_ee_trb84/db/addresses_trb3.db
users/gsi_ee_trb84/db/register_configgbe.db
users/gsi_ee_trb84/db/register_configgbe_ip.db
users/gsi_ee_trb84/first.C
users/gsi_ee_trb84/second.C
users/gsi_ee_trb84/startup.sh
users/gsi_ee_trb84/trbreset_loop.pl

index cbbbbef121509d481fa1caab0a9d8831fdda4985..b3aa9f70b311bcb83f4d3c9c97b03a5be9987da3 100755 (executable)
@@ -5,11 +5,11 @@ use HADES::TrbNet;
 use Time::HiRes qw(usleep);
 use Data::Dumper;
 
-my $dirich = 0x1204;
+my $dirich = 0x1207;
 my $throffset = 0xa000;
 my $monitor = 0xdfc0;
 
-my $last_channel = 5;
+my $last_channel = 8;
 
 my $default_threshold = 0x3000;
 
index adcbb44385a60bfeb0714ca564350687404fb1df..7b5546613c84a14998ab90b1a3873a3e3dabd5f8 100755 (executable)
@@ -117,7 +117,7 @@ my $registers_to_read = 0;
 my $register_counter_on_page = 0;
 $page = chr(0) x 256; # initialize empty page;
 
-my @addresses = sort { $a <=> $b } keys $sc_data;
+my @addresses = sort { $a <=> $b } keys %{$sc_data};
 for my $addr (@addresses) {
   
   insert_at(\$page,6*$register_counter_on_page,   my_uint($addr,             2) );
index e1bd0fb4f40cc6681f7c27ca9deaf0ea46af38ed..d80f118553082ecae73d59b78e75961f66f085b2 100644 (file)
@@ -96,13 +96,13 @@ When starting analysis from the go4 gui, one should specify stream server with p
     <Module name="Combiner" class="hadaq::CombinerModule">    
         <!-- these parameters will force to create inputs/outputs of module -->
        <NumInputs value="4"/>
-       <NumOutputs value="2"/>
-
-       <InputPort name="Input0" url="hadaq://host:50061" urlopt1=""/>
-       <InputPort name="Input1" url="hadaq://host:50113" urlopt1=""/>
-       <InputPort name="Input2" url="hadaq://host:50084" urlopt1=""/>
-       <InputPort name="Input3" url="hadaq://host:50158" urlopt1=""/>
+       <NumOutputs value="1"/>
 
+       <InputPort name="Input0" url="hadaq://host:50084" urlopt1="" thread="inp2thrd"/>
+       <InputPort name="Input1" url="hadaq://host:50061" urlopt1="" thread="inp1thrd"/>
+<!--       <InputPort name="Input1" url="hadaq://host:50113" urlopt1=""/> -->
+       <InputPort name="Input2" url="hadaq://host:50113" urlopt1="" thread="inp3thrd"/>
+       <InputPort name="Input3" url="hadaq://host:50158" urlopt1="" thread="inp0thrd"/>       
        <InputPort name="Input4" url="hadaq://host:10104" urlopt1="trb=0x8030&tdc=[0x3030,0x3031,0x3032,0x3033]&dummy"/>
        <InputPort name="Input5" url="hadaq://host:10105" urlopt1="trb=0x8040&tdc=[0x3040,0x3041,0x3042,0x3043]&dummy"/>
 
@@ -112,7 +112,7 @@ When starting analysis from the go4 gui, one should specify stream server with p
        <!-- <InputPort name="Input3" url="hadaq://host:10104" urlopt1="trb=0x8030&tdc=[0x3030,0x3031,0x3032,0x3033]&dummy"/> -->
        <!-- <InputPort name="Input4" url="hadaq://host:10105" urlopt1="trb=0x8040&tdc=[0x3040,0x3041,0x3042,0x3043]&dummy"/> -->
 
-       <InputPort name="Input*" queue="30" urlopt="udpbuf=2000000&mtu=64512&flush=2.0&observer=false&debug&resort"/>
+       <InputPort name="Input*" queue="30" urlopt="udpbuf=20000&mtu=64512&flush=2.0&observer=false&debug"/>
 
        <ExtraDebug value="false"/>
 
index ff146b6f75ba2057e25abb672d094ca01d9f7859..589783af59d5902f6524ab4fc289fb1d978619fa 100755 (executable)
@@ -20,9 +20,9 @@ my $result = GetOptions (
 
 my $map = {
  0 => { trb =>  84, addr => "0xc001", sys => "CTS"},
- 1 => { trb =>  61, addr => "0x8000", sys => "TOF"},
- 2 => { trb => 113, addr => "0x8001", sys => "TOF"}, 
- 3 => { trb => 158, addr => "0x8002", sys => "TOF"},
+ 1 => { trb =>  61, addr => "0x8610", sys => "TOF"},
+ 2 => { trb => 113, addr => "0x8113", sys => "TOF"}, 
+ 3 => { trb => 158, addr => "0x8158", sys => "TOF"},
 
 };
 my $MAX_PROCESSES=50;
@@ -100,7 +100,7 @@ while ( (($first_iteration == 1) || keys %$rh_unsuccessful) &&
   if ($reboot && ($number_of_reboots_done < $maximal_reboot_counter) && keys %$rh_unsuccessful) {
     #print Dumper $rh_unsuccessful;
     print "have to reboot FPGAs, first make a reset and reassign the addresses.\n";
-    my $cmd = "trbcmd reset; sleep 2;  merge_serial_address.pl ~/trbsoft/daqtools/base/serials_trb3.db ~/trbsoft/userscript/db/addresses_trb3.db";
+    my $cmd = 'trbcmd reset; sleep 2;  ~/trbsoft/daqtools/merge_serial_address.pl $DAQ_TOOLS_PATH/base/serials_trb3.db $USER_DIR/db/addresses_trb3.db';
     qx($cmd);
     sleep 3;
     # test trbnet:
index 6613a19c7dfb04e45d60262ca13622b30beed1ae..48ba6d09f297bdb60f499f9473f9c0350c505f5b 100644 (file)
@@ -11,4 +11,5 @@
 0x1206             0006     1
 0x1207             0007     1
 0x1208             0008     1
+0x1209             0009     1
 
index a480b5f1fb46d10b1a338018993129521c34ba1e..31eaea0427ffd887da284f42cef888f08aa8e092 100644 (file)
 0x1583            158     3
 0x8158     158            5
 
+
+#slave
+0x1700            170     0
+0x1701            170     1
+0x1702            170     2
+0x1703            170     3
+0x8170     170            5
+
+#slave
+0x1620            162     0
+0x1621            162     1
+0x1622            162     2
+0x1623            162     3
+0xc001     162            5
+
+
+#slave
+0x1680            168     0
+0x1681            168     1
+0x1682            168     2
+0x1683            168     3
+0x8168     168            5
+
+
+
+
+
+
+
+
index ff874836065f88c5cf0eff937af477c53bf6f0f7..a35bfd35810c31f6f97598be0a1d6cc182a8896e 100644 (file)
@@ -1,15 +1,25 @@
 !Register table
 #  Type  #   C0   #   C1   #   C2   #   C3   #   C4   #   C5   #   C6   #   C7   #   C8   #  C9   #  C10
 ###########################################################################################################
-     0     0x8300   0x8301   0x8302   0x8303   0x8304   0x8305   0x8306   0x8307    0x8308  0x830b  0x830d
-
+     0     0x8300   0x8305   0x8307   0x8308   0x830b   
+     1     0x8301   0x8302   0x8304   0x8309   0x830c   0x830e   0x830f   0x8310
 
 !Value table
 #                                                                                                                                                      Enable
-#                    SubEvtId     SubEvtDec     QueDec      PackSize     FrameSize    UseGbE       UseTrbNet   MultiQueue   Trig. Num.   MinEvtSize  Readout Bit
-# Hub    #  Type  #     C0     #     C1     #     C2     #     C3     #     C4     #     C5     #     C6     #     C7     #    C8     #    C9     #      C10    #
-#################################################################################################################################################################
-  0xc001      0       0xc001     0x00020001   0x00030062     0xEA60       0x578          1            0            1        0xffffff      0x7            0x1
-  0x8610      0       0x8000     0x00020001   0x00030062     0xEA60       0x578          1            0            1        0xffffff      0x7            0x1
-  0x8113      0       0x8001     0x00020001   0x00030062     0xEA60       0x578          1            0            1        0xffffff      0x7            0x1
-  0x8158      0       0x8002     0x00020001   0x00030062     0xEA60       0x578          1            0            1        0xffffff      0x7            0x1
+#                    SubEvtId      UseGbE      MultiQueue   Trig. Num.  InclTrgType  
+# Hub    #  Type  #     C0     #     C1     #     C2     #    C3     #      C4      
+##################################################################################
+  0xc001      0       0xc001          1            0        0xffffff         1      
+  0x8610      0       0x8000          1            0        0xffffff         1      
+  0x8113      0       0x8001          1            0        0xffffff         1      
+  0x8158      0       0x8002          1            0        0xffffff         1      
+
+
+
+
+
+#These values to not need to be written - for completeness only  
+#                    SubEvtDec     QueDec     FrameSize   RX enable    SubEvtSize   Evt/Queue    QueueClose  MaxQueueSize
+# Hub    #  Type  #     C0     #     C1     #     C2    #     C3     #     C4     #     C5     #     C6     #     C7     #
+##########################################################################################################################
+# 0xff7f      1      0x00020001   0x00030062     0x578         1         59800         200        32000         60000
index 93d22edbccc0d5ac1f3cf7ba08c45b080b5f2093..df1a7a1eb074cb2b0f696e5dfbc93a808b50ad48 100644 (file)
@@ -3,37 +3,33 @@
 # EB 0:   kp1pc105  eth1  00:1B:21:43:97:EA 192.168.0.2 ports 50000 - 50099
 
 !Register table
-#  Type  #   C0   #   C1   #   C2   #   C3   #   C4   #   C5   #   C6   #   C7   #   C8   #
-###########################################################################################
+#  Type  #   C0   #   C1   #   C2   #   C3   #   C4   #
+#######################################################
 #new memory locations
-     0     0x8100   0x8101   0x8102   0x8103   0x8104   0x8105   0x8106   0x8107   0x8108
-     1     0x8110   0x8111   0x8112   0x8113   0x8114   0x8115   0x8116   0x8117   0x8118
-     2     0x8120   0x8121   0x8122   0x8123   0x8124   0x8125   0x8126   0x8127   0x8128
-     3     0x8130   0x8131   0x8132   0x8133   0x8134   0x8135   0x8136   0x8137   0x8138
-     4     0x8140   0x8141   0x8142   0x8143   0x8144   0x8145   0x8146   0x8147   0x8148
-     5     0x8150   0x8151   0x8152   0x8153   0x8154   0x8155   0x8156   0x8157   0x8158
-     6     0x8160   0x8161   0x8162   0x8163   0x8164   0x8165   0x8166   0x8167   0x8168
-     7     0x8170   0x8171   0x8172   0x8173   0x8174   0x8175   0x8176   0x8177   0x8178
-     8     0x8180   0x8181   0x8182   0x8183   0x8184   0x8185   0x8186   0x8187   0x8188
-     9     0x8190   0x8191   0x8192   0x8193   0x8194   0x8195   0x8196   0x8197   0x8198
-    10     0x81A0   0x81A1   0x81A2   0x81A3   0x81A4   0x81A5   0x81A6   0x81A7   0x81A8
-    11     0x81B0   0x81B1   0x81B2   0x81B3   0x81B4   0x81B5   0x81B6   0x81B7   0x81B8
-    12     0x81C0   0x81C1   0x81C2   0x81C3   0x81C4   0x81C5   0x81C6   0x81C7   0x81C8
-    13     0x81D0   0x81D1   0x81D2   0x81D3   0x81D4   0x81D5   0x81D6   0x81D7   0x81D8
-    14     0x81E0   0x81E1   0x81E2   0x81E3   0x81E4   0x81E5   0x81E6   0x81E7   0x81E8
-    15     0x81F0   0x81F1   0x81F2   0x81F3   0x81F4   0x81F5   0x81F6   0x81F7   0x81F8
+     0     0x8100   0x8101   0x8102   0x8103   0x8107  
+     1     0x8110   0x8111   0x8112   0x8113   0x8117  
+     2     0x8120   0x8121   0x8122   0x8123   0x8127  
+     3     0x8130   0x8131   0x8132   0x8133   0x8137  
+     4     0x8140   0x8141   0x8142   0x8143   0x8147  
+     5     0x8150   0x8151   0x8152   0x8153   0x8157  
+     6     0x8160   0x8161   0x8162   0x8163   0x8167  
+     7     0x8170   0x8171   0x8172   0x8173   0x8177  
+     8     0x8180   0x8181   0x8182   0x8183   0x8187  
+     9     0x8190   0x8191   0x8192   0x8193   0x8197  
+    10     0x81A0   0x81A1   0x81A2   0x81A3   0x81A7  
+    11     0x81B0   0x81B1   0x81B2   0x81B3   0x81B7  
+    12     0x81C0   0x81C1   0x81C2   0x81C3   0x81C7  
+    13     0x81D0   0x81D1   0x81D2   0x81D3   0x81D7  
+    14     0x81E0   0x81E1   0x81E2   0x81E3   0x81E7  
+    15     0x81F0   0x81F1   0x81F2   0x81F3   0x81F7  
 
 !Value table
-#                    Dest MAC    Dest MAC       Dest IP     Dest Port    Src MAC     Src MAC       Src IP        Src Port   Packet Size
-# Hub    #  Type  #     C0     #     C1     #     C2     #     C3     #     C4     #     C5     #     C6     #     C7     #     C8     #
-########################################################################################################################################
-
-# kp1pc105
-#0xc001                0   0x214397EA    0x001b      0xc0a80002      0xc3a4     0xDEADc000     0x001B   0xc0a80154      0xc350     0x0578
-#0x8000                0   0x214397EA    0x001b      0xc0a80002      0xc38d     0xDEADc000     0x001c   0xc0a80155      0xc350     0x0578
+#                Dest MAC   Dest MAC    Dest IP     Dest Port  Src Port  
+# Hub  # Type #     C0    #     C1   #     C2     #    C3    #    C7   #
+########################################################################
 
 #14:dd:a9:d3:f4:b8 # hadesp39
- 0xc001                0   0xa9d3f4b8    0x14dd      0xc0a800b1      0xc3a4     0xDEADc000     0x001B   0xc0a80154      0xc350     0x0578
- 0x8610                0   0xa9d3f4b8    0x14dd      0xc0a800b1      0xc38d     0xDEADc001     0x001d   0xc0a80155      0xc350     0x0578
- 0x8113                0   0xa9d3f4b8    0x14dd      0xc0a800b1      0xc3c1     0xDEADc002     0x001d   0xc0a80156      0xc350     0x0578
- 0x8158                0   0xa9d3f4b8    0x14dd      0xc0a800b1      0xc3ee     0xDEADc003     0x001d   0xc0a80157      0xc350     0x0578
+ 0xc001    0    0xa9d3f4b8    0x14dd    0xc0a800b1    50084    0xc350
+ 0x8610    0    0xa9d3f4b8    0x14dd    0xc0a800b1    50061     0xc350
+ 0x8113           0    0xa9d3f4b8    0x14dd    0xc0a800b1    50113     0xc350
+ 0x8158           0    0xa9d3f4b8    0x14dd    0xc0a800b1    50158     0xc350
index d805e1d8ed919cee5169cbc03c5740f532ceb5b9..dc9ff9e17604b73e18db8b2d09c00209df903816 100644 (file)
@@ -10,16 +10,16 @@ void first()
    base::ProcMgr::instance()->SetHistFilling(4);
 
    // configure bubbles
-   hadaq::TdcProcessor::SetBubbleMode(3, 18);
+   //hadaq::TdcProcessor::SetBubbleMode(3, 18);
 
-   // this limits used for liner calibrations when nothing else is available
-   hadaq::TdcMessage::SetFineLimits(31, 491);
+   // this limits used for linear calibrations when nothing else is available
+   hadaq::TdcMessage::SetFineLimits(81, 464);
 
    // default channel numbers and edges mask
-   hadaq::TrbProcessor::SetDefaults(5, 1);
+   hadaq::TrbProcessor::SetDefaults(32, 1);
 
    // [min..max] range for TDC ids
-   hadaq::TrbProcessor::SetTDCRange(0x1200, 0x12FF);
+   hadaq::TrbProcessor::SetTDCRange(0x1200, 0x15FF);
 
    // [min..max] range for HUB ids
    hadaq::TrbProcessor::SetHUBRange(0x8000, 0x8fff);
@@ -31,10 +31,10 @@ void first()
    const char* calname = getenv("CALNAME");
    if ((calname==0) || (*calname==0)) calname = "test_";
    const char* calmode = getenv("CALMODE");
-   int cnt = (calmode && *calmode) ? atoi(calmode) : 10000;
-   cnt=100000;
+   int cnt = (calmode && *calmode) ? atoi(calmode) : 100000;
+   //cnt=100000;
    const char* caltrig = getenv("CALTRIG");
-   unsigned trig = (caltrig && *caltrig) ? atoi(caltrig) : 0x1;
+   unsigned trig = (caltrig && *caltrig) ? atoi(caltrig) : 0x0;
    const char* uset = getenv("USETEMP");
    unsigned use_temp = 0; // 0x80000000;
    if ((uset!=0) && (*uset!=0) && (strcmp(uset,"1")==0)) use_temp = 0x80000000;
@@ -54,18 +54,19 @@ void first()
    //    0x3FFF - all kinds of trigger types will be used for calibration (excluding 0xE and 0xF)
    //   0x80000000 in mask enables usage of temperature correction
    hld->ConfigureCalibration(calname, cnt, (1 << trig) | use_temp);
+   //hld->ConfigureCalibration(calname, 100000, 1);
 
    // only accept trigger type 0x1 when storing file
    // new hadaq::HldFilter(0x1);
 
    // create ROOT file store
-   base::ProcMgr::instance()->CreateStore("td.root");
+   //base::ProcMgr::instance()->CreateStore("td.root");
 
    // 0 - disable store
    // 1 - std::vector<hadaq::TdcMessageExt> - includes original TDC message
    // 2 - std::vector<hadaq::MessageFloat>  - compact form, without channel 0, stamp as float (relative to ch0)
    // 3 - std::vector<hadaq::MessageDouble> - compact form, with channel 0, absolute time stamp as double
-   base::ProcMgr::instance()->SetStoreKind(2);
+   base::ProcMgr::instance()->SetStoreKind(0);
 
 
    // when configured as output in DABC, one specifies:
@@ -95,14 +96,19 @@ extern "C" void after_create(hadaq::HldProcessor* hld)
 
       printf("Configure %s!\n", tdc->GetName());
 
-      // tdc->SetUseLastHit(true);
+      tdc->SetUseLastHit(false);
 
-      // tdc->SetStoreEnabled();
-      for (unsigned nch=2;nch<tdc->NumChannels();nch++)
-        tdc->SetRefChannel(nch, nch-2, 0xffff, 20000,  -10., 10.);
+      //tdc->SetStoreEnabled();
+      for (unsigned nch=1; nch<tdc->NumChannels(); nch++) {
+        tdc->SetRefChannel(nch, nch-1, 0xffff, 10000,  -90., 90.);
+      }
 
-      tdc->SetRefChannel(1, tdc->NumChannels() -1 , 0xffff, 20000,  -10., 10.);
+      //tdc->SetRefChannel(1, tdc->NumChannels() -1 , 0xffff, 20000,  -10., 10.);
 
+      //      tdc->SetRefChannel(6, 2 , 0xffff, 20000,  -10., 10.);
+      //tdc->SetRefChannel(4, 2 , 0xffff, 20000,  -10., 10.);
+      //tdc->SetRefChannel(7, 6 , 0xffff, 20000,  -10., 10.);
+      
       
    }
 }
index 71fdcc54bdad2fe9f8a65d8c236f3c0ce2c13a2c..bde233b9e281c7e5d6bffdab70f1f640aa484a5f 100644 (file)
@@ -114,5 +114,5 @@ void second()
 {
   //new SecondProc("A", "TDC_1133");
   //new SecondProc("A", "TDC_1580");
-  new SecondProc("A", "TDC_1207");
+  new SecondProc("A", "TDC_1209");
 }
index ef5c93a33803ae1a22931beb575640425f69026a..9f3a28190d1b3d1aa4ce61fe5c160c75e696b9b6 100755 (executable)
@@ -20,7 +20,7 @@ then
     ~/trbsoft/trbnettools/bin/trbnetd -i 84
 fi
 
-./check_ping.pl --reboot
+#./check_ping.pl --reboot
 
 
 echo "reset"
@@ -83,20 +83,17 @@ echo "TDC settings end"
 trbcmd w 0xfffe 0xc5 0x50ff
 
 #Dirich-Concentrator: enable reference time from RJ45
-trbcmd loadbit 0x8300 0xd580 0x6 0x6
+######trbcmd loadbit 0x8300 0xd580 0x6 0x6
 
 echo "pulser"
 # pulser #0 to 10 kHz
-trbcmd w 0xc001 0xa150 0x0000270f   
+trbcmd w 0xc001 0xa154 0x0000270f   
 #trbcmd w 0xc001 0xa150 0x0022270f   
 
 echo "trigger type"
 # set trigger type to 0x1
-trbcmd setbit 0xc001 0xa155 0x10
+trbcmd setbit 0xc001 0xa159 0x10
 
-echo "pulser enable"
-# pulser enable
-#trbcmd setbit 0xc001 0xa101 0x1
 
 #trbcmd clearbit 0x1130 0xc801 0x80000000 # disable window
 #trbcmd w 0x1130 0xc802 0xffff0000 # enable upper 16 channels for padiwa
@@ -114,3 +111,7 @@ trbcmd clearbit 0x1133 0xc801 0x80000000 # disable window
 trbcmd w 0x1133 0xc802 0x00000c03 # enable pulser
 
 #trbcmd setbit 0xc001 0xa101 0x8 # enable external trigger in of CTS
+
+echo "pulser enable"
+# pulser enable
+#trbcmd setbit 0xc001 0xa101 0x1
index 82b7efed72e35e84c86302e553e6c4712e395bc3..8edff9e9e783819132046f585ef17cc338c57226 100755 (executable)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 
 ### Change THIS!
-my $required_endpoints = 20;
+my $required_endpoints = 23;
 
 
 
@@ -14,7 +14,8 @@ my $number = 0;
 
 
 #js while (($number != 65) || ($counter > $max_counter)) {
-while (($number < $required_endpoints) || ($counter > $max_counter)) {
+#while (($number < $required_endpoints) || ($counter > $max_counter)) {
+while (($number < $required_endpoints) ) {
     my $c; my $res;
 
     $counter++;