diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-07-31 21:45:56 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-08-02 09:54:06 +0200 |
commit | 803351ec59cb57c63129c77d95b5edf2fc65c302 (patch) | |
tree | 35ea721d89a115af2e6e17ec3ad5a621ba3b1669 /src/jtag/tcl.c | |
parent | 630fc86ee339aa400f58fe80cbc5a1926eb3ef39 (diff) |
jtag: add jtag_flush_queue_sleep debug command
it can be useful to throttle performance: test
differences in behavior, test performance effect
of long roundtrips.
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/jtag/tcl.c')
-rw-r--r-- | src/jtag/tcl.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c index ea6d07e3..69045c60 100644 --- a/src/jtag/tcl.c +++ b/src/jtag/tcl.c @@ -1248,7 +1248,31 @@ COMMAND_HANDLER(handle_tms_sequence_command) return ERROR_OK; } +COMMAND_HANDLER(handle_jtag_flush_queue_sleep) +{ + if (CMD_ARGC != 1) + return ERROR_COMMAND_SYNTAX_ERROR; + + int sleep_ms; + COMMAND_PARSE_NUMBER(int, CMD_ARGV[0], sleep_ms); + + jtag_set_flush_queue_sleep(sleep_ms); + + return ERROR_OK; +} + + + static const struct command_registration jtag_command_handlers[] = { + + { + .name = "jtag_flush_queue_sleep", + .handler = handle_jtag_flush_queue_sleep, + .mode = COMMAND_ANY, + .help = "For debug purposes(simulate long delays of interface) " + "to test performance or change in behavior. Default 0ms.", + .usage = "[sleep in ms]", + }, { .name = "jtag_rclk", .handler = handle_jtag_rclk_command, |