From 4c8d501b653a843e7e98becf32486e07daca42a7 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Wed, 8 Jan 2014 13:38:18 +0100 Subject: [PATCH] fixed bug in rate display in composite registers, added rates in JtagController --- xml-db/database/JtagController.xml | 8 ++++---- xml-db/get.pl | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) 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) { -- 2.43.0