71 static void bitq_io(
int tms,
int tdi,
int tdo_req)
94 LOG_ERROR(
"TAP move from or to unstable state");
101 for (i = 0; i < tms_count; i++) {
111 for (
unsigned int i = 0; i <
cmd->num_states; i++) {
135 for (
unsigned int i = 0; i < num_cycles; i++)
147 const uint8_t *out_ptr;
157 for (
unsigned int i = 0; i < (field->
num_bits - 1); i++)
165 for (
unsigned int i = 0; i < (field->
num_bits - 1); i++) {
166 bitq_io(0, ((*out_ptr) & out_mask) != 0, tdo_req);
167 if (out_mask == 0x80) {
174 bitq_io(do_pause, ((*out_ptr) & out_mask) != 0, tdo_req);
194 for (i = 0; i <
cmd->num_fields - 1; i++)
213 if ((
cmd->cmd.reset->trst == 1) ||
214 (
cmd->cmd.reset->srst &&
223 LOG_DEBUG_IO(
"runtest %u cycles, end in %i",
cmd->cmd.runtest->num_cycles,
cmd->cmd.runtest->end_state);
235 LOG_DEBUG_IO(
"pathmove: %u states, end in %i",
cmd->cmd.pathmove->num_states,
236 cmd->cmd.pathmove->path[
cmd->cmd.pathmove->num_states - 1]);
257 LOG_ERROR(
"BUG: unknown JTAG command type encountered");
268 LOG_ERROR(
"missing data from bitq interface");
272 LOG_ERROR(
"extra data from bitq interface");
static void bitq_io(int tms, int tdi, int tdo_req)
static void bitq_end_state(tap_state_t state)
static void bitq_scan(struct scan_command *cmd)
struct bitq_interface * bitq_interface
static void bitq_state_move(tap_state_t new_state)
static void bitq_path_move(struct pathmove_command *cmd)
static void bitq_in_proc(void)
int bitq_execute_queue(struct jtag_command *cmd_queue)
static void bitq_runtest(unsigned int num_cycles)
static void bitq_scan_field(struct scan_field *field, int do_pause)
static struct bitq_state bitq_in_state
bool tap_is_state_stable(tap_state_t astate)
Function tap_is_state_stable returns true if the astate is stable.
tap_state_t tap_state_transition(tap_state_t cur_state, bool tms)
Function tap_state_transition takes a current TAP state and returns the next state according to the t...
const char * tap_state_name(tap_state_t state)
Function tap_state_name Returns a string suitable for display representing the JTAG tap_state.
void tap_set_end_state(tap_state_t new_end_state)
This function sets the state of an "end state follower" which tracks the state that any cable driver ...
tap_state_t tap_get_end_state(void)
For more information,.
int tap_get_tms_path(tap_state_t from, tap_state_t to)
This function provides a "bit sequence" indicating what has to be done with TMS during a sequence of ...
int tap_get_tms_path_len(tap_state_t from, tap_state_t to)
Function int tap_get_tms_path_len returns the total number of bits that represents a TMS path transit...
tap_state_t tap_get_state(void)
This function gets the state of the "state follower" which tracks the state of the TAPs connected to ...
#define tap_set_state(new_state)
This function sets the state of a "state follower" which tracks the state of the TAPs connected to th...
enum reset_types jtag_get_reset_config(void)
The JTAG interface can be implemented with a software or hardware fifo.
#define ERROR_JTAG_QUEUE_FAILED
enum tap_state tap_state_t
Defines JTAG Test Access Port states.
#define LOG_DEBUG_IO(expr ...)
#define LOG_ERROR(expr ...)
int(* sleep)(unsigned long us)
int(* reset)(int trst, int srst)
int(* out)(int tms, int tdi, int tdo_req)
struct jtag_command * cmd
enum jtag_command_type type
struct jtag_command * next
union jtag_command_container cmd
The scan_command provide a means of encapsulating a set of scan_field structures that should be scann...
unsigned int num_fields
number of fields in *fields array
struct scan_field * fields
pointer to an array of data scan fields
This structure defines a single scan field in the scan.
uint8_t * in_value
A pointer to a 32-bit memory location for data scanned out.
const uint8_t * out_value
A pointer to value to be scanned into the device.
unsigned int num_bits
The number of bits this field specifies.
struct scan_command * scan