From: Jan Michel Date: Mon, 12 May 2014 14:56:25 +0000 (+0200) Subject: fixed bug with mixed r/w registers X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=487c3ec5642c5d9cda0d0e334147bd5ae3a0eb04;p=daqtools.git fixed bug with mixed r/w registers --- diff --git a/xml-db/put.pl b/xml-db/put.pl index 927a9ea..d2beab0 100755 --- a/xml-db/put.pl +++ b/xml-db/put.pl @@ -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); } }