OpenOCD
xsvf.c File Reference
Include dependency graph for xsvf.c:

Go to the source code of this file.

Macros

#define LCOUNT   0x19
 
#define LDELAY   0x1A
 
#define LSDR   0x1B
 
#define XCOMMENT   0x16
 
#define XCOMPLETE   0x00
 
#define XENDDR   0x14
 
#define XENDIR   0x13
 
#define XREPEAT   0x07
 
#define XRUNTEST   0x04
 
#define XSDR   0x03
 
#define XSDRB   0x0C
 
#define XSDRC   0x0D
 
#define XSDRE   0x0E
 
#define XSDRINC   0x0B
 
#define XSDRSIZE   0x08
 
#define XSDRTDO   0x09
 
#define XSDRTDOB   0x0F
 
#define XSDRTDOC   0x10
 
#define XSDRTDOE   0x11
 
#define XSETSDRMASKS   0x0A
 
#define XSIR   0x02
 
#define XSIR2   0x15
 
#define XSTATE   0x12
 
#define XSTATE_MAX_PATH   12
 
#define XSV_DRCAPTURE   0x03
 
#define XSV_DREXIT1   0x05
 
#define XSV_DREXIT2   0x07
 
#define XSV_DRPAUSE   0x06
 
#define XSV_DRSELECT   0x02
 
#define XSV_DRSHIFT   0x04
 
#define XSV_DRUPDATE   0x08
 
#define XSV_IDLE   0x01
 
#define XSV_IRCAPTURE   0x0A
 
#define XSV_IREXIT1   0x0C
 
#define XSV_IREXIT2   0x0E
 
#define XSV_IRPAUSE   0x0D
 
#define XSV_IRSELECT   0x09
 
#define XSV_IRSHIFT   0x0B
 
#define XSV_IRUPDATE   0x0F
 
#define XSV_RESET   0x00
 
#define XTDOMASK   0x01
 
#define XTRST   0x1C
 
#define XTRST_ABSENT   3
 
#define XTRST_OFF   1
 
#define XTRST_ON   0
 
#define XTRST_Z   2
 
#define XWAIT   0x17
 
#define XWAITSTATE   0x18
 

Functions

 COMMAND_HANDLER (handle_xsvf_command)
 
static int xsvf_read_buffer (int num_bits, int fd, uint8_t *buf)
 
int xsvf_register_commands (struct command_context *cmd_ctx)
 
static tap_state_t xsvf_to_tap (int xsvf_state)
 

Variables

static const struct command_registration xsvf_command_handlers []
 
static int xsvf_fd
 

Macro Definition Documentation

◆ LCOUNT

#define LCOUNT   0x19

Definition at line 81 of file xsvf.c.

◆ LDELAY

#define LDELAY   0x1A

Definition at line 82 of file xsvf.c.

◆ LSDR

#define LSDR   0x1B

Definition at line 83 of file xsvf.c.

◆ XCOMMENT

#define XCOMMENT   0x16

Definition at line 56 of file xsvf.c.

◆ XCOMPLETE

#define XCOMPLETE   0x00

Definition at line 36 of file xsvf.c.

◆ XENDDR

#define XENDDR   0x14

Definition at line 54 of file xsvf.c.

◆ XENDIR

#define XENDIR   0x13

Definition at line 53 of file xsvf.c.

◆ XREPEAT

#define XREPEAT   0x07

Definition at line 41 of file xsvf.c.

◆ XRUNTEST

#define XRUNTEST   0x04

Definition at line 40 of file xsvf.c.

◆ XSDR

#define XSDR   0x03

Definition at line 39 of file xsvf.c.

◆ XSDRB

#define XSDRB   0x0C

Definition at line 46 of file xsvf.c.

◆ XSDRC

#define XSDRC   0x0D

Definition at line 47 of file xsvf.c.

◆ XSDRE

#define XSDRE   0x0E

Definition at line 48 of file xsvf.c.

◆ XSDRINC

#define XSDRINC   0x0B

Definition at line 45 of file xsvf.c.

◆ XSDRSIZE

#define XSDRSIZE   0x08

Definition at line 42 of file xsvf.c.

◆ XSDRTDO

#define XSDRTDO   0x09

Definition at line 43 of file xsvf.c.

◆ XSDRTDOB

#define XSDRTDOB   0x0F

Definition at line 49 of file xsvf.c.

◆ XSDRTDOC

#define XSDRTDOC   0x10

Definition at line 50 of file xsvf.c.

◆ XSDRTDOE

#define XSDRTDOE   0x11

Definition at line 51 of file xsvf.c.

◆ XSETSDRMASKS

#define XSETSDRMASKS   0x0A

Definition at line 44 of file xsvf.c.

◆ XSIR

#define XSIR   0x02

Definition at line 38 of file xsvf.c.

◆ XSIR2

#define XSIR2   0x15

Definition at line 55 of file xsvf.c.

◆ XSTATE

#define XSTATE   0x12

Definition at line 52 of file xsvf.c.

◆ XSTATE_MAX_PATH

#define XSTATE_MAX_PATH   12

Definition at line 110 of file xsvf.c.

◆ XSV_DRCAPTURE

#define XSV_DRCAPTURE   0x03

Definition at line 90 of file xsvf.c.

◆ XSV_DREXIT1

#define XSV_DREXIT1   0x05

Definition at line 92 of file xsvf.c.

◆ XSV_DREXIT2

#define XSV_DREXIT2   0x07

Definition at line 94 of file xsvf.c.

◆ XSV_DRPAUSE

#define XSV_DRPAUSE   0x06

Definition at line 93 of file xsvf.c.

◆ XSV_DRSELECT

#define XSV_DRSELECT   0x02

Definition at line 89 of file xsvf.c.

◆ XSV_DRSHIFT

#define XSV_DRSHIFT   0x04

Definition at line 91 of file xsvf.c.

◆ XSV_DRUPDATE

#define XSV_DRUPDATE   0x08

Definition at line 95 of file xsvf.c.

◆ XSV_IDLE

#define XSV_IDLE   0x01

Definition at line 88 of file xsvf.c.

◆ XSV_IRCAPTURE

#define XSV_IRCAPTURE   0x0A

Definition at line 97 of file xsvf.c.

◆ XSV_IREXIT1

#define XSV_IREXIT1   0x0C

Definition at line 99 of file xsvf.c.

◆ XSV_IREXIT2

#define XSV_IREXIT2   0x0E

Definition at line 101 of file xsvf.c.

◆ XSV_IRPAUSE

#define XSV_IRPAUSE   0x0D

Definition at line 100 of file xsvf.c.

◆ XSV_IRSELECT

#define XSV_IRSELECT   0x09

Definition at line 96 of file xsvf.c.

◆ XSV_IRSHIFT

#define XSV_IRSHIFT   0x0B

Definition at line 98 of file xsvf.c.

◆ XSV_IRUPDATE

#define XSV_IRUPDATE   0x0F

Definition at line 102 of file xsvf.c.

◆ XSV_RESET

#define XSV_RESET   0x00

Definition at line 87 of file xsvf.c.

◆ XTDOMASK

#define XTDOMASK   0x01

Definition at line 37 of file xsvf.c.

◆ XTRST

#define XTRST   0x1C

Definition at line 84 of file xsvf.c.

◆ XTRST_ABSENT

#define XTRST_ABSENT   3

Definition at line 108 of file xsvf.c.

◆ XTRST_OFF

#define XTRST_OFF   1

Definition at line 106 of file xsvf.c.

◆ XTRST_ON

#define XTRST_ON   0

Definition at line 105 of file xsvf.c.

◆ XTRST_Z

#define XTRST_Z   2

Definition at line 107 of file xsvf.c.

◆ XWAIT

#define XWAIT   0x17

Definition at line 57 of file xsvf.c.

◆ XWAITSTATE

#define XWAITSTATE   0x18

Definition at line 64 of file xsvf.c.

Function Documentation

◆ COMMAND_HANDLER()

◆ xsvf_read_buffer()

static int xsvf_read_buffer ( int  num_bits,
int  fd,
uint8_t *  buf 
)
static

Definition at line 176 of file xsvf.c.

References ERROR_OK, and ERROR_XSVF_EOF.

Referenced by COMMAND_HANDLER().

◆ xsvf_register_commands()

int xsvf_register_commands ( struct command_context cmd_ctx)

Definition at line 1042 of file xsvf.c.

References NULL, register_commands(), and xsvf_command_handlers.

Referenced by jtag_select().

◆ xsvf_to_tap()

Variable Documentation

◆ xsvf_command_handlers

const struct command_registration xsvf_command_handlers[]
static
Initial value:
= {
{
.name = "xsvf",
.handler = handle_xsvf_command,
.mode = COMMAND_EXEC,
.help = "Runs a XSVF file. If 'virt2' is given, xruntest "
"counts are interpreted as TCK cycles rather than "
"as microseconds. Without the 'quiet' option, all "
"comments, retries, and mismatches will be reported.",
.usage = "(tapname|'plain') filename ['virt2'] ['quiet']",
},
}
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:253
@ COMMAND_EXEC
Definition: command.h:40

Definition at line 189 of file xsvf.c.

Referenced by xsvf_register_commands().

◆ xsvf_fd

int xsvf_fd
static

Definition at line 112 of file xsvf.c.

Referenced by COMMAND_HANDLER().