OpenOCD
ecp5.c File Reference
Include dependency graph for ecp5.c:

Go to the source code of this file.

Macros

#define ISC_PROGRAM_USERCODE   0xC2
 
#define REGISTER_ALL_BITS_1   0xffffffff
 
#define STATUS_BUSY_FLAG   0x00001000
 
#define STATUS_DONE_BIT   0x00000100
 
#define STATUS_ERROR_BITS   0x00020040
 
#define STATUS_FAIL_FLAG   0x00002000
 
#define STATUS_FEA_OTP   0x00004000
 

Functions

int lattice_ecp5_connect_spi_to_jtag (struct lattice_pld_device *pld_device_info)
 
int lattice_ecp5_disconnect_spi_from_jtag (struct lattice_pld_device *pld_device_info)
 
static int lattice_ecp5_enable_sram_programming (struct jtag_tap *tap)
 
static int lattice_ecp5_erase_sram (struct jtag_tap *tap)
 
static int lattice_ecp5_exit_programming_mode (struct jtag_tap *tap)
 
int lattice_ecp5_get_facing_read_bits (struct lattice_pld_device *pld_device_info, unsigned int *facing_read_bits)
 
static int lattice_ecp5_init_address (struct jtag_tap *tap)
 
int lattice_ecp5_load (struct lattice_pld_device *lattice_device, struct lattice_bit_file *bit_file)
 
static int lattice_ecp5_program_config_map (struct jtag_tap *tap, struct lattice_bit_file *bit_file)
 
int lattice_ecp5_read_status (struct jtag_tap *tap, uint32_t *status, uint32_t out, bool do_idle)
 
int lattice_ecp5_read_usercode (struct jtag_tap *tap, uint32_t *usercode, uint32_t out)
 
int lattice_ecp5_refresh (struct lattice_pld_device *lattice_device)
 
int lattice_ecp5_write_usercode (struct lattice_pld_device *lattice_device, uint32_t usercode)
 

Macro Definition Documentation

◆ ISC_PROGRAM_USERCODE

#define ISC_PROGRAM_USERCODE   0xC2

Definition at line 16 of file ecp5.c.

◆ REGISTER_ALL_BITS_1

#define REGISTER_ALL_BITS_1   0xffffffff

Definition at line 23 of file ecp5.c.

◆ STATUS_BUSY_FLAG

#define STATUS_BUSY_FLAG   0x00001000

Definition at line 22 of file ecp5.c.

◆ STATUS_DONE_BIT

#define STATUS_DONE_BIT   0x00000100

Definition at line 18 of file ecp5.c.

◆ STATUS_ERROR_BITS

#define STATUS_ERROR_BITS   0x00020040

Definition at line 19 of file ecp5.c.

◆ STATUS_FAIL_FLAG

#define STATUS_FAIL_FLAG   0x00002000

Definition at line 21 of file ecp5.c.

◆ STATUS_FEA_OTP

#define STATUS_FEA_OTP   0x00004000

Definition at line 20 of file ecp5.c.

Function Documentation

◆ lattice_ecp5_connect_spi_to_jtag()

◆ lattice_ecp5_disconnect_spi_from_jtag()

int lattice_ecp5_disconnect_spi_from_jtag ( struct lattice_pld_device pld_device_info)

◆ lattice_ecp5_enable_sram_programming()

◆ lattice_ecp5_erase_sram()

◆ lattice_ecp5_exit_programming_mode()

static int lattice_ecp5_exit_programming_mode ( struct jtag_tap tap)
static

◆ lattice_ecp5_get_facing_read_bits()

int lattice_ecp5_get_facing_read_bits ( struct lattice_pld_device pld_device_info,
unsigned int *  facing_read_bits 
)

Definition at line 270 of file ecp5.c.

References ERROR_FAIL, and ERROR_OK.

Referenced by lattice_get_stuff_bits().

◆ lattice_ecp5_init_address()

◆ lattice_ecp5_load()

◆ lattice_ecp5_program_config_map()

◆ lattice_ecp5_read_status()

int lattice_ecp5_read_status ( struct jtag_tap tap,
uint32_t *  status,
uint32_t  out,
bool  do_idle 
)

Definition at line 25 of file ecp5.c.

References lattice_read_u32_register(), LSC_READ_STATUS, and status.

Referenced by lattice_read_status_u32().

◆ lattice_ecp5_read_usercode()

int lattice_ecp5_read_usercode ( struct jtag_tap tap,
uint32_t *  usercode,
uint32_t  out 
)

Definition at line 30 of file ecp5.c.

References lattice_read_u32_register(), and READ_USERCODE.

Referenced by lattice_read_usercode().

◆ lattice_ecp5_refresh()

int lattice_ecp5_refresh ( struct lattice_pld_device lattice_device)

◆ lattice_ecp5_write_usercode()