OpenOCD
|
Go to the source code of this file.
Typedefs | |
typedef int(* | read_mem_func_t) (uint32_t coreid, uint32_t address, uint32_t *data) |
typedef int(* | write_mem_func_t) (uint32_t coreid, uint32_t address, uint32_t data) |
Functions | |
static int | aice_backup_edm_registers (uint32_t coreid) |
EDM_CTL will be modified by OpenOCD as debugging. More... | |
static int | aice_backup_tmp_registers (uint32_t coreid) |
static int | aice_batch_buffer_read (uint8_t buf_index, uint32_t *word, uint32_t num_of_words) |
static int | aice_batch_buffer_write (uint8_t buf_index, const uint8_t *word, uint32_t num_of_words) |
static int | aice_bulk_read_mem (uint32_t coreid, uint32_t addr, uint32_t count, uint8_t *buffer) |
static int | aice_bulk_write_mem (uint32_t coreid, uint32_t addr, uint32_t count, const uint8_t *buffer) |
static int | aice_check_dbger (uint32_t coreid, uint32_t expect_status) |
static int | aice_core_init (uint32_t coreid) |
static int | aice_do_execute (uint8_t target_id) |
static int | aice_edm_init (uint32_t coreid) |
static int | aice_execute_custom_script (const char *script) |
static int | aice_execute_dim (uint32_t coreid, uint32_t *insts, uint8_t n_inst) |
static int | aice_fastread_mem (uint8_t target_id, uint8_t *word, uint32_t num_of_words) |
static int | aice_fastwrite_mem (uint8_t target_id, const uint8_t *word, uint32_t num_of_words) |
static int | aice_get_version_info (void) |
static int | aice_init_edm_registers (uint32_t coreid, bool clear_dex_use_psw) |
static int | aice_issue_reset_hold (uint32_t coreid) |
static int | aice_issue_reset_hold_multi (void) |
static int | aice_issue_srst (uint32_t coreid) |
static int | aice_open_device (struct aice_port_param_s *param) |
static void | aice_pack_htda (uint8_t cmd_code, uint8_t extra_word_length, uint32_t address) |
static void | aice_pack_htdc (uint8_t cmd_code, uint8_t extra_word_length, uint32_t address, uint32_t word, enum aice_target_endian access_endian) |
static void | aice_pack_htdma (uint8_t cmd_code, uint8_t target_id, uint8_t extra_word_length, uint32_t address) |
static void | aice_pack_htdmb (uint8_t cmd_code, uint8_t target_id, uint8_t extra_word_length, uint32_t address) |
static void | aice_pack_htdmc (uint8_t cmd_code, uint8_t target_id, uint8_t extra_word_length, uint32_t address, uint32_t word, enum aice_target_endian access_endian) |
static void | aice_pack_htdmc_multiple_data (uint8_t cmd_code, uint8_t target_id, uint8_t extra_word_length, uint32_t address, uint32_t *word, uint8_t num_of_words, enum aice_target_endian access_endian) |
static void | aice_pack_htdmd (uint8_t cmd_code, uint8_t target_id, uint8_t extra_word_length, uint32_t address, uint32_t word, enum aice_target_endian access_endian) |
static void | aice_pack_htdmd_multiple_data (uint8_t cmd_code, uint8_t target_id, uint8_t extra_word_length, uint32_t address, const uint8_t *word, enum aice_target_endian access_endian) |
int | aice_read_ctrl (uint32_t address, uint32_t *data) |
static int | aice_read_dtr (uint8_t target_id, uint32_t *data) |
static int | aice_read_dtr_to_buffer (uint8_t target_id, uint32_t buffer_idx) |
static int | aice_read_edmsr (uint8_t target_id, uint32_t address, uint32_t *data) |
static int | aice_read_mem (uint8_t target_id, uint32_t address, uint32_t *data) |
static int | aice_read_mem_b (uint8_t target_id, uint32_t address, uint32_t *data) |
static int | aice_read_mem_h (uint8_t target_id, uint32_t address, uint32_t *data) |
static int | aice_read_misc (uint8_t target_id, uint32_t address, uint32_t *data) |
static int | aice_read_reg (uint32_t coreid, uint32_t num, uint32_t *val) |
static int | aice_reset_box (void) |
static int | aice_restore_edm_registers (uint32_t coreid) |
static int | aice_restore_tmp_registers (uint32_t coreid) |
static int | aice_scan_chain (uint32_t *id_codes, uint8_t *num_of_ids) |
static int | aice_switch_to_big_endian (uint32_t *word, uint8_t num_of_words) |
static void | aice_unpack_dtha (uint8_t *cmd_ack_code, uint8_t *extra_word_length, uint32_t *word, enum aice_target_endian access_endian) |
static void | aice_unpack_dtha_multiple_data (uint8_t *cmd_ack_code, uint8_t *extra_word_length, uint32_t *word, uint8_t num_of_words, enum aice_target_endian access_endian) |
static void | aice_unpack_dthb (uint8_t *cmd_ack_code, uint8_t *extra_word_length) |
static void | aice_unpack_dthma (uint8_t *cmd_ack_code, uint8_t *target_id, uint8_t *extra_word_length, uint32_t *word, enum aice_target_endian access_endian) |
static void | aice_unpack_dthma_multiple_data (uint8_t *cmd_ack_code, uint8_t *target_id, uint8_t *extra_word_length, uint8_t *word, enum aice_target_endian access_endian) |
static void | aice_unpack_dthmb (uint8_t *cmd_ack_code, uint8_t *target_id, uint8_t *extra_word_length) |
static int | aice_usb_assert_srst (uint32_t coreid, enum aice_srst_type_s srst) |
static int | aice_usb_bulk_read_mem (uint32_t coreid, uint32_t addr, uint32_t length, uint8_t *buffer) |
static int | aice_usb_bulk_write_mem (uint32_t coreid, uint32_t addr, uint32_t length, const uint8_t *buffer) |
static int | aice_usb_cache_ctl (uint32_t coreid, uint32_t subtype, uint32_t address) |
static int | aice_usb_close (void) |
static int | aice_usb_dcache_inval_all (uint32_t coreid) |
static int | aice_usb_dcache_va_inval (uint32_t coreid, uint32_t address) |
static int | aice_usb_dcache_va_wb (uint32_t coreid, uint32_t address) |
static int | aice_usb_dcache_wb_all (uint32_t coreid) |
static int | aice_usb_execute (uint32_t coreid, uint32_t *instructions, uint32_t instruction_num) |
static int | aice_usb_halt (uint32_t coreid) |
static int | aice_usb_icache_inval_all (uint32_t coreid) |
static int | aice_usb_icache_va_inval (uint32_t coreid, uint32_t address) |
static int | aice_usb_idcode (uint32_t *idcode, uint8_t *num_of_idcode) |
static int | aice_usb_init_cache (uint32_t coreid) |
static int | aice_usb_memory_access (uint32_t coreid, enum nds_memory_access channel) |
static int | aice_usb_memory_mode (uint32_t coreid, enum nds_memory_select mem_select) |
static int | aice_usb_open (struct aice_port_param_s *param) |
static int | aice_usb_packet_append (uint8_t *out_buffer, int out_length, int in_length) |
static int | aice_usb_packet_flush (void) |
static int | aice_usb_profiling (uint32_t coreid, uint32_t interval, uint32_t iteration, uint32_t reg_no, uint32_t *samples, uint32_t *num_samples) |
static int | aice_usb_program_edm (uint32_t coreid, char *command_sequence) |
static int | aice_usb_read (uint8_t *in_buffer, int expected_size) |
static int | aice_usb_read_debug_reg (uint32_t coreid, uint32_t addr, uint32_t *val) |
static int | aice_usb_read_mem_b_bus (uint32_t coreid, uint32_t address, uint32_t *data) |
static int | aice_usb_read_mem_b_dim (uint32_t coreid, uint32_t address, uint32_t *data) |
static int | aice_usb_read_mem_h_bus (uint32_t coreid, uint32_t address, uint32_t *data) |
static int | aice_usb_read_mem_h_dim (uint32_t coreid, uint32_t address, uint32_t *data) |
static int | aice_usb_read_mem_w_bus (uint32_t coreid, uint32_t address, uint32_t *data) |
static int | aice_usb_read_mem_w_dim (uint32_t coreid, uint32_t address, uint32_t *data) |
static int | aice_usb_read_memory_unit (uint32_t coreid, uint32_t addr, uint32_t size, uint32_t count, uint8_t *buffer) |
static int | aice_usb_read_reg (uint32_t coreid, uint32_t num, uint32_t *val) |
static int | aice_usb_read_reg_64 (uint32_t coreid, uint32_t num, uint64_t *val) |
static int | aice_usb_read_tlb (uint32_t coreid, target_addr_t virtual_address, target_addr_t *physical_address) |
static int | aice_usb_reset (void) |
static int | aice_usb_run (uint32_t coreid) |
static int | aice_usb_set_address_dim (uint32_t coreid, uint32_t address) |
static int | aice_usb_set_clock (int set_clock) |
static int | aice_usb_set_command_mode (enum aice_command_mode command_mode) |
static int | aice_usb_set_count_to_check_dbger (uint32_t count_to_check) |
static int | aice_usb_set_custom_restart_script (const char *script) |
static int | aice_usb_set_custom_srst_script (const char *script) |
static int | aice_usb_set_custom_trst_script (const char *script) |
static int | aice_usb_set_data_endian (uint32_t coreid, enum aice_target_endian target_data_endian) |
static int | aice_usb_set_jtag_clock (uint32_t a_clock) |
static int | aice_usb_set_retry_times (uint32_t a_retry_times) |
static int | aice_usb_state (uint32_t coreid, enum aice_target_state_s *state) |
static int | aice_usb_step (uint32_t coreid) |
static int | aice_usb_write (uint8_t *out_buffer, int out_length) |
static int | aice_usb_write_debug_reg (uint32_t coreid, uint32_t addr, const uint32_t val) |
static int | aice_usb_write_mem_b_bus (uint32_t coreid, uint32_t address, uint32_t data) |
static int | aice_usb_write_mem_b_dim (uint32_t coreid, uint32_t address, uint32_t data) |
static int | aice_usb_write_mem_h_bus (uint32_t coreid, uint32_t address, uint32_t data) |
static int | aice_usb_write_mem_h_dim (uint32_t coreid, uint32_t address, uint32_t data) |
static int | aice_usb_write_mem_w_bus (uint32_t coreid, uint32_t address, uint32_t data) |
static int | aice_usb_write_mem_w_dim (uint32_t coreid, uint32_t address, uint32_t data) |
static int | aice_usb_write_memory_unit (uint32_t coreid, uint32_t addr, uint32_t size, uint32_t count, const uint8_t *buffer) |
static int | aice_usb_write_reg (uint32_t coreid, uint32_t num, uint32_t val) |
static int | aice_usb_write_reg_64 (uint32_t coreid, uint32_t num, uint64_t val) |
int | aice_write_ctrl (uint32_t address, uint32_t data) |
static int | aice_write_dim (uint8_t target_id, uint32_t *word, uint8_t num_of_words) |
static int | aice_write_dtr (uint8_t target_id, uint32_t data) |
static int | aice_write_dtr_from_buffer (uint8_t target_id, uint32_t buffer_idx) |
static int | aice_write_edmsr (uint8_t target_id, uint32_t address, uint32_t data) |
static int | aice_write_mem (uint8_t target_id, uint32_t address, uint32_t data) |
static int | aice_write_mem_b (uint8_t target_id, uint32_t address, uint32_t data) |
static int | aice_write_mem_h (uint8_t target_id, uint32_t address, uint32_t data) |
static int | aice_write_misc (uint8_t target_id, uint32_t address, uint32_t data) |
static int | aice_write_reg (uint32_t coreid, uint32_t num, uint32_t val) |
static int | check_privilege (uint32_t coreid, uint32_t dbger_value) |
static int | check_suppressed_exception (uint32_t coreid, uint32_t dbger_value) |
static int | fill_profiling_batch_commands (uint32_t coreid, uint32_t reg_no) |
static bool | is_v2_edm (uint32_t coreid) |
static int | usb_bulk_read_ex (struct libusb_device_handle *dev, int ep, char *bytes, int size, int timeout) |
static int | usb_bulk_with_retries (int(*f)(struct libusb_device_handle *, int, char *, int, int, int *), struct libusb_device_handle *dev, int ep, char *bytes, int size, int timeout, int *transferred) |
static int | usb_bulk_write_ex (struct libusb_device_handle *dev, int ep, char *bytes, int size, int timeout) |
static int | wrap_usb_bulk_write (struct libusb_device_handle *dev, int ep, char *buff, int size, int timeout, int *transferred) |
Variables | |
static enum aice_command_mode | aice_command_mode |
static uint32_t | aice_count_to_check_dbger = 30 |
static struct aice_usb_handler_s | aice_handler |
static int | aice_max_retry_times = 50 |
struct aice_port_api_s | aice_usb_api |
static struct aice_nds32_info | core_info [AICE_MAX_NUM_CORE] |
static char * | custom_restart_script |
static char * | custom_srst_script |
static char * | custom_trst_script |
static enum aice_target_endian | data_endian |
static uint32_t | jtag_clock |
static uint8_t | total_num_of_core |
static uint8_t | usb_in_buffer [AICE_IN_BUFFER_SIZE] |
static uint8_t | usb_in_packets_buffer [AICE_IN_PACKETS_BUFFER_SIZE] |
static uint32_t | usb_in_packets_buffer_length |
static uint8_t | usb_out_buffer [AICE_OUT_BUFFER_SIZE] |
static uint8_t | usb_out_packets_buffer [AICE_OUT_PACKETS_BUFFER_SIZE] |
static uint32_t | usb_out_packets_buffer_length |
#define AICE_CMD_BATCH_BUFFER_READ 0x60 |
Definition at line 64 of file aice_usb.c.
#define AICE_CMD_BATCH_BUFFER_WRITE 0x68 |
Definition at line 66 of file aice_usb.c.
#define AICE_CMD_READ_CTRL 0x50 |
Definition at line 62 of file aice_usb.c.
#define AICE_CMD_READ_DTR_TO_BUFFER 0x61 |
Definition at line 65 of file aice_usb.c.
#define AICE_CMD_SCAN_CHAIN 0x00 |
Definition at line 45 of file aice_usb.c.
#define AICE_CMD_T_EXECUTE 0x3E |
Definition at line 61 of file aice_usb.c.
#define AICE_CMD_T_FASTREAD_MEM 0x27 |
Definition at line 52 of file aice_usb.c.
#define AICE_CMD_T_FASTWRITE_MEM 0x2F |
Definition at line 60 of file aice_usb.c.
#define AICE_CMD_T_READ_DTR 0x22 |
Definition at line 48 of file aice_usb.c.
#define AICE_CMD_T_READ_EDMSR 0x21 |
Definition at line 47 of file aice_usb.c.
#define AICE_CMD_T_READ_MEM 0x26 |
Definition at line 51 of file aice_usb.c.
#define AICE_CMD_T_READ_MEM_B 0x24 |
Definition at line 49 of file aice_usb.c.
#define AICE_CMD_T_READ_MEM_H 0x25 |
Definition at line 50 of file aice_usb.c.
#define AICE_CMD_T_READ_MISC 0x20 |
Definition at line 46 of file aice_usb.c.
#define AICE_CMD_T_WRITE_DIM 0x2B |
Definition at line 56 of file aice_usb.c.
#define AICE_CMD_T_WRITE_DTR 0x2A |
Definition at line 55 of file aice_usb.c.
#define AICE_CMD_T_WRITE_EDMSR 0x29 |
Definition at line 54 of file aice_usb.c.
#define AICE_CMD_T_WRITE_MEM 0x2E |
Definition at line 59 of file aice_usb.c.
#define AICE_CMD_T_WRITE_MEM_B 0x2C |
Definition at line 57 of file aice_usb.c.
#define AICE_CMD_T_WRITE_MEM_H 0x2D |
Definition at line 58 of file aice_usb.c.
#define AICE_CMD_T_WRITE_MISC 0x28 |
Definition at line 53 of file aice_usb.c.
#define AICE_CMD_WRITE_CTRL 0x51 |
Definition at line 63 of file aice_usb.c.
#define AICE_CMD_WRITE_DTR_FROM_BUFFER 0x69 |
Definition at line 67 of file aice_usb.c.
#define AICE_FORMAT_DTHA (6) |
Definition at line 39 of file aice_usb.c.
#define AICE_FORMAT_DTHB (2) |
Definition at line 40 of file aice_usb.c.
#define AICE_FORMAT_DTHMA (8) |
Definition at line 41 of file aice_usb.c.
#define AICE_FORMAT_DTHMB (4) |
Definition at line 42 of file aice_usb.c.
#define AICE_FORMAT_HTDA (3) |
Definition at line 33 of file aice_usb.c.
#define AICE_FORMAT_HTDC (7) |
Definition at line 34 of file aice_usb.c.
#define AICE_FORMAT_HTDMA (4) |
Definition at line 35 of file aice_usb.c.
#define AICE_FORMAT_HTDMB (8) |
Definition at line 36 of file aice_usb.c.
#define AICE_FORMAT_HTDMC (8) |
Definition at line 37 of file aice_usb.c.
#define AICE_FORMAT_HTDMD (12) |
Definition at line 38 of file aice_usb.c.
#define LINE_BUFFER_SIZE 1024 |
Definition at line 2193 of file aice_usb.c.
typedef int(* read_mem_func_t) (uint32_t coreid, uint32_t address, uint32_t *data) |
Definition at line 1749 of file aice_usb.c.
typedef int(* write_mem_func_t) (uint32_t coreid, uint32_t address, uint32_t data) |
Definition at line 1750 of file aice_usb.c.
|
static |
EDM_CTL will be modified by OpenOCD as debugging.
OpenOCD has the responsibility to keep EDM_CTL untouched after debugging.
There are two scenarios to consider:
So, we need to bakcup EDM_CTL before halted and restore it after running. The difference of these two scenarios is EDM_CTL.DEH_SEL is on for scenario 1, and off for scenario 2.
Definition at line 2376 of file aice_usb.c.
References aice_read_edmsr(), core_info, aice_nds32_info::dex_use_psw_on, LOG_DEBUG, and NDS_EDM_SR_EDM_CTL.
Referenced by aice_usb_halt(), and aice_usb_state().
|
static |
Definition at line 2410 of file aice_usb.c.
References aice_execute_dim(), aice_read_dtr(), aice_read_edmsr(), aice_read_reg(), BEQ_MINUS_12, core_info, DSB, aice_nds32_info::edmsw_backup, ERROR_OK, aice_nds32_info::host_dtr_valid, instructions, LOG_DEBUG, MFSR_DTR, MTSR_DTR, NDS_EDM_SR_EDMSW, R0, R1, and aice_nds32_info::target_dtr_valid.
Referenced by aice_issue_reset_hold(), aice_usb_halt(), and aice_usb_state().
|
static |
Definition at line 1649 of file aice_usb.c.
References AICE_CMD_BATCH_BUFFER_READ, AICE_FORMAT_DTHMA, AICE_FORMAT_HTDMA, aice_max_retry_times, aice_pack_htdma(), aice_reset_box(), aice_unpack_dthma_multiple_data(), aice_usb_read(), aice_usb_write(), data_endian, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
|
static |
Definition at line 1694 of file aice_usb.c.
References AICE_CMD_BATCH_BUFFER_WRITE, AICE_FORMAT_DTHMB, AICE_FORMAT_HTDMC, aice_max_retry_times, aice_pack_htdmc(), aice_reset_box(), aice_unpack_dthmb(), aice_usb_read(), aice_usb_write(), data_endian, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_usb_packet_flush(), and fill_profiling_batch_commands().
|
static |
set address
Definition at line 3256 of file aice_usb.c.
References addr, aice_fastread_mem(), aice_write_misc(), buffer, count, ERROR_FAIL, ERROR_OK, and NDS_EDM_MISC_SBAR.
Referenced by aice_usb_bulk_read_mem().
|
static |
set address
Definition at line 3281 of file aice_usb.c.
References addr, aice_fastwrite_mem(), aice_write_misc(), buffer, count, ERROR_FAIL, ERROR_OK, and NDS_EDM_MISC_SBAR.
Referenced by aice_usb_bulk_write_mem().
|
static |
Definition at line 1817 of file aice_usb.c.
References aice_count_to_check_dbger, aice_read_misc(), check_privilege(), check_suppressed_exception(), ERROR_FAIL, ERROR_OK, keep_alive(), LOG_ERROR, NDS_EDM_MISC_DBGER, and timeval_ms().
Referenced by aice_execute_dim(), aice_issue_reset_hold(), aice_usb_execute(), and aice_usb_halt().
|
static |
Definition at line 2535 of file aice_usb.c.
References aice_nds32_info::access_channel, AICE_TARGET_UNKNOWN, core_info, aice_nds32_info::core_state, ERROR_OK, aice_nds32_info::memory_select, NDS_MEMORY_ACC_CPU, and NDS_MEMORY_SELECT_AUTO.
Referenced by aice_usb_idcode().
|
static |
Definition at line 1174 of file aice_usb.c.
References AICE_CMD_T_EXECUTE, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMB, AICE_FORMAT_HTDMC, AICE_LITTLE_ENDIAN, aice_max_retry_times, aice_pack_htdmc(), aice_reset_box(), aice_unpack_dthmb(), aice_usb_packet_append(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_execute_dim(), and aice_usb_execute().
|
static |
Definition at line 2316 of file aice_usb.c.
References aice_read_edmsr(), aice_write_edmsr(), aice_write_misc(), core_info, aice_nds32_info::edm_version, ERROR_OK, NDS_DBGER_AT_MAX, NDS_DBGER_CRST, NDS_DBGER_DPED, NDS_EDM_MISC_DBGER, NDS_EDM_MISC_DIMIR, NDS_EDM_SR_DIMBR, NDS_EDM_SR_EDM_CFG, and NDS_EDM_SR_EDM_CTL.
Referenced by aice_issue_reset_hold_multi(), and aice_usb_idcode().
|
static |
Definition at line 2195 of file aice_usb.c.
References AICE_CUSTOM_DELAY_CLEAN_DBGI, AICE_CUSTOM_DELAY_CLEAN_SRST, AICE_CUSTOM_DELAY_CLEAN_TRST, AICE_CUSTOM_DELAY_SET_DBGI, AICE_CUSTOM_DELAY_SET_SRST, AICE_CUSTOM_DELAY_SET_TRST, aice_write_ctrl(), AICE_WRITE_CTRL_CUSTOM_DELAY, ERROR_FAIL, ERROR_OK, LINE_BUFFER_SIZE, and NULL.
Referenced by aice_issue_reset_hold(), aice_issue_srst(), and aice_usb_reset().
|
static |
fill DIM
clear DBGER.DPED
execute DIM
read DBGER.DPED
Definition at line 1852 of file aice_usb.c.
References aice_check_dbger(), aice_do_execute(), aice_write_dim(), aice_write_misc(), ERROR_FAIL, ERROR_OK, LOG_ERROR, NDS_DBGER_DPED, and NDS_EDM_MISC_DBGER.
Referenced by aice_backup_tmp_registers(), aice_read_reg(), aice_restore_tmp_registers(), aice_usb_dcache_inval_all(), aice_usb_dcache_va_inval(), aice_usb_dcache_va_wb(), aice_usb_dcache_wb_all(), aice_usb_execute(), aice_usb_icache_inval_all(), aice_usb_icache_va_inval(), aice_usb_read_mem_b_dim(), aice_usb_read_mem_h_dim(), aice_usb_read_mem_w_dim(), aice_usb_read_tlb(), aice_usb_run(), aice_usb_set_address_dim(), aice_usb_write_mem_b_dim(), aice_usb_write_mem_h_dim(), aice_usb_write_mem_w_dim(), and aice_write_reg().
|
static |
Definition at line 1392 of file aice_usb.c.
References AICE_CMD_T_FASTREAD_MEM, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMA, AICE_FORMAT_HTDMB, aice_max_retry_times, aice_pack_htdmb(), aice_reset_box(), aice_unpack_dthma_multiple_data(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), data_endian, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_bulk_read_mem().
|
static |
Definition at line 1442 of file aice_usb.c.
References AICE_CMD_T_FASTWRITE_MEM, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMB, AICE_FORMAT_HTDMD, aice_max_retry_times, aice_pack_htdmd_multiple_data(), aice_reset_box(), aice_unpack_dthmb(), aice_usb_packet_append(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), data_endian, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_bulk_write_mem().
|
static |
Definition at line 2172 of file aice_usb.c.
References aice_read_ctrl(), AICE_READ_CTRL_GET_FIRMWARE_VERSION, AICE_READ_CTRL_GET_FPGA_VERSION, AICE_READ_CTRL_GET_HARDWARE_VERSION, ERROR_FAIL, ERROR_OK, and LOG_INFO.
Referenced by aice_open_device().
|
static |
Definition at line 2346 of file aice_usb.c.
References aice_write_edmsr(), core_info, aice_nds32_info::edm_ctl_backup, LOG_DEBUG, and NDS_EDM_SR_EDM_CTL.
Referenced by aice_usb_halt(), and aice_usb_state().
|
static |
Definition at line 2779 of file aice_usb.c.
References aice_backup_tmp_registers(), aice_check_dbger(), aice_execute_custom_script(), aice_issue_srst(), AICE_JTAG_PIN_CONTROL_RESTART, aice_read_ctrl(), AICE_READ_CTRL_GET_JTAG_PIN_STATUS, aice_read_reg(), AICE_TARGET_HALTED, aice_usb_halt(), aice_write_ctrl(), AICE_WRITE_CTRL_JTAG_PIN_CONTROL, AICE_WRITE_CTRL_JTAG_PIN_STATUS, aice_write_reg(), core_info, aice_nds32_info::core_state, custom_restart_script, ERROR_FAIL, ERROR_OK, IR3, LOG_DEBUG, NDS_DBGER_CRST, NDS_DBGER_DEX, and PC.
Referenced by aice_usb_assert_srst().
|
static |
Definition at line 2839 of file aice_usb.c.
References AICE_CUSTOM_DELAY_CLEAN_SRST, AICE_CUSTOM_DELAY_SET_SRST, aice_edm_init(), aice_write_ctrl(), AICE_WRITE_CTRL_CUSTOM_DELAY, aice_write_misc(), ERROR_FAIL, ERROR_OK, NDS_EDM_MISC_EDM_CMDR, and total_num_of_core.
Referenced by aice_usb_assert_srst().
|
static |
Definition at line 2739 of file aice_usb.c.
References aice_execute_custom_script(), AICE_JTAG_PIN_CONTROL_SRST, aice_read_misc(), aice_restore_edm_registers(), AICE_TARGET_RUNNING, aice_write_ctrl(), AICE_WRITE_CTRL_JTAG_PIN_CONTROL, core_info, aice_nds32_info::core_state, custom_srst_script, ERROR_FAIL, ERROR_OK, aice_nds32_info::host_dtr_valid, keep_alive(), LOG_DEBUG, NDS_DBGER_CRST, NDS_EDM_MISC_DBGER, and aice_nds32_info::target_dtr_valid.
Referenced by aice_issue_reset_hold(), and aice_usb_assert_srst().
|
static |
Definition at line 2492 of file aice_usb.c.
References aice_get_version_info(), aice_reset_box(), aice_usb_open(), ERROR_FAIL, ERROR_OK, LOG_ERROR, LOG_INFO, and param.
|
static |
Definition at line 71 of file aice_usb.c.
References usb_out_buffer.
Referenced by aice_read_ctrl(), and aice_scan_chain().
|
static |
Definition at line 79 of file aice_usb.c.
References AICE_BIG_ENDIAN, and usb_out_buffer.
Referenced by aice_write_ctrl().
|
static |
Definition at line 98 of file aice_usb.c.
References usb_out_buffer.
Referenced by aice_batch_buffer_read(), aice_read_dtr(), aice_read_dtr_to_buffer(), aice_read_edmsr(), aice_read_misc(), and aice_write_dtr_from_buffer().
|
static |
Definition at line 107 of file aice_usb.c.
References usb_out_buffer.
Referenced by aice_fastread_mem(), aice_read_mem(), aice_read_mem_b(), and aice_read_mem_h().
|
static |
Definition at line 120 of file aice_usb.c.
References AICE_BIG_ENDIAN, and usb_out_buffer.
Referenced by aice_batch_buffer_write(), aice_do_execute(), aice_write_dtr(), aice_write_edmsr(), and aice_write_misc().
|
static |
Definition at line 141 of file aice_usb.c.
References AICE_BIG_ENDIAN, and usb_out_buffer.
Referenced by aice_write_dim().
|
static |
Definition at line 166 of file aice_usb.c.
References AICE_BIG_ENDIAN, and usb_out_buffer.
Referenced by aice_write_mem(), aice_write_mem_b(), and aice_write_mem_h().
|
static |
Definition at line 191 of file aice_usb.c.
References AICE_BIG_ENDIAN, and usb_out_buffer.
Referenced by aice_fastwrite_mem().
int aice_read_ctrl | ( | uint32_t | address, |
uint32_t * | data | ||
) |
Definition at line 604 of file aice_usb.c.
References AICE_CMD_READ_CTRL, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHA, AICE_FORMAT_HTDA, AICE_LITTLE_ENDIAN, aice_pack_htda(), aice_unpack_dtha(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, usb_in_buffer, and usb_out_buffer.
Referenced by aice_get_version_info(), aice_issue_reset_hold(), aice_reset_box(), aice_usb_packet_flush(), aice_usb_set_clock(), and aice_usb_state().
|
static |
Definition at line 676 of file aice_usb.c.
References AICE_CMD_T_READ_DTR, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMA, AICE_FORMAT_HTDMA, AICE_LITTLE_ENDIAN, aice_max_retry_times, aice_pack_htdma(), aice_reset_box(), aice_unpack_dthma(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_backup_tmp_registers(), aice_read_reg(), aice_usb_read_mem_b_dim(), aice_usb_read_mem_h_dim(), and aice_usb_read_mem_w_dim().
|
static |
Definition at line 726 of file aice_usb.c.
References AICE_CMD_READ_DTR_TO_BUFFER, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMB, AICE_FORMAT_HTDMA, aice_max_retry_times, aice_pack_htdma(), aice_reset_box(), aice_unpack_dthmb(), aice_usb_packet_append(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by fill_profiling_batch_commands().
|
static |
Definition at line 985 of file aice_usb.c.
References AICE_CMD_T_READ_EDMSR, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMA, AICE_FORMAT_HTDMA, AICE_LITTLE_ENDIAN, aice_max_retry_times, aice_pack_htdma(), aice_reset_box(), aice_unpack_dthma(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_backup_edm_registers(), aice_backup_tmp_registers(), aice_edm_init(), aice_read_reg(), aice_usb_halt(), aice_usb_read_debug_reg(), and aice_write_reg().
|
static |
Definition at line 1598 of file aice_usb.c.
References AICE_CMD_T_READ_MEM, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMA, AICE_FORMAT_HTDMB, aice_max_retry_times, aice_pack_htdmb(), aice_reset_box(), aice_unpack_dthma(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), data_endian, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_usb_read_mem_w_bus().
|
static |
Definition at line 1498 of file aice_usb.c.
References AICE_CMD_T_READ_MEM_B, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMA, AICE_FORMAT_HTDMB, aice_max_retry_times, aice_pack_htdmb(), aice_reset_box(), aice_unpack_dthma(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), data_endian, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_usb_read_mem_b_bus().
|
static |
Definition at line 1548 of file aice_usb.c.
References AICE_CMD_T_READ_MEM_H, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMA, AICE_FORMAT_HTDMB, aice_max_retry_times, aice_pack_htdmb(), aice_reset_box(), aice_unpack_dthma(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), data_endian, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_usb_read_mem_h_bus().
|
static |
Definition at line 880 of file aice_usb.c.
References AICE_CMD_T_READ_MISC, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMA, AICE_FORMAT_HTDMA, AICE_LITTLE_ENDIAN, aice_max_retry_times, aice_pack_htdma(), aice_reset_box(), aice_unpack_dthma(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), ERROR_AICE_DISCONNECT, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_check_dbger(), aice_issue_srst(), aice_usb_halt(), aice_usb_run(), and aice_usb_state().
|
static |
execute instructions in DIM
Definition at line 1880 of file aice_usb.c.
References aice_execute_dim(), aice_read_dtr(), aice_read_edmsr(), AMFAR, AMFAR2, BEQ_MINUS_12, CB_CTL, CBE3, DSB, ERROR_FAIL, ERROR_OK, FD0, FD31, FMFCFG, FMFCSR, FMFDR, FMFSR, FPCFG, FPCSR, FS0, FS31, instructions, LOG_DEBUG, LOG_ERROR, MFSR, MFUSR_G0, MTSR_DTR, nds32_reg_sr_index(), nds32_reg_type(), NDS32_REG_TYPE_AUMR, NDS32_REG_TYPE_FPU, NDS32_REG_TYPE_GPR, NDS32_REG_TYPE_SPR, NDS_EDM_SR_EDMSW, NDS_EDMSW_WDV, and NOP.
Referenced by aice_backup_tmp_registers(), aice_issue_reset_hold(), aice_usb_halt(), aice_usb_init_cache(), aice_usb_read_reg(), aice_usb_read_reg_64(), aice_usb_read_tlb(), aice_usb_state(), aice_usb_step(), and check_suppressed_exception().
|
static |
Definition at line 527 of file aice_usb.c.
References aice_read_ctrl(), AICE_READ_CTRL_GET_JTAG_PIN_STATUS, aice_write_ctrl(), AICE_WRITE_CTRL_CLEAR_TIMEOUT_STATUS, AICE_WRITE_CTRL_JTAG_PIN_STATUS, ERROR_FAIL, and ERROR_OK.
Referenced by aice_batch_buffer_read(), aice_batch_buffer_write(), aice_do_execute(), aice_fastread_mem(), aice_fastwrite_mem(), aice_open_device(), aice_read_dtr(), aice_read_dtr_to_buffer(), aice_read_edmsr(), aice_read_mem(), aice_read_mem_b(), aice_read_mem_h(), aice_read_misc(), aice_scan_chain(), aice_usb_reset(), aice_write_dim(), aice_write_dtr(), aice_write_dtr_from_buffer(), aice_write_edmsr(), aice_write_mem(), aice_write_mem_b(), aice_write_mem_h(), and aice_write_misc().
|
static |
Definition at line 2399 of file aice_usb.c.
References aice_write_edmsr(), core_info, LOG_DEBUG, and NDS_EDM_SR_EDM_CTL.
Referenced by aice_issue_srst(), and aice_usb_run().
|
static |
Definition at line 2457 of file aice_usb.c.
References aice_execute_dim(), aice_write_dtr(), aice_write_reg(), BEQ_MINUS_12, core_info, DSB, ERROR_OK, instructions, LOG_DEBUG, MTSR_DTR, NOP, ORI, R0, R1, and SETHI.
Referenced by aice_usb_run().
|
static |
TODO: modify receive length
Definition at line 545 of file aice_usb.c.
References AICE_CMD_SCAN_CHAIN, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHA, AICE_FORMAT_HTDA, AICE_LITTLE_ENDIAN, AICE_MAX_NUM_CORE, aice_max_retry_times, aice_pack_htda(), aice_reset_box(), aice_unpack_dtha_multiple_data(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, LOG_INFO, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_usb_idcode().
|
static |
|
static |
Definition at line 223 of file aice_usb.c.
References AICE_BIG_ENDIAN, and usb_in_buffer.
Referenced by aice_read_ctrl().
|
static |
Definition at line 242 of file aice_usb.c.
References AICE_BIG_ENDIAN, and usb_in_buffer.
Referenced by aice_scan_chain().
|
static |
Definition at line 265 of file aice_usb.c.
References usb_in_buffer.
Referenced by aice_write_ctrl().
|
static |
Definition at line 271 of file aice_usb.c.
References AICE_BIG_ENDIAN, and usb_in_buffer.
Referenced by aice_read_dtr(), aice_read_edmsr(), aice_read_mem(), aice_read_mem_b(), aice_read_mem_h(), and aice_read_misc().
|
static |
Definition at line 291 of file aice_usb.c.
References AICE_BIG_ENDIAN, and usb_in_buffer.
Referenced by aice_batch_buffer_read(), and aice_fastread_mem().
|
static |
Definition at line 328 of file aice_usb.c.
References usb_in_buffer.
Referenced by aice_batch_buffer_write(), aice_do_execute(), aice_fastwrite_mem(), aice_read_dtr_to_buffer(), aice_write_dim(), aice_write_dtr(), aice_write_dtr_from_buffer(), aice_write_edmsr(), aice_write_mem(), aice_write_mem_b(), aice_write_mem_h(), and aice_write_misc().
|
static |
Definition at line 2866 of file aice_usb.c.
References aice_issue_reset_hold(), aice_issue_reset_hold_multi(), aice_issue_srst(), AICE_RESET_HOLD, AICE_SRST, aice_write_misc(), ERROR_FAIL, ERROR_OK, NDS_DBGER_CLEAR_ALL, NDS_DBGER_CRST, NDS_EDM_MISC_DBGER, and total_num_of_core.
|
static |
Definition at line 3306 of file aice_usb.c.
References addr, aice_bulk_read_mem(), aice_usb_read_memory_unit(), aice_usb_set_address_dim(), buffer, core_info, length, LOG_DEBUG, and NDS_MEMORY_ACC_CPU.
|
static |
Definition at line 3324 of file aice_usb.c.
References addr, aice_bulk_write_mem(), aice_usb_set_address_dim(), aice_usb_write_memory_unit(), buffer, core_info, length, LOG_DEBUG, and NDS_MEMORY_ACC_CPU.
|
static |
Definition at line 3660 of file aice_usb.c.
References AICE_CACHE_CTL_L1D_INVALALL, AICE_CACHE_CTL_L1D_VA_INVAL, AICE_CACHE_CTL_L1D_VA_WB, AICE_CACHE_CTL_L1D_WBALL, AICE_CACHE_CTL_L1I_INVALALL, AICE_CACHE_CTL_L1I_VA_INVAL, aice_usb_dcache_inval_all(), aice_usb_dcache_va_inval(), aice_usb_dcache_va_wb(), aice_usb_dcache_wb_all(), aice_usb_icache_inval_all(), aice_usb_icache_va_inval(), aice_usb_init_cache(), core_info, ERROR_FAIL, and LOG_DEBUG.
|
static |
Definition at line 2525 of file aice_usb.c.
References aice_handler, custom_restart_script, custom_srst_script, custom_trst_script, ERROR_OK, jtag_libusb_close(), and aice_usb_handler_s::usb_handle.
|
static |
Definition at line 3516 of file aice_usb.c.
References aice_execute_dim(), aice_write_dtr(), BEQ_MINUS_12, core_info, aice_nds32_info::dcache, DSB, ERROR_FAIL, ERROR_OK, instructions, L1D_IX_INVAL, cache_info::log2_line_size, cache_info::log2_set, LOG_DEBUG, MFSR_DTR, R0, cache_info::set, and cache_info::way.
Referenced by aice_usb_cache_ctl().
|
static |
Definition at line 3548 of file aice_usb.c.
References aice_execute_dim(), aice_write_dtr(), BEQ_MINUS_12, DSB, instructions, L1D_VA_INVAL, LOG_DEBUG, MFSR_DTR, and R0.
Referenced by aice_usb_cache_ctl().
|
static |
Definition at line 3596 of file aice_usb.c.
References aice_execute_dim(), aice_write_dtr(), BEQ_MINUS_12, DSB, instructions, L1D_VA_WB, LOG_DEBUG, MFSR_DTR, and R0.
Referenced by aice_usb_cache_ctl().
|
static |
Definition at line 3564 of file aice_usb.c.
References aice_execute_dim(), aice_write_dtr(), BEQ_MINUS_12, core_info, aice_nds32_info::dcache, DSB, ERROR_FAIL, ERROR_OK, instructions, L1D_IX_WB, cache_info::log2_line_size, cache_info::log2_set, LOG_DEBUG, MFSR_DTR, R0, cache_info::set, and cache_info::way.
Referenced by aice_usb_cache_ctl().
|
static |
fill DIM
clear DBGER.DPED
execute DIM
check DBGER.DPED
Definition at line 3777 of file aice_usb.c.
References aice_check_dbger(), aice_do_execute(), aice_execute_dim(), aice_write_dim(), aice_write_misc(), BEQ_MINUS_12, ERROR_FAIL, ERROR_OK, instructions, LOG_ERROR, NDS_DBGER_DPED, NDS_EDM_MISC_DBGER, and NOP.
|
static |
backup EDM registers
init EDM for host debugging
no need to clear dex_use_psw, because dbgi will clear it
Clear EDM_CTL.DBGIM & EDM_CTL.DBGACKM
debug 'debug mode'. use force_debug to issue dbgi
Issue DBGI normally
set EDM_CTL.DBGIM & EDM_CTL.DBGACKM after halt
Definition at line 2560 of file aice_usb.c.
References aice_backup_edm_registers(), aice_backup_tmp_registers(), aice_check_dbger(), aice_init_edm_registers(), aice_read_edmsr(), aice_read_misc(), aice_read_reg(), AICE_TARGET_HALTED, aice_write_edmsr(), aice_write_misc(), aice_write_reg(), core_info, aice_nds32_info::core_state, aice_nds32_info::debug_under_dex_on, ERROR_FAIL, ERROR_OK, IR0, is_v2_edm(), LOG_DEBUG, LOG_ERROR, NDS_DBGER_AT_MAX, NDS_DBGER_DEX, NDS_EDM_MISC_ACC_CTL, NDS_EDM_MISC_DBGER, NDS_EDM_MISC_EDM_CMDR, and NDS_EDM_SR_EDM_CTL.
Referenced by aice_issue_reset_hold(), and aice_usb_state().
|
static |
Definition at line 3612 of file aice_usb.c.
References aice_execute_dim(), aice_write_dtr(), BEQ_MINUS_12, core_info, ERROR_FAIL, ERROR_OK, aice_nds32_info::icache, instructions, ISB, L1I_IX_INVAL, cache_info::log2_line_size, cache_info::log2_set, LOG_DEBUG, MFSR_DTR, R0, cache_info::set, and cache_info::way.
Referenced by aice_usb_cache_ctl().
|
static |
Definition at line 3644 of file aice_usb.c.
References aice_execute_dim(), aice_write_dtr(), BEQ_MINUS_12, instructions, ISB, L1I_VA_INVAL, LOG_DEBUG, MFSR_DTR, and R0.
Referenced by aice_usb_cache_ctl().
|
static |
Definition at line 2544 of file aice_usb.c.
References aice_core_init(), aice_edm_init(), aice_scan_chain(), ERROR_OK, and total_num_of_core.
|
static |
Definition at line 3463 of file aice_usb.c.
References aice_read_reg(), aice_nds32_info::cache_init, core_info, CR1, CR2, aice_nds32_info::dcache, ERROR_OK, aice_nds32_info::icache, cache_info::line_size, cache_info::log2_line_size, cache_info::log2_set, LOG_DEBUG, cache_info::set, and cache_info::way.
Referenced by aice_usb_cache_ctl().
|
static |
Definition at line 3375 of file aice_usb.c.
References aice_nds32_info::access_channel, core_info, ERROR_OK, and LOG_DEBUG.
|
static |
Definition at line 3384 of file aice_usb.c.
References aice_write_misc(), core_info, ERROR_OK, LOG_DEBUG, aice_nds32_info::memory_select, NDS_EDM_MISC_ACC_CTL, NDS_MEMORY_SELECT_AUTO, and NDS_MEMORY_SELECT_MEM.
|
static |
Definition at line 2071 of file aice_usb.c.
References aice_handler, devh, ERROR_FAIL, ERROR_OK, jtag_libusb_choose_interface(), jtag_libusb_open(), LOG_DEBUG, NULL, param, aice_port_param_s::pid, aice_usb_handler_s::usb_handle, aice_usb_handler_s::usb_read_ep, aice_usb_handler_s::usb_write_ep, and aice_port_param_s::vid.
Referenced by aice_open_device().
|
static |
Definition at line 496 of file aice_usb.c.
References AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_OUT_BATCH_COMMAND_SIZE, AICE_OUT_PACK_COMMAND_SIZE, AICE_OUT_PACKETS_BUFFER_SIZE, aice_usb_packet_flush(), ERROR_FAIL, ERROR_OK, LOG_DEBUG, usb_in_packets_buffer_length, usb_out_packets_buffer, and usb_out_packets_buffer_length.
Referenced by aice_do_execute(), aice_fastwrite_mem(), aice_read_dtr_to_buffer(), aice_write_ctrl(), aice_write_dim(), aice_write_dtr(), aice_write_dtr_from_buffer(), aice_write_edmsr(), aice_write_mem(), aice_write_mem_b(), aice_write_mem_h(), and aice_write_misc().
|
static |
Definition at line 431 of file aice_usb.c.
References aice_batch_buffer_write(), AICE_BATCH_COMMAND_BUFFER_0, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_NORMAL, AICE_COMMAND_MODE_PACK, aice_read_ctrl(), AICE_READ_CTRL_BATCH_STATUS, aice_usb_read(), aice_usb_write(), aice_write_ctrl(), AICE_WRITE_CTRL_BATCH_CTRL, alive_sleep(), ERROR_FAIL, ERROR_OK, keep_alive(), LOG_DEBUG, usb_in_packets_buffer, usb_in_packets_buffer_length, usb_out_packets_buffer, and usb_out_packets_buffer_length.
Referenced by aice_do_execute(), aice_fastread_mem(), aice_fastwrite_mem(), aice_read_ctrl(), aice_read_dtr(), aice_read_dtr_to_buffer(), aice_read_edmsr(), aice_read_mem(), aice_read_mem_b(), aice_read_mem_h(), aice_read_misc(), aice_scan_chain(), aice_usb_packet_append(), aice_usb_set_command_mode(), aice_write_ctrl(), aice_write_dim(), aice_write_dtr(), aice_write_dtr_from_buffer(), aice_write_edmsr(), and aice_write_misc().
|
static |
Definition at line 3932 of file aice_usb.c.
|
static |
Definition at line 3702 of file aice_usb.c.
References aice_write_misc(), ERROR_FAIL, ERROR_OK, LOG_ERROR, NDS_EDM_MISC_GEN_PORT0, NDS_EDM_MISC_GEN_PORT1, and NULL.
|
static |
Definition at line 412 of file aice_usb.c.
References aice_handler, AICE_USB_TIMEOUT, LOG_DEBUG_IO, usb_bulk_read_ex(), aice_usb_handler_s::usb_handle, and aice_usb_handler_s::usb_read_ep.
Referenced by aice_batch_buffer_read(), aice_batch_buffer_write(), aice_do_execute(), aice_fastread_mem(), aice_fastwrite_mem(), aice_read_ctrl(), aice_read_dtr(), aice_read_dtr_to_buffer(), aice_read_edmsr(), aice_read_mem(), aice_read_mem_b(), aice_read_mem_h(), aice_read_misc(), aice_scan_chain(), aice_usb_packet_flush(), aice_write_ctrl(), aice_write_dim(), aice_write_dtr(), aice_write_dtr_from_buffer(), aice_write_edmsr(), aice_write_mem(), aice_write_mem_b(), aice_write_mem_h(), and aice_write_misc().
|
static |
Definition at line 3342 of file aice_usb.c.
References addr, aice_read_edmsr(), AICE_TARGET_HALTED, core_info, aice_nds32_info::edmsw_backup, NDS_EDM_SR_EDM_DTR, NDS_EDM_SR_EDMSW, aice_nds32_info::target_dtr_backup, and aice_nds32_info::target_dtr_valid.
|
static |
Definition at line 2997 of file aice_usb.c.
References aice_read_mem_b().
Referenced by aice_usb_read_memory_unit().
|
static |
Definition at line 3012 of file aice_usb.c.
References aice_execute_dim(), aice_read_dtr(), BEQ_MINUS_12, DSB, ERROR_OK, instructions, LBI_BI, MTSR_DTR, R0, and R1.
Referenced by aice_usb_read_memory_unit().
|
static |
Definition at line 3002 of file aice_usb.c.
References aice_read_mem_h().
Referenced by aice_usb_read_memory_unit().
|
static |
Definition at line 3030 of file aice_usb.c.
References aice_execute_dim(), aice_read_dtr(), BEQ_MINUS_12, DSB, ERROR_OK, instructions, LHI_BI, MTSR_DTR, R0, and R1.
Referenced by aice_usb_read_memory_unit().
|
static |
Definition at line 3007 of file aice_usb.c.
References aice_read_mem().
Referenced by aice_usb_read_memory_unit().
|
static |
Definition at line 3048 of file aice_usb.c.
References aice_execute_dim(), aice_read_dtr(), BEQ_MINUS_12, DSB, ERROR_OK, instructions, LWI_BI, MTSR_DTR, R0, and R1.
Referenced by aice_usb_read_memory_unit().
|
static |
Definition at line 3076 of file aice_usb.c.
References addr, aice_usb_read_mem_b_bus(), aice_usb_read_mem_b_dim(), aice_usb_read_mem_h_bus(), aice_usb_read_mem_h_dim(), aice_usb_read_mem_w_bus(), aice_usb_read_mem_w_dim(), aice_usb_set_address_dim(), buffer, core_info, count, ERROR_OK, LOG_DEBUG, NDS_MEMORY_ACC_BUS, NDS_MEMORY_ACC_CPU, and size.
Referenced by aice_usb_bulk_read_mem().
|
static |
Definition at line 1954 of file aice_usb.c.
References aice_read_reg(), core_info, DR41, DR42, DR43, aice_nds32_info::edm_ctl_backup, aice_nds32_info::edmsw_backup, ERROR_OK, LOG_DEBUG, R0, aice_nds32_info::r0_backup, R1, aice_nds32_info::r1_backup, aice_nds32_info::target_dtr_backup, and aice_nds32_info::target_dtr_valid.
|
static |
Definition at line 2130 of file aice_usb.c.
References AICE_BIG_ENDIAN, aice_read_reg(), data_endian, ERROR_OK, LOG_DEBUG, nds32_reg_simple_name(), and R1.
|
static |
Definition at line 3403 of file aice_usb.c.
References aice_execute_dim(), aice_read_reg(), aice_write_dtr(), BEQ_MINUS_12, DSB, ERROR_FAIL, ERROR_OK, instructions, LOG_DEBUG, MFSR_DTR, MR3, MR4, R0, R1, TARGET_PRIxADDR, TLBOP_TARGET_PROBE, and TLBOP_TARGET_READ.
|
static |
Definition at line 2717 of file aice_usb.c.
References aice_execute_custom_script(), AICE_JTAG_PIN_CONTROL_TRST, aice_reset_box(), aice_usb_set_clock(), aice_write_ctrl(), AICE_WRITE_CTRL_JTAG_PIN_CONTROL, custom_trst_script, ERROR_FAIL, ERROR_OK, and jtag_clock.
|
static |
restore EDM registers
OpenOCD should restore EDM_CTL before to exit debug state. Otherwise, following instruction will read wrong EDM_CTL value.
pc -> mfsr $p0, EDM_CTL (single step) slli $p0, $p0, 1 slri $p0, $p0, 31
execute instructions in DIM
Definition at line 2897 of file aice_usb.c.
References aice_execute_dim(), aice_read_misc(), aice_restore_edm_registers(), aice_restore_tmp_registers(), AICE_TARGET_RUNNING, aice_write_misc(), core_info, aice_nds32_info::core_state, ERROR_FAIL, ERROR_OK, instructions, IRET, LOG_DEBUG, LOG_WARNING, NDS_DBGER_CLEAR_ALL, NDS_DBGER_DEX, NDS_EDM_MISC_DBGER, and NOP.
Referenced by aice_usb_step().
|
static |
Definition at line 3064 of file aice_usb.c.
References aice_execute_dim(), BEQ_MINUS_12, instructions, NOP, ORI, R0, and SETHI.
Referenced by aice_usb_bulk_read_mem(), aice_usb_bulk_write_mem(), aice_usb_read_memory_unit(), and aice_usb_write_memory_unit().
|
static |
Definition at line 2264 of file aice_usb.c.
References aice_read_ctrl(), AICE_READ_CTRL_GET_ICE_STATE, AICE_TCK_CONTROL_TCK_SCAN, aice_write_ctrl(), AICE_WRITE_CTRL_TCK_CONTROL, ERROR_FAIL, ERROR_OK, and LOG_ERROR.
Referenced by aice_usb_reset(), and aice_usb_set_jtag_clock().
|
static |
Definition at line 3759 of file aice_usb.c.
References AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_NORMAL, aice_usb_packet_flush(), aice_write_ctrl(), AICE_WRITE_CTRL_BATCH_CMD_BUF0_CTRL, and ERROR_OK.
Referenced by fill_profiling_batch_commands().
|
static |
Definition at line 3852 of file aice_usb.c.
References aice_count_to_check_dbger, and ERROR_OK.
|
static |
Definition at line 3845 of file aice_usb.c.
References custom_restart_script, and ERROR_OK.
|
static |
Definition at line 3831 of file aice_usb.c.
References custom_srst_script, and ERROR_OK.
|
static |
Definition at line 3838 of file aice_usb.c.
References custom_trst_script, and ERROR_OK.
|
static |
Definition at line 3859 of file aice_usb.c.
References data_endian, and ERROR_OK.
|
static |
Definition at line 2513 of file aice_usb.c.
References aice_usb_set_clock(), ERROR_FAIL, ERROR_OK, jtag_clock, and LOG_ERROR.
|
static |
Definition at line 3696 of file aice_usb.c.
References aice_max_retry_times, and ERROR_OK.
|
static |
Definition at line 2643 of file aice_usb.c.
References aice_backup_edm_registers(), aice_backup_tmp_registers(), aice_init_edm_registers(), aice_read_ctrl(), AICE_READ_CTRL_GET_ICE_STATE, aice_read_misc(), aice_read_reg(), AICE_TARGET_HALTED, AICE_TARGET_RESET, AICE_TARGET_RUNNING, AICE_TARGET_UNKNOWN, aice_usb_halt(), aice_write_misc(), core_info, aice_nds32_info::core_state, ERROR_AICE_DISCONNECT, ERROR_AICE_TIMEOUT, ERROR_FAIL, ERROR_OK, IR11, LOG_DEBUG, LOG_ERROR, NDS_DBGER_AT_MAX, NDS_DBGER_CRST, NDS_DBGER_DEX, NDS_DBGER_ILL_SEC_ACC, NDS_EDM_MISC_DBGER, and state.
Referenced by aice_usb_step().
|
static |
enable HSS
set PSW.HSS
disable HSS
Definition at line 2942 of file aice_usb.c.
References aice_read_reg(), AICE_TARGET_HALTED, aice_usb_run(), aice_usb_state(), aice_write_reg(), ERROR_FAIL, ERROR_OK, IR0, IR1, is_v2_edm(), LOG_DEBUG, LOG_WARNING, state, and timeval_ms().
|
static |
Definition at line 392 of file aice_usb.c.
References aice_handler, AICE_OUT_BUFFER_SIZE, AICE_USB_TIMEOUT, LOG_DEBUG_IO, LOG_ERROR, usb_bulk_write_ex(), aice_usb_handler_s::usb_handle, and aice_usb_handler_s::usb_write_ep.
Referenced by aice_batch_buffer_read(), aice_batch_buffer_write(), aice_do_execute(), aice_fastread_mem(), aice_fastwrite_mem(), aice_read_ctrl(), aice_read_dtr(), aice_read_dtr_to_buffer(), aice_read_edmsr(), aice_read_mem(), aice_read_mem_b(), aice_read_mem_h(), aice_read_misc(), aice_scan_chain(), aice_usb_packet_flush(), aice_write_ctrl(), aice_write_dim(), aice_write_dtr(), aice_write_dtr_from_buffer(), aice_write_edmsr(), aice_write_mem(), aice_write_mem_b(), aice_write_mem_h(), and aice_write_misc().
|
static |
Definition at line 3362 of file aice_usb.c.
References addr, AICE_TARGET_HALTED, aice_write_edmsr(), core_info, aice_nds32_info::edmsw_backup, aice_nds32_info::host_dtr_backup, aice_nds32_info::host_dtr_valid, and NDS_EDM_SR_EDM_DTR.
|
static |
Definition at line 3135 of file aice_usb.c.
References aice_write_mem_b().
Referenced by aice_usb_write_memory_unit().
|
static |
Definition at line 3150 of file aice_usb.c.
References aice_execute_dim(), aice_write_dtr(), BEQ_MINUS_12, DSB, ERROR_OK, instructions, MFSR_DTR, R0, R1, and SBI_BI.
Referenced by aice_usb_write_memory_unit().
|
static |
Definition at line 3140 of file aice_usb.c.
References aice_write_mem_h().
Referenced by aice_usb_write_memory_unit().
|
static |
Definition at line 3165 of file aice_usb.c.
References aice_execute_dim(), aice_write_dtr(), BEQ_MINUS_12, DSB, ERROR_OK, instructions, MFSR_DTR, R0, R1, and SHI_BI.
Referenced by aice_usb_write_memory_unit().
|
static |
Definition at line 3145 of file aice_usb.c.
References aice_write_mem().
Referenced by aice_usb_write_memory_unit().
|
static |
Definition at line 3180 of file aice_usb.c.
References aice_execute_dim(), aice_write_dtr(), BEQ_MINUS_12, DSB, ERROR_OK, instructions, MFSR_DTR, R0, R1, and SWI_BI.
Referenced by aice_usb_write_memory_unit().
|
static |
Definition at line 3195 of file aice_usb.c.
References addr, aice_usb_set_address_dim(), aice_usb_write_mem_b_bus(), aice_usb_write_mem_b_dim(), aice_usb_write_mem_h_bus(), aice_usb_write_mem_h_dim(), aice_usb_write_mem_w_bus(), aice_usb_write_mem_w_dim(), buffer, core_info, count, ERROR_OK, LOG_DEBUG, NDS_MEMORY_ACC_BUS, NDS_MEMORY_ACC_CPU, and size.
Referenced by aice_usb_bulk_write_mem().
|
static |
Definition at line 2048 of file aice_usb.c.
References aice_write_reg(), core_info, DR42, DR43, aice_nds32_info::edm_ctl_backup, ERROR_OK, LOG_DEBUG, R0, aice_nds32_info::r0_backup, R1, aice_nds32_info::r1_backup, aice_nds32_info::target_dtr_backup, and aice_nds32_info::target_dtr_valid.
|
static |
Definition at line 2152 of file aice_usb.c.
References AICE_BIG_ENDIAN, aice_write_reg(), data_endian, LOG_DEBUG, nds32_reg_simple_name(), and R1.
int aice_write_ctrl | ( | uint32_t | address, |
uint32_t | data | ||
) |
Definition at line 638 of file aice_usb.c.
References AICE_CMD_WRITE_CTRL, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHB, AICE_FORMAT_HTDC, AICE_LITTLE_ENDIAN, aice_pack_htdc(), aice_unpack_dthb(), aice_usb_packet_append(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, usb_in_buffer, and usb_out_buffer.
Referenced by aice_execute_custom_script(), aice_issue_reset_hold(), aice_issue_reset_hold_multi(), aice_issue_srst(), aice_reset_box(), aice_usb_packet_flush(), aice_usb_reset(), aice_usb_set_clock(), and aice_usb_set_command_mode().
|
static |
instruction is big-endian
Definition at line 1106 of file aice_usb.c.
References AICE_CMD_T_WRITE_DIM, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMB, AICE_FORMAT_HTDMC, AICE_LITTLE_ENDIAN, aice_max_retry_times, aice_pack_htdmc_multiple_data(), aice_reset_box(), aice_switch_to_big_endian(), aice_unpack_dthmb(), aice_usb_packet_append(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_execute_dim(), aice_usb_execute(), and fill_profiling_batch_commands().
|
static |
Definition at line 777 of file aice_usb.c.
References AICE_CMD_T_WRITE_DTR, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMB, AICE_FORMAT_HTDMC, AICE_LITTLE_ENDIAN, aice_max_retry_times, aice_pack_htdmc(), aice_reset_box(), aice_unpack_dthmb(), aice_usb_packet_append(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_restore_tmp_registers(), aice_usb_dcache_inval_all(), aice_usb_dcache_va_inval(), aice_usb_dcache_va_wb(), aice_usb_dcache_wb_all(), aice_usb_icache_inval_all(), aice_usb_icache_va_inval(), aice_usb_read_tlb(), aice_usb_write_mem_b_dim(), aice_usb_write_mem_h_dim(), aice_usb_write_mem_w_dim(), and aice_write_reg().
|
static |
Definition at line 829 of file aice_usb.c.
References AICE_CMD_WRITE_DTR_FROM_BUFFER, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMB, AICE_FORMAT_HTDMA, aice_max_retry_times, aice_pack_htdma(), aice_reset_box(), aice_unpack_dthmb(), aice_usb_packet_append(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by fill_profiling_batch_commands().
|
static |
Definition at line 1035 of file aice_usb.c.
References AICE_CMD_T_WRITE_EDMSR, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMB, AICE_FORMAT_HTDMC, AICE_LITTLE_ENDIAN, aice_max_retry_times, aice_pack_htdmc(), aice_reset_box(), aice_unpack_dthmb(), aice_usb_packet_append(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_edm_init(), aice_init_edm_registers(), aice_restore_edm_registers(), aice_usb_halt(), and aice_usb_write_debug_reg().
|
static |
Definition at line 1337 of file aice_usb.c.
References AICE_CMD_T_WRITE_MEM, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMB, AICE_FORMAT_HTDMD, aice_max_retry_times, aice_pack_htdmd(), aice_reset_box(), aice_unpack_dthmb(), aice_usb_packet_append(), aice_usb_read(), aice_usb_write(), data_endian, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_usb_write_mem_w_bus().
|
static |
Definition at line 1228 of file aice_usb.c.
References AICE_CMD_T_WRITE_MEM_B, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMB, AICE_FORMAT_HTDMD, aice_max_retry_times, aice_pack_htdmd(), aice_reset_box(), aice_unpack_dthmb(), aice_usb_packet_append(), aice_usb_read(), aice_usb_write(), data_endian, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_usb_write_mem_b_bus().
|
static |
Definition at line 1282 of file aice_usb.c.
References AICE_CMD_T_WRITE_MEM_H, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMB, AICE_FORMAT_HTDMD, aice_max_retry_times, aice_pack_htdmd(), aice_reset_box(), aice_unpack_dthmb(), aice_usb_packet_append(), aice_usb_read(), aice_usb_write(), data_endian, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_usb_write_mem_h_bus().
|
static |
Definition at line 929 of file aice_usb.c.
References AICE_CMD_T_WRITE_MISC, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_PACK, AICE_FORMAT_DTHMB, AICE_FORMAT_HTDMC, AICE_LITTLE_ENDIAN, aice_max_retry_times, aice_pack_htdmc(), aice_reset_box(), aice_unpack_dthmb(), aice_usb_packet_append(), aice_usb_packet_flush(), aice_usb_read(), aice_usb_write(), ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, retry_times, usb_in_buffer, and usb_out_buffer.
Referenced by aice_bulk_read_mem(), aice_bulk_write_mem(), aice_edm_init(), aice_execute_dim(), aice_issue_reset_hold_multi(), aice_usb_assert_srst(), aice_usb_execute(), aice_usb_halt(), aice_usb_memory_mode(), aice_usb_program_edm(), aice_usb_run(), aice_usb_state(), check_privilege(), and fill_profiling_batch_commands().
|
static |
execute instructions in DIM
Definition at line 1981 of file aice_usb.c.
References aice_execute_dim(), aice_read_edmsr(), aice_write_dtr(), AMTAR, AMTAR2, BEQ_MINUS_12, CB_CTL, CBE3, DSB, ERROR_FAIL, FD0, FD31, FMTCSR, FMTDR, FMTSR, FPCFG, FPCSR, FS0, FS31, instructions, LOG_DEBUG, LOG_ERROR, MFSR_DTR, MTSR, MTUSR_G0, nds32_reg_sr_index(), nds32_reg_type(), NDS32_REG_TYPE_AUMR, NDS32_REG_TYPE_FPU, NDS32_REG_TYPE_GPR, NDS32_REG_TYPE_SPR, NDS_EDM_SR_EDMSW, NDS_EDMSW_RDV, and NOP.
Referenced by aice_issue_reset_hold(), aice_restore_tmp_registers(), aice_usb_halt(), aice_usb_step(), aice_usb_write_reg(), aice_usb_write_reg_64(), and check_suppressed_exception().
|
static |
Definition at line 1802 of file aice_usb.c.
References aice_write_misc(), ERROR_FAIL, ERROR_OK, LOG_ERROR, NDS_DBGER_ILL_SEC_ACC, and NDS_EDM_MISC_DBGER.
Referenced by aice_check_dbger().
|
static |
Definition at line 1763 of file aice_usb.c.
References aice_read_reg(), aice_write_reg(), ERROR_OK, IR4, IR6, LOG_ERROR, LOG_INFO, and NDS_DBGER_ALL_SUPRS_EX.
Referenced by aice_check_dbger().
|
static |
Definition at line 3867 of file aice_usb.c.
References aice_batch_buffer_write(), AICE_BATCH_COMMAND_BUFFER_0, AICE_BATCH_DATA_BUFFER_0, AICE_BATCH_DATA_BUFFER_1, AICE_COMMAND_MODE_BATCH, AICE_COMMAND_MODE_NORMAL, aice_read_dtr_to_buffer(), aice_usb_set_command_mode(), aice_write_dim(), aice_write_dtr_from_buffer(), aice_write_misc(), BEQ_MINUS_12, DSB, ERROR_FAIL, ERROR_OK, IRET, MFSR, MFSR_DTR, MFUSR_G0, MTSR_DTR, nds32_reg_sr_index(), nds32_reg_type(), NDS32_REG_TYPE_GPR, NDS32_REG_TYPE_SPR, NDS_EDM_MISC_EDM_CMDR, NOP, usb_in_packets_buffer_length, usb_out_packets_buffer, and usb_out_packets_buffer_length.
|
static |
Definition at line 2338 of file aice_usb.c.
References core_info.
Referenced by aice_usb_halt(), and aice_usb_step().
|
inlinestatic |
Definition at line 382 of file aice_usb.c.
References jtag_libusb_bulk_read(), size, and usb_bulk_with_retries().
Referenced by aice_usb_read().
|
static |
Definition at line 341 of file aice_usb.c.
References count, ERROR_OK, ERROR_TIMEOUT_REACHED, and size.
Referenced by usb_bulk_read_ex(), and usb_bulk_write_ex().
|
inlinestatic |
Definition at line 372 of file aice_usb.c.
References size, usb_bulk_with_retries(), and wrap_usb_bulk_write().
Referenced by aice_usb_write().
|
static |
Definition at line 362 of file aice_usb.c.
References jtag_libusb_bulk_write(), and size.
Referenced by usb_bulk_write_ex().
|
static |
Definition at line 425 of file aice_usb.c.
|
static |
Definition at line 1758 of file aice_usb.c.
Referenced by aice_check_dbger(), and aice_usb_set_count_to_check_dbger().
|
static |
Definition at line 25 of file aice_usb.c.
Referenced by aice_usb_close(), aice_usb_open(), aice_usb_read(), and aice_usb_write().
|
static |
Definition at line 28 of file aice_usb.c.
Referenced by aice_batch_buffer_read(), aice_batch_buffer_write(), aice_do_execute(), aice_fastread_mem(), aice_fastwrite_mem(), aice_read_dtr(), aice_read_dtr_to_buffer(), aice_read_edmsr(), aice_read_mem(), aice_read_mem_b(), aice_read_mem_h(), aice_read_misc(), aice_scan_chain(), aice_usb_set_retry_times(), aice_write_dim(), aice_write_dtr(), aice_write_dtr_from_buffer(), aice_write_edmsr(), aice_write_mem(), aice_write_mem_b(), aice_write_mem_h(), and aice_write_misc().
struct aice_port_api_s aice_usb_api |
Definition at line 3932 of file aice_usb.c.
|
static |
Definition at line 1750 of file aice_usb.c.
Referenced by aice_backup_edm_registers(), aice_backup_tmp_registers(), aice_core_init(), aice_edm_init(), aice_init_edm_registers(), aice_issue_reset_hold(), aice_issue_srst(), aice_restore_edm_registers(), aice_restore_tmp_registers(), aice_usb_bulk_read_mem(), aice_usb_bulk_write_mem(), aice_usb_cache_ctl(), aice_usb_dcache_inval_all(), aice_usb_dcache_wb_all(), aice_usb_halt(), aice_usb_icache_inval_all(), aice_usb_init_cache(), aice_usb_memory_access(), aice_usb_memory_mode(), aice_usb_read_debug_reg(), aice_usb_read_memory_unit(), aice_usb_read_reg(), aice_usb_run(), aice_usb_state(), aice_usb_write_debug_reg(), aice_usb_write_memory_unit(), aice_usb_write_reg(), and is_v2_edm().
|
static |
Definition at line 1757 of file aice_usb.c.
Referenced by aice_issue_reset_hold(), aice_usb_close(), and aice_usb_set_custom_restart_script().
|
static |
Definition at line 1755 of file aice_usb.c.
Referenced by aice_issue_srst(), aice_usb_close(), and aice_usb_set_custom_srst_script().
|
static |
Definition at line 1756 of file aice_usb.c.
Referenced by aice_usb_close(), aice_usb_reset(), and aice_usb_set_custom_trst_script().
|
static |
Definition at line 28 of file aice_usb.c.
Referenced by aice_batch_buffer_read(), aice_batch_buffer_write(), aice_fastread_mem(), aice_fastwrite_mem(), aice_read_mem(), aice_read_mem_b(), aice_read_mem_h(), aice_usb_read_reg_64(), aice_usb_set_data_endian(), aice_usb_write_reg_64(), aice_write_mem(), aice_write_mem_b(), and aice_write_mem_h().
|
static |
Definition at line 25 of file aice_usb.c.
Referenced by aice_usb_reset(), and aice_usb_set_jtag_clock().
|
static |
Definition at line 1753 of file aice_usb.c.
Referenced by aice_issue_reset_hold_multi(), aice_usb_assert_srst(), and aice_usb_idcode().
|
static |
Definition at line 23 of file aice_usb.c.
Referenced by aice_batch_buffer_read(), aice_batch_buffer_write(), aice_do_execute(), aice_fastread_mem(), aice_fastwrite_mem(), aice_read_ctrl(), aice_read_dtr(), aice_read_dtr_to_buffer(), aice_read_edmsr(), aice_read_mem(), aice_read_mem_b(), aice_read_mem_h(), aice_read_misc(), aice_scan_chain(), aice_unpack_dtha(), aice_unpack_dtha_multiple_data(), aice_unpack_dthb(), aice_unpack_dthma(), aice_unpack_dthma_multiple_data(), aice_unpack_dthmb(), aice_write_ctrl(), aice_write_dim(), aice_write_dtr(), aice_write_dtr_from_buffer(), aice_write_edmsr(), aice_write_mem(), aice_write_mem_b(), aice_write_mem_h(), and aice_write_misc().
|
static |
Definition at line 423 of file aice_usb.c.
Referenced by aice_usb_packet_flush().
|
static |
Definition at line 425 of file aice_usb.c.
Referenced by aice_usb_packet_append(), aice_usb_packet_flush(), and fill_profiling_batch_commands().
|
static |
Definition at line 24 of file aice_usb.c.
Referenced by aice_batch_buffer_read(), aice_batch_buffer_write(), aice_do_execute(), aice_fastread_mem(), aice_fastwrite_mem(), aice_pack_htda(), aice_pack_htdc(), aice_pack_htdma(), aice_pack_htdmb(), aice_pack_htdmc(), aice_pack_htdmc_multiple_data(), aice_pack_htdmd(), aice_pack_htdmd_multiple_data(), aice_read_ctrl(), aice_read_dtr(), aice_read_dtr_to_buffer(), aice_read_edmsr(), aice_read_mem(), aice_read_mem_b(), aice_read_mem_h(), aice_read_misc(), aice_scan_chain(), aice_write_ctrl(), aice_write_dim(), aice_write_dtr(), aice_write_dtr_from_buffer(), aice_write_edmsr(), aice_write_mem(), aice_write_mem_b(), aice_write_mem_h(), and aice_write_misc().
|
static |
Definition at line 422 of file aice_usb.c.
Referenced by aice_usb_packet_append(), aice_usb_packet_flush(), and fill_profiling_batch_commands().
|
static |
Definition at line 424 of file aice_usb.c.
Referenced by aice_usb_packet_append(), aice_usb_packet_flush(), and fill_profiling_batch_commands().