[ 1911429 ] Read TDO data from instruction shift

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1114 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Arnim Läuger 17 years ago
parent e4e1208a92
commit 1dd77da6ad

@ -1,3 +1,14 @@
2008-03-10 Arnim Laeuger <arniml@users.sourceforge.net>
[ 1911429 ] Read TDO data from instruction shift:
* doc/UrJTAG.txt: removed note about SIR deficiency
* src/svf/svf.c (svf_sxr): request TDO capture for SIR when command specifies TDO paramters
* src/tap/chain.c (chain_shift_instructions_mode): use defered shifting and capture TDO
output when requested
* src/part/instruction.c (instruction_alloc): allocate tap_register out
* include/chain.h: parameter capture_output added to chain_shift_instructions_mode()
* include/instruction.h: tap_register out added
2008-03-03 Arnim Laeuger <arniml@users.sourceforge.net>
* src/tap/parport/ftd2xx.c (ftd2xx_mpsse_open): fix FT_SetChar() parameters

@ -852,8 +852,6 @@ The implementation of some SVF commands has deficiencies.
- PIOMAP command not supported.
- RUNTEST SCK not supported. +
The maximum time constraint is not guaranteed.
- SIR +
No check is done against the TDO parameter.
- TRST +
Parameters Z and ABSENT are not supported.
- TIR, TDR commands not supported. +

@ -50,7 +50,7 @@ void chain_defer_clock( chain_t *chain, int tms, int tdi, int n );
int chain_set_trst( chain_t *chain, int trst );
int chain_get_trst( chain_t *chain );
void chain_shift_instructions( chain_t *chain );
void chain_shift_instructions_mode( chain_t *chain, int capture, int exit );
void chain_shift_instructions_mode( chain_t *chain, int capture_output, int capture, int exit );
void chain_shift_data_registers( chain_t *chain, int capture_output );
void chain_shift_data_registers_mode( chain_t *chain, int capture_output, int capture, int exit );
void chain_flush( chain_t *chain );

@ -35,6 +35,7 @@ typedef struct instruction instruction;
struct instruction {
char name[MAXLEN_INSTRUCTION + 1];
tap_register *value;
tap_register *out;
data_register *data_register;
instruction *next;
};

@ -49,7 +49,12 @@ instruction_alloc( const char *name, int len, const char *val )
i->value = register_alloc( len );
if (!i->value) {
free( i->name );
free( i );
return NULL;
}
i->out = register_alloc( len );
if (!i->out) {
free( i->value );
free( i );
return NULL;
}
@ -67,6 +72,9 @@ instruction_free( instruction *i )
if (!i)
return;
register_free( i->value );
if (i->value)
register_free( i->value );
if (i->out)
register_free( i->out );
free( i );
}

@ -83,7 +83,6 @@ static int svf_trst_absent;
static int svf_state_executed;
/* protocol issued warnings */
static int issued_sir_tdo;
static int issued_runtest_maxtime;
@ -884,15 +883,14 @@ svf_sxr(chain_t *chain, enum generic_irdr_coding ir_dr, struct ths_params *param
switch (ir_dr) {
case generic_ir:
svf_goto_state(chain, Shift_IR);
chain_shift_instructions_mode(chain, 0, EXITMODE_EXIT1);
chain_shift_instructions_mode(chain,
sxr_params->params.tdo ? 1 : 0,
0,
EXITMODE_EXIT1);
svf_goto_state(chain, endir);
if (sxr_params->params.tdo)
if (!issued_sir_tdo) {
printf( _("Warning %s: checking of TDO not supported for SIR.\n"), "svf");
printf( _(" This message is only displayed once.\n"));
issued_sir_tdo = 1;
}
result = svf_compare_tdo(sxr_params->params.tdo, sxr_params->params.mask, ir->out, loc);
break;
case generic_dr:
@ -1107,7 +1105,6 @@ svf_run(chain_t *chain, FILE *SVF_FILE, int stop_on_mismatch)
svf_state_executed = 0;
/* set back flags for issued warnings */
issued_sir_tdo = 0;
issued_runtest_maxtime = 0;

@ -114,7 +114,7 @@ chain_get_trst( chain_t *chain )
}
void
chain_shift_instructions_mode( chain_t *chain, int capture, int exit )
chain_shift_instructions_mode( chain_t *chain, int capture_output, int capture, int exit )
{
int i;
parts_t *ps;
@ -133,15 +133,35 @@ chain_shift_instructions_mode( chain_t *chain, int capture, int exit )
if (capture)
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 ? exit : EXITMODE_SHIFT );
/* new implementation: split into defer + retrieve part
shift the data register of each part in the chain one by one */
for (i = 0; i < ps->len; i++) {
tap_defer_shift_register( chain, ps->parts[i]->active_instruction->value,
capture_output ? ps->parts[i]->active_instruction->out : NULL,
(i + 1) == ps->len ? exit : EXITMODE_SHIFT );
}
if(capture_output)
{
for (i = 0; i < ps->len; i++) {
tap_shift_register_output( chain, ps->parts[i]->active_instruction->value,
ps->parts[i]->active_instruction->out,
(i + 1) == ps->len ? exit : EXITMODE_SHIFT );
}
}
else
{
/* give the cable driver a chance to flush if it's considered useful */
cable_flush( chain->cable, TO_OUTPUT );
}
}
void
chain_shift_instructions( chain_t *chain )
{
chain_shift_instructions_mode( chain, 1, EXITMODE_IDLE );
chain_shift_instructions_mode( chain, 0, 1, EXITMODE_IDLE );
}
void

Loading…
Cancel
Save