9 #ifndef OPENOCD_TARGET_ESIRISC_JTAG_H
10 #define OPENOCD_TARGET_ESIRISC_JTAG_H
16 #define INSTR_IDCODE 0x8
17 #define INSTR_DEBUG 0x9
18 #define INSTR_BYPASS 0xf
19 #define INSTR_LENGTH 4
22 #define DEBUG_NOP 0x00
23 #define DEBUG_READ_BYTE 0x10
24 #define DEBUG_READ_HWORD 0x20
25 #define DEBUG_READ_WORD 0x30
26 #define DEBUG_WRITE_BYTE 0x60
27 #define DEBUG_WRITE_HWORD 0x70
28 #define DEBUG_WRITE_WORD 0x80
29 #define DEBUG_READ_REG 0xb0
30 #define DEBUG_WRITE_REG 0xc0
31 #define DEBUG_READ_CSR 0xd0
32 #define DEBUG_WRITE_CSR 0xe0
33 #define DEBUG_ENABLE_DEBUG 0xf0
34 #define DEBUG_DISABLE_DEBUG 0xf2
35 #define DEBUG_ASSERT_RESET 0xf4
36 #define DEBUG_DEASSERT_RESET 0xf6
37 #define DEBUG_BREAK 0xf8
38 #define DEBUG_CONTINUE 0xfa
39 #define DEBUG_FLUSH_CACHES 0xfc
42 #define EID_OVERFLOW 0x3d
43 #define EID_CANT_DEBUG 0x3e
47 #define STUFF_MARKER 0x55
60 uint32_t address, uint8_t *data);
62 uint32_t address, uint16_t *data);
64 uint32_t address, uint32_t *data);
67 uint32_t address, uint8_t data);
69 uint32_t address, uint16_t data);
71 uint32_t address, uint32_t data);
74 uint8_t
reg, uint32_t *data);
76 uint8_t
reg, uint32_t data);
79 uint8_t
bank, uint8_t
csr, uint32_t *data);
81 uint8_t
bank, uint8_t
csr, uint32_t data);
int esirisc_jtag_read_hword(struct esirisc_jtag *jtag_info, uint32_t address, uint16_t *data)
int esirisc_jtag_read_csr(struct esirisc_jtag *jtag_info, uint8_t bank, uint8_t csr, uint32_t *data)
int esirisc_jtag_deassert_reset(struct esirisc_jtag *jtag_info)
int esirisc_jtag_read_reg(struct esirisc_jtag *jtag_info, uint8_t reg, uint32_t *data)
int esirisc_jtag_read_byte(struct esirisc_jtag *jtag_info, uint32_t address, uint8_t *data)
int esirisc_jtag_write_byte(struct esirisc_jtag *jtag_info, uint32_t address, uint8_t data)
int esirisc_jtag_continue(struct esirisc_jtag *jtag_info)
uint8_t esirisc_jtag_get_eid(struct esirisc_jtag *jtag_info)
int esirisc_jtag_flush_caches(struct esirisc_jtag *jtag_info)
bool esirisc_jtag_is_debug_active(struct esirisc_jtag *jtag_info)
int esirisc_jtag_disable_debug(struct esirisc_jtag *jtag_info)
int esirisc_jtag_write_csr(struct esirisc_jtag *jtag_info, uint8_t bank, uint8_t csr, uint32_t data)
int esirisc_jtag_write_reg(struct esirisc_jtag *jtag_info, uint8_t reg, uint32_t data)
int esirisc_jtag_read_word(struct esirisc_jtag *jtag_info, uint32_t address, uint32_t *data)
bool esirisc_jtag_is_stopped(struct esirisc_jtag *jtag_info)
int esirisc_jtag_assert_reset(struct esirisc_jtag *jtag_info)
int esirisc_jtag_write_word(struct esirisc_jtag *jtag_info, uint32_t address, uint32_t data)
int esirisc_jtag_write_hword(struct esirisc_jtag *jtag_info, uint32_t address, uint16_t data)
int esirisc_jtag_enable_debug(struct esirisc_jtag *jtag_info)
int esirisc_jtag_break(struct esirisc_jtag *jtag_info)
The JTAG interface can be implemented with a software or hardware fifo.