Dick Hollenbeck <dick@softplc.com> adds jtag_add_clocks() and implements those in the bitbang and ft2232.c. nearly a full rewrite of the xsvf.c. improved some messaging only affected by _DEBUG_JTAG_IO_

git-svn-id: svn://svn.berlios.de/openocd/trunk@1308 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
oharboe
2009-01-09 07:42:45 +00:00
parent ebd5afbb0e
commit 9324e6280e
6 changed files with 1005 additions and 321 deletions

View File

@@ -29,6 +29,7 @@
#include "command.h"
#if 0
#define _DEBUG_JTAG_IO_
#endif
@@ -112,6 +113,13 @@ typedef struct runtest_command_s
enum tap_state end_state; /* TAP state in which JTAG commands should finish */
} runtest_command_t;
typedef struct stableclocks_command_s
{
int num_cycles; /* number of clock cycles that should be sent */
} stableclocks_command_t;
typedef struct reset_command_s
{
int trst; /* trst/srst 0: deassert, 1: assert, -1: don't change */
@@ -134,6 +142,7 @@ typedef union jtag_command_container_u
statemove_command_t *statemove;
pathmove_command_t *pathmove;
runtest_command_t *runtest;
stableclocks_command_t *stableclocks;
reset_command_t *reset;
end_state_command_t *end_state;
sleep_command_t *sleep;
@@ -144,7 +153,8 @@ enum jtag_command_type
JTAG_SCAN = 1,
JTAG_STATEMOVE = 2, JTAG_RUNTEST = 3,
JTAG_RESET = 4, JTAG_END_STATE = 5,
JTAG_PATHMOVE = 6, JTAG_SLEEP = 7
JTAG_PATHMOVE = 6, JTAG_SLEEP = 7,
JTAG_STABLECLOCKS = 8
};
typedef struct jtag_command_s
@@ -434,6 +444,16 @@ extern int interface_jtag_add_end_state(enum tap_state endstate);
extern void jtag_add_sleep(u32 us);
extern int interface_jtag_add_sleep(u32 us);
/**
* Function jtag_add_stable_clocks
* first checks that the state in which the clocks are to be issued is
* stable, then queues up clock_count clocks for transmission.
*/
void jtag_add_clocks( int num_cycles );
int interface_jtag_add_clocks( int num_cycles );
/*
* For software FIFO implementations, the queued commands can be executed
* during this call or earlier. A sw queue might decide to push out