OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | svf_check_tdo_para |
struct | svf_para |
struct | svf_statemove |
struct | svf_xxr_para |
Macros | |
#define | MIN_CHUNK 16 /* Buffer is increased by this size each time as required */ |
#define | SVF_BUF_LOG(_lvl, _buf, _nbits, _desc) svf_hexbuf_print(LOG_LVL_##_lvl, __FILE__, __LINE__, __func__, _buf, _nbits, _desc) |
#define | SVF_CHECK_TDO_PARA_SIZE 1024 |
#define | SVF_MAX_ADDCYCLES 255 |
#define | SVF_MAX_BUFFER_SIZE_TO_COMMIT (1024 * 1024) |
#define | SVF_MAX_NUM_OF_OPTIONS 8 |
#define | SVF_MIN_NUM_OF_OPTIONS 1 |
#define | SVFP_CMD_INC_CNT 1024 |
#define | XXR_MASK (1 << 2) |
#define | XXR_SMASK (1 << 3) |
#define | XXR_TDI (1 << 0) |
#define | XXR_TDO (1 << 1) |
Enumerations | |
enum | svf_cmd_param { OPT_ADDCYCLES , OPT_IGNORE_ERROR , OPT_NIL , OPT_NORESET , OPT_PROGRESS , OPT_QUIET , OPT_TAP , DEPRECATED_OPT_IGNORE_ERROR , DEPRECATED_OPT_NIL , DEPRECATED_OPT_PROGRESS , DEPRECATED_OPT_QUIET } |
enum | svf_command { ENDDR , ENDIR , FREQUENCY , HDR , HIR , PIO , PIOMAP , RUNTEST , SDR , SIR , STATE , TDR , TIR , TRST } |
enum | trst_mode { TRST_ON , TRST_OFF , TRST_Z , TRST_ABSENT } |
Functions | |
COMMAND_HANDLER (handle_svf_command) | |
static int | svf_add_check_para (uint8_t enabled, int buffer_offset, int bit_len) |
int | svf_add_statemove (tap_state_t state_to) |
svf_add_statemove() moves from the current state to goal_state. More... | |
static int | svf_adjust_array_length (uint8_t **arr, int orig_bit_len, int new_bit_len) |
static int | svf_check_tdo (void) |
static int | svf_copy_hexstring_to_binary (char *str, uint8_t **bin, int orig_bit_len, int bit_len) |
static int | svf_execute_tap (void) |
static int | svf_find_string_in_array (char *str, char **strs, int num_of_element) |
static void | svf_free_xxd_para (struct svf_xxr_para *para) |
static int | svf_getline (char **lineptr, size_t *n, FILE *stream) |
static void | svf_hexbuf_print (int dbg_lvl, const char *file, unsigned int line, const char *function, const uint8_t *buf, int bit_len, const char *desc) |
static int | svf_parse_cmd_string (char *str, int len, char **argus, int *num_of_argu) |
static int | svf_read_command_from_file (FILE *fd) |
static int | svf_realloc_buffers (size_t len) |
int | svf_register_commands (struct command_context *cmd_ctx) |
static int | svf_run_command (struct command_context *cmd_ctx, char *cmd_str) |
static int | svf_set_padding (struct svf_xxr_para *para, int len, unsigned char tdi) |
bool | svf_tap_state_is_stable (tap_state_t state) |
svf_tap_state_is_stable() returns true for stable non-SHIFT states More... | |
#define MIN_CHUNK 16 /* Buffer is increased by this size each time as required */ |
#define SVF_BUF_LOG | ( | _lvl, | |
_buf, | |||
_nbits, | |||
_desc | |||
) | svf_hexbuf_print(LOG_LVL_##_lvl, __FILE__, __LINE__, __func__, _buf, _nbits, _desc) |
#define SVF_MAX_NUM_OF_OPTIONS 8 |
#define SVF_MIN_NUM_OF_OPTIONS 1 |
enum svf_cmd_param |
enum svf_command |
COMMAND_HANDLER | ( | handle_svf_command | ) |
Definition at line 381 of file svf.c.
References jtag_tap::abs_chain_position, CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, command_print(), DEPRECATED_OPT_IGNORE_ERROR, DEPRECATED_OPT_NIL, DEPRECATED_OPT_PROGRESS, DEPRECATED_OPT_QUIET, ERROR_COMMAND_ARGUMENT_INVALID, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, svf_para::hdr_para, svf_para::hir_para, jtag_tap::ir_length, jtag_add_tlr(), jtag_all_taps(), jtag_execute_queue(), jtag_tap_by_string(), LOG_ERROR, LOG_INFO, LOG_USER, LOG_USER_N, jtag_tap::next_tap, NULL, nvp_name2value(), OPT_ADDCYCLES, OPT_IGNORE_ERROR, OPT_NIL, OPT_NORESET, OPT_PROGRESS, OPT_QUIET, OPT_TAP, svf_para::sdr_para, svf_para::sir_para, svf_addcycles, svf_buffer_index, svf_buffer_size, svf_check_tdo(), svf_check_tdo_para_index, SVF_CHECK_TDO_PARA_SIZE, svf_cmd_opts, svf_command_buffer, svf_command_buffer_size, svf_fd, svf_free_xxd_para(), svf_getline(), svf_ignore_error, svf_last_printed_percentage, svf_line_number, svf_mask_buffer, SVF_MAX_ADDCYCLES, SVF_MAX_BUFFER_SIZE_TO_COMMIT, SVF_MAX_NUM_OF_OPTIONS, SVF_MIN_NUM_OF_OPTIONS, svf_nil, svf_noreset, svf_para_init, svf_percentage, svf_progress_enabled, svf_quiet, svf_read_command_from_file(), svf_read_line, svf_realloc_buffers(), svf_run_command(), svf_set_padding(), svf_tap_is_specified, svf_tdi_buffer, svf_tdo_buffer, svf_total_lines, svf_para::tdr_para, timeval_ms(), svf_para::tir_para, and nvp::value.
|
static |
Definition at line 954 of file svf.c.
References svf_check_tdo_para::bit_len, svf_check_tdo_para::buffer_offset, jtag_tap::enabled, svf_check_tdo_para::enabled, ERROR_FAIL, ERROR_OK, svf_check_tdo_para::line_num, LOG_ERROR, svf_check_tdo_para_index, SVF_CHECK_TDO_PARA_SIZE, and svf_line_number.
int svf_add_statemove | ( | tap_state_t | goal_state | ) |
svf_add_statemove() moves from the current state to goal_state.
goal_state | The final TAP state. |
The current and goal states must satisfy svf_tap_state_is_stable(). State transition paths used by this routine are those given in the SVF specification for single-argument STATE commands (and also used for various other state transitions).
Definition at line 316 of file svf.c.
References ARRAY_SIZE, cmd_queue_cur_state, ERROR_FAIL, ERROR_OK, jtag_add_pathmove(), jtag_add_tlr(), LOG_ERROR, svf_nil, svf_statemoves, TAP_RESET, tap_state_name(), and svf_statemove::to.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 836 of file svf.c.
References ERROR_FAIL, ERROR_OK, and LOG_ERROR.
Referenced by svf_copy_hexstring_to_binary(), and svf_set_padding().
|
static |
Definition at line 927 of file svf.c.
References svf_check_tdo_para::bit_len, buf_eq_mask(), svf_check_tdo_para::buffer_offset, jtag_tap::enabled, ERROR_FAIL, ERROR_OK, LOG_ERROR, SVF_BUF_LOG, svf_check_tdo_para_index, svf_ignore_error, svf_mask_buffer, svf_tdi_buffer, and svf_tdo_buffer.
Referenced by COMMAND_HANDLER(), and svf_execute_tap().
|
static |
Definition at line 864 of file svf.c.
References ERROR_FAIL, ERROR_OK, LOG_ERROR, and svf_adjust_array_length().
|
static |
Definition at line 970 of file svf.c.
References ERROR_FAIL, ERROR_OK, jtag_execute_queue(), svf_buffer_index, svf_check_tdo(), and svf_nil.
Referenced by svf_realloc_buffers().
|
static |
|
static |
Definition at line 299 of file svf.c.
References svf_xxr_para::mask, NULL, svf_xxr_para::smask, svf_xxr_para::tdi, and svf_xxr_para::tdo.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 661 of file svf.c.
References MIN_CHUNK.
Referenced by COMMAND_HANDLER(), and svf_read_command_from_file().
|
static |
Definition at line 248 of file svf.c.
References svf_check_tdo_para::bit_len, DIV_ROUND_UP, and log_printf_lf().
|
static |
Definition at line 781 of file svf.c.
References ERROR_FAIL, ERROR_OK, and LOG_ERROR.
|
static |
Definition at line 692 of file svf.c.
References ERROR_FAIL, ERROR_OK, LOG_ERROR, svf_command_buffer, svf_command_buffer_size, svf_fd, svf_getline(), svf_line_number, svf_read_line, and svf_read_line_size.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 272 of file svf.c.
References ERROR_FAIL, ERROR_OK, svf_buffer_size, svf_execute_tap(), svf_mask_buffer, svf_tdi_buffer, and svf_tdo_buffer.
Referenced by COMMAND_HANDLER().
int svf_register_commands | ( | struct command_context * | cmd_ctx | ) |
Definition at line 1643 of file svf.c.
References NULL, register_commands(), and svf_command_handlers.
Referenced by jtag_select().
|
static |
Definition at line 982 of file svf.c.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 851 of file svf.c.
References svf_xxr_para::data_mask, ERROR_OK, svf_xxr_para::len, svf_xxr_para::mask, svf_adjust_array_length(), svf_xxr_para::tdi, svf_xxr_para::tdo, and XXR_TDI.
Referenced by COMMAND_HANDLER().
bool svf_tap_state_is_stable | ( | tap_state_t | state | ) |
svf_tap_state_is_stable() returns true for stable non-SHIFT states
state | The TAP state in question |
Definition at line 819 of file svf.c.
References state, TAP_DRPAUSE, TAP_IDLE, TAP_IRPAUSE, and TAP_RESET.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 229 of file svf.c.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 224 of file svf.c.
Referenced by COMMAND_HANDLER(), and svf_execute_tap().
|
static |
Definition at line 224 of file svf.c.
Referenced by COMMAND_HANDLER(), and svf_realloc_buffers().
|
static |
|
static |
Definition at line 206 of file svf.c.
Referenced by COMMAND_HANDLER(), svf_add_check_para(), and svf_check_tdo().
|
static |
Definition at line 316 of file svf.c.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 217 of file svf.c.
Referenced by COMMAND_HANDLER(), and svf_read_command_from_file().
|
static |
Definition at line 218 of file svf.c.
Referenced by COMMAND_HANDLER(), and svf_read_command_from_file().
|
static |
Definition at line 982 of file svf.c.
Referenced by svf_register_commands().
|
static |
|
static |
Definition at line 214 of file svf.c.
Referenced by COMMAND_HANDLER(), and svf_read_command_from_file().
|
static |
Definition at line 227 of file svf.c.
Referenced by COMMAND_HANDLER(), and svf_check_tdo().
|
static |
Definition at line 239 of file svf.c.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 219 of file svf.c.
Referenced by COMMAND_HANDLER(), svf_add_check_para(), and svf_read_command_from_file().
|
static |
Definition at line 223 of file svf.c.
Referenced by COMMAND_HANDLER(), svf_check_tdo(), and svf_realloc_buffers().
|
static |
Definition at line 226 of file svf.c.
Referenced by COMMAND_HANDLER(), svf_add_statemove(), and svf_execute_tap().
|
static |
Definition at line 228 of file svf.c.
Referenced by COMMAND_HANDLER().
|
static |
|
static |
Definition at line 238 of file svf.c.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 236 of file svf.c.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 225 of file svf.c.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 215 of file svf.c.
Referenced by COMMAND_HANDLER(), and svf_read_command_from_file().
|
static |
Definition at line 216 of file svf.c.
Referenced by svf_read_command_from_file().
|
static |
Definition at line 70 of file svf.c.
Referenced by svf_add_statemove().
|
static |
Definition at line 232 of file svf.c.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 223 of file svf.c.
Referenced by COMMAND_HANDLER(), svf_check_tdo(), and svf_realloc_buffers().
|
static |
Definition at line 223 of file svf.c.
Referenced by COMMAND_HANDLER(), svf_check_tdo(), and svf_realloc_buffers().
|
static |
Definition at line 237 of file svf.c.
Referenced by COMMAND_HANDLER().