OpenOCD
|
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 |
int lattice_ecp5_connect_spi_to_jtag | ( | struct lattice_pld_device * | pld_device_info | ) |
Definition at line 209 of file ecp5.c.
References buf_get_u32(), buffer, jtag_tap::cur_instr, ERROR_FAIL, ERROR_OK, scan_field::in_value, jtag_tap::ir_length, jtag_add_dr_scan(), jtag_execute_queue(), lattice_ecp5_enable_sram_programming(), lattice_ecp5_erase_sram(), lattice_ecp5_exit_programming_mode(), lattice_preload(), lattice_set_instr(), NULL, scan_field::num_bits, scan_field::out_value, PROGRAM_SPI, lattice_pld_device::tap, and TAP_IDLE.
Referenced by lattice_connect_spi_to_jtag().
int lattice_ecp5_disconnect_spi_from_jtag | ( | struct lattice_pld_device * | pld_device_info | ) |
Definition at line 253 of file ecp5.c.
References ERROR_FAIL, jtag_add_runtest(), jtag_execute_queue(), lattice_pld_device::tap, and TAP_IDLE.
Referenced by lattice_disconnect_spi_from_jtag().
|
static |
Definition at line 73 of file ecp5.c.
References buffer, ERROR_OK, scan_field::in_value, ISC_ENABLE, jtag_add_dr_scan(), jtag_add_runtest(), jtag_add_sleep(), jtag_execute_queue(), lattice_set_instr(), NULL, scan_field::num_bits, scan_field::out_value, and TAP_IDLE.
Referenced by lattice_ecp5_connect_spi_to_jtag(), and lattice_ecp5_load().
|
static |
Definition at line 91 of file ecp5.c.
References buffer, ERROR_OK, scan_field::in_value, ISC_ERASE, jtag_add_dr_scan(), jtag_add_runtest(), jtag_add_sleep(), jtag_execute_queue(), lattice_set_instr(), NULL, scan_field::num_bits, scan_field::out_value, TAP_IDLE, and TAP_IRPAUSE.
Referenced by lattice_ecp5_connect_spi_to_jtag(), and lattice_ecp5_load().
|
static |
Definition at line 147 of file ecp5.c.
References BYPASS, ERROR_OK, ISC_DISABLE, jtag_add_runtest(), jtag_add_sleep(), jtag_execute_queue(), lattice_set_instr(), and TAP_IDLE.
Referenced by lattice_ecp5_connect_spi_to_jtag(), and lattice_ecp5_load().
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().
|
static |
Definition at line 108 of file ecp5.c.
References buffer, ERROR_OK, scan_field::in_value, jtag_add_dr_scan(), jtag_add_runtest(), jtag_add_sleep(), jtag_execute_queue(), lattice_set_instr(), LSC_INIT_ADDRESS, NULL, scan_field::num_bits, scan_field::out_value, and TAP_IDLE.
Referenced by lattice_ecp5_load().
int lattice_ecp5_load | ( | struct lattice_pld_device * | lattice_device, |
struct lattice_bit_file * | bit_file | ||
) |
Definition at line 162 of file ecp5.c.
References ERROR_FAIL, ERROR_OK, lattice_ecp5_enable_sram_programming(), lattice_ecp5_erase_sram(), lattice_ecp5_exit_programming_mode(), lattice_ecp5_init_address(), lattice_ecp5_program_config_map(), lattice_preload(), lattice_verify_status_register_u32(), STATUS_BUSY_FLAG, STATUS_DONE_BIT, STATUS_ERROR_BITS, STATUS_FAIL_FLAG, STATUS_FEA_OTP, and lattice_pld_device::tap.
Referenced by lattice_load_command().
|
static |
Definition at line 125 of file ecp5.c.
References BYPASS, raw_bit_file::data, ERROR_OK, scan_field::in_value, jtag_add_dr_scan(), jtag_add_runtest(), jtag_add_sleep(), jtag_execute_queue(), lattice_set_instr(), raw_bit_file::length, LSC_BITSTREAM_BURST, NULL, scan_field::num_bits, lattice_bit_file::offset, scan_field::out_value, lattice_bit_file::raw_bit, and TAP_IDLE.
Referenced by lattice_ecp5_load().
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().
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().
int lattice_ecp5_refresh | ( | struct lattice_pld_device * | lattice_device | ) |
Definition at line 280 of file ecp5.c.
References BYPASS, ERROR_FAIL, ERROR_OK, jtag_add_runtest(), jtag_add_sleep(), jtag_execute_queue(), lattice_preload(), lattice_set_instr(), LSC_REFRESH, lattice_pld_device::tap, and TAP_IDLE.
Referenced by COMMAND_HANDLER().
int lattice_ecp5_write_usercode | ( | struct lattice_pld_device * | lattice_device, |
uint32_t | usercode | ||
) |
Definition at line 35 of file ecp5.c.
References buffer, ERROR_FAIL, ERROR_OK, h_u32_to_le(), scan_field::in_value, ISC_DISABLE, ISC_ENABLE, ISC_PROGRAM_USERCODE, jtag_add_dr_scan(), jtag_add_runtest(), jtag_add_sleep(), jtag_execute_queue(), lattice_set_instr(), lattice_verify_usercode(), NULL, scan_field::num_bits, scan_field::out_value, REGISTER_ALL_BITS_1, lattice_pld_device::tap, and TAP_IDLE.
Referenced by lattice_write_usercode().