]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
CBM-MBS Register Definition added
authorManuel Penschuck <manuel.penschuck@stud.uni-frankfurt.de>
Tue, 28 Oct 2014 17:50:20 +0000 (18:50 +0100)
committerManuel Penschuck <manuel.penschuck@stud.uni-frankfurt.de>
Tue, 28 Oct 2014 17:50:20 +0000 (18:50 +0100)
web/htdocs/index.pl
web/htdocs/tools/cbmmbs.pl [new file with mode: 0755]
xml-db/database/CBMMBSRecv.xml [new file with mode: 0644]

index 120f846862770f2971416a01c58497bc0f40bb32..bc803b336c810989a3691cdfb655d25430eb3601 100755 (executable)
@@ -94,6 +94,7 @@ The main documentation of the network can be found in these documents and locati
 <li><a href="network/generic.pl">Everything else</a>
 <li><a href="padiwa/padiwa.pl">Padiwa (xml-based, with thresholds)</a>
 <li><a href="tools/billboard.pl">Billboard</a>
+<li><a href="tools/cbmmbs.pl">CBM-MBS Receiver</a>
 </ul>
 </div>
 </div>
diff --git a/web/htdocs/tools/cbmmbs.pl b/web/htdocs/tools/cbmmbs.pl
new file mode 100755 (executable)
index 0000000..6356e20
--- /dev/null
@@ -0,0 +1,38 @@
+#!/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} = "CBM MBS Receiver";
+$page->{link}  = "../";
+
+my @setup;
+my $i = 0;
+
+$setup[$i]->{name}    = "StatusAndControl";
+$setup[$i]->{cmd}     = "CBMMBSRecv-0xffff-ControlAndStatus";
+$setup[$i]->{period}  = -1;
+$setup[$i]->{address} = 1;
+
+
+xmlpage::initPage(\@setup,$page);
+
+1;
+
+
diff --git a/xml-db/database/CBMMBSRecv.xml b/xml-db/database/CBMMBSRecv.xml
new file mode 100644 (file)
index 0000000..f623b13
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0"  encoding="utf-8" ?>
+<TrbNetEntity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xsi:noNamespaceSchemaLocation="../schema/TrbNetEntity.xsd"
+              name="CBMMBSRecv"
+              address="b800"
+>
+  <description>CBM-MBS Receiver Block with own Regio-Handler (unlike in the default CTS-ETM configuration)</description>
+  
+  <group name="ControlAndStatus" address="0000" purpose="status" mode="rw" continuous="false">
+    <register name="MainControlAndStatus" address="0000" mode="rw" purpose="config">
+      <description>Main information of module</description>
+      <field name="EnableReadout" start="0" bits="1" format="boolean" defaultValue="1">
+        <description>Active high, instructs the module to write data into data-stream</description>
+      </field>
+      <field name="InvertInputPolarity" start="1" bits="1" format="boolean" defaultValue="0"  invertflag="1">
+        <description>Active high, inverts polarity of input signal</description>
+      </field>
+      <field name="InclRDOTimestamp" start="2" bits="1" format="boolean" mode="r" purpose="status"  noflag="1">
+        <description>Active high, indicates that module was synthesised to include a timestamp in the readout stream</description>
+      </field>
+      <field name="ErrorReg" start="7" bits="1" format="boolean" mode="r" purpose="status" errorflag="1">
+        <description>Active high, indicates error in last data word received (same as error-bit in readout stream)</description>
+      </field>
+      <field name="LastMBSNumber" start="8" bits="24" format="hex" mode="r" purpose="status">
+        <description>Last data word received</description>
+      </field>
+    </register>
+    
+    <register name="RecvCounter" address="0001" mode="r" purpose="statistics">
+      <description>Counts number of data words received via MBS link</description>
+      <field name="RecvCounter" start="0" bits="32" format="unsigned" rate="1" unit="words" />
+    </register> 
+
+    <register name="ActCounter" address="0002" mode="r" purpose="statistics">
+      <description>Counts activity of MBS input, i.e. number of cycles the input changed, sampled at TrbNet clock</description>
+      <field name="ActCounter" start="0" bits="32" format="unsigned" rate="1" unit="changes" />
+    </register> 
+
+    <register name="HighCounter" address="0003" mode="r" purpose="statistics">
+      <description>Counts number of TrbNet clock cycles the MBS line was high (&lt; 90% indicates wrong polarity)</description>
+      <field name="HighCounter" start="0" bits="32" format="unsigned" rate="1" scale="0.01" unit="us" />
+    </register> 
+    
+  </group>
+  
+</TrbNetEntity>
\ No newline at end of file