39 int num_words, uint32_t *words)
46 values = malloc(num_words * 4);
52 for (i = 0; i < num_words; i++)
66 uint8_t *in = (uint8_t *)arg;
71 int num_words, uint32_t *words)
101 data[0] = 0xaa995566;
102 data[1] = 0x2800E001;
103 data[2] = 0x20000000;
104 data[3] = 0x20000000;
105 data[4] = 0x20000000;
138 for (i = 0; i < bit_file.
length; i++)
210 pld->driver_priv = virtex2_info;
219 .handler = virtex2_handle_read_stat_command,
220 .help =
"read status register",
229 .help =
"Virtex-II specific commands",
239 .pld_device_command = &virtex2_pld_device_command,
static const struct device_t * device
uint32_t flip_u32(uint32_t value, unsigned int num)
static uint32_t buf_get_u32(const uint8_t *_buffer, unsigned first, unsigned num)
Retrieves num bits from _buffer, starting at the first bit, returning the bits in a 32-bit word.
static void buf_set_u32(uint8_t *_buffer, unsigned first, unsigned num, uint32_t value)
Sets num bits in _buffer, starting at the first bit, using the bits in value.
void command_print(struct command_invocation *cmd, const char *format,...)
#define CMD
Use this macro to access the command being handled, rather than accessing the variable directly.
#define CMD_ARGV
Use this macro to access the arguments for the command being handled, rather than accessing the varia...
#define ERROR_COMMAND_SYNTAX_ERROR
#define CMD_ARGC
Use this macro to access the number of arguments for the command being handled, rather than accessing...
#define COMMAND_PARSE_NUMBER(type, in, out)
parses the string in into out as a type, or prints a command error and passes the error code to the c...
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
struct jtag_tap * jtag_tap_by_string(const char *s)
int jtag_execute_queue(void)
For software FIFO implementations, the queued commands can be executed during this call or earlier.
void jtag_add_tlr(void)
Run a TAP_RESET reset where the end state is TAP_RESET, regardless of the start state.
void jtag_add_sleep(uint32_t us)
void jtag_add_ir_scan(struct jtag_tap *active, struct scan_field *in_fields, tap_state_t state)
Generate an IR SCAN with a list of scan fields with one entry for each enabled TAP.
void jtag_add_runtest(int num_cycles, tap_state_t state)
Goes to TAP_IDLE (if we're not already there), cycle precisely num_cycles in the TAP_IDLE state,...
void jtag_add_dr_scan(struct jtag_tap *active, int in_num_fields, const struct scan_field *in_fields, tap_state_t state)
Generate a DR SCAN using the fields passed to the function.
void jtag_add_callback(jtag_callback1_t f, jtag_callback_data_t data0)
A simpler version of jtag_add_callback4().
intptr_t jtag_callback_data_t
Defines the type of data passed to the jtag_callback_t interface.
#define LOG_DEBUG(expr ...)
struct pld_device * get_pld_device_by_num(int num)
uint8_t * cur_instr
current instruction
int ir_length
size of instruction register
This structure defines a single scan field in the scan.
int num_bits
The number of bits this field specifies.
uint8_t * in_value
A pointer to a 32-bit memory location for data scanned out.
const uint8_t * out_value
A pointer to value to be scanned into the device.
#define DIV_ROUND_UP(m, n)
Rounds m up to the nearest multiple of n using division.
static uint32_t le_to_h_u32(const uint8_t *buf)
static int virtex2_send_32(struct pld_device *pld_device, int num_words, uint32_t *words)
static int virtex2_read_stat(struct pld_device *pld_device, uint32_t *status)
static const struct command_registration virtex2_command_handler[]
static int virtex2_set_instr(struct jtag_tap *tap, uint32_t new_instr)
COMMAND_HANDLER(virtex2_handle_read_stat_command)
PLD_DEVICE_COMMAND_HANDLER(virtex2_pld_device_command)
static int virtex2_load(struct pld_device *pld_device, const char *filename)
static int virtex2_receive_32(struct pld_device *pld_device, int num_words, uint32_t *words)
struct pld_driver virtex2_pld
static void virtexflip32(jtag_callback_data_t arg)
static const struct command_registration virtex2_exec_command_handlers[]
void xilinx_free_bit_file(struct xilinx_bit_file *bit_file)
int xilinx_read_bit_file(struct xilinx_bit_file *bit_file, const char *filename)