svf: Only read TDO back from the device if we actually need to look at the bits.

This results in a 90% speedup on USB-Blaster, which serializes repeated
TDI input against TDO readback; program time on an 5CGXFC5C6F27 part was
dropped from 2m30s to 9s.

Signed-off-by: Joshua Wise <joshua@joshuawise.com>
Change-Id: I92d5a8b800492283d619328549235b610528c338
Reviewed-on: http://openocd.zylin.com/2145
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
Joshua Wise 2014-05-16 01:08:43 -07:00 committed by Andreas Fritiofson
parent f9e82f3ffb
commit dd4e3a2406
1 changed files with 2 additions and 2 deletions

View File

@ -1171,7 +1171,7 @@ XXR_common:
svf_add_check_para(0, svf_buffer_index, i);
field.num_bits = i;
field.out_value = &svf_tdi_buffer[svf_buffer_index];
field.in_value = &svf_tdi_buffer[svf_buffer_index];
field.in_value = (xxr_para_tmp->data_mask & XXR_TDO) ? &svf_tdi_buffer[svf_buffer_index] : NULL;
if (!svf_nil) {
/* NOTE: doesn't use SVF-specified state paths */
jtag_add_plain_dr_scan(field.num_bits,
@ -1261,7 +1261,7 @@ XXR_common:
svf_add_check_para(0, svf_buffer_index, i);
field.num_bits = i;
field.out_value = &svf_tdi_buffer[svf_buffer_index];
field.in_value = &svf_tdi_buffer[svf_buffer_index];
field.in_value = (xxr_para_tmp->data_mask & XXR_TDO) ? &svf_tdi_buffer[svf_buffer_index] : NULL;
if (!svf_nil) {
/* NOTE: doesn't use SVF-specified state paths */
jtag_add_plain_ir_scan(field.num_bits,