]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
fixed bug with mixed r/w registers
authorJan Michel <j.michel@gsi.de>
Mon, 12 May 2014 14:56:25 +0000 (16:56 +0200)
committerJan Michel <j.michel@gsi.de>
Mon, 12 May 2014 14:57:37 +0000 (16:57 +0200)
xml-db/put.pl

index 927a9eac86d74222c9a15912522a76171e36a951..d2beab0a7caa3c398fec7807f8c95c36dc26dc9f 100755 (executable)
@@ -128,7 +128,7 @@ sub writedata {
       $old  = $o->{$b};
       my $mask = ~(((1<<$obj->{bits})-1) << $obj->{start});
       $old = $old & $mask;
-      
+
       my $new = $value & ((1<<$obj->{bits})-1); 
       $new = $new << $obj->{start};
       $new = $new | $old;
@@ -139,7 +139,8 @@ sub writedata {
     my $mask = ~(((1<<$obj->{bits})-1) << $obj->{start});
     my $new = $value & ((1<<$obj->{bits})-1); 
     $new = $new << $obj->{start};
-    trb_register_write($netaddr,$obj->{address}+$slice*$stepsize,$new);
+
+    trb_register_loadbit($netaddr,$obj->{address}+$slice*$stepsize,~$mask,$new);
     }
     
   }