Dick Hollenbeck <dick@softplc.com> work in progress

git-svn-id: svn://svn.berlios.de/openocd/trunk@1457 b42882b7-edfa-0310-969c-e2dbd0fdcd60
__archive__
oharboe 2009-04-14 19:17:17 +00:00
parent ba4e2c43fb
commit 1552562b3a
1 changed files with 571 additions and 576 deletions

View File

@ -9,7 +9,7 @@
* peter.hettkamp@htp-tel.de *
* *
* Copyright (C) 2009 SoftPLC Corporation. http://softplc.com *
* dick@softplc.com *
* Dick Hollenbeck <dick@softplc.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@ -480,7 +480,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha
jtag_add_pathmove( sizeof(exception_path)/sizeof(exception_path[0]), exception_path);
if (verbose)
LOG_USER("%s %d retry %d", op_name, xsdrsize, attempt);
LOG_USER("%s mismatch, xsdrsize=%d retry=%d", op_name, xsdrsize, attempt);
}
field.tap = tap;
@ -570,7 +570,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha
case XSTATE:
{
tap_state_t mystate;
tap_state_t *path;
tap_state_t* path;
int path_len;
if (read(xsvf_fd, &uc, 1) < 0)
@ -619,8 +619,6 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha
break;
case XENDIR:
{
tap_state_t mystate;
if (read(xsvf_fd, &uc, 1) < 0)
{
@ -629,26 +627,21 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha
}
/* see page 22 of XSVF spec */
mystate = uc == 1 ? TAP_IRPAUSE : TAP_IDLE;
LOG_DEBUG("XENDIR 0x%02X %s", uc, tap_state_name(mystate));
/* assuming that the XRUNTEST comes from SVF RUNTEST, then only these states
* should come here because the SVF spec only allows these with a RUNTEST
*/
if (mystate != TAP_IRPAUSE && mystate != TAP_DRPAUSE && mystate != TAP_RESET && mystate != TAP_IDLE )
if( uc == 0 )
xendir = TAP_IDLE;
else if( uc == 1 )
xendir = TAP_IRPAUSE;
else
{
LOG_ERROR("illegal XENDIR endstate: \"%s\"", tap_state_name(mystate));
LOG_ERROR("illegial XENDIR argument: 0x%02X", uc);
unsupported = 1;
break;
}
xendir = mystate;
}
LOG_DEBUG("XENDIR 0x%02X %s", uc, tap_state_name(xendir));
break;
case XENDDR:
{
tap_state_t mystate;
if (read(xsvf_fd, &uc, 1) < 0)
{
@ -657,18 +650,18 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha
}
/* see page 22 of XSVF spec */
mystate = uc == 1 ? TAP_DRPAUSE : TAP_IDLE;
LOG_DEBUG("XENDDR %02X %s", uc, tap_state_name(mystate));
if (mystate != TAP_IRPAUSE && mystate != TAP_DRPAUSE && mystate != TAP_RESET && mystate != TAP_IDLE )
if( uc == 0 )
xenddr = TAP_IDLE;
else if( uc == 1 )
xenddr = TAP_DRPAUSE;
else
{
LOG_ERROR("illegal XENDDR endstate: \"%s\"", tap_state_name( mystate ));
LOG_ERROR("illegial XENDDR argument: 0x%02X", uc);
unsupported = 1;
break;
}
xenddr = mystate;
}
LOG_DEBUG("XENDDR %02X %s", uc, tap_state_name(xenddr));
break;
case XSIR:
@ -1058,7 +1051,9 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha
}
/* PSUEDO-Code from Xilinx Appnote XAPP067.pdf:
#if 0 /* this comment style used to try and keep uncrustify from adding * at begin of line */
PSUEDO-Code from Xilinx Appnote XAPP067.pdf:
the following pseudo code clarifies the intent of the xrepeat support. The
flow given is for the entire processing of an SVF file, not an XSVF file.
@ -1106,4 +1101,4 @@ else if RUNTEST record then
store <TCK value> as <current pause time>
end if
*/
#endif