]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
httpi now supports WebSocket-Requests (for simplicity much session handling is done...
authorManuel Penschuck <manuel.penschuck@stud.uni-frankfurt.de>
Mon, 3 Mar 2014 17:02:17 +0000 (18:02 +0100)
committerManuel Penschuck <manuel.penschuck@stud.uni-frankfurt.de>
Mon, 3 Mar 2014 17:02:17 +0000 (18:02 +0100)
Added CTS AddOn Output Mux
Added Triggers from TRB3 peripheral FPGAs
Support for unified trigger input multiplexer (WARNING: This required a renaming of some CTS-AddOn related input registers, breaking compatibility with older cts-startup scripts!)

.kateconfig [new file with mode: 0644]
web/CtsPlugins/CtsMod13.pm
web/htdocs/cts/cts.htm
web/htdocs/layout/cts.css
web/htdocs/scripts/cts.js

diff --git a/.kateconfig b/.kateconfig
new file mode 100644 (file)
index 0000000..8224436
--- /dev/null
@@ -0,0 +1 @@
+kate: space-indent on; indent-width 3; tab-width 3; replace-tabs on;
index f11290dfc7bc0239eadf85bf9740082ba0b3347a..3aac0f7031e785373e3e94cbe69125026d418058 100755 (executable)
@@ -38,8 +38,9 @@ sub init {
    }
    
 # registers
+   my @mux_names = ();
    for(my $i = 0; $i < $header->{'len'}; $i++) {
-      my $key = "trg_addon_output_multi$i";
+      my $key = "trg_addon_output_mux$i";
       
       $regs->{$key} = new TrbRegister($address + $i + 1, $trb, {
          'input'  => {'lower' =>  0, 'len' => 7, 'type' => 'enum', 'enum' => $enum}
@@ -49,10 +50,20 @@ sub init {
          'monitor' => '1',
          'label' => "AddOn Output Multiplexer $i"
       });
+      
+      push @mux_names, "outmux[$i]";
    }
 
 # properties
-   $prop->{"trg_addon_output_multiplexer_count"} = $header->{'len'};
+   $prop->{"trg_addon_output_mux_count"} = $header->{'len'};
+   if (8 == $header->{'len'}) {
+      $prop->{"trg_addon_output_mux_names"} = [
+        "jout1[0]/joutlvds[0]", "jout1[1]/joutlvds[1]", "jout1[2]/joutlvds[2]", "jout1[3]/joutlvds[3]", 
+        "jout2[0]/joutlvds[4]", "jout2[1]/joutlvds[5]", "jout2[2]/joutlvds[6]", "jout2[3]/joutlvds[7]", 
+      ];
+   } else {
+      $prop->{"trg_addon_output_mux_names"} = \@mux_names;
+   }
 }
 
 1;
index 45631eb880cb60b30453abc9ed6b022537f295a1..8abb770795bdc5709fa151b7dfa8c52b83375d1f 100644 (file)
            </div>
          </div>
 
+         <div class="expandable expanded" id="out-mux-expander">
+            <div class="header"><span class="indicator"></span> CTS AddOn Output Multiplexer</div>
+         
+            <div class="content">
+            
+               <div stlye="clear: both"></div>
+            </div>
+         </div>
+
          <div class="expandable expanded" id="readout-expander">
             <div class="header"><span class="indicator"></span> Readout</div>
          
index a4abfffb8de1700e82ee22c4e9beabff2d501591..8a3107a0c395b316fe068e637d18bc566647f0b4 100644 (file)
       display: none;
    }
    
+   #periph-inp-tab th {text-align: center;}
+   #periph-inp-tab td {width: 33px; text-align: center;}
+   #periph-inp-tab .slice4 {padding-left:  35px;}
+   #periph-inp-tab .slice0 {padding-right: 35px;}
+   #periph-inp-tab num.td {width: 35px;}
+   
+   #out-mux-expander .mux-container {
+      padding: 0 0 10px 0;
+      width: 25%;
+      float: left;
+   }
+   
 /* Name DB */
    #win-nameDB {
       display: none;
index 9508a0b5f3c4d4c5279c5b99538c0ae568cd2b2b..4a22d6e12d8d41b2d61e79936850ec8902d7e505 100644 (file)
@@ -84,11 +84,12 @@ var CTS = new Class({
 
       this.renderTriggerChannels();
       this.renderCoins();
-      this.renderTriggerAddOnInputs();
+      this.renderTriggerInputs();
       this.renderPeriphTrigger();
       this.renderRegularPulsers();
       this.renderRandPulsers();
       this.renderCTSDetails();
+      this.renderOutputMux();
       
       this.initAutoRates();
       this.initAutoUpdate();
@@ -408,14 +409,13 @@ var CTS = new Class({
  * section. It is called by the class' constructor and hence
  * should not by called manually.
  */
-   renderTriggerAddOnInputs: function() {
+   renderTriggerInputs: function() {
       var source_from = this.defs.properties.trg_input_count - this.defs.properties.trg_inp_mux_count;
       var to = this.defs.properties.trg_input_count;
       
       for(var i=0; i < to; i++) {
          var reg = 'trg_input_config' + i;
          var areg = 'trg_input_mux' + (i-source_from);
-         var en = this.defs.registers[areg]._defs.input.enum;
          var source;
          $('inputs-tab')
          .adopt(
@@ -456,8 +456,9 @@ var CTS = new Class({
          );
         
          if (i >= source_from) {
+            var en = this.defs.registers[areg]._defs.input.enum;
             source.adopt(
-               new Element('select', {'class': 'text autocommit autoupdate', 'slice': areg + '.input'})
+               new Element('select', {'class': 'autocommit autoupdate', 'slice': areg + '.input'})
                .adopt(
                   Object.values(en).map(function (r) {
                   return new Element('option', {'value': r, 'text': this.translateName('addon-input-multiplexer', r, r)})
@@ -469,6 +470,26 @@ var CTS = new Class({
       }
    },
    
+   renderOutputMux: function() {
+      if (!this.defs.properties['trg_addon_output_mux_count']) {
+         $('out-mux-expander').setStyle('display', 'none');
+         return;
+      }
+      
+      var con = $$('#out-mux-expander .content')[0];
+      for(var i=0; i<this.defs.properties['trg_addon_output_mux_count']; i++) {
+         var reg = 'trg_addon_output_mux' + i;
+         var en = this.defs.registers[reg]._defs.input.enum;
+         var name = this.defs.properties['trg_addon_output_mux_names'][i];
+         
+         con.adopt(new Element('div', {'class': 'mux-container'}).adopt([
+            new Element('label', {'for': 'out-mux-input' + i, 'text': this.translateName('addout-output-multiplexer', name, name)+": "}),
+            new Element('select', {'id':  'out-mux-input' + i, 'slice': reg + '.input', 'class': 'autocommit autoupdate'}).adopt(
+               Object.values(en).map(function (r) {return new Element('option', {'value': r, 'text': r})})
+            )
+         ]));
+      }
+   },
    
    renderPeriphTrigger: function() {
       if (!this.defs.properties['trg_periph_count']) {
@@ -479,17 +500,18 @@ var CTS = new Class({
       var row, header;
       tab.adopt(header = new Element('tr', {'class': 'snd_header'}));
       header.adopt(new Element('td'));
-      for(var i=0; i < 4; i++)
-         [10,7,6,5,4].each(function(n) {header.adopt(new Element('td', {'text': n}));});
+      for(var f=0; f < 4; f++)
+         for(var i=4; i>=0; i--)
+            header.adopt(new Element('td', {'text': (4==i?10:4+i), 'class': 'slice' + i}));
       
       for(var pt=0; pt < this.defs.properties['trg_periph_count']; pt++) {
          tab.adopt(row = new Element('tr', {'class': pt%2?'':'alt', 'flashgroup': 'itc-' + (pt + parseInt(this.defs.properties.trg_periph_itc_base))} ))
-         row.adopt(new Element('td', {'text': pt}));
+         row.adopt(new Element('td', {'text': pt, 'class': 'num'}));
          
          for(var f=0; f<4; f++) {
             for(var i=4; i>=0; i--) {
-               var bit = (i == 4) ? (16+f) : (4*f + i);
-                  row.adopt(new Element('td', {'class': (i%5)?'':'new-fpga'}).adopt(new Element('input', {'class': 'autoupdate autocommit', 'type': 'checkbox',
+               var bit = (5*f + i);
+                  row.adopt(new Element('td', {'class': 'slice' + i}).adopt(new Element('input', {'class': 'autoupdate autocommit', 'type': 'checkbox',
                      'slice': 'trg_periph_config' + pt + '.mask[' + bit + ']'})));
             }
          }