Go to the source code of this file.
|
| | COMMAND_HANDLER (xvc_handle_host_command) |
| |
| | COMMAND_HANDLER (xvc_handle_port_command) |
| |
| static int | read_frame (int sock_id, unsigned char *ptr, unsigned int size) |
| |
| static unsigned int | xvc_bits_to_bytes (unsigned int bits) |
| |
| static int | xvc_fill_buffer (void) |
| |
| static int | xvc_flush (void) |
| |
| static int | xvc_getinfo (void) |
| |
| static int | xvc_init (void) |
| |
| static int | xvc_init_tcp (int *fd) |
| |
| static int | xvc_init_unix (int *fd) |
| |
| static int | xvc_khz (int khz, int *jtag_speed) |
| |
| static int | xvc_queue (const uint8_t *tms, unsigned int tms_offset, const uint8_t *tdi, unsigned int tdi_offset, uint8_t *tdo, unsigned int tdo_offset, unsigned int length) |
| |
| static int | xvc_quit (void) |
| |
| static int | xvc_reset (int trst, int srst) |
| |
| static int | xvc_set_tck (void) |
| |
| static int | xvc_speed (int speed) |
| |
| static int | xvc_speed_div (int speed, int *khz) |
| |
| static void | xvc_tap_end_state (enum tap_state state) |
| |
| static int | xvc_tap_execute_queue (struct jtag_command *cmd_queue) |
| |
| static int | xvc_tap_execute_tms (struct jtag_command *cmd) |
| |
| static int | xvc_tap_path_move (struct pathmove_command *cmd) |
| |
| static int | xvc_tap_runtest (unsigned int num_cycles) |
| |
| static int | xvc_tap_scan_write (struct scan_command *cmd) |
| |
| static unsigned int | xvc_tap_stableclocks (unsigned int num_cycles) |
| |
| static int | xvc_tap_state_move (int skip) |
| |
◆ MAX_BUF_SIZE
| #define MAX_BUF_SIZE (BIT(31) - 11) |
Definition at line 68 of file xvc.c.
◆ MAX_SHIFT_RESULTS
| #define MAX_SHIFT_RESULTS 256 |
Definition at line 69 of file xvc.c.
◆ COMMAND_HANDLER() [1/2]
| COMMAND_HANDLER |
( |
xvc_handle_host_command |
| ) |
|
◆ COMMAND_HANDLER() [2/2]
| COMMAND_HANDLER |
( |
xvc_handle_port_command |
| ) |
|
◆ read_frame()
| static int read_frame |
( |
int |
sock_id, |
|
|
unsigned char * |
ptr, |
|
|
unsigned int |
size |
|
) |
| |
|
static |
◆ xvc_bits_to_bytes()
| static unsigned int xvc_bits_to_bytes |
( |
unsigned int |
bits | ) |
|
|
static |
◆ xvc_fill_buffer()
| static int xvc_fill_buffer |
( |
void |
| ) |
|
|
static |
Definition at line 297 of file xvc.c.
References buf_set_buf(), shift_result::buffer, shift_result::buffer_offset, ERROR_FAIL, ERROR_OK, shift_result::first, last_used_bits, shift_result::length, LOG_ERROR, pending_shift_results, read_frame(), shift_result_buffer, xvc_bits_to_bytes(), xvc_fd, xvc_max_usable_vector_size, and xvc_tdo_buf.
Referenced by xvc_queue().
◆ xvc_flush()
| static int xvc_flush |
( |
void |
| ) |
|
|
static |
Definition at line 123 of file xvc.c.
References ERROR_FAIL, ERROR_OK, h_u32_to_le(), last_used_bits, LOG_DEBUG, LOG_ERROR, write_socket(), xvc_bits_to_bytes(), xvc_fd, xvc_max_usable_vector_size, xvc_send_buf, xvc_tdi_buf, xvc_tms_buf, and xvc_used_bits.
Referenced by xvc_queue().
◆ xvc_getinfo()
| static int xvc_getinfo |
( |
void |
| ) |
|
|
static |
Definition at line 205 of file xvc.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, LOG_INFO, MAX_BUF_SIZE, NULL, read_socket(), write_socket(), xvc_fd, xvc_max_usable_vector_size, xvc_max_vector_size, xvc_send_buf, xvc_tdi_buf, xvc_tdo_buf, and xvc_tms_buf.
Referenced by xvc_init().
◆ xvc_init()
| static int xvc_init |
( |
void |
| ) |
|
|
static |
Definition at line 458 of file xvc.c.
References ERROR_OK, last_used_bits, LOG_DEBUG, pending_shift_results, xvc_fd, xvc_getinfo(), xvc_init_tcp(), xvc_init_unix(), xvc_port, xvc_set_tck(), xvc_tck, and xvc_used_bits.
◆ xvc_init_tcp()
| static int xvc_init_tcp |
( |
int * |
fd | ) |
|
|
static |
◆ xvc_init_unix()
| static int xvc_init_unix |
( |
int * |
fd | ) |
|
|
static |
◆ xvc_khz()
| static int xvc_khz |
( |
int |
khz, |
|
|
int * |
jtag_speed |
|
) |
| |
|
static |
◆ xvc_queue()
| static int xvc_queue |
( |
const uint8_t * |
tms, |
|
|
unsigned int |
tms_offset, |
|
|
const uint8_t * |
tdi, |
|
|
unsigned int |
tdi_offset, |
|
|
uint8_t * |
tdo, |
|
|
unsigned int |
tdo_offset, |
|
|
unsigned int |
length |
|
) |
| |
|
static |
Definition at line 169 of file xvc.c.
References buf_set_buf(), shift_result::buffer, shift_result::buffer_offset, ERROR_OK, shift_result::first, length, shift_result::length, MAX_SHIFT_RESULTS, pending_shift_results, shift_result_buffer, xvc_fill_buffer(), xvc_flush(), xvc_max_usable_vector_size, xvc_tdi_buf, xvc_tms_buf, and xvc_used_bits.
Referenced by xvc_tap_execute_tms(), xvc_tap_path_move(), xvc_tap_scan_write(), xvc_tap_stableclocks(), and xvc_tap_state_move().
◆ xvc_quit()
| static int xvc_quit |
( |
void |
| ) |
|
|
static |
Definition at line 490 of file xvc.c.
References close_socket(), ERROR_FAIL, ERROR_OK, LOG_ERROR, xvc_fd, xvc_host, xvc_port, xvc_send_buf, xvc_tdi_buf, xvc_tdo_buf, and xvc_tms_buf.
◆ xvc_reset()
| static int xvc_reset |
( |
int |
trst, |
|
|
int |
srst |
|
) |
| |
|
static |
◆ xvc_set_tck()
| static int xvc_set_tck |
( |
void |
| ) |
|
|
static |
Definition at line 270 of file xvc.c.
References ERROR_FAIL, ERROR_OK, h_u32_to_le(), le_to_h_u32(), LOG_ERROR, LOG_INFO, read_socket(), write_socket(), xvc_fd, and xvc_tck.
Referenced by xvc_init(), and xvc_speed().
◆ xvc_speed()
| static int xvc_speed |
( |
int |
speed | ) |
|
|
static |
◆ xvc_speed_div()
| static int xvc_speed_div |
( |
int |
speed, |
|
|
int * |
khz |
|
) |
| |
|
static |
◆ xvc_tap_end_state()
| static void xvc_tap_end_state |
( |
enum tap_state |
state | ) |
|
|
static |
◆ xvc_tap_execute_queue()
| static int xvc_tap_execute_queue |
( |
struct jtag_command * |
cmd_queue | ) |
|
|
static |
◆ xvc_tap_execute_tms()
◆ xvc_tap_path_move()
Definition at line 544 of file xvc.c.
References cmd, ERROR_FAIL, ERROR_OK, LOG_ERROR, NULL, tap_get_state(), tap_set_end_state(), tap_set_state, tap_state_name(), tap_state_transition(), and xvc_queue().
◆ xvc_tap_runtest()
| static int xvc_tap_runtest |
( |
unsigned int |
num_cycles | ) |
|
|
static |
◆ xvc_tap_scan_write()
Definition at line 604 of file xvc.c.
References bit_copy(), cmd, ERROR_FAIL, ERROR_OK, LOG_DEBUG, NULL, TAP_DRSHIFT, tap_get_end_state(), tap_get_state(), TAP_IRSHIFT, tap_set_end_state(), tap_set_state, tap_state_transition(), xvc_queue(), xvc_tap_end_state(), and xvc_tap_state_move().
◆ xvc_tap_stableclocks()
| static unsigned int xvc_tap_stableclocks |
( |
unsigned int |
num_cycles | ) |
|
|
static |
◆ xvc_tap_state_move()
| static int xvc_tap_state_move |
( |
int |
skip | ) |
|
|
static |
◆ last_used_bits
| unsigned int last_used_bits |
|
static |
◆ pending_shift_results
| unsigned int pending_shift_results |
|
static |
◆ shift_result_buffer
◆ xvc_adapter_driver
Initial value:= {
.name = "xvc",
}
static int xvc_reset(int trst, int srst)
static int xvc_quit(void)
static struct jtag_interface xvc_interface
static int xvc_khz(int khz, int *jtag_speed)
static int xvc_speed_div(int speed, int *khz)
static const struct command_registration xvc_command_handlers[]
static int xvc_init(void)
static int xvc_speed(int speed)
Definition at line 667 of file xvc.c.
◆ xvc_command_handlers
Initial value:= {
{
.name = "xvc",
.help = "perform XVC driver configuration",
},
}
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
const char * usage
a string listing the options and arguments, required or optional
static const struct command_registration xvc_subcommand_handlers[]
Definition at line 418 of file xvc.c.
◆ xvc_fd
◆ xvc_host
◆ xvc_interface
Initial value:= {
}
#define DEBUG_CAP_TMS_SEQ
static int xvc_tap_execute_queue(struct jtag_command *cmd_queue)
Definition at line 667 of file xvc.c.
◆ xvc_max_usable_vector_size
| unsigned int xvc_max_usable_vector_size |
|
static |
◆ xvc_max_vector_size
| unsigned int xvc_max_vector_size |
|
static |
◆ xvc_port
◆ xvc_send_buf
◆ xvc_subcommand_handlers
Initial value:= {
{
.name = "port",
.handler = xvc_handle_port_command,
.help =
"Set the port to use to connect to the XVC remote server.\n"
" If 0 or unset, use unix sockets to connect to the remote server.",
.usage = "port_number",
},
{
.name = "host",
.handler = xvc_handle_host_command,
.help = "Set the host to use or UNIX socket to connect to the remote XVC server.",
.usage = "host_name",
},
}
Definition at line 418 of file xvc.c.
◆ xvc_tck
◆ xvc_tdi_buf
◆ xvc_tdo_buf
◆ xvc_tms_buf
◆ xvc_used_bits