OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | lattice_pld_device |
Macros | |
#define | BYPASS 0xFF |
Functions | |
int | lattice_preload (struct lattice_pld_device *lattice_device) |
int | lattice_read_u32_register (struct jtag_tap *tap, uint8_t cmd, uint32_t *in_val, uint32_t out_val, bool do_idle) |
int | lattice_read_u64_register (struct jtag_tap *tap, uint8_t cmd, uint64_t *in_val, uint64_t out_val) |
int | lattice_set_instr (struct jtag_tap *tap, uint8_t new_instr, tap_state_t endstate) |
int | lattice_verify_status_register_u32 (struct lattice_pld_device *lattice_device, uint32_t out, uint32_t expected, uint32_t mask, bool do_idle) |
int | lattice_verify_status_register_u64 (struct lattice_pld_device *lattice_device, uint64_t out, uint64_t expected, uint64_t mask) |
int | lattice_verify_usercode (struct lattice_pld_device *lattice_device, uint32_t out, uint32_t expected, uint32_t mask) |
int lattice_preload | ( | struct lattice_pld_device * | lattice_device | ) |
Definition at line 147 of file lattice.c.
References buffer, DIV_ROUND_UP, ERROR_FAIL, ERROR_OK, scan_field::in_value, jtag_add_dr_scan(), jtag_execute_queue(), lattice_set_instr(), LOG_ERROR, NULL, scan_field::num_bits, scan_field::out_value, PRELOAD, lattice_pld_device::preload_length, lattice_pld_device::tap, and TAP_IDLE.
Referenced by lattice_certus_connect_spi_to_jtag(), lattice_certus_load(), lattice_certus_refresh(), lattice_ecp2_load(), lattice_ecp3_load(), lattice_ecp5_connect_spi_to_jtag(), lattice_ecp5_load(), and lattice_ecp5_refresh().
int lattice_read_u32_register | ( | struct jtag_tap * | tap, |
uint8_t | cmd, | ||
uint32_t * | in_val, | ||
uint32_t | out_val, | ||
bool | do_idle | ||
) |
Definition at line 100 of file lattice.c.
References buffer, cmd, ERROR_OK, h_u32_to_le(), scan_field::in_value, jtag_add_dr_scan(), jtag_add_runtest(), jtag_add_sleep(), jtag_execute_queue(), lattice_set_instr(), le_to_h_u32(), scan_field::num_bits, scan_field::out_value, and TAP_IDLE.
Referenced by lattice_certus_read_usercode(), lattice_ecp2_3_read_status(), lattice_ecp2_3_read_usercode(), lattice_ecp5_read_status(), and lattice_ecp5_read_usercode().
int lattice_read_u64_register | ( | struct jtag_tap * | tap, |
uint8_t | cmd, | ||
uint64_t * | in_val, | ||
uint64_t | out_val | ||
) |
Definition at line 126 of file lattice.c.
References buffer, cmd, ERROR_OK, h_u64_to_le(), scan_field::in_value, jtag_add_dr_scan(), jtag_execute_queue(), lattice_set_instr(), le_to_h_u64(), scan_field::num_bits, scan_field::out_value, and TAP_IDLE.
Referenced by lattice_certus_read_status().
int lattice_set_instr | ( | struct jtag_tap * | tap, |
uint8_t | new_instr, | ||
tap_state_t | endstate | ||
) |
Definition at line 62 of file lattice.c.
References buf_set_u32(), DIV_ROUND_UP, ERROR_FAIL, ERROR_OK, scan_field::in_value, jtag_tap::ir_length, jtag_add_ir_scan(), LOG_ERROR, NULL, scan_field::num_bits, and scan_field::out_value.
Referenced by lattice_certus_connect_spi_to_jtag(), lattice_certus_enable_programming(), lattice_certus_enable_transparent_mode(), lattice_certus_erase_device(), lattice_certus_exit_programming_mode(), lattice_certus_init_address(), lattice_certus_program_config_map(), lattice_certus_refresh(), lattice_ecp2_3_connect_spi_to_jtag(), lattice_ecp2_3_disconnect_spi_from_jtag(), lattice_ecp2_3_erase_device(), lattice_ecp2_3_exit_programming_mode(), lattice_ecp2_3_program_config_map(), lattice_ecp2_3_refresh(), lattice_ecp2_3_write_usercode(), lattice_ecp2_load(), lattice_ecp3_load(), lattice_ecp5_connect_spi_to_jtag(), lattice_ecp5_enable_sram_programming(), lattice_ecp5_erase_sram(), lattice_ecp5_exit_programming_mode(), lattice_ecp5_init_address(), lattice_ecp5_program_config_map(), lattice_ecp5_refresh(), lattice_ecp5_write_usercode(), lattice_preload(), lattice_read_u32_register(), and lattice_read_u64_register().
int lattice_verify_status_register_u32 | ( | struct lattice_pld_device * | lattice_device, |
uint32_t | out, | ||
uint32_t | expected, | ||
uint32_t | mask, | ||
bool | do_idle | ||
) |
Definition at line 241 of file lattice.c.
References ERROR_FAIL, ERROR_OK, jtag_tap::expected, lattice_read_status_u32(), LOG_ERROR, mask, and status.
Referenced by lattice_ecp2_load(), lattice_ecp3_load(), and lattice_ecp5_load().
int lattice_verify_status_register_u64 | ( | struct lattice_pld_device * | lattice_device, |
uint64_t | out, | ||
uint64_t | expected, | ||
uint64_t | mask | ||
) |
Definition at line 257 of file lattice.c.
References ERROR_FAIL, ERROR_OK, jtag_tap::expected, lattice_read_status_u64(), LOG_ERROR, mask, and status.
Referenced by lattice_certus_erase_device(), and lattice_certus_load().
int lattice_verify_usercode | ( | struct lattice_pld_device * | lattice_device, |
uint32_t | out, | ||
uint32_t | expected, | ||
uint32_t | mask | ||
) |
Definition at line 187 of file lattice.c.
References ERROR_FAIL, ERROR_OK, jtag_tap::expected, lattice_read_usercode(), LOG_ERROR, and mask.
Referenced by lattice_ecp2_3_erase_device(), lattice_ecp2_3_write_usercode(), and lattice_ecp5_write_usercode().