diff --git a/jtag/ChangeLog b/jtag/ChangeLog index f75171c0..12c8011d 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,10 @@ +2003-08-14 Marcel Telka + + * src/tap/chain.c (chain_shift_instructions): Moved test for parts without active instruction before + shifting process. + (chain_shift_data_registers): Moved test for parts without active instruction or data register before + shifting process. + 2003-08-14 Marcel Telka * data/Makefile.am (nobase_dist_pkgdata_DATA): Added samsung/s3c4510b/s3c4510b. diff --git a/jtag/TODO b/jtag/TODO index 6dc501bc..1586db8d 100644 --- a/jtag/TODO +++ b/jtag/TODO @@ -1,6 +1,7 @@ $Id$ * Write documentation. +* Add 'initbus' command to allow dynamic bus driver loading. * Support for display the result of a boundary scan formated according to the CPU definitions (e.g. MA[0-26] = 0x00001c00). * Remove direct relation between JTAG instruction and data register (e.g. ARM7TDMI). * SVF player. diff --git a/jtag/src/tap/chain.c b/jtag/src/tap/chain.c index b7ec60ce..71802fd8 100644 --- a/jtag/src/tap/chain.c +++ b/jtag/src/tap/chain.c @@ -105,15 +105,16 @@ chain_shift_instructions( chain_t *chain ) ps = chain->parts; - tap_capture_ir( chain ); - for (i = 0; i < ps->len; i++) { - if (!ps->parts[i]->active_instruction) { - printf( _("%s(%d) Part without active instruction\n"), __FILE__, __LINE__ ); - continue; + if (ps->parts[i]->active_instruction == NULL) { + printf( _("%s(%d) Part %d without active instruction\n"), __FILE__, __LINE__, i ); + return; } - tap_shift_register( chain, ps->parts[i]->active_instruction->value, NULL, (i + 1) == ps->len ); } + + tap_capture_ir( chain ); + for (i = 0; i < ps->len; i++) + tap_shift_register( chain, ps->parts[i]->active_instruction->value, NULL, (i + 1) == ps->len ); } void @@ -127,19 +128,20 @@ chain_shift_data_registers( chain_t *chain, int capture_output ) ps = chain->parts; - tap_capture_dr( chain ); - for (i = 0; i < ps->len; i++) { - if (!ps->parts[i]->active_instruction) { - printf( _("%s(%d) Part without active instruction\n"), __FILE__, __LINE__ ); - continue; + if (ps->parts[i]->active_instruction == NULL) { + printf( _("%s(%d) Part %d without active instruction\n"), __FILE__, __LINE__, i ); + return; } - if (!ps->parts[i]->active_instruction->data_register) { - printf( _("%s(%d) Part without data register\n"), __FILE__, __LINE__ ); - continue; + if (ps->parts[i]->active_instruction->data_register == NULL) { + printf( _("%s(%d) Part %d without data register\n"), __FILE__, __LINE__, i ); + return; } + } + + tap_capture_dr( chain ); + for (i = 0; i < ps->len; i++) tap_shift_register( chain, ps->parts[i]->active_instruction->data_register->in, capture_output ? ps->parts[i]->active_instruction->data_register->out : NULL, (i + 1) == ps->len ); - } }