]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
update web tools for Trb5sc CTS
authorJan Michel <michel@physik.uni-frankfurt.de>
Tue, 6 Aug 2024 08:48:52 +0000 (10:48 +0200)
committerJan Michel <michel@physik.uni-frankfurt.de>
Tue, 6 Aug 2024 08:48:52 +0000 (10:48 +0200)
web/CtsPlugins/CtsMod1a.pm [new file with mode: 0644]
xml-db/database/InputMonitorTrb3sc.xml

diff --git a/web/CtsPlugins/CtsMod1a.pm b/web/CtsPlugins/CtsMod1a.pm
new file mode 100644 (file)
index 0000000..9aa74a4
--- /dev/null
@@ -0,0 +1,66 @@
+# Module: Unified AddOn Module for TRB5sc with internal trg logic and pin-header inputs
+package CtsMod1a;
+
+@ISA = (CtsBaseModule);
+
+use warnings;
+use strict;
+use TrbRegister;
+use Data::Dumper;
+
+sub moduleName {"Trigger Input Multiplexer"}
+
+sub init {
+   my $self    = $_[0];
+   my $address = $_[1];
+   
+   my $trb  = $self->{'_cts'}{'_trb'};
+   
+   my $regs = $self->{'_registers'};
+   my $prop = $self->{'_properties'};
+   
+   my $cprop = $self->{'_cts'}{'_properties'};
+   my $header = $self->{'_cts'}{'_enum'}{0x1a}->read();
+
+   
+# registers
+   for(my $i = 0; $i < $header->{'len'}; $i++) {
+      my $key = "trg_input_mux$i";
+      
+      $regs->{$key} = new TrbRegister($address + 1 + $i, $trb, {
+         'input'  => {'lower' =>  0, 'len' => 7, 'type' => 'enum', 'enum' => 
+            {
+#               0 => 'trig_rj[3]', 1 => 'trig_rj[4]', 
+#               34 => 'int_trg[0]', 35 => 'int_trg[1]'
+            }
+         }
+      }, {
+         'accessmode' => "rw",
+         'export'     => 1,
+         'monitor' => '1',
+         'label' => "Input Multiplexer $i"
+      });
+      
+      my $chanStart = 0;
+      for(my $k=0; $k<4; $k++) {
+        $regs->{$key}{'_defs'}{'input'}{'enum'}{$k+$chanStart} = "internal[$k]";
+        }
+        
+      $chanStart = 4;
+      for(my $k=0; $k<8; $k++) {
+        $regs->{$key}{'_defs'}{'input'}{'enum'}{$k+$chanStart} = "hdrio[".($k+16)."]";
+        }
+
+   }
+   
+
+   for(my $i = 0; $i < $header->{'itc_len'}; $i++) {
+      $self->{'_cts'}->getProperties->{'itc_assignments'}[$i + $header->{'itc_base'}] = "Trigger Multiplexer $i";
+   }
+
+# properties
+   $prop->{"trg_inp_mux_count"} = $header->{'len'};
+   $prop->{"trg_inp_mux_itc_base"} = $header->{'itc_base'};
+}
+
+1;
index ce6919bf4024987c4beab9f468b181c5cc8e15cf..3ad4fca336cdea53926f2f0dd03715e00925c406 100644 (file)
@@ -162,6 +162,12 @@ output #slice</description>
       <field  name="TriggerOutputs" start="8" bits="4" format="unsigned" noflag="true">
          <description>Number of outputs of the trigger logic</description>
       </field>
+      <field  name="TriggerMultiplicities" start="12" bits="4" format="unsigned" noflag="true">
+         <description>Number of multiplicity logic blocks</description>
+      </field>
+      <field  name="TriggerCoincidences" start="16" bits="8" format="unsigned" noflag="true">
+         <description>Number of coincidence blocks</description>
+      </field>      
     </register>
     <register name="Multiplicity" address="0032" mode="r" >
       <description>Coincidence interval is fixed to 4 clock cycles or configurable in TriggerStretchSet</description>