OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | callbackentry |
Macros | |
#define | callbackqueue_size 128 |
#define | readqueue_size 16384 |
#define | ZYLIN_KHZ 60000 |
Enumerations | |
enum | ZY1000_CMD { ZY1000_CMD_POKE = 0x0, ZY1000_CMD_PEEK = 0x8, ZY1000_CMD_SLEEP = 0x1, ZY1000_CMD_WAITIDLE = 2 } |
Functions | |
int | arm11_run_instr_data_to_core_noack_inner (struct jtag_tap *tap, uint32_t opcode, uint32_t *data, size_t count) |
COMMAND_HANDLER (handle_power_command) | |
void | embeddedice_write_dcc (struct jtag_tap *tap, int reg_addr, const uint8_t *buffer, int little, int count) |
static bool | flush_writes (void) |
int | interface_add_tms_seq (unsigned num_bits, const uint8_t *seq, enum tap_state state) |
int | interface_jtag_add_clocks (int num_cycles) |
int | interface_jtag_add_dr_scan (struct jtag_tap *active, int num_fields, const struct scan_field *fields, tap_state_t state) |
see jtag_add_dr_scan() More... | |
int | interface_jtag_add_ir_scan (struct jtag_tap *active, const struct scan_field *fields, tap_state_t state) |
see jtag_add_ir_scan() More... | |
int | interface_jtag_add_pathmove (int num_states, const tap_state_t *path) |
int | interface_jtag_add_plain_dr_scan (int num_bits, const uint8_t *out_bits, uint8_t *in_bits, tap_state_t state) |
int | interface_jtag_add_plain_ir_scan (int num_bits, const uint8_t *out_bits, uint8_t *in_bits, tap_state_t state) |
int | interface_jtag_add_reset (int req_trst, int req_srst) |
This drives the actual srst and trst pins. More... | |
int | interface_jtag_add_runtest (int num_cycles, tap_state_t state) |
int | interface_jtag_add_sleep (uint32_t us) |
int | interface_jtag_add_tlr (void) |
int | interface_jtag_execute_queue (void) |
static int | jim_zy1000_server (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static void | jtag_pre_post_bits (struct jtag_tap *tap, int *pre, int *post) |
static bool | readLong (uint32_t *out_data) |
static bool | readPowerDropout (void) |
static bool | readSRST (void) |
static void | scanBits (const uint8_t *out_value, uint8_t *in_value, int num_bits, bool pause_now, tap_state_t shiftState, tap_state_t end_state) |
static void | scanFields (int num_fields, const struct scan_field *fields, tap_state_t shiftState, tap_state_t end_state) |
static void | setPower (bool power) |
static void | tcpip_open (void) |
void | waitIdle (void) |
static void | waitSRST (bool asserted) |
static bool | writeLong (uint32_t l) |
static void | writeShiftValue (uint8_t *data, int bits) |
void | zy1000_flush_callbackqueue (void) |
void | zy1000_flush_readqueue (void) |
int | zy1000_init (void) |
void | zy1000_jtag_add_callback (jtag_callback1_t callback, jtag_callback_data_t data0) |
void | zy1000_jtag_add_callback4 (jtag_callback_t callback, jtag_callback_data_t data0, jtag_callback_data_t data1, jtag_callback_data_t data2, jtag_callback_data_t data3) |
static int | zy1000_jtag_add_clocks (int num_cycles, tap_state_t state, tap_state_t clockstate) |
static int | zy1000_jtag_convert_to_callback4 (jtag_callback_data_t data0, jtag_callback_data_t data1, jtag_callback_data_t data2, jtag_callback_data_t data3) |
static int | zy1000_khz (int khz, int *jtag_speed) |
static int | zy1000_power_dropout (int *dropout) |
int | zy1000_quit (void) |
void | zy1000_reset (int trst, int srst) |
int | zy1000_speed (int speed) |
static int | zy1000_speed_div (int speed, int *khz) |
static int | zy1000_srst_asserted (int *srst_asserted) |
uint32_t | zy1000_tcpin (uint32_t address) |
void | zy1000_tcpout (uint32_t address, uint32_t data) |
static int | zylinjtag_Jim_Command_powerstatus (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
Variables | |
static struct callbackentry | callbackqueue [callbackqueue_size] |
static int | callbackqueue_pos |
static uint8_t | in_buffer [16384] |
static size_t | in_pos |
static size_t | in_write |
static uint8_t | out_buffer [16384] |
static size_t | out_pos |
struct { | |
int bits | |
uint8_t * dest | |
} | readqueue [readqueue_size] |
static int | readqueue_pos |
static bool | savePower |
static int | tcp_ip = -1 |
static char * | tcp_server = "notspecified" |
struct adapter_driver | zy1000_adapter_driver |
static const struct command_registration | zy1000_commands [] |
static struct jtag_interface | zy1000_interface |
static bool | zy1000_rclk |
#define callbackqueue_size 128 |
Definition at line 1003 of file zy1000.c.
Referenced by zy1000_jtag_add_callback4().
#define readqueue_size 16384 |
Definition at line 959 of file zy1000.c.
Referenced by writeShiftValue().
#define ZYLIN_KHZ 60000 |
Definition at line 59 of file zy1000.c.
Referenced by zy1000_khz(), zy1000_speed(), and zy1000_speed_div().
enum ZY1000_CMD |
int arm11_run_instr_data_to_core_noack_inner | ( | struct jtag_tap * | tap, |
uint32_t | opcode, | ||
uint32_t * | data, | ||
size_t | count | ||
) |
Definition at line 675 of file zy1000.c.
References arm11_MOVE_DRPAUSE_IDLE_DRPAUSE_with_delay, arm11_run_instr_data_to_core_noack_inner_default(), ARRAY_SIZE, jtag_add_dr_scan(), jtag_add_pathmove(), jtag_execute_queue(), jtag_pre_post_bits(), scan_field::num_bits, shiftValueInner(), TAP_DRCAPTURE, TAP_DREXIT2, TAP_DRPAUSE, TAP_DRSELECT, TAP_DRSHIFT, TAP_DRUPDATE, TAP_IDLE, waitIdle(), ZY1000_JTAG_BASE, and ZY1000_POKE.
COMMAND_HANDLER | ( | handle_power_command | ) |
Definition at line 261 of file zy1000.c.
References CMD_ARGC, CMD_ARGV, COMMAND_PARSE_ON_OFF, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, LOG_INFO, savePower, and setPower().
void embeddedice_write_dcc | ( | struct jtag_tap * | tap, |
int | reg_addr, | ||
const uint8_t * | buffer, | ||
int | little, | ||
int | count | ||
) |
Definition at line 632 of file zy1000.c.
References count, embeddedice_write_reg_inner(), fast_target_buffer_get_u32(), jtag_pre_post_bits(), shiftValueInner(), TAP_DRSHIFT, and TAP_IDLE.
|
static |
Definition at line 811 of file zy1000.c.
References out_buffer, out_pos, and tcp_ip.
Referenced by readLong(), and writeLong().
int interface_add_tms_seq | ( | unsigned | num_bits, |
const uint8_t * | seq, | ||
enum tap_state | state | ||
) |
Definition at line 548 of file zy1000.c.
References tms_command::bits, buf_cpy(), jtag_command::cmd, cmd_queue_alloc(), DIV_ROUND_UP, ERROR_FAIL, ERROR_OK, jtag_queue_command(), JTAG_TMS, NULL, tms_command::num_bits, TAP_INVALID, jtag_command_container::tms, jtag_command::type, waitIdle(), ZY1000_JTAG_BASE, and ZY1000_POKE.
Referenced by interface_jtag_add_pathmove().
int interface_jtag_add_clocks | ( | int | num_cycles | ) |
Definition at line 543 of file zy1000.c.
References jtag_command::cmd, cmd_queue_alloc(), cmd_queue_cur_state, ERROR_OK, jtag_queue_command(), JTAG_STABLECLOCKS, stableclocks_command::num_cycles, jtag_command_container::stableclocks, jtag_command::type, and zy1000_jtag_add_clocks().
int interface_jtag_add_dr_scan | ( | struct jtag_tap * | active, |
int | num_fields, | ||
const struct scan_field * | fields, | ||
tap_state_t | state | ||
) |
Definition at line 454 of file zy1000.c.
References jtag_tap::bypass, jtag_command::cmd, cmd_queue_alloc(), scan_command::end_state, ERROR_OK, scan_command::fields, scan_field::in_value, scan_command::ir_scan, jtag_queue_command(), JTAG_SCAN, jtag_scan_field_clone(), jtag_tap_next_enabled(), NULL, scan_field::num_bits, scan_command::num_fields, scan_field::out_value, scan, jtag_command_container::scan, scanFields(), shiftValueInner(), TAP_DRSHIFT, and jtag_command::type.
int interface_jtag_add_ir_scan | ( | struct jtag_tap * | active, |
const struct scan_field * | fields, | ||
tap_state_t | state | ||
) |
Definition at line 407 of file zy1000.c.
References buf_cpy(), buf_set_ones(), jtag_tap::bypass, jtag_command::cmd, cmd_queue_alloc(), jtag_tap::cur_instr, DIV_ROUND_UP, scan_command::end_state, ERROR_OK, scan_command::fields, scan_field::in_value, jtag_tap::ir_length, scan_command::ir_scan, jtag_queue_command(), JTAG_SCAN, jtag_scan_field_clone(), jtag_tap_count_enabled(), jtag_tap_next_enabled(), NULL, scan_field::num_bits, scan_command::num_fields, scan_field::out_value, scan, jtag_command_container::scan, scanFields(), shiftValueInner(), TAP_IRSHIFT, and jtag_command::type.
int interface_jtag_add_pathmove | ( | int | num_states, |
const tap_state_t * | path | ||
) |
Definition at line 575 of file zy1000.c.
References jtag_command::cmd, cmd_queue_alloc(), cmd_queue_cur_state, ERROR_OK, interface_add_tms_seq(), JTAG_PATHMOVE, jtag_queue_command(), LOG_ERROR, pathmove_command::num_states, pathmove_command::path, jtag_command_container::pathmove, tap_state_name(), tap_state_transition(), and jtag_command::type.
int interface_jtag_add_plain_dr_scan | ( | int | num_bits, |
const uint8_t * | out_bits, | ||
uint8_t * | in_bits, | ||
tap_state_t | state | ||
) |
Definition at line 480 of file zy1000.c.
References ERROR_OK, jtag_add_plain_scan(), scanBits(), and TAP_DRSHIFT.
int interface_jtag_add_plain_ir_scan | ( | int | num_bits, |
const uint8_t * | out_bits, | ||
uint8_t * | in_bits, | ||
tap_state_t | state | ||
) |
Definition at line 445 of file zy1000.c.
References ERROR_OK, jtag_add_plain_scan(), scanBits(), and TAP_IRSHIFT.
int interface_jtag_add_reset | ( | int | trst, |
int | srst | ||
) |
This drives the actual srst and trst pins.
srst will always be 0 if jtag_reset_config & RESET_SRST_PULLS_TRST != 0 and ditto for trst.
the higher level jtag_add_reset will invoke jtag_add_tlr() if appropriate
Definition at line 495 of file zy1000.c.
References jtag_command::cmd, cmd_queue_alloc(), ERROR_OK, jtag_queue_command(), JTAG_RESET, jtag_command_container::reset, reset_command::srst, reset_command::trst, jtag_command::type, and zy1000_reset().
int interface_jtag_add_runtest | ( | int | num_cycles, |
tap_state_t | state | ||
) |
Definition at line 538 of file zy1000.c.
References jtag_command::cmd, cmd_queue_alloc(), runtest_command::end_state, ERROR_OK, jtag_queue_command(), JTAG_RUNTEST, runtest_command::num_cycles, jtag_command_container::runtest, TAP_IDLE, jtag_command::type, and zy1000_jtag_add_clocks().
int interface_jtag_add_sleep | ( | uint32_t | us | ) |
Definition at line 948 of file zy1000.c.
References jtag_command::cmd, cmd_queue_alloc(), ERROR_OK, jtag_queue_command(), JTAG_SLEEP, jtag_command_container::sleep, tcpip_open(), jtag_command::type, sleep_command::us, writeLong(), and ZY1000_CMD_SLEEP.
Referenced by writeShiftValue().
int interface_jtag_add_tlr | ( | void | ) |
Definition at line 489 of file zy1000.c.
References jtag_command::cmd, cmd_queue_alloc(), statemove_command::end_state, ERROR_OK, jtag_queue_command(), JTAG_TLR_RESET, setCurrentState(), jtag_command_container::statemove, TAP_RESET, and jtag_command::type.
int interface_jtag_execute_queue | ( | void | ) |
Definition at line 315 of file zy1000.c.
References bits, jtag_callback_entry::callback, jtag_callback_entry::data0, jtag_callback_entry::data1, jtag_callback_entry::data2, jtag_callback_entry::data3, default_interface_jtag_execute_queue(), ERROR_OK, jtag_callback_queue_reset(), jtag_command_queue_reset(), LOG_WARNING, jtag_callback_entry::next, NULL, waitIdle(), writeShiftValue(), zy1000_flush_callbackqueue(), zy1000_flush_readqueue(), ZY1000_JTAG_BASE, ZY1000_PEEK, ZY1000_POKE, and zy1000_rclk.
|
static |
Definition at line 282 of file zy1000.c.
References NULL, and tcp_server.
|
static |
Definition at line 609 of file zy1000.c.
References jtag_tap_next_enabled(), and NULL.
Referenced by arm11_run_instr_data_to_core_noack_inner(), and embeddedice_write_dcc().
|
static |
Definition at line 832 of file zy1000.c.
References flush_writes(), in_buffer, in_pos, in_write, out_pos, and tcp_ip.
Referenced by zy1000_flush_readqueue(), and zy1000_tcpin().
|
static |
Definition at line 109 of file zy1000.c.
References powerDropout, ZY1000_JTAG_BASE, ZY1000_PEEK, and ZY1000_POKE.
Referenced by zy1000_power_dropout(), and zylinjtag_Jim_Command_powerstatus().
|
static |
Definition at line 121 of file zy1000.c.
References srstAsserted, ZY1000_JTAG_BASE, ZY1000_PEEK, and ZY1000_POKE.
Referenced by waitSRST(), and zy1000_srst_asserted().
|
inlinestatic |
Definition at line 351 of file zy1000.c.
References NULL, shiftValueInner(), and writeShiftValue().
Referenced by interface_jtag_add_plain_dr_scan(), interface_jtag_add_plain_ir_scan(), and scanFields().
|
inlinestatic |
Definition at line 392 of file zy1000.c.
References scanBits().
Referenced by interface_jtag_add_dr_scan(), and interface_jtag_add_ir_scan().
|
static |
Definition at line 252 of file zy1000.c.
References savePower, ZY1000_JTAG_BASE, and ZY1000_POKE.
Referenced by COMMAND_HANDLER(), and zy1000_init().
|
static |
Definition at line 876 of file zy1000.c.
References flag, tcp_ip, and tcp_server.
Referenced by interface_jtag_add_sleep(), waitIdle(), zy1000_flush_readqueue(), zy1000_tcpin(), and zy1000_tcpout().
void waitIdle | ( | void | ) |
Definition at line 925 of file zy1000.c.
References tcpip_open(), writeLong(), and ZY1000_CMD_WAITIDLE.
Referenced by arm11_run_instr_data_to_core_noack_inner(), interface_add_tms_seq(), interface_jtag_execute_queue(), sampleShiftRegister(), shiftValueInner(), writeShiftValue(), zy1000_jtag_add_clocks(), zy1000_reset(), and zy1000_speed().
|
static |
Definition at line 145 of file zy1000.c.
References keep_alive(), LOG_ERROR, LOG_USER, mode, readSRST(), srstAsserted, start, and timeval_ms().
Referenced by zy1000_reset().
|
static |
Definition at line 818 of file zy1000.c.
References flush_writes(), out_buffer, and out_pos.
Referenced by interface_jtag_add_sleep(), waitIdle(), writeShiftValue(), zy1000_tcpin(), and zy1000_tcpout().
|
static |
Definition at line 1073 of file zy1000.c.
References bits, ERROR_OK, flag, interface_jtag_add_sleep(), jtag_sleep(), LOG_ERROR, LOG_INFO, readqueue, readqueue_pos, readqueue_size, VERBOSE, waitIdle(), writeLong(), ZY1000_CMD_PEEK, zy1000_flush_readqueue(), ZY1000_JTAG_BASE, and ZY1000_PEEK.
Referenced by interface_jtag_execute_queue(), and scanBits().
void zy1000_flush_callbackqueue | ( | void | ) |
Definition at line 1058 of file zy1000.c.
References callbackentry::callback, callbackqueue, callbackqueue_pos, callbackentry::data0, callbackentry::data1, callbackentry::data2, callbackentry::data3, jtag_set_error(), and zy1000_flush_readqueue().
Referenced by interface_jtag_execute_queue(), and zy1000_jtag_add_callback4().
void zy1000_flush_readqueue | ( | void | ) |
Definition at line 970 of file zy1000.c.
References readLong(), readqueue, readqueue_pos, and tcpip_open().
Referenced by interface_jtag_execute_queue(), writeShiftValue(), zy1000_flush_callbackqueue(), and zy1000_tcpin().
int zy1000_init | ( | void | ) |
Definition at line 1203 of file zy1000.c.
References ERROR_FAIL, ERROR_OK, LOG_ERROR, setPower(), ZY1000_JTAG_BASE, ZY1000_POKE, and zy1000_reset().
void zy1000_jtag_add_callback | ( | jtag_callback1_t | callback, |
jtag_callback_data_t | data0 | ||
) |
Definition at line 1049 of file zy1000.c.
References zy1000_jtag_add_callback4(), and zy1000_jtag_convert_to_callback4().
void zy1000_jtag_add_callback4 | ( | jtag_callback_t | callback, |
jtag_callback_data_t | data0, | ||
jtag_callback_data_t | data1, | ||
jtag_callback_data_t | data2, | ||
jtag_callback_data_t | data3 | ||
) |
Definition at line 1014 of file zy1000.c.
References callbackentry::callback, callbackqueue, callbackqueue_pos, callbackqueue_size, callbackentry::data0, callbackentry::data1, callbackentry::data2, callbackentry::data3, and zy1000_flush_callbackqueue().
Referenced by zy1000_jtag_add_callback().
|
static |
Definition at line 501 of file zy1000.c.
References ERROR_OK, setCurrentState(), shiftValueInner(), tap_get_end_state(), tap_get_state(), tap_get_tms_path(), tap_get_tms_path_len(), TAP_IDLE, waitIdle(), ZY1000_JTAG_BASE, and ZY1000_POKE.
Referenced by interface_jtag_add_clocks(), and interface_jtag_add_runtest().
|
static |
Definition at line 1040 of file zy1000.c.
References ERROR_OK.
Referenced by zy1000_jtag_add_callback().
|
static |
|
static |
Definition at line 138 of file zy1000.c.
References ERROR_OK, and readPowerDropout().
void zy1000_reset | ( | int | trst, |
int | srst | ||
) |
Definition at line 176 of file zy1000.c.
References jtag_get_reset_config(), LOG_DEBUG, RESET_SRST_PULLS_TRST, RESET_TRST_PULLS_SRST, TAP_RESET, waitIdle(), waitSRST(), ZY1000_JTAG_BASE, and ZY1000_POKE.
Referenced by interface_jtag_add_reset(), and zy1000_init().
int zy1000_speed | ( | int | speed | ) |
Definition at line 218 of file zy1000.c.
References ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, LOG_DEBUG, LOG_USER, waitIdle(), ZY1000_JTAG_BASE, ZY1000_POKE, zy1000_rclk, zy1000_speed_div(), and ZYLIN_KHZ.
|
static |
Definition at line 99 of file zy1000.c.
References ERROR_OK, and ZYLIN_KHZ.
Referenced by zy1000_speed().
|
static |
Definition at line 132 of file zy1000.c.
References ERROR_OK, and readSRST().
uint32_t zy1000_tcpin | ( | uint32_t | address | ) |
Definition at line 934 of file zy1000.c.
References readLong(), tcpip_open(), writeLong(), ZY1000_CMD_PEEK, and zy1000_flush_readqueue().
void zy1000_tcpout | ( | uint32_t | address, |
uint32_t | data | ||
) |
Definition at line 912 of file zy1000.c.
References tcpip_open(), writeLong(), and ZY1000_CMD_POKE.
|
static |
Definition at line 293 of file zy1000.c.
References readPowerDropout().
int bits |
Definition at line 962 of file zy1000.c.
Referenced by avr32_ocd_setbits(), bitbang_execute_tms(), interface_jtag_execute_queue(), Jim_Command_drscan(), jtag_check_value_inner(), opendous_tap_append_step(), poll_target(), syncbb_execute_tms(), tap_state_queue_run(), target_address_max(), wait_for_debugint_clear(), writeShiftValue(), xds110_flush(), and xlnx_pcie_xvc_execute_tms().
|
static |
Referenced by zy1000_flush_callbackqueue(), and zy1000_jtag_add_callback4().
|
static |
Definition at line 1012 of file zy1000.c.
Referenced by zy1000_flush_callbackqueue(), and zy1000_jtag_add_callback4().
uint8_t* dest |
|
static |
Definition at line 809 of file zy1000.c.
Referenced by adbg_wb_burst_read(), jsp_input(), jsp_poll_read(), or1k_to_du(), and readLong().
|
static |
Definition at line 807 of file zy1000.c.
Referenced by readLong().
|
static |
Definition at line 808 of file zy1000.c.
Referenced by readLong().
|
static |
Definition at line 806 of file zy1000.c.
Referenced by flush_writes(), jsp_poll_read(), or1k_to_du(), and writeLong().
|
static |
Definition at line 805 of file zy1000.c.
Referenced by flush_writes(), readLong(), and writeLong().
struct { ... } readqueue[readqueue_size] |
Referenced by writeShiftValue(), and zy1000_flush_readqueue().
|
static |
Definition at line 965 of file zy1000.c.
Referenced by writeShiftValue(), and zy1000_flush_readqueue().
|
static |
Definition at line 250 of file zy1000.c.
Referenced by COMMAND_HANDLER(), and setPower().
|
static |
Definition at line 802 of file zy1000.c.
Referenced by flush_writes(), readLong(), and tcpip_open().
|
static |
Definition at line 281 of file zy1000.c.
Referenced by jim_zy1000_server(), and tcpip_open().
struct adapter_driver zy1000_adapter_driver |
|
static |
|
static |
|
static |
Definition at line 62 of file zy1000.c.
Referenced by interface_jtag_execute_queue(), and zy1000_speed().