buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
field.in_value = NULL;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_ir_scan(1, &field, end_state);
field.out_value = NULL;
field.in_value = &status;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IDLE);
jtag_execute_queue();
field.out_value = NULL;
field.in_value = str9xpec_info->options;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IDLE);
jtag_execute_queue();
field.out_value = buffer;
field.in_value = NULL;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IDLE);
jtag_add_sleep(40000);
field.out_value = NULL;
field.in_value = buffer;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IRPAUSE);
jtag_execute_queue();
field.out_value = buffer;
field.in_value = NULL;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IDLE);
jtag_execute_queue();
field.out_value = NULL;
field.in_value = &status;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, -1);
jtag_execute_queue();
field.out_value = §or;
field.in_value = NULL;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, -1);
field.out_value = (buffer + bytes_written);
field.in_value = NULL;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IDLE);
field.out_value = NULL;
field.in_value = scanbuf;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, -1);
jtag_execute_queue();
field.out_value = last_dword;
field.in_value = NULL;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IDLE);
field.out_value = NULL;
field.in_value = scanbuf;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, -1);
jtag_execute_queue();
field.out_value = NULL;
field.in_value = buffer;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IDLE);
jtag_execute_queue();
field.out_value = str9xpec_info->options;
field.in_value = NULL;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, TAP_IDLE);
field.out_value = NULL;
field.in_value = &status;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, -1);
jtag_execute_queue();
field.out_value = idcode_buffer;
field.in_value = idcode_buffer;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
for (i = 0; i < JTAG_MAX_CHAIN_SIZE; i++)
{
field.out_value = ir_test;
field.in_value = ir_test;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_plain_ir_scan(1, &field, TAP_RESET);
jtag_execute_queue();
/* 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! DO NOT USE! process received buffer using this handler */
- void* in_handler_priv; /* additional information for the in_handler */
+ 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 {
field.num_bits = tap->ir_length;
field.out_value = calloc(CEIL(field.num_bits, 8), 1);
buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
-
+
field.in_value = NULL;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = 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_check_value = NULL;
- scan_field.in_check_mask = NULL;
scan_field.in_handler = NULL;
- scan_field.in_handler_priv = NULL;
for (i = 0; i < num_words; i++)
buf_set_u32(values + 4 * i, 0, 32, flip_u32(*words++, 32));
scan_field.num_bits = 32;
scan_field.out_value = NULL;
scan_field.in_value = NULL;
- scan_field.in_check_value = NULL;
- scan_field.in_check_mask = NULL;
scan_field.in_handler = virtex2_jtag_buf_to_u32; /* deprecated! invoke this from user code! */
virtex2_set_instr(virtex2_info->tap, 0x4); /* CFG_OUT */
scan_field_t field;
field.tap = virtex2_info->tap;
-
+
field.in_value = NULL;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
if ((retval = xilinx_read_bit_file(&bit_file, filename)) != ERROR_OK)
return retval;
field.out_value = &svf_tdi_buffer[svf_buffer_index];
field.in_value = &svf_tdi_buffer[svf_buffer_index];
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_plain_dr_scan(1, &field, svf_para.dr_end_state);
svf_buffer_index += (i + 7) >> 3;
field.out_value = &svf_tdi_buffer[svf_buffer_index];
field.in_value = &svf_tdi_buffer[svf_buffer_index];
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_plain_ir_scan(1, &field, svf_para.ir_end_state);
svf_buffer_index += (i + 7) >> 3;
fields[0].out_value = &instruction_buf;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 32;
} else
{
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
+
}
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
jtag_add_dr_scan(2, fields, TAP_INVALID);
fields[0].out_value = NULL;
fields[0].in_value = &breakpoint;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = 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_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
+
if((retval = arm_jtag_scann(&arm7_9->jtag_info, 0x1)) != ERROR_OK)
{
fields[0].out_value = NULL;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 32;
fields[1].in_value = NULL;
fields[1].in_handler = arm_jtag_buf_to_u32_flip; /* deprecated! invoke this from user code! */
fields[1].in_handler_priv = in;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
jtag_add_dr_scan(2, fields, TAP_INVALID);
fields[0].out_value = NULL;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 32;
break;
}
fields[1].in_handler_priv = in;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
jtag_add_dr_scan(2, fields, TAP_INVALID);
fields[0].out_value = &access_type_buf;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = 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_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = 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_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = 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_check_value = NULL;
- fields[3].in_check_mask = NULL;
+
+
fields[3].in_handler = NULL;
- fields[3].in_handler_priv = NULL;
+
jtag_add_dr_scan(4, fields, TAP_INVALID);
fields[0].out_value = &access_type_buf;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 32;
fields[1].out_value = value_buf;
fields[1].in_value = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = 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_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = 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_check_value = NULL;
- fields[3].in_check_mask = NULL;
+
+
fields[3].in_handler = NULL;
- fields[3].in_handler_priv = NULL;
+
jtag_add_dr_scan(4, fields, TAP_INVALID);
fields[0].out_value = &access_type_buf;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 32;
fields[1].out_value = cp15_opcode_buf;
fields[1].in_value = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = 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_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = 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_check_value = NULL;
- fields[3].in_check_mask = NULL;
+
+
fields[3].in_handler = NULL;
- fields[3].in_handler_priv = NULL;
+
jtag_add_dr_scan(4, fields, TAP_INVALID);
fields[0].out_value = NULL;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = 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_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = 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_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = 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_check_value = NULL;
- fields[3].in_check_mask = NULL;
+
+
fields[3].in_handler = NULL;
- fields[3].in_handler_priv = NULL;
+
jtag_add_dr_scan(4, fields, TAP_INVALID);
fields[0].out_value = value_buf;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = 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_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = 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_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = 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_check_value = NULL;
- fields[3].in_check_mask = NULL;
+
+
fields[3].in_handler = NULL;
- fields[3].in_handler_priv = NULL;
+
jtag_add_dr_scan(4, fields, TAP_INVALID);
/*TODO: add timeout*/
fields[0].out_value = NULL;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = 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_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = 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_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].out_value = value_buf;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = 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_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = 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_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].out_value = NULL;
fields[0].in_value = databus;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = arm7_9->jtag_info.tap;
fields[1].num_bits = 3;
fields[1].out_value = NULL;
fields[1].in_value = &debug_reason;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
+
fields[2].tap = arm7_9->jtag_info.tap;
fields[2].num_bits = 32;
fields[2].out_value = NULL;
fields[2].in_value = instructionbus;
- fields[2].in_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = NULL;
+
if((retval = arm_jtag_scann(&arm7_9->jtag_info, 0x1)) != ERROR_OK)
{
else
{
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
}
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = 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_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = 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_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].in_value = NULL;
fields[0].in_handler = arm_jtag_buf_to_u32; /* deprecated! invoke this from user code! */
fields[0].in_handler_priv = in;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 3;
fields[1].in_value = NULL;
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = 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_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
break;
}
fields[0].in_handler_priv = in;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 3;
fields[1].in_value = NULL;
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = 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_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].out_value = &out_addr_buf;
fields[0].in_value = ack;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 32;
fields[1].in_value = invalue;
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
+
jtag_add_dr_scan(2, fields, TAP_INVALID);
fields[0].out_value = &out_addr_buf;
fields[0].in_value = ack;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 32;
else
{
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
+
}
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
jtag_add_dr_scan(2, fields, TAP_INVALID);
buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
field.in_value = NULL;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = handler;
- field.in_handler_priv = NULL;
+
jtag_add_ir_scan(1, &field, TAP_INVALID);
}
fields[0].out_value = reg->value;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = ice_reg->jtag_info->tap;
fields[1].num_bits = 5;
buf_set_u32(fields[1].out_value, 0, 5, reg_addr);
fields[1].in_value = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
+
fields[2].tap = ice_reg->jtag_info->tap;
fields[2].num_bits = 1;
buf_set_u32(fields[2].out_value, 0, 1, 0);
fields[2].in_value = NULL;
- fields[2].in_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].out_value = NULL;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 5;
buf_set_u32(fields[1].out_value, 0, 5, embeddedice_reg_arch_info[EICE_COMMS_DATA]);
fields[1].in_value = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].num_bits = 1;
buf_set_u32(fields[2].out_value, 0, 1, 0);
fields[2].in_value = NULL;
- fields[2].in_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].out_value = field0_out;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 5;
buf_set_u32(fields[1].out_value, 0, 5, embeddedice_reg_arch_info[EICE_COMMS_DATA]);
fields[1].in_value = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].num_bits = 1;
buf_set_u32(fields[2].out_value, 0, 1, 1);
fields[2].in_value = NULL;
- fields[2].in_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = NULL;
+
while (size > 0)
{
fields[0].out_value = NULL;
fields[0].in_value = field0_in;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = jtag_info->tap;
fields[1].num_bits = 5;
buf_set_u32(fields[1].out_value, 0, 5, embeddedice_reg_arch_info[EICE_COMMS_CTRL]);
fields[1].in_value = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
+
fields[2].tap = jtag_info->tap;
fields[2].num_bits = 1;
buf_set_u32(fields[2].out_value, 0, 1, 0);
fields[2].in_value = NULL;
- fields[2].in_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
gettimeofday(&lap, NULL);
buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
field.in_value = NULL;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_ir_scan(1, &field, TAP_INVALID);
buf_set_u32(field.out_value, 0, field.num_bits, new_scan_chain);
field.in_value = NULL;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
/* select INTEST instruction */
etb_set_instr(etb, 0x2);
fields[0].out_value = NULL;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = etb->tap;
fields[1].num_bits = 7;
buf_set_u32(fields[1].out_value, 0, 7, 4);
fields[1].in_value = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
+
fields[2].tap = etb->tap;
fields[2].num_bits = 1;
buf_set_u32(fields[2].out_value, 0, 1, 0);
fields[2].in_value = NULL;
- fields[2].in_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].out_value = reg->value;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = etb_reg->etb->tap;
fields[1].num_bits = 7;
buf_set_u32(fields[1].out_value, 0, 7, reg_addr);
fields[1].in_value = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
+
fields[2].tap = etb_reg->etb->tap;
fields[2].num_bits = 1;
buf_set_u32(fields[2].out_value, 0, 1, 0);
fields[2].in_value = NULL;
- fields[2].in_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
buf_set_u32(fields[0].out_value, 0, 32, value);
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = etb_reg->etb->tap;
fields[1].num_bits = 7;
buf_set_u32(fields[1].out_value, 0, 7, reg_addr);
fields[1].in_value = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
+
fields[2].tap = etb_reg->etb->tap;
fields[2].num_bits = 1;
buf_set_u32(fields[2].out_value, 0, 1, 1);
fields[2].in_value = NULL;
- fields[2].in_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].out_value = reg->value;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = etm_reg->jtag_info->tap;
fields[1].num_bits = 7;
buf_set_u32(fields[1].out_value, 0, 7, reg_addr);
fields[1].in_value = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
+
fields[2].tap = etm_reg->jtag_info->tap;
fields[2].num_bits = 1;
buf_set_u32(fields[2].out_value, 0, 1, 0);
fields[2].in_value = NULL;
- fields[2].in_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
buf_set_u32(fields[0].out_value, 0, 32, value);
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = etm_reg->jtag_info->tap;
fields[1].num_bits = 7;
buf_set_u32(fields[1].out_value, 0, 7, reg_addr);
fields[1].in_value = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
+
fields[2].tap = etm_reg->jtag_info->tap;
fields[2].num_bits = 1;
buf_set_u32(fields[2].out_value, 0, 1, 1);
fields[2].in_value = NULL;
- fields[2].in_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
fields[0].in_value = NULL;
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = 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_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = 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_check_value = NULL;
- fields[2].in_check_mask = NULL;
+
+
fields[2].in_handler = NULL;
- fields[2].in_handler_priv = NULL;
+
jtag_add_dr_scan(3, fields, TAP_INVALID);
buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
field.in_value = NULL;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_ir_scan(1, &field, TAP_INVALID);
}
field.out_value = NULL;
field.in_value = (void*)idcode;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, TAP_INVALID);
if (jtag_execute_queue() != ERROR_OK)
field.out_value = NULL;
field.in_value = (void*)impcode;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, TAP_INVALID);
if (jtag_execute_queue() != ERROR_OK)
buf_set_u32(field.out_value, 0, field.num_bits, *data);
field.in_value = (u8*)data;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
jtag_add_dr_scan(1, &field, TAP_INVALID);
if ((retval = jtag_execute_queue()) != ERROR_OK)
fields[1].in_value = xscale->reg_cache->reg_list[XSCALE_DCSR].value;
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
+
fields[2].tap = xscale->jtag_info.tap;
fields[2].num_bits = 1;
fields[1].in_value = NULL;
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
+
fields[2].tap = xscale->jtag_info.tap;
fields[2].num_bits = 1;
fields[1].in_value = xscale->reg_cache->reg_list[XSCALE_TX].value;
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
+
fields[2].tap = xscale->jtag_info.tap;
fields[2].num_bits = 1;
fields[1].in_value = NULL;
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
+
fields[2].tap = xscale->jtag_info.tap;
fields[2].num_bits = 1;
fields[1].in_value = NULL;
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
+
fields[2].tap = xscale->jtag_info.tap;
fields[2].num_bits = 1;
fields[0].out_value = &cmd;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = xscale->jtag_info.tap;
fields[1].num_bits = 27;
fields[1].out_value = packet;
fields[1].in_value = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
+
jtag_add_dr_scan(2, fields, TAP_INVALID);
fields[0].out_value = &cmd;
fields[0].in_value = NULL;
- fields[0].in_check_value = NULL;
- fields[0].in_check_mask = NULL;
+
+
fields[0].in_handler = NULL;
- fields[0].in_handler_priv = NULL;
+
fields[1].tap = xscale->jtag_info.tap;
fields[1].num_bits = 27;
fields[1].out_value = packet;
fields[1].in_value = NULL;
- fields[1].in_check_value = NULL;
- fields[1].in_check_mask = NULL;
+
+
fields[1].in_handler = NULL;
- fields[1].in_handler_priv = NULL;
+
jtag_add_dr_scan(2, fields, TAP_INVALID);
field.out_value = ir_buf;
field.in_value = NULL;
- field.in_check_value = NULL;
- field.in_check_mask = NULL;
+
+
field.in_handler = NULL;
- field.in_handler_priv = NULL;
+
if (tap == NULL)
jtag_add_plain_ir_scan(1, &field, my_end_state);