OpenOCD
aice_usb.h File Reference
Include dependency graph for aice_usb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  aice_nds32_info
 
struct  aice_usb_handler_s
 
struct  cache_info
 

Macros

#define AICE_BATCH_COMMAND_BUFFER_0   0x0
 
#define AICE_BATCH_COMMAND_BUFFER_1   0x1
 
#define AICE_BATCH_COMMAND_BUFFER_2   0x2
 
#define AICE_BATCH_COMMAND_BUFFER_3   0x3
 
#define AICE_BATCH_DATA_BUFFER_0   0x4
 
#define AICE_BATCH_DATA_BUFFER_1   0x5
 
#define AICE_BATCH_DATA_BUFFER_2   0x6
 
#define AICE_BATCH_DATA_BUFFER_3   0x7
 
#define AICE_CUSTOM_DELAY_CLEAN_DBGI   0x08
 
#define AICE_CUSTOM_DELAY_CLEAN_SRST   0x02
 
#define AICE_CUSTOM_DELAY_CLEAN_TRST   0x20
 
#define AICE_CUSTOM_DELAY_SET_DBGI   0x04
 
#define AICE_CUSTOM_DELAY_SET_SRST   0x01
 
#define AICE_CUSTOM_DELAY_SET_TRST   0x10
 
#define AICE_IN_BATCH_COMMAND_SIZE   512
 
#define AICE_IN_BUFFER_SIZE   2048
 
#define AICE_IN_PACK_COMMAND_SIZE   2048
 
#define AICE_IN_PACKETS_BUFFER_SIZE   2048
 
#define AICE_JTAG_PIN_CONTROL_RESTART   0x08
 
#define AICE_JTAG_PIN_CONTROL_SRST   0x01
 
#define AICE_JTAG_PIN_CONTROL_STOP   0x04
 
#define AICE_JTAG_PIN_CONTROL_TRST   0x02
 
#define AICE_OUT_BATCH_COMMAND_SIZE   512
 
#define AICE_OUT_BUFFER_SIZE   2048
 
#define AICE_OUT_PACK_COMMAND_SIZE   2048
 
#define AICE_OUT_PACKETS_BUFFER_SIZE   2048
 
#define AICE_READ_CTRL_BATCH_BUF0_STATE   0x31
 
#define AICE_READ_CTRL_BATCH_BUF4_STATE   0x39
 
#define AICE_READ_CTRL_BATCH_BUF5_STATE   0x3b
 
#define AICE_READ_CTRL_BATCH_BUF_INFO   0x22
 
#define AICE_READ_CTRL_BATCH_STATUS   0x23
 
#define AICE_READ_CTRL_GET_FIRMWARE_VERSION   0x03
 
#define AICE_READ_CTRL_GET_FPGA_VERSION   0x02
 
#define AICE_READ_CTRL_GET_HARDWARE_VERSION   0x01
 
#define AICE_READ_CTRL_GET_ICE_STATE   0x00
 
#define AICE_READ_CTRL_GET_JTAG_PIN_STATUS   0x04
 
#define AICE_TCK_CONTROL_TCK3048   0x08
 
#define AICE_TCK_CONTROL_TCK_SCAN   0x10
 
#define AICE_TCK_CONTROL_TCK_SCAN   0x10
 
#define AICE_USB_TIMEOUT   5000
 
#define AICE_WRITE_CTRL_BATCH_CMD_BUF0_CTRL   0x30
 
#define AICE_WRITE_CTRL_BATCH_CTRL   0x20
 
#define AICE_WRITE_CTRL_BATCH_DATA_BUF0_CTRL   0x38
 
#define AICE_WRITE_CTRL_BATCH_DATA_BUF1_CTRL   0x3a
 
#define AICE_WRITE_CTRL_BATCH_DIM_SIZE   0x22
 
#define AICE_WRITE_CTRL_BATCH_ITERATION   0x21
 
#define AICE_WRITE_CTRL_CLEAR_TIMEOUT_STATUS   0x02
 
#define AICE_WRITE_CTRL_CUSTOM_DELAY   0x0d
 
#define AICE_WRITE_CTRL_JTAG_PIN_CONTROL   0x01
 
#define AICE_WRITE_CTRL_JTAG_PIN_STATUS   0x04
 
#define AICE_WRITE_CTRL_RESERVED   0x03
 
#define AICE_WRITE_CTRL_TCK_CONTROL   0x00
 

Functions

int aice_read_ctrl (uint32_t address, uint32_t *data)
 
int aice_write_ctrl (uint32_t address, uint32_t data)
 

Variables

struct aice_port_api_s aice_usb_api
 

Macro Definition Documentation

◆ AICE_BATCH_COMMAND_BUFFER_0

#define AICE_BATCH_COMMAND_BUFFER_0   0x0

Definition at line 52 of file aice_usb.h.

◆ AICE_BATCH_COMMAND_BUFFER_1

#define AICE_BATCH_COMMAND_BUFFER_1   0x1

Definition at line 53 of file aice_usb.h.

◆ AICE_BATCH_COMMAND_BUFFER_2

#define AICE_BATCH_COMMAND_BUFFER_2   0x2

Definition at line 54 of file aice_usb.h.

◆ AICE_BATCH_COMMAND_BUFFER_3

#define AICE_BATCH_COMMAND_BUFFER_3   0x3

Definition at line 55 of file aice_usb.h.

◆ AICE_BATCH_DATA_BUFFER_0

#define AICE_BATCH_DATA_BUFFER_0   0x4

Definition at line 56 of file aice_usb.h.

◆ AICE_BATCH_DATA_BUFFER_1

#define AICE_BATCH_DATA_BUFFER_1   0x5

Definition at line 57 of file aice_usb.h.

◆ AICE_BATCH_DATA_BUFFER_2

#define AICE_BATCH_DATA_BUFFER_2   0x6

Definition at line 58 of file aice_usb.h.

◆ AICE_BATCH_DATA_BUFFER_3

#define AICE_BATCH_DATA_BUFFER_3   0x7

Definition at line 59 of file aice_usb.h.

◆ AICE_CUSTOM_DELAY_CLEAN_DBGI

#define AICE_CUSTOM_DELAY_CLEAN_DBGI   0x08

Definition at line 78 of file aice_usb.h.

◆ AICE_CUSTOM_DELAY_CLEAN_SRST

#define AICE_CUSTOM_DELAY_CLEAN_SRST   0x02

Definition at line 76 of file aice_usb.h.

◆ AICE_CUSTOM_DELAY_CLEAN_TRST

#define AICE_CUSTOM_DELAY_CLEAN_TRST   0x20

Definition at line 80 of file aice_usb.h.

◆ AICE_CUSTOM_DELAY_SET_DBGI

#define AICE_CUSTOM_DELAY_SET_DBGI   0x04

Definition at line 77 of file aice_usb.h.

◆ AICE_CUSTOM_DELAY_SET_SRST

#define AICE_CUSTOM_DELAY_SET_SRST   0x01

Definition at line 75 of file aice_usb.h.

◆ AICE_CUSTOM_DELAY_SET_TRST

#define AICE_CUSTOM_DELAY_SET_TRST   0x10

Definition at line 79 of file aice_usb.h.

◆ AICE_IN_BATCH_COMMAND_SIZE

#define AICE_IN_BATCH_COMMAND_SIZE   512

Definition at line 21 of file aice_usb.h.

◆ AICE_IN_BUFFER_SIZE

#define AICE_IN_BUFFER_SIZE   2048

Definition at line 17 of file aice_usb.h.

◆ AICE_IN_PACK_COMMAND_SIZE

#define AICE_IN_PACK_COMMAND_SIZE   2048

Definition at line 23 of file aice_usb.h.

◆ AICE_IN_PACKETS_BUFFER_SIZE

#define AICE_IN_PACKETS_BUFFER_SIZE   2048

Definition at line 19 of file aice_usb.h.

◆ AICE_JTAG_PIN_CONTROL_RESTART

#define AICE_JTAG_PIN_CONTROL_RESTART   0x08

Definition at line 69 of file aice_usb.h.

◆ AICE_JTAG_PIN_CONTROL_SRST

#define AICE_JTAG_PIN_CONTROL_SRST   0x01

Definition at line 66 of file aice_usb.h.

◆ AICE_JTAG_PIN_CONTROL_STOP

#define AICE_JTAG_PIN_CONTROL_STOP   0x04

Definition at line 68 of file aice_usb.h.

◆ AICE_JTAG_PIN_CONTROL_TRST

#define AICE_JTAG_PIN_CONTROL_TRST   0x02

Definition at line 67 of file aice_usb.h.

◆ AICE_OUT_BATCH_COMMAND_SIZE

#define AICE_OUT_BATCH_COMMAND_SIZE   512

Definition at line 22 of file aice_usb.h.

◆ AICE_OUT_BUFFER_SIZE

#define AICE_OUT_BUFFER_SIZE   2048

Definition at line 18 of file aice_usb.h.

◆ AICE_OUT_PACK_COMMAND_SIZE

#define AICE_OUT_PACK_COMMAND_SIZE   2048

Definition at line 24 of file aice_usb.h.

◆ AICE_OUT_PACKETS_BUFFER_SIZE

#define AICE_OUT_PACKETS_BUFFER_SIZE   2048

Definition at line 20 of file aice_usb.h.

◆ AICE_READ_CTRL_BATCH_BUF0_STATE

#define AICE_READ_CTRL_BATCH_BUF0_STATE   0x31

Definition at line 34 of file aice_usb.h.

◆ AICE_READ_CTRL_BATCH_BUF4_STATE

#define AICE_READ_CTRL_BATCH_BUF4_STATE   0x39

Definition at line 35 of file aice_usb.h.

◆ AICE_READ_CTRL_BATCH_BUF5_STATE

#define AICE_READ_CTRL_BATCH_BUF5_STATE   0x3b

Definition at line 36 of file aice_usb.h.

◆ AICE_READ_CTRL_BATCH_BUF_INFO

#define AICE_READ_CTRL_BATCH_BUF_INFO   0x22

Definition at line 32 of file aice_usb.h.

◆ AICE_READ_CTRL_BATCH_STATUS

#define AICE_READ_CTRL_BATCH_STATUS   0x23

Definition at line 33 of file aice_usb.h.

◆ AICE_READ_CTRL_GET_FIRMWARE_VERSION

#define AICE_READ_CTRL_GET_FIRMWARE_VERSION   0x03

Definition at line 30 of file aice_usb.h.

◆ AICE_READ_CTRL_GET_FPGA_VERSION

#define AICE_READ_CTRL_GET_FPGA_VERSION   0x02

Definition at line 29 of file aice_usb.h.

◆ AICE_READ_CTRL_GET_HARDWARE_VERSION

#define AICE_READ_CTRL_GET_HARDWARE_VERSION   0x01

Definition at line 28 of file aice_usb.h.

◆ AICE_READ_CTRL_GET_ICE_STATE

#define AICE_READ_CTRL_GET_ICE_STATE   0x00

Definition at line 27 of file aice_usb.h.

◆ AICE_READ_CTRL_GET_JTAG_PIN_STATUS

#define AICE_READ_CTRL_GET_JTAG_PIN_STATUS   0x04

Definition at line 31 of file aice_usb.h.

◆ AICE_TCK_CONTROL_TCK3048

#define AICE_TCK_CONTROL_TCK3048   0x08

Definition at line 62 of file aice_usb.h.

◆ AICE_TCK_CONTROL_TCK_SCAN [1/2]

#define AICE_TCK_CONTROL_TCK_SCAN   0x10

Definition at line 72 of file aice_usb.h.

◆ AICE_TCK_CONTROL_TCK_SCAN [2/2]

#define AICE_TCK_CONTROL_TCK_SCAN   0x10

Definition at line 72 of file aice_usb.h.

◆ AICE_USB_TIMEOUT

#define AICE_USB_TIMEOUT   5000

Definition at line 14 of file aice_usb.h.

◆ AICE_WRITE_CTRL_BATCH_CMD_BUF0_CTRL

#define AICE_WRITE_CTRL_BATCH_CMD_BUF0_CTRL   0x30

Definition at line 48 of file aice_usb.h.

◆ AICE_WRITE_CTRL_BATCH_CTRL

#define AICE_WRITE_CTRL_BATCH_CTRL   0x20

Definition at line 45 of file aice_usb.h.

◆ AICE_WRITE_CTRL_BATCH_DATA_BUF0_CTRL

#define AICE_WRITE_CTRL_BATCH_DATA_BUF0_CTRL   0x38

Definition at line 49 of file aice_usb.h.

◆ AICE_WRITE_CTRL_BATCH_DATA_BUF1_CTRL

#define AICE_WRITE_CTRL_BATCH_DATA_BUF1_CTRL   0x3a

Definition at line 50 of file aice_usb.h.

◆ AICE_WRITE_CTRL_BATCH_DIM_SIZE

#define AICE_WRITE_CTRL_BATCH_DIM_SIZE   0x22

Definition at line 47 of file aice_usb.h.

◆ AICE_WRITE_CTRL_BATCH_ITERATION

#define AICE_WRITE_CTRL_BATCH_ITERATION   0x21

Definition at line 46 of file aice_usb.h.

◆ AICE_WRITE_CTRL_CLEAR_TIMEOUT_STATUS

#define AICE_WRITE_CTRL_CLEAR_TIMEOUT_STATUS   0x02

Definition at line 41 of file aice_usb.h.

◆ AICE_WRITE_CTRL_CUSTOM_DELAY

#define AICE_WRITE_CTRL_CUSTOM_DELAY   0x0d

Definition at line 44 of file aice_usb.h.

◆ AICE_WRITE_CTRL_JTAG_PIN_CONTROL

#define AICE_WRITE_CTRL_JTAG_PIN_CONTROL   0x01

Definition at line 40 of file aice_usb.h.

◆ AICE_WRITE_CTRL_JTAG_PIN_STATUS

#define AICE_WRITE_CTRL_JTAG_PIN_STATUS   0x04

Definition at line 43 of file aice_usb.h.

◆ AICE_WRITE_CTRL_RESERVED

#define AICE_WRITE_CTRL_RESERVED   0x03

Definition at line 42 of file aice_usb.h.

◆ AICE_WRITE_CTRL_TCK_CONTROL

#define AICE_WRITE_CTRL_TCK_CONTROL   0x00

Definition at line 39 of file aice_usb.h.

Function Documentation

◆ aice_read_ctrl()

◆ aice_write_ctrl()

Variable Documentation

◆ aice_usb_api

struct aice_port_api_s aice_usb_api
extern

Definition at line 3932 of file aice_usb.c.