int jtag_flush_queue_count; /* count # of flushes for profiling / debugging purposes */
+
/* note that this is not marked as static as it must be available from outside jtag.c for those
that implement the jtag_xxx() minidriver layer
*/
u32 id[8];
int modified[8];
-
/* if we are to run a verification of the ir scan, we need to get the input back.
* We may have to allocate space if the caller didn't ask for the input back.
*
break;
}
nth_tap++;
+
+ assert(nth_tap < x );
+
scan_size = tap->ir_length;
(*last_cmd)->cmd.scan->fields[nth_tap].tap = tap;
(*last_cmd)->cmd.scan->fields[nth_tap].num_bits = scan_size;
- (*last_cmd)->cmd.scan->fields[nth_tap].in_value = fields[nth_tap].in_value;
+ (*last_cmd)->cmd.scan->fields[nth_tap].in_value = NULL; /* do not collect input for tap's in bypass */
/* search the list */
for (j = 0; j < num_fields; j++)
if (tap == fields[j].tap)
{
found = 1;
+ (*last_cmd)->cmd.scan->fields[nth_tap].in_value = fields[j].in_value;
(*last_cmd)->cmd.scan->fields[nth_tap].out_value = buf_cpy(fields[j].out_value, cmd_queue_alloc(CEIL(scan_size, 8)), scan_size);
tap->bypass = 0;
/* update device information */
buf_cpy((*last_cmd)->cmd.scan->fields[nth_tap].out_value, tap->cur_instr, scan_size);
}
+ assert(nth_tap == (x-1));
return ERROR_OK;
}
/* each flush can take as much as 1-2ms on high bandwidth low latency interfaces.
* E.g. a JTAG over TCP/IP or USB....
*/
- jtag_flush_queue_count++;
+ jtag_flush_queue_count++;
int retval=interface_jtag_execute_queue();
/* we keep the first error */