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++) {
113 for (i = 0; i <
cmd->num_states; i++) {
139 for (i = 0; i < num_cycles; i++)
152 const uint8_t *out_ptr;
162 for (bit_cnt = field->
num_bits; bit_cnt > 1; bit_cnt--)
170 for (bit_cnt = field->
num_bits; bit_cnt > 1; bit_cnt--) {
171 bitq_io(0, ((*out_ptr) & out_mask) != 0, tdo_req);
172 if (out_mask == 0x80) {
179 bitq_io(do_pause, ((*out_ptr) & out_mask) != 0, tdo_req);
200 for (i = 0; i <
cmd->num_fields - 1; i++)
219 if ((
cmd->cmd.reset->trst == 1) ||
220 (
cmd->cmd.reset->srst &&
229 LOG_DEBUG_IO(
"runtest %i cycles, end in %i",
cmd->cmd.runtest->num_cycles,
cmd->cmd.runtest->end_state);
241 LOG_DEBUG_IO(
"pathmove: %i states, end in %i",
cmd->cmd.pathmove->num_states,
242 cmd->cmd.pathmove->path[
cmd->cmd.pathmove->num_states - 1]);
263 LOG_ERROR(
"BUG: unknown JTAG command type encountered");
274 LOG_ERROR(
"missing data from bitq interface");
278 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)
int bitq_execute_queue(void)
static void bitq_path_move(struct pathmove_command *cmd)
static void bitq_in_proc(void)
static void bitq_runtest(int num_cycles)
static void bitq_scan_field(struct scan_field *field, int do_pause)
static struct bitq_state bitq_in_state
struct jtag_command * jtag_command_queue
The current queue of jtag_command_s structures.
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_s structures that should be sca...
struct scan_field * fields
pointer to an array of data scan fields
int num_fields
number of fields in *fields array
This structure defines a single scan field in the scan.
int num_bits
The number of bits this field specifies.
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.
struct scan_command * scan