]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
fixed bug in rate display in composite registers, added rates in JtagController
authorJan Michel <j.michel@gsi.de>
Wed, 8 Jan 2014 12:38:18 +0000 (13:38 +0100)
committerJan Michel <j.michel@gsi.de>
Wed, 8 Jan 2014 12:38:18 +0000 (13:38 +0100)
xml-db/database/JtagController.xml
xml-db/get.pl

index 5ebe6b131d518cf4675eb1e6cad14fb2fe5d544e..dc7dee11ca0d1ce6e532dc7e234259ffd2c2e934 100644 (file)
                 address="0000" purpose="status" mode="r" >
         <description>Error counters for read and write operations on the JTAG chain</description>
         <field name="ErrorsReadId"
-               start="0"   bits="16"  mode="r"  purpose="status"  format="integer"  errorflag="true">
+               start="0"   bits="16"  mode="r"  purpose="status"  format="integer"  errorflag="true" rate="true" >
           <description>Number of read errors during "read id" operation</description>
         </field>
         <field name="ErrorsWrite"
-               start="16" bits="16"  mode="r"  purpose="status"  format="integer"  errorflag="true">
+               start="16" bits="16"  mode="r"  purpose="status"  format="integer"  errorflag="true" rate="true" >
           <description>Number of read errors during write operation</description>
         </field>
       </register>
                 address="0001" purpose="status" mode="r" >
         <description>Error counters for read and write operations on the JTAG chain</description>
         <field name="ErrorsDataChanged"
-               start="0"  bits="16"  mode="r"  purpose="status"  format="integer"  errorflag="true">
+               start="0"  bits="16"  mode="r"  purpose="status"  format="integer"  errorflag="true" rate="true" >
           <description>Number of times data read back from the sensor was not identical to the data written to the sensor.</description>
         </field>
         <field name="ErrorsSampling"
-               start="16" bits="16"  mode="r"  purpose="status"  format="integer"  errorflag="true">
+               start="16" bits="16"  mode="r"  purpose="status"  format="integer"  errorflag="true" rate="true" >
           <description>Number of sampling errors of TDI signal. The signal from the sensor is sampled three times for each bit, all occurrences must be equal.</description>
         </field>
       </register>
index a1a64b8804a097d48820639338d99fef418af527..342d704cd8c50bc839746ae3af5c0b43c752e7b1 100755 (executable)
@@ -367,7 +367,10 @@ sub generateoutput {
 sub makerate {
   my ($obj,$val,$addr,$b) = @_;
   if(defined $olddata->{$addr}->{$b}) {
-    $val -= $olddata->{$addr}->{$b};
+    my $ovalue = $olddata->{$addr}->{$b};
+    $ovalue  = $ovalue >> ($obj->{start});
+    $ovalue &= ((1<<$obj->{bits})-1);
+    $val -= $ovalue;
     }
   my $delay = $data->{time0} - $olddata->{time0};
   while ($val < 0) {