monitor tdi, too
authormichael <michael>
Tue, 1 May 2007 21:18:51 +0000 (21:18 +0000)
committermichael <michael>
Tue, 1 May 2007 21:18:51 +0000 (21:18 +0000)
jtagkey.c
jtagmon.c
jtagmon.h

index 19011fa190aff8e9f6d389fa286484cc0857c5a1..6ed7375c82668f79413bf4fa3344d774006660d0 100644 (file)
--- a/jtagkey.c
+++ b/jtagkey.c
@@ -209,7 +209,7 @@ int jtagkey_transfer(WD_TRANSFER *tr, int fd, unsigned int request, int ppbase,
                        DPRINTF("write byte: %d\n", val);
 
                if (tr[i].cmdTrans == 13)
                        DPRINTF("write byte: %d\n", val);
 
                if (tr[i].cmdTrans == 13)
-                       tapmon(val & PP_TCK, val & PP_TMS);
+                       jtagmon(val & PP_TCK, val & PP_TMS, val & PP_TDI);
 #endif
 
                /* Pad writebuf for read-commands in stream */
 #endif
 
                /* Pad writebuf for read-commands in stream */
index 198a2c6cb1329b279a7ff6ed56af4c91db6191e5..1a71ce087b7914b045a4729105b332d55269dcdb 100644 (file)
--- a/jtagmon.c
+++ b/jtagmon.c
@@ -21,8 +21,9 @@ enum tap_states {
        UPDATE_IR
 };
 
        UPDATE_IR
 };
 
-void tapmon(unsigned char tck, unsigned char tms) {
+void jtagmon(unsigned char tck, unsigned char tms, unsigned char tdi) {
        static unsigned char last_tck = 1;
        static unsigned char last_tck = 1;
+       static char tdi_written = 0;
        static int state = TEST_LOGIC_RESET;
        static char state_text[32] = "Test Logic Reset";
        char last_state_text[32];
        static int state = TEST_LOGIC_RESET;
        static char state_text[32] = "Test Logic Reset";
        char last_state_text[32];
@@ -198,7 +199,14 @@ void tapmon(unsigned char tck, unsigned char tms) {
                }
 
                if (last_state != state) {
                }
 
                if (last_state != state) {
+                       if (tdi_written)
+                               fprintf(stderr,"\n");
+
                        fprintf(stderr,"TAP state transition from %s to %s\n", last_state_text, state_text);
                        fprintf(stderr,"TAP state transition from %s to %s\n", last_state_text, state_text);
+                       tdi_written = 0;
+               } else {
+                       fprintf(stderr,"%d",(tdi ? 1 : 0));
+                       tdi_written = 1;
                }
        }
 
                }
        }
 
index 26dea79db0c5dcbd1a37242ca2acaddf86fa1135..030db236db50f541ce19c1ec3f3a8e1e561aca8e 100644 (file)
--- a/jtagmon.h
+++ b/jtagmon.h
@@ -1 +1 @@
-void tapmon(unsigned char tck, unsigned char tms);
+void jtagmon(unsigned char tck, unsigned char tms, unsigned char tdi);
Impressum, Datenschutz