monitor tdi, too
This commit is contained in:
parent
0a060ead2d
commit
084feb4bf3
@ -209,7 +209,7 @@ int jtagkey_transfer(WD_TRANSFER *tr, int fd, unsigned int request, int ppbase,
|
|||||||
DPRINTF("write byte: %d\n", val);
|
DPRINTF("write byte: %d\n", val);
|
||||||
|
|
||||||
if (tr[i].cmdTrans == 13)
|
if (tr[i].cmdTrans == 13)
|
||||||
tapmon(val & PP_TCK, val & PP_TMS);
|
jtagmon(val & PP_TCK, val & PP_TMS, val & PP_TDI);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Pad writebuf for read-commands in stream */
|
/* Pad writebuf for read-commands in stream */
|
||||||
|
10
jtagmon.c
10
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 int state = TEST_LOGIC_RESET;
|
||||||
static char state_text[32] = "Test Logic Reset";
|
static char state_text[32] = "Test Logic Reset";
|
||||||
char last_state_text[32];
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user