From: Jan Michel Date: Wed, 8 Jan 2014 12:38:18 +0000 (+0100) Subject: fixed bug in rate display in composite registers, added rates in JtagController X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=4c8d501b653a843e7e98becf32486e07daca42a7;p=daqtools.git fixed bug in rate display in composite registers, added rates in JtagController --- diff --git a/xml-db/database/JtagController.xml b/xml-db/database/JtagController.xml index 5ebe6b1..dc7dee1 100644 --- a/xml-db/database/JtagController.xml +++ b/xml-db/database/JtagController.xml @@ -157,11 +157,11 @@ address="0000" purpose="status" mode="r" > Error counters for read and write operations on the JTAG chain + start="0" bits="16" mode="r" purpose="status" format="integer" errorflag="true" rate="true" > Number of read errors during "read id" operation + start="16" bits="16" mode="r" purpose="status" format="integer" errorflag="true" rate="true" > Number of read errors during write operation @@ -169,11 +169,11 @@ address="0001" purpose="status" mode="r" > Error counters for read and write operations on the JTAG chain + start="0" bits="16" mode="r" purpose="status" format="integer" errorflag="true" rate="true" > Number of times data read back from the sensor was not identical to the data written to the sensor. + start="16" bits="16" mode="r" purpose="status" format="integer" errorflag="true" rate="true" > Number of sampling errors of TDI signal. The signal from the sensor is sampled three times for each bit, all occurrences must be equal. diff --git a/xml-db/get.pl b/xml-db/get.pl index a1a64b8..342d704 100755 --- a/xml-db/get.pl +++ b/xml-db/get.pl @@ -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) {