Skip to content
This repository
Browse code

Issue #131: Some additional fixes; not all TDI/TDO data was reported …

…correctly.
  • Loading branch information...
commit 95fc6d7f93eeb32ae1151d85dab53e86edbfd470 1 parent 01e616c
Jan Willem Janssen authored December 11, 2012
45  tool.jtag/src/main/java/nl/lxtreme/ols/tool/jtag/JTAGAnalyserTask.java
@@ -21,14 +21,34 @@
21 21
 package nl.lxtreme.ols.tool.jtag;
22 22
 
23 23
 
24  
-import static nl.lxtreme.ols.tool.jtag.JTAGState.*;
25  
-
26  
-import java.util.logging.*;
27  
-
28  
-import nl.lxtreme.ols.api.acquisition.*;
  24
+import static nl.lxtreme.ols.tool.jtag.JTAGState.CAPTURE_DR;
  25
+import static nl.lxtreme.ols.tool.jtag.JTAGState.CAPTURE_IR;
  26
+import static nl.lxtreme.ols.tool.jtag.JTAGState.EXIT1_DR;
  27
+import static nl.lxtreme.ols.tool.jtag.JTAGState.EXIT1_IR;
  28
+import static nl.lxtreme.ols.tool.jtag.JTAGState.EXIT2_DR;
  29
+import static nl.lxtreme.ols.tool.jtag.JTAGState.EXIT2_IR;
  30
+import static nl.lxtreme.ols.tool.jtag.JTAGState.PAUSE_DR;
  31
+import static nl.lxtreme.ols.tool.jtag.JTAGState.PAUSE_IR;
  32
+import static nl.lxtreme.ols.tool.jtag.JTAGState.RUN_TEST_IDLE;
  33
+import static nl.lxtreme.ols.tool.jtag.JTAGState.SELECT_DR;
  34
+import static nl.lxtreme.ols.tool.jtag.JTAGState.SELECT_IR;
  35
+import static nl.lxtreme.ols.tool.jtag.JTAGState.SHIFT_DR;
  36
+import static nl.lxtreme.ols.tool.jtag.JTAGState.SHIFT_IR;
  37
+import static nl.lxtreme.ols.tool.jtag.JTAGState.TEST_LOGIC_RESET;
  38
+import static nl.lxtreme.ols.tool.jtag.JTAGState.UPDATE_DR;
  39
+import static nl.lxtreme.ols.tool.jtag.JTAGState.UPDATE_IR;
  40
+
  41
+import java.math.BigInteger;
  42
+import java.util.logging.Level;
  43
+import java.util.logging.Logger;
  44
+
  45
+import nl.lxtreme.ols.api.acquisition.AcquisitionResult;
29 46
 import nl.lxtreme.ols.api.data.annotation.AnnotationListener;
30  
-import nl.lxtreme.ols.api.tools.*;
31  
-import nl.lxtreme.ols.tool.base.annotation.*;
  47
+import nl.lxtreme.ols.api.tools.ToolContext;
  48
+import nl.lxtreme.ols.api.tools.ToolProgressListener;
  49
+import nl.lxtreme.ols.api.tools.ToolTask;
  50
+import nl.lxtreme.ols.tool.base.annotation.ChannelLabelAnnotation;
  51
+import nl.lxtreme.ols.tool.base.annotation.SampleDataAnnotation;
32 52
 
33 53
 
34 54
 /**
@@ -336,9 +356,12 @@ else if ( this.currentState == UPDATE_DR )
336 356
             state = this.currentState.getDisplayText();
337 357
 
338 358
             this.annotationListener.onAnnotation( new SampleDataAnnotation( this.tdiIdx, timestamps[startTdiDataIdx],
339  
-                timestamps[endTdiDataIdx], tdiData ) );
  359
+                timestamps[endTdiDataIdx], String.format( "0x%x", new BigInteger( tdiData, 2 ) ) ) );
340 360
             this.annotationListener.onAnnotation( new SampleDataAnnotation( this.tdoIdx, timestamps[startTdiDataIdx],
341  
-                timestamps[endTdiDataIdx], tdoData ) );
  361
+                timestamps[endTdiDataIdx], String.format( "0x%x", new BigInteger( tdoData, 2 ) ) ) );
  362
+
  363
+            aDataSet.reportJTAGTdiData( tdiIdx, startTdiDataIdx, endTdiDataIdx, currentState, tdiData );
  364
+            aDataSet.reportJTAGTdoData( tdoIdx, startTdiDataIdx, endTdiDataIdx, currentState, tdoData );
342 365
 
343 366
             if ( tmsValue == 0 )
344 367
             {
@@ -454,10 +477,10 @@ else if ( this.currentState == UPDATE_IR )
454 477
             state = this.currentState.getDisplayText();
455 478
 
456 479
             this.annotationListener.onAnnotation( new SampleDataAnnotation( this.tdiIdx, timestamps[startTdiDataIdx],
457  
-                timestamps[endTdiDataIdx], tdiData ) );
  480
+                timestamps[endTdiDataIdx], String.format( "0x%x", new BigInteger( tdiData, 2 ) ) ) );
458 481
 
459 482
             this.annotationListener.onAnnotation( new SampleDataAnnotation( this.tdoIdx, timestamps[startTdiDataIdx],
460  
-                timestamps[endTdiDataIdx], tdoData ) );
  483
+                timestamps[endTdiDataIdx], String.format( "0x%x", new BigInteger( tdoData, 2 ) ) ) );
461 484
 
462 485
             aDataSet.reportJTAGTdiData( tdiIdx, startTdiDataIdx, endTdiDataIdx, currentState, tdiData );
463 486
             aDataSet.reportJTAGTdoData( tdoIdx, startTdiDataIdx, endTdiDataIdx, currentState, tdoData );
4  tool.jtag/src/main/java/nl/lxtreme/ols/tool/jtag/JTAGDataSet.java
@@ -67,7 +67,7 @@ public void reportJTAGState( final int aChannelIdx, final int aStartIdx, final i
67 67
   public void reportJTAGTdiData( final int aChannelIdx, final int aStartIdx, final int aEndIdx, final JTAGState aState, final String aTdiData )
68 68
   {
69 69
     final int idx = size();
70  
-    addData( new JTAGData( idx, aChannelIdx, JTAG_TDI, new BigInteger( aTdiData ), aStartIdx, aEndIdx ) );
  70
+    addData( new JTAGData( idx, aChannelIdx, JTAG_TDI, new BigInteger( aTdiData, 2 ), aStartIdx, aEndIdx ) );
71 71
   }
72 72
 
73 73
   /**
@@ -76,7 +76,7 @@ public void reportJTAGTdiData( final int aChannelIdx, final int aStartIdx, final
76 76
   public void reportJTAGTdoData( final int aChannelIdx, final int aStartIdx, final int aEndIdx, final JTAGState aState, final String aTdoData )
77 77
   {
78 78
     final int idx = size();
79  
-    addData( new JTAGData( idx, aChannelIdx, JTAG_TDO, new BigInteger( aTdoData ), aStartIdx, aEndIdx ) );
  79
+    addData( new JTAGData( idx, aChannelIdx, JTAG_TDO, new BigInteger( aTdoData, 2 ), aStartIdx, aEndIdx ) );
80 80
   }
81 81
 
82 82
   /**

0 notes on commit 95fc6d7

Please sign in to comment.
Something went wrong with that request. Please try again.