flush todo queue for transfers without output capture (if conservative flush strategy is not disabled)

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1016 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Arnim Läuger 17 years ago
parent 63ddfcd1e9
commit 5f104d447d

@ -1,3 +1,9 @@
2008-02-14 Arnim Laeuger <arniml@users.sourceforge.net>
* src/tap/cable.c (cable_flush), src/tap/chain.c (chain_shift_data_registers_mode),
include/cable.h, configure.ac: follow conservative flush strategy for transfers
without output capture (if not disabled via configure --disable-conservative-flush)
2008-02-14 Kolja Waschk <kawk>
* src/tap/chain.c: Enabled the new^2 implementation in tap_shift_register

@ -381,6 +381,21 @@ AS_IF([test "x$jim" = xtrue], [
AM_CONDITIONAL(ENABLE_JIM, false)
])
dnl Use conservative flush?
AC_ARG_ENABLE(conservative_flush,
[ --enable-conservative-flush Perform conservative queue flushing (default is enabled)],
[case "${enableval}" in
yes) conservative_flush=true ;;
no) conservative_flush=false ;;
*) AC_MSG_ERROR(cab value ${enableval} for --enable-conservative-flush) ;;
esac],
[conservative_flush=true])
AS_IF([test "x$conservative_flush" = xtrue], [
AC_DEFINE(CONSERVATIVE_FLUSH, 1, [define if conservative queue flushing is enabled])
])
AC_OUTPUT
dnl

@ -38,6 +38,7 @@ typedef struct cable_driver_t cable_driver_t;
typedef enum
{
OPTIONALLY,
CONSERVATIVELY,
TO_OUTPUT,
COMPLETELY
}

@ -142,6 +142,15 @@ cable_init( cable_t *cable )
void
cable_flush ( cable_t *cable, cable_flush_amount_t how_much )
{
if (how_much == CONSERVATIVELY)
{
#ifdef CONSERVATIVE_FLUSH
how_much = COMPLETELY;
#else
how_much = OPTIONALLY;
#endif
}
cable->driver->flush( cable, how_much );
}

@ -173,7 +173,6 @@ chain_shift_data_registers_mode( chain_t *chain, int capture_output, int capture
shift the data register of each part in the chain one by one */
for (i = 0; i < ps->len; i++) {
puts("tap_defer_shift_register");
tap_defer_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 ? exit : EXITMODE_SHIFT );
@ -182,12 +181,18 @@ chain_shift_data_registers_mode( chain_t *chain, int capture_output, int capture
if(capture_output)
{
for (i = 0; i < ps->len; i++) {
puts("tap_shift_register_output");
tap_shift_register_output( chain, ps->parts[i]->active_instruction->data_register->in,
ps->parts[i]->active_instruction->data_register->out,
(i + 1) == ps->len ? exit : EXITMODE_SHIFT );
}
}
else
{
/* the todo queue should be flushed here when following a conservative strategy
since otherwise transfers without output capture wouldn't be submitted until
a transfer with output capture is executed */
cable_flush( chain->cable, CONSERVATIVELY );
}
}
void

Loading…
Cancel
Save