]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
add new registers for MDC upgrade
authorJan Michel <j.michel@gsi.de>
Tue, 10 Aug 2021 12:47:30 +0000 (14:47 +0200)
committerJan Michel <j.michel@gsi.de>
Tue, 10 Aug 2021 12:47:39 +0000 (14:47 +0200)
web/htdocs/addons/mdcupgrade.pl [new file with mode: 0755]
xml-db/database/MDCUpgrade.xml [new file with mode: 0644]
xml-db/database/Mimosis.xml [new file with mode: 0644]

diff --git a/web/htdocs/addons/mdcupgrade.pl b/web/htdocs/addons/mdcupgrade.pl
new file mode 100755 (executable)
index 0000000..9941e0f
--- /dev/null
@@ -0,0 +1,45 @@
+#!/usr/bin/perl
+if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) {
+  print "HTTP/1.0 200 OK\n";
+  print "Content-type: text/html\r\n\r\n";
+  }
+else {
+  use lib '..';
+  use if (!($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i)), apacheEnv;
+  print "Content-type: text/html\n\n";
+  }
+
+use CGI ':standard';
+use XML::LibXML;
+use POSIX;
+use CGI::Carp qw(fatalsToBrowser);
+
+use lib qw|../commands htdocs/commands|;
+use xmlpage;
+
+my $page;
+
+$page->{title} = "MDCUpgrade";
+$page->{link}  = "../";
+
+my @setup;
+
+push(@setup,({name      => "TDC", 
+              cmd       => "MDCUpgrade-0xfe91-TDC",
+              period    => 10000,
+              address   => 1}));
+
+push(@setup,({name      => "SpikeCount", 
+              cmd       => "MDCUpgrade-0xfe91-SpikeCount",
+              period    => 1000,
+              rates     => 1,
+              address   => 1}));              
+
+xmlpage::initPage(\@setup,$page);
+
+
+1;
+
+
diff --git a/xml-db/database/MDCUpgrade.xml b/xml-db/database/MDCUpgrade.xml
new file mode 100644 (file)
index 0000000..67afbc1
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0"  encoding="utf-8" ?>
+<TrbNetEntity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xsi:noNamespaceSchemaLocation="../schema/TrbNetEntity.xsd"
+              name="MDCUpgrade"
+              address="0000"
+              >
+  <description>Registers for the upgraded MDC electronics</description>
+
+  <group name="TDC" address="c000"  size="128"  purpose="config" mode="r" continuous="false">
+
+    <register name="BoardConfig" address="1580" >
+      <description>Board COnfiguration</description>
+      <field name="LedOff" start="0" bits="1" format="boolean"  noflag="true" mode="rw">
+        <description>Switch off LED</description>
+      </field>
+      <field name="FlashOverride" start="1" bits="1" format="boolean" errorflag="true" mode="rw">
+        <description>Override automatic Flash selection to select golden image</description>
+      </field>
+      <field name="TestPulse" start="24" bits="4" format="bitmask" errorflag="true" mode="rw">
+        <description>Set test signal for Pasttrec</description>
+      </field>
+    </register>
+    
+    <register name="ChannelEnable" address="0000" >
+      <description>Individual Channel Enable</description>
+      <field name="ChannelEnable" start="0" bits="32" format="bitmask"  noflag="true" mode="rw" />
+    </register>
+
+    <register name="TdcConfig" address="0001" >
+      <description>TDC COnfiguration</description>
+      <field name="ExternalCalib" start="0" bits="1" format="boolean" noflag="true" mode="rw">
+        <description>Use Pasttrec test as calibration signal</description>
+      </field>
+      <field name="SpikeRejection" start="8" bits="4" format="unsigned" scale="6.4" unit="ns" noflag="true" mode="rw">
+        <description>Length of the spike rejection. Values 1..10 are not allowed</description>
+      </field>
+      <field name="TriggerWindow" start="16" bits="9" format="unsigned" scale="6.4" unit="ns" noflag="true" mode="rw">
+        <description>Length of the spike rejection</description>
+      </field>
+    </register>
+    
+    <register name="ReadoutHandler" address="0010" repeat="2">
+      <description>Status of the readout handler</description>
+      <field name="HandlerState" start="0" bits="4" format="enum" noflag="true" mode="r">
+        <description>Status of the readout handler FSM</description>
+      </field>    
+      <field name="CollectorState" start="4" bits="4" format="enum" noflag="true" mode="r">
+        <description>Status of the data collector FSM</description>
+      </field>    
+    </register>
+  </group>
+  
+   
+  <group name="SpikeCount" address="c100"  size="32"  purpose="status" mode="r" continuous="true">
+    <register name="SpikeCount" address="0000" repeat="32">
+      <description>Counter for rejected spikes</description>
+      <field name="SpikeCount" start="0" bits="24" format="unsigned" rate="true" noflag="true" mode="r" />
+    </register>    
+    
+  </group>
+    
+    
+</TrbNetEntity>  
diff --git a/xml-db/database/Mimosis.xml b/xml-db/database/Mimosis.xml
new file mode 100644 (file)
index 0000000..9c27007
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0"  encoding="utf-8" ?>
+<TrbNetEntity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xsi:noNamespaceSchemaLocation="../schema/TrbNetEntity.xsd"
+              name="Mimosis"
+              address="a000"
+              >
+  <description>Registers for the Mimosis Readout</description>
+
+
+  <group name="FrameBuffer" address="0200"  size="16"  purpose="status" mode="r" continuous="true">
+    <register name="CounterHeader" address="0000" >
+      <description>Number of frame headers</description>
+      <field name="CounterHeader" start="0" bits="32" format="unsigned"  noflag="true" rate="true" />
+    </register>
+
+    <register name="CounterTrailer" address="0001" >
+      <description>Number of frame trailers</description>
+      <field name="CounterTrailer" start="0" bits="32" format="unsigned"  noflag="true" rate="true" />
+    </register>
+
+    <register name="FrameLength" address="0002" >
+      <description>16bit words in last frame</description>
+      <field name="FrameLength" start="0" bits="16" format="unsigned"  noflag="true" />
+    </register>
+
+    
+    <register name="CounterFE" address="0006" >
+      <description>Counter for header words</description>
+      <field name="CounterFE" start="0" bits="32" format="unsigned"  noflag="true" rate="true" />
+    </register>
+
+    
+    <register name="CounterFF" address="0007" >
+      <description>Counter for trailer words</description>
+      <field name="CounterFF" start="0" bits="32" format="unsigned"  noflag="true" rate="true" />
+    </register>
+
+    
+    <register name="CounterOOF" address="0008" >
+      <description>Counter of data words outside of frame</description>
+      <field name="CounterOOF" start="0" bits="32" format="unsigned"  noflag="true" rate="true" />
+    </register>
+
+    
+    
+    <register name="FrameNumber" address="0003" >
+      <description>Sensor frame number</description>
+      <field name="FrameNumber" start="0" bits="32" format="unsigned"  noflag="true" rate="true" />
+    </register>
+
+    <register name="WordCount" address="0004" >
+      <description>Current word counter</description>
+      <field name="WordCount" start="0" bits="16" format="unsigned"  noflag="true"  />
+    </register>
+
+    <register name="BufferLevel" address="0005" >
+      <description>Buffer fill level</description>
+      <field name="BufferLevel" start="0" bits="16" format="unsigned"  noflag="true"  />
+    </register>
+
+    
+  </group>
+
+</TrbNetEntity>