zy1000: jtag_add_dr_scan() performance improvement
Reduce overhead in jtag_add_dr_scan() a bit. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>__archive__
parent
c21c740a89
commit
90efc404f3
|
@ -650,22 +650,29 @@ int interface_jtag_add_dr_scan(int num_fields, const struct scan_field *fields,
|
||||||
|
|
||||||
for (j = 0; j < num_fields; j++)
|
for (j = 0; j < num_fields; j++)
|
||||||
{
|
{
|
||||||
|
/* Find a range of fields to write to this tap */
|
||||||
if (tap == fields[j].tap)
|
if (tap == fields[j].tap)
|
||||||
{
|
{
|
||||||
found = 1;
|
found = 1;
|
||||||
|
int i;
|
||||||
|
for (i = j + 1; i < num_fields; i++)
|
||||||
|
{
|
||||||
|
if (tap != fields[j].tap)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
scanFields(1, fields+j, TAP_DRSHIFT, pause);
|
scanFields(i - j, fields + j, TAP_DRSHIFT, pause);
|
||||||
|
|
||||||
|
j = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
struct scan_field tmp;
|
/* Shift out a 0 for disabled tap's */
|
||||||
/* program the scan field to 1 bit length, and ignore it's value */
|
shiftValueInner(TAP_DRSHIFT, pause?TAP_DRPAUSE:TAP_DRSHIFT, 1, 0);
|
||||||
tmp.num_bits = 1;
|
|
||||||
tmp.out_value = NULL;
|
|
||||||
tmp.in_value = NULL;
|
|
||||||
|
|
||||||
scanFields(1, &tmp, TAP_DRSHIFT, pause);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue