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

Go to the source code of this file.

Data Structures

struct  pld_device
 
struct  pld_driver
 
struct  pld_ipdbg_hub
 

Macros

#define __PLD_CREATE_COMMAND(name)    COMMAND_HELPER(name, struct pld_device *pld)
 
#define ERROR_PLD_DEVICE_INVALID   (-1000)
 
#define ERROR_PLD_FILE_LOAD_FAILED   (-1001)
 
#define PLD_CREATE_COMMAND_HANDLER(name)    static __PLD_CREATE_COMMAND(name)
 

Functions

struct pld_deviceget_pld_device_by_name (const char *name)
 
struct pld_deviceget_pld_device_by_name_or_numstr (const char *str)
 
struct pld_deviceget_pld_device_by_num (int num)
 
int pld_connect_spi_to_jtag (struct pld_device *pld_device)
 
int pld_disconnect_spi_from_jtag (struct pld_device *pld_device)
 
int pld_get_jtagspi_stuff_bits (struct pld_device *pld_device, unsigned int *facing_read_bits, unsigned int *trailing_write_bits)
 
int pld_get_jtagspi_userircode (struct pld_device *pld_device, unsigned int *ir)
 
int pld_has_jtagspi_instruction (struct pld_device *device, bool *has_instruction)
 
int pld_register_commands (struct command_context *cmd_ctx)
 

Variables

struct pld_driver efinix_pld
 
struct pld_driver gatemate_pld
 
struct pld_driver gowin_pld
 
struct pld_driver intel_pld
 
struct pld_driver lattice_pld
 
struct pld_driver virtex2_pld
 

Macro Definition Documentation

◆ __PLD_CREATE_COMMAND

#define __PLD_CREATE_COMMAND (   name)     COMMAND_HELPER(name, struct pld_device *pld)

Definition at line 15 of file pld.h.

◆ ERROR_PLD_DEVICE_INVALID

#define ERROR_PLD_DEVICE_INVALID   (-1000)

Definition at line 61 of file pld.h.

◆ ERROR_PLD_FILE_LOAD_FAILED

#define ERROR_PLD_FILE_LOAD_FAILED   (-1001)

Definition at line 62 of file pld.h.

◆ PLD_CREATE_COMMAND_HANDLER

#define PLD_CREATE_COMMAND_HANDLER (   name)     static __PLD_CREATE_COMMAND(name)

Definition at line 45 of file pld.h.

Function Documentation

◆ get_pld_device_by_name()

struct pld_device* get_pld_device_by_name ( const char *  name)

Definition at line 46 of file pld.c.

References name, pld_device::next, NULL, and pld_devices.

Referenced by COMMAND_HANDLER(), and get_pld_device_by_name_or_numstr().

◆ get_pld_device_by_name_or_numstr()

struct pld_device* get_pld_device_by_name_or_numstr ( const char *  str)

Definition at line 56 of file pld.c.

References get_pld_device_by_name(), get_pld_device_by_num(), LOG_ERROR, and NULL.

Referenced by COMMAND_HANDLER(), and FLASH_BANK_COMMAND_HANDLER().

◆ get_pld_device_by_num()

struct pld_device* get_pld_device_by_num ( int  num)

Definition at line 31 of file pld.c.

References LOG_WARNING, pld_device::name, pld_device::next, NULL, and pld_devices.

Referenced by get_pld_device_by_name_or_numstr().

◆ pld_connect_spi_to_jtag()

int pld_connect_spi_to_jtag ( struct pld_device pld_device)

Definition at line 127 of file pld.c.

References pld_driver::connect_spi_to_jtag, pld_device::driver, ERROR_FAIL, and LOG_ERROR.

Referenced by jtagspi_cmd().

◆ pld_disconnect_spi_from_jtag()

int pld_disconnect_spi_from_jtag ( struct pld_device pld_device)

Definition at line 144 of file pld.c.

References pld_driver::disconnect_spi_from_jtag, pld_device::driver, ERROR_FAIL, and LOG_ERROR.

Referenced by jtagspi_cmd().

◆ pld_get_jtagspi_stuff_bits()

int pld_get_jtagspi_stuff_bits ( struct pld_device pld_device,
unsigned int *  facing_read_bits,
unsigned int *  trailing_write_bits 
)

Definition at line 109 of file pld.c.

References pld_device::driver, ERROR_FAIL, ERROR_OK, pld_driver::get_stuff_bits, and LOG_ERROR.

Referenced by jtagspi_cmd().

◆ pld_get_jtagspi_userircode()

int pld_get_jtagspi_userircode ( struct pld_device pld_device,
unsigned int *  ir 
)

◆ pld_has_jtagspi_instruction()

int pld_has_jtagspi_instruction ( struct pld_device device,
bool *  has_instruction 
)

◆ pld_register_commands()

int pld_register_commands ( struct command_context cmd_ctx)

Definition at line 368 of file pld.c.

References NULL, pld_command_handler, and register_commands().

Referenced by setup_command_handler().

Variable Documentation

◆ efinix_pld

struct pld_driver efinix_pld
extern

Definition at line 258 of file efinix.c.

◆ gatemate_pld

struct pld_driver gatemate_pld
extern

Definition at line 274 of file gatemate.c.

◆ gowin_pld

struct pld_driver gowin_pld
extern

Definition at line 566 of file gowin.c.

◆ intel_pld

struct pld_driver intel_pld
extern

Definition at line 421 of file intel.c.

◆ lattice_pld

struct pld_driver lattice_pld
extern

Definition at line 578 of file lattice.c.

◆ virtex2_pld

struct pld_driver virtex2_pld
extern

Definition at line 400 of file virtex2.c.