OpenOCD
|
Go to the source code of this file.
Macros | |
#define | ISC_DISABLE 0x1E |
#define | ISC_ENABLE 0x15 |
#define | ISC_ERASE 0x03 |
#define | ISC_PROGRAM_USERCODE 0x1A |
#define | LSCC_BITSTREAM_BURST 0x02 |
#define | LSCC_READ_STATUS 0x53 |
#define | LSCC_REFRESH 0x23 |
#define | LSCC_RESET_ADDRESS 0x21 |
#define | PROGRAM_SPI 0x3A |
#define | READ_USERCODE 0x17 |
#define | REGISTER_ALL_BITS_0 0x00000000 |
#define | REGISTER_ALL_BITS_1 0xffffffff |
#define | STATUS_DONE_BIT 0x00020000 |
#define | STATUS_ERROR_BITS_ECP2 0x00040003 |
#define | STATUS_ERROR_BITS_ECP3 0x00040007 |
int lattice_ecp2_3_connect_spi_to_jtag | ( | struct lattice_pld_device * | pld_device_info | ) |
Definition at line 254 of file ecp2_3.c.
References ERROR_FAIL, ERROR_OK, ISC_DISABLE, ISC_ENABLE, ISC_ERASE, jtag_execute_queue(), lattice_set_instr(), PROGRAM_SPI, lattice_pld_device::tap, and TAP_IDLE.
Referenced by lattice_connect_spi_to_jtag().
int lattice_ecp2_3_disconnect_spi_from_jtag | ( | struct lattice_pld_device * | pld_device_info | ) |
Definition at line 282 of file ecp2_3.c.
References BYPASS, ERROR_FAIL, ERROR_OK, jtag_execute_queue(), lattice_set_instr(), lattice_pld_device::tap, and TAP_IDLE.
Referenced by lattice_disconnect_spi_from_jtag().
|
static |
Definition at line 80 of file ecp2_3.c.
References buffer, ERROR_FAIL, ERROR_OK, lattice_pld_device::family, scan_field::in_value, ISC_ERASE, ISC_PROGRAM_USERCODE, jtag_add_dr_scan(), jtag_add_runtest(), jtag_add_sleep(), LATTICE_ECP2, lattice_set_instr(), lattice_verify_usercode(), LSCC_RESET_ADDRESS, mask, NULL, scan_field::num_bits, scan_field::out_value, REGISTER_ALL_BITS_0, REGISTER_ALL_BITS_1, lattice_pld_device::tap, TAP_IDLE, and TAP_IRPAUSE.
Referenced by lattice_ecp2_load(), and lattice_ecp3_load().
|
static |
Definition at line 153 of file ecp2_3.c.
References BYPASS, ERROR_FAIL, ERROR_OK, ISC_DISABLE, jtag_add_runtest(), jtag_add_sleep(), jtag_execute_queue(), lattice_set_instr(), lattice_pld_device::tap, and TAP_IDLE.
Referenced by lattice_ecp2_load(), and lattice_ecp3_load().
int lattice_ecp2_3_get_facing_read_bits | ( | struct lattice_pld_device * | pld_device_info, |
unsigned int * | facing_read_bits | ||
) |
Definition at line 298 of file ecp2_3.c.
References ERROR_FAIL, and ERROR_OK.
Referenced by lattice_get_stuff_bits().
|
static |
Definition at line 127 of file ecp2_3.c.
References raw_bit_file::data, ERROR_FAIL, 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, LSCC_BITSTREAM_BURST, LSCC_RESET_ADDRESS, NULL, scan_field::num_bits, lattice_bit_file::offset, scan_field::out_value, lattice_bit_file::raw_bit, lattice_pld_device::tap, and TAP_IDLE.
Referenced by lattice_ecp2_load(), and lattice_ecp3_load().
int lattice_ecp2_3_read_status | ( | struct jtag_tap * | tap, |
uint32_t * | status, | ||
uint32_t | out, | ||
bool | do_idle | ||
) |
Definition at line 32 of file ecp2_3.c.
References lattice_read_u32_register(), LSCC_READ_STATUS, and status.
Referenced by lattice_read_status_u32().
int lattice_ecp2_3_read_usercode | ( | struct jtag_tap * | tap, |
uint32_t * | usercode, | ||
uint32_t | out | ||
) |
Definition at line 37 of file ecp2_3.c.
References lattice_read_u32_register(), and READ_USERCODE.
Referenced by lattice_read_usercode().
int lattice_ecp2_3_refresh | ( | struct lattice_pld_device * | lattice_device | ) |
Definition at line 308 of file ecp2_3.c.
References ERROR_FAIL, ERROR_OK, jtag_execute_queue(), lattice_set_instr(), LSCC_REFRESH, lattice_pld_device::tap, and TAP_IDLE.
Referenced by COMMAND_HANDLER().
int lattice_ecp2_3_write_usercode | ( | struct lattice_pld_device * | lattice_device, |
uint32_t | usercode | ||
) |
Definition at line 42 of file ecp2_3.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().
int lattice_ecp2_load | ( | struct lattice_pld_device * | lattice_device, |
struct lattice_bit_file * | bit_file | ||
) |
Definition at line 172 of file ecp2_3.c.
References ERROR_FAIL, ERROR_OK, jtag_tap::expected, ISC_ENABLE, jtag_add_runtest(), jtag_add_sleep(), lattice_ecp2_3_erase_device(), lattice_ecp2_3_exit_programming_mode(), lattice_ecp2_3_program_config_map(), lattice_preload(), lattice_set_instr(), lattice_verify_status_register_u32(), LSCC_REFRESH, mask, REGISTER_ALL_BITS_1, STATUS_DONE_BIT, STATUS_ERROR_BITS_ECP2, lattice_pld_device::tap, and TAP_IDLE.
Referenced by lattice_load_command().
int lattice_ecp3_load | ( | struct lattice_pld_device * | lattice_device, |
struct lattice_bit_file * | bit_file | ||
) |
Definition at line 212 of file ecp2_3.c.
References ERROR_FAIL, ERROR_OK, jtag_tap::expected, ISC_ENABLE, jtag_add_runtest(), jtag_add_sleep(), lattice_ecp2_3_erase_device(), lattice_ecp2_3_exit_programming_mode(), lattice_ecp2_3_program_config_map(), lattice_preload(), lattice_set_instr(), lattice_verify_status_register_u32(), LSCC_REFRESH, mask, REGISTER_ALL_BITS_1, STATUS_DONE_BIT, STATUS_ERROR_BITS_ECP3, lattice_pld_device::tap, and TAP_IDLE.
Referenced by lattice_load_command().