field.in_value = NULL;
- field.in_handler = NULL;
+
jtag_add_ir_scan(1, &field, end_state);
field.in_value = &status;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IDLE);
field.in_value = str9xpec_info->options;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IDLE);
field.in_value = NULL;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IDLE);
field.in_value = buffer;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IRPAUSE);
field.in_value = NULL;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IDLE);
field.in_value = &status;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, -1);
field.in_value = NULL;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, -1);
field.in_value = NULL;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IDLE);
field.in_value = scanbuf;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, -1);
field.in_value = NULL;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IDLE);
field.in_value = scanbuf;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, -1);
field.in_value = buffer;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IDLE);
field.in_value = NULL;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IDLE);
field.in_value = &status;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, -1);
while (bitq_in_state.field_idx<bitq_in_state.cmd->cmd.scan->num_fields)
{
field = &bitq_in_state.cmd->cmd.scan->fields[bitq_in_state.field_idx];
- if (field->in_value || field->in_handler)
+ if (field->in_value)
{
if (bitq_in_state.bit_pos==0)
{
in_mask <<= 1;
bitq_in_state.bit_pos++;
}
-
-
- if (field->in_handler && bitq_in_state.status==ERROR_OK)
- {
- bitq_in_state.status = (*field->in_handler)(in_buff, field->in_handler_priv, field);
- }
}
bitq_in_state.field_idx++; /* advance to next field */
u8* out_ptr;
u8 out_mask;
- if (field->in_value || field->in_handler)
+ if (field->in_value)
tdo_req = 1;
else
tdo_req = 0;
(*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 = NULL;
- (*last_cmd)->cmd.scan->fields[nth_tap].in_handler = NULL; /* disable verification by default */
/* search the list */
for (j = 0; j < num_fields; j++)
(*last_cmd)->cmd.scan->fields[i].num_bits = num_bits;
(*last_cmd)->cmd.scan->fields[i].out_value = buf_cpy(fields[i].out_value, cmd_queue_alloc(num_bytes), num_bits);
(*last_cmd)->cmd.scan->fields[i].in_value = fields[i].in_value;
- (*last_cmd)->cmd.scan->fields[i].in_check_value = fields[i].in_check_value;
- (*last_cmd)->cmd.scan->fields[i].in_check_mask = fields[i].in_check_mask;
- (*last_cmd)->cmd.scan->fields[i].in_handler = NULL;
- (*last_cmd)->cmd.scan->fields[i].in_handler_priv = NULL;
}
return ERROR_OK;
}
(*last_cmd)->cmd.scan->fields[field_count].num_bits = scan_size;
(*last_cmd)->cmd.scan->fields[field_count].out_value = buf_cpy(fields[j].out_value, cmd_queue_alloc(CEIL(scan_size, 8)), scan_size);
(*last_cmd)->cmd.scan->fields[field_count].in_value = fields[j].in_value;
- (*last_cmd)->cmd.scan->fields[field_count].in_check_value = fields[j].in_check_value;
- (*last_cmd)->cmd.scan->fields[field_count].in_check_mask = fields[j].in_check_mask;
- (*last_cmd)->cmd.scan->fields[field_count].in_handler = fields[j].in_handler;
- (*last_cmd)->cmd.scan->fields[field_count++].in_handler_priv = fields[j].in_handler_priv;
+ field_count++;
}
}
if (!found)
(*last_cmd)->cmd.scan->fields[field_count].num_bits = 1;
(*last_cmd)->cmd.scan->fields[field_count].out_value = NULL;
(*last_cmd)->cmd.scan->fields[field_count].in_value = NULL;
- (*last_cmd)->cmd.scan->fields[field_count].in_check_value = NULL;
- (*last_cmd)->cmd.scan->fields[field_count].in_check_mask = NULL;
- (*last_cmd)->cmd.scan->fields[field_count].in_handler = NULL;
- (*last_cmd)->cmd.scan->fields[field_count++].in_handler_priv = NULL;
+ field_count++;
}
else
{
(*last_cmd)->cmd.scan->fields[field_count].num_bits = scan_size;
(*last_cmd)->cmd.scan->fields[field_count].out_value = buf_cpy(out_value, cmd_queue_alloc(CEIL(scan_size, 8)), scan_size);
(*last_cmd)->cmd.scan->fields[field_count].in_value = NULL;
- (*last_cmd)->cmd.scan->fields[field_count].in_check_value = NULL;
- (*last_cmd)->cmd.scan->fields[field_count].in_check_mask = NULL;
- (*last_cmd)->cmd.scan->fields[field_count].in_handler = NULL;
- (*last_cmd)->cmd.scan->fields[field_count++].in_handler_priv = NULL;
+ field_count++;
}
} else
{
(*last_cmd)->cmd.scan->fields[field_count].num_bits = 1;
(*last_cmd)->cmd.scan->fields[field_count].out_value = NULL;
(*last_cmd)->cmd.scan->fields[field_count].in_value = NULL;
- (*last_cmd)->cmd.scan->fields[field_count].in_check_value = NULL;
- (*last_cmd)->cmd.scan->fields[field_count].in_check_mask = NULL;
- (*last_cmd)->cmd.scan->fields[field_count].in_handler = NULL;
- (*last_cmd)->cmd.scan->fields[field_count++].in_handler_priv = NULL;
+ field_count++;
}
}
}
(*last_cmd)->cmd.scan->fields[i].num_bits = num_bits;
(*last_cmd)->cmd.scan->fields[i].out_value = buf_cpy(fields[i].out_value, cmd_queue_alloc(num_bytes), num_bits);
(*last_cmd)->cmd.scan->fields[i].in_value = fields[i].in_value;
- (*last_cmd)->cmd.scan->fields[i].in_check_value = fields[i].in_check_value;
- (*last_cmd)->cmd.scan->fields[i].in_check_mask = fields[i].in_check_mask;
- (*last_cmd)->cmd.scan->fields[i].in_handler = fields[i].in_handler;
- (*last_cmd)->cmd.scan->fields[i].in_handler_priv = fields[i].in_handler_priv;
}
return ERROR_OK;
/* if neither in_value nor in_handler
* are specified we don't have to examine this field
*/
- if (cmd->fields[i].in_value || cmd->fields[i].in_handler)
+ if (cmd->fields[i].in_value)
{
int num_bits = cmd->fields[i].num_bits;
u8 *captured = buf_set_buf(buffer, bit_count, malloc(CEIL(num_bits, 8)), 0, num_bits);
if (cmd->fields[i].in_value)
{
buf_cpy(captured, cmd->fields[i].in_value, num_bits);
-
- if (cmd->fields[i].in_handler)
- {
- if (cmd->fields[i].in_handler(cmd->fields[i].in_value, cmd->fields[i].in_handler_priv, cmd->fields+i) != ERROR_OK)
- {
- LOG_WARNING("in_handler: with \"in_value\", mismatch in %s", cmd->ir_scan ? "SIR" : "SDR" );
- retval = ERROR_JTAG_QUEUE_FAILED;
- }
- }
- }
-
- /* no in_value specified, but a handler takes care of the scanned data */
- if (cmd->fields[i].in_handler && (!cmd->fields[i].in_value))
- {
- if (cmd->fields[i].in_handler(captured, cmd->fields[i].in_handler_priv, cmd->fields+i) != ERROR_OK)
- {
- /* We're going to call the error:handler later, but if the in_handler
- * reported an error we report this failure upstream
- */
- LOG_WARNING("in_handler: w/o \"in_value\", mismatch in %s", cmd->ir_scan ? "SIR" : "SDR" );
- retval = ERROR_JTAG_QUEUE_FAILED;
- }
}
free(captured);
return retval;
}
-int jtag_check_value(u8 *captured, void *priv, scan_field_t *field)
-{
- return jtag_check_value_inner(captured, field, field->in_check_value, field->in_check_mask);
-}
-
-/*
- set up checking of this field using the in_handler. The values passed in must be valid until
- after jtag_execute() has completed.
- */
-void jtag_set_check_value(scan_field_t *field, u8 *value, u8 *mask, struct invalidstruct *obsolete)
-{
- if (value)
- field->in_handler = jtag_check_value;
- else
- field->in_handler = NULL; /* No check, e.g. embeddedice uses value==NULL to indicate no check */
- field->in_handler_priv = NULL;
- field->in_check_value = value;
- field->in_check_mask = mask;
-}
-
void jtag_check_value_mask(scan_field_t *field, u8 *value, u8 *mask)
{
assert(field->in_value != NULL);
int retval=jtag_check_value_inner(field->in_value, field, value, mask);
jtag_set_error(retval);
-
}
for (i = 0; i < cmd->num_fields; i++)
{
- if (cmd->fields[i].in_value || cmd->fields[i].in_handler)
+ if (cmd->fields[i].in_value)
type |= SCAN_IN;
if (cmd->fields[i].out_value)
type |= SCAN_OUT;
field.in_value = idcode_buffer;
- field.in_handler = NULL;
+
for (i = 0; i < JTAG_MAX_CHAIN_SIZE; i++)
{
field.num_bits = total_ir_length;
field.out_value = ir_test;
field.in_value = ir_test;
- field.in_handler = NULL;
+
jtag_add_plain_ir_scan(1, &field, TAP_RESET);
jtag_execute_queue();
fields[i].out_value = malloc(CEIL(field_size, 8));
buf_set_u32(fields[i].out_value, 0, field_size, strtoul(args[i*2+1], NULL, 0));
fields[i].in_value = NULL;
- fields[i].in_check_mask = NULL;
- fields[i].in_handler = NULL;
- fields[i].in_handler_priv = NULL;
}
jtag_add_ir_scan(argc / 2, fields, TAP_INVALID);
fields[field_count].out_value = malloc(CEIL(bits, 8));
str_to_buf(str, len, fields[field_count].out_value, bits, 0);
fields[field_count].in_value = fields[field_count].out_value;
- fields[field_count].in_check_mask = NULL;
- fields[field_count].in_check_value = NULL;
- fields[field_count].in_handler = NULL;
- fields[field_count++].in_handler_priv = NULL;
+ field_count++;
}
jtag_add_dr_scan(num_fields, fields, TAP_INVALID);
int num_bits; /* number of bits this field specifies (up to 32) */
u8* out_value; /* value to be scanned into the device */
u8* in_value; /* pointer to a 32-bit memory location to take data scanned out */
- /* in_check_value/mask, in_handler_error_handler, in_handler_priv can be used by the in handler, otherwise they contain garbage */
- u8* in_check_value; /* deprecated! only used from jtag_set_check_value. used to validate scan results */
- u8* in_check_mask; /* deprecated! only used from jtag_set_check_value. check specified bits against check_value */
- in_handler_t in_handler; /* deprecated! SET TO NULL. DO NOT USE! process received buffer using this handler */
- void* in_handler_priv; /* deprecated! only used by obsolete in_handler implementations */
} scan_field_t;
enum scan_type {
};
-extern void jtag_set_check_value(scan_field_t* field, u8* value, u8* mask, struct invalidstruct *obsolete);
/* execute jtag queue and check value and use mask if mask is != NULL. invokes
* jtag_set_error() with any error. */
extern void jtag_check_value_mask(scan_field_t *field, u8 *value, u8 *mask);
if (fields[i].in_value!=NULL)
{
inBuffer=fields[i].in_value;
- } else if (fields[i].in_handler!=NULL)
- {
- if (in_buff_size*8<num_bits)
- {
- // we need more space
- if (in_buff!=NULL)
- free(in_buff);
- in_buff=NULL;
- in_buff_size=(num_bits+7)/8;
- in_buff=malloc(in_buff_size);
- if (in_buff==NULL)
- {
- LOG_ERROR("Out of memory");
- jtag_error=ERROR_JTAG_QUEUE_FAILED;
- return;
- }
- }
- inBuffer=in_buff;
}
// here we shuffle N bits out/in
}
j+=k;
}
-
- if (fields[i].in_handler!=NULL)
- {
- // invoke callback
- int r=fields[i].in_handler(inBuffer, fields[i].in_handler_priv, fields+i);
- if (r!=ERROR_OK)
- {
- /* this will cause jtag_execute_queue() to return an error */
- jtag_error=r;
- }
- }
}
}
{
found = 1;
- if ((jtag_verify_capture_ir)&&(fields[j].in_handler==NULL))
- {
- jtag_set_check_value(fields+j, tap->expected, tap->expected_mask, NULL);
- } else if (jtag_verify_capture_ir)
- {
- fields[j].in_check_value = tap->expected;
- fields[j].in_check_mask = tap->expected_mask;
- }
-
scanFields(1, fields+j, TAP_IRSHIFT, pause);
/* update device information */
buf_cpy(fields[j].out_value, tap->cur_instr, scan_size);
tmp.num_bits = 1;
tmp.out_value = NULL;
tmp.in_value = NULL;
- tmp.in_check_value = NULL;
- tmp.in_check_mask = NULL;
- tmp.in_handler = NULL;
- tmp.in_handler_priv = NULL;
scanFields(1, &tmp, TAP_DRSHIFT, pause);
}
field.in_value = NULL;
- field.in_handler = NULL;
+
jtag_add_ir_scan(1, &field, TAP_IDLE);
scan_field.num_bits = num_words * 32;
scan_field.out_value = values;
scan_field.in_value = NULL;
- scan_field.in_handler = NULL;
for (i = 0; i < num_words; i++)
buf_set_u32(values + 4 * i, 0, 32, flip_u32(*words++, 32));
scan_field.out_value = NULL;
u8 tmp[4];
scan_field.in_value = tmp;
- scan_field.in_handler = NULL;
virtex2_set_instr(virtex2_info->tap, 0x4); /* CFG_OUT */
field.in_value = NULL;
- field.in_handler = NULL;
+
if ((retval = xilinx_read_bit_file(&bit_file, filename)) != ERROR_OK)
field.in_value = &svf_tdi_buffer[svf_buffer_index];
- field.in_handler = NULL;
+
jtag_add_plain_dr_scan(1, &field, svf_para.dr_end_state);
field.in_value = &svf_tdi_buffer[svf_buffer_index];
- field.in_handler = NULL;
+
jtag_add_plain_ir_scan(1, &field, svf_para.ir_end_state);
{
field->tap = arm11->jtag_info.tap;
field->num_bits = num_bits;
- field->in_check_mask = NULL;
- field->in_check_value = NULL;
- field->in_handler = NULL;
- field->in_handler_priv = NULL;
-
field->out_value = out_data;
field->in_value = in_data;
}
fields[0].num_bits = 1;
fields[0].out_value = &instruction_buf;
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 32;
fields[1].out_value = out_buf;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
if (in)
{
u8 tmp[4];
fields[0].num_bits = 1;
fields[0].out_value = NULL;
fields[0].in_value = &breakpoint;
- fields[0].in_handler = NULL;
+
fields[1].tap = arm7_9->jtag_info.tap;
fields[1].num_bits = 32;
fields[1].out_value = NULL;
fields[1].in_value = databus;
- fields[1].in_handler = NULL;
+
if((retval = arm_jtag_scann(&arm7_9->jtag_info, 0x1)) != ERROR_OK)
{
fields[0].num_bits = 1;
fields[0].out_value = NULL;
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].out_value = NULL;
u8 tmp[4];
fields[1].in_value = tmp;
- fields[1].in_handler = NULL;
+
jtag_add_dr_scan_now(2, fields, TAP_INVALID);
fields[0].num_bits = 1;
fields[0].out_value = NULL;
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 32;
fields[1].out_value = NULL;
u8 tmp[4];
fields[1].in_value = tmp;
- fields[1].in_handler = NULL;
+
jtag_add_dr_scan_now(2, fields, TAP_INVALID);
fields[0].num_bits = 1;
fields[0].out_value = &access_type_buf;
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 32;
fields[1].out_value = NULL;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].num_bits = 6;
fields[2].out_value = ®_addr_buf;
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
fields[3].tap = jtag_info->tap;
fields[3].num_bits = 1;
fields[3].out_value = &nr_w_buf;
fields[3].in_value = NULL;
- fields[3].in_handler = NULL;
+
jtag_add_dr_scan(4, fields, TAP_INVALID);
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
fields[3].tap = jtag_info->tap;
fields[3].in_value = NULL;
- fields[3].in_handler = NULL;
+
jtag_add_dr_scan(4, fields, TAP_INVALID);
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
fields[3].tap = jtag_info->tap;
fields[3].in_value = NULL;
- fields[3].in_handler = NULL;
+
jtag_add_dr_scan(4, fields, TAP_INVALID);
int arm926ejs_catch_broken_irscan(u8 *captured, void *priv, scan_field_t *field)
{
+ /* FIX!!!! this code should be reenabled. For now it does not check
+ * the queue...*/
+ return 0;
+#if 0
/* The ARM926EJ-S' instruction register is 4 bits wide */
u8 t = *captured & 0xf;
u8 t2 = *field->in_check_value & 0xf;
return ERROR_OK;
}
return ERROR_JTAG_QUEUE_FAILED;;
+#endif
}
#define ARM926EJS_CP15_ADDR(opcode_1, opcode_2, CRn, CRm) ((opcode_1 << 11) | (opcode_2 << 8) | (CRn << 4) | (CRm << 0))
fields[0].out_value = NULL;
u8 tmp[4];
fields[0].in_value = tmp;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 1;
fields[1].out_value = &access;
fields[1].in_value = &access;
- fields[1].in_handler = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].num_bits = 14;
fields[2].out_value = address_buf;
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
fields[3].tap = jtag_info->tap;
fields[3].num_bits = 1;
fields[3].out_value = &nr_w_buf;
fields[3].in_value = NULL;
- fields[3].in_handler = NULL;
+
jtag_add_dr_scan(4, fields, TAP_INVALID);
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].in_value = &access;
- fields[1].in_handler = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
fields[3].tap = jtag_info->tap;
fields[3].in_value = NULL;
- fields[3].in_handler = NULL;
+
jtag_add_dr_scan(4, fields, TAP_INVALID);
fields[0].num_bits = 32;
fields[0].out_value = NULL;
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 6;
fields[1].out_value = ®_addr_buf;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].num_bits = 1;
fields[2].out_value = &nr_w_buf;
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].in_value = databus;
- fields[0].in_handler = NULL;
+
fields[1].tap = arm7_9->jtag_info.tap;
fields[1].in_value = &debug_reason;
- fields[1].in_handler = NULL;
+
fields[2].tap = arm7_9->jtag_info.tap;
fields[2].in_value = instructionbus;
- fields[2].in_handler = NULL;
+
if((retval = arm_jtag_scann(&arm7_9->jtag_info, 0x1)) != ERROR_OK)
fields[0].num_bits = 32;
fields[0].out_value = out_buf;
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 3;
fields[1].out_value = &sysspeed_buf;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].num_bits = 32;
fields[2].out_value = instr_buf;
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
if (in)
{
fields[0].out_value = NULL;
u8 tmp[4];
fields[0].in_value = tmp;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 3;
fields[1].out_value = NULL;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].num_bits = 32;
fields[2].out_value = NULL;
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
jtag_add_dr_scan_now(3, fields, TAP_INVALID);
fields[0].out_value = NULL;
u8 tmp[4];
fields[0].in_value = tmp;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 3;
fields[1].out_value = NULL;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].num_bits = 32;
fields[2].out_value = NULL;
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
jtag_add_dr_scan_now(3, fields, TAP_INVALID);
fields[0].in_value = ack;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].out_value = outvalue;
fields[1].in_value = invalue;
- fields[1].in_handler = NULL;
+
buf_set_u32(&out_addr_buf, 0, 3, ((reg_addr >> 1) & 0x6) | (RnW & 0x1));
fields[0].out_value = &out_addr_buf;
fields[0].in_value = ack;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
buf_set_u32(out_value_buf, 0, 32, outvalue);
fields[1].out_value = out_value_buf;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
if (invalue)
{
field.out_value = t;
buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
field.in_value = NULL;
- field.in_handler = NULL;
+
if (no_verify_capture==NULL)
int avr_target_create(struct target_s *target, Jim_Interp *interp)
{
avr_common_t *avr = calloc(1, sizeof(avr_common_t));
-
+
avr->jtag_info.tap = target->tap;
target->arch_info = avr;
-
+
return ERROR_OK;
}
{
target->state = TARGET_HALTED;
}
-
+
LOG_DEBUG("%s", __FUNCTION__);
return ERROR_OK;
}
int avr_assert_reset(target_t *target)
{
target->state = TARGET_RESET;
-
+
LOG_DEBUG("%s", __FUNCTION__);
return ERROR_OK;
}
int avr_deassert_reset(target_t *target)
{
target->state = TARGET_RUNNING;
-
+
LOG_DEBUG("%s", __FUNCTION__);
return ERROR_OK;
}
LOG_ERROR("invalid ir_len");
return ERROR_FAIL;
}
-
+
{
scan_field_t field[1];
-
+
field[0].tap = tap;
field[0].num_bits = tap->ir_length;
field[0].out_value = ir_out;
field[0].in_value = ir_in;
- field[0].in_check_value = NULL;
- field[0].in_check_mask = NULL;
- field[0].in_handler = NULL;
- field[0].in_handler_priv = NULL;
jtag_add_plain_ir_scan(sizeof(field) / sizeof(field[0]), field, TAP_IDLE);
}
-
+
return ERROR_OK;
}
LOG_ERROR("invalid tap");
return ERROR_FAIL;
}
-
+
{
scan_field_t field[1];
-
+
field[0].tap = tap;
field[0].num_bits = dr_len;
field[0].out_value = dr_out;
field[0].in_value = dr_in;
- field[0].in_check_value = NULL;
- field[0].in_check_mask = NULL;
- field[0].in_handler = NULL;
- field[0].in_handler_priv = NULL;
jtag_add_plain_dr_scan(sizeof(field) / sizeof(field[0]), field, TAP_IDLE);
}
-
+
return ERROR_OK;
}
LOG_ERROR("ir_len overflow, maxium is 8");
return ERROR_FAIL;
}
-
+
mcu_write_ir(tap, ir_in, &ir_out, ir_len, rti);
-
+
return ERROR_OK;
}
LOG_ERROR("dr_len overflow, maxium is 8");
return ERROR_FAIL;
}
-
+
mcu_write_dr(tap, dr_in, &dr_out, dr_len, rti);
-
+
return ERROR_OK;
}
LOG_ERROR("ir_len overflow, maxium is 16");
return ERROR_FAIL;
}
-
+
mcu_write_ir(tap, (u8*)ir_in, (u8*)&ir_out, ir_len, rti);
-
+
return ERROR_OK;
}
LOG_ERROR("dr_len overflow, maxium is 16");
return ERROR_FAIL;
}
-
+
mcu_write_dr(tap, (u8*)dr_in, (u8*)&dr_out, dr_len, rti);
-
+
return ERROR_OK;
}
LOG_ERROR("ir_len overflow, maxium is 32");
return ERROR_FAIL;
}
-
+
mcu_write_ir(tap, (u8*)ir_in, (u8*)&ir_out, ir_len, rti);
-
+
return ERROR_OK;
}
LOG_ERROR("dr_len overflow, maxium is 32");
return ERROR_FAIL;
}
-
+
mcu_write_dr(tap, (u8*)dr_in, (u8*)&dr_out, dr_len, rti);
-
+
return ERROR_OK;
}
fields[0].num_bits = 32;
fields[0].out_value = reg->value;
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = ice_reg->jtag_info->tap;
fields[1].num_bits = 5;
fields[1].out_value = field1_out;
buf_set_u32(fields[1].out_value, 0, 5, reg_addr);
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = ice_reg->jtag_info->tap;
fields[2].num_bits = 1;
fields[2].out_value = field2_out;
buf_set_u32(fields[2].out_value, 0, 1, 0);
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].out_value = NULL;
u8 tmp[4];
fields[0].in_value = tmp;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 5;
fields[1].out_value = field1_out;
buf_set_u32(fields[1].out_value, 0, 5, embeddedice_reg_arch_info[EICE_COMMS_DATA]);
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].num_bits = 1;
fields[2].out_value = field2_out;
buf_set_u32(fields[2].out_value, 0, 1, 0);
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
while (size > 0)
fields[0].in_value = field0_in;
- fields[0].in_handler = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
field.in_value = NULL;
- field.in_handler = NULL;
+
jtag_add_ir_scan(1, &field, TAP_INVALID);
field.in_value = NULL;
- field.in_handler = NULL;
+
/* select INTEST instruction */
fields[0].out_value = NULL;
u8 tmp[4];
fields[0].in_value = tmp;
- fields[0].in_handler = NULL;
+
fields[1].tap = etb->tap;
fields[1].num_bits = 7;
fields[1].out_value = malloc(1);
buf_set_u32(fields[1].out_value, 0, 7, 4);
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = etb->tap;
fields[2].num_bits = 1;
fields[2].out_value = malloc(1);
buf_set_u32(fields[2].out_value, 0, 1, 0);
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = etb_reg->etb->tap;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = etb_reg->etb->tap;
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = etb_reg->etb->tap;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = etb_reg->etb->tap;
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].num_bits = 32;
fields[0].out_value = reg->value;
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = etm_reg->jtag_info->tap;
fields[1].num_bits = 7;
fields[1].out_value = malloc(1);
buf_set_u32(fields[1].out_value, 0, 7, reg_addr);
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = etm_reg->jtag_info->tap;
fields[2].num_bits = 1;
fields[2].out_value = malloc(1);
buf_set_u32(fields[2].out_value, 0, 1, 0);
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = etm_reg->jtag_info->tap;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = etm_reg->jtag_info->tap;
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].out_value = out_buf;
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].in_value = NULL;
- fields[2].in_handler = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
field.in_value = NULL;
- field.in_handler = NULL;
+
jtag_add_ir_scan(1, &field, TAP_INVALID);
}
field.in_value = (void*)idcode;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, TAP_INVALID);
field.in_value = (void*)impcode;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, TAP_INVALID);
field.in_value = (u8*)data;
- field.in_handler = NULL;
+
jtag_add_dr_scan(1, &field, TAP_INVALID);
fields[1].num_bits = 32;
fields[1].out_value = NULL;
fields[1].in_value = xscale->reg_cache->reg_list[XSCALE_DCSR].value;
- fields[1].in_handler = NULL;
+
fields[2].tap = xscale->jtag_info.tap;
fields[2].num_bits = 1;
fields[1].out_value = NULL;
u8 tmp[4];
fields[1].in_value = tmp;
- fields[1].in_handler = NULL;
+
fields[2].tap = xscale->jtag_info.tap;
fields[2].num_bits = 1;
fields[1].num_bits = 32;
fields[1].out_value = NULL;
fields[1].in_value = xscale->reg_cache->reg_list[XSCALE_TX].value;
- fields[1].in_handler = NULL;
+
fields[2].tap = xscale->jtag_info.tap;
fields[2].num_bits = 1;
fields[1].num_bits = 32;
fields[1].out_value = xscale->reg_cache->reg_list[XSCALE_RX].value;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = xscale->jtag_info.tap;
fields[2].num_bits = 1;
fields[1].num_bits = 32;
fields[1].out_value = xscale->reg_cache->reg_list[XSCALE_DCSR].value;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
fields[2].tap = xscale->jtag_info.tap;
fields[2].num_bits = 1;
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = xscale->jtag_info.tap;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
jtag_add_dr_scan(2, fields, TAP_INVALID);
fields[0].in_value = NULL;
- fields[0].in_handler = NULL;
+
fields[1].tap = xscale->jtag_info.tap;
fields[1].in_value = NULL;
- fields[1].in_handler = NULL;
+
jtag_add_dr_scan(2, fields, TAP_INVALID);
field.in_value = NULL;
- field.in_handler = NULL;
+
if (tap == NULL)
jtag_add_plain_ir_scan(1, &field, my_end_state);