Revert some erroneous/unnecessary prefixes (URJ_JIM_RESET -> RESET; URJ_SVF_)

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1558 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Rutger Hofman 16 years ago
parent 1b394b8042
commit 63295937a6

@ -171,7 +171,7 @@ flashbscoach_bus_init (urj_bus_t *bus)
if (urj_tap_state (chain) != URJ_TAP_STATE_RUN_TEST_IDLE)
{
/* silently skip initialization if TAP isn't in RUNTEST/URJ_JIM_IDLE state
/* silently skip initialization if TAP isn't in RUNTEST/IDLE state
this is required to avoid interfering with detect when initbus
is contained in the part description file
URJ_BUS_INIT() will be called latest by URJ_BUS_PREPARE() */

@ -296,7 +296,7 @@ ejtag_bus_init (urj_bus_t *bus)
if (urj_tap_state (bus->chain) != URJ_TAP_STATE_RUN_TEST_IDLE)
{
/* silently skip initialization if TAP isn't in RUNTEST/URJ_JIM_IDLE state
/* silently skip initialization if TAP isn't in RUNTEST/IDLE state
this is required to avoid interfering with detect when initbus
is contained in the part description file
URJ_BUS_INIT() will be called latest by URJ_BUS_PREPARE() */

@ -378,7 +378,7 @@ ejtag_dma_bus_init (urj_bus_t *bus)
if (urj_tap_state (bus->chain) != URJ_TAP_STATE_RUN_TEST_IDLE)
{
/* silently skip initialization if TAP isn't in RUNTEST/URJ_JIM_IDLE state
/* silently skip initialization if TAP isn't in RUNTEST/IDLE state
this is required to avoid interfering with detect when initbus
is contained in the part description file
URJ_BUS_INIT() will be called latest by URJ_BUS_PREPARE() */

@ -446,7 +446,7 @@ jopcyc_bus_init (urj_bus_t *bus)
if (urj_tap_state (chain) != URJ_TAP_STATE_RUN_TEST_IDLE)
{
/* silently skip initialization if TAP isn't in RUNTEST/URJ_JIM_IDLE state
/* silently skip initialization if TAP isn't in RUNTEST/IDLE state
this is required to avoid interfering with detect when initbus
is contained in the part description file
URJ_BUS_INIT() will be called latest by URJ_BUS_PREPARE() */

@ -272,7 +272,7 @@ pxa2xx_bus_init (urj_bus_t *bus)
if (urj_tap_state (chain) != URJ_TAP_STATE_RUN_TEST_IDLE)
{
/* silently skip initialization if TAP isn't in RUNTEST/URJ_JIM_IDLE state
/* silently skip initialization if TAP isn't in RUNTEST/IDLE state
this is required to avoid interfering with detect when initbus
is contained in the part description file
URJ_BUS_INIT() will be called latest by URJ_BUS_PREPARE() */

@ -206,7 +206,7 @@ s3c4510_bus_init (urj_bus_t *bus)
if (urj_tap_state (chain) != URJ_TAP_STATE_RUN_TEST_IDLE)
{
/* silently skip initialization if TAP isn't in RUNTEST/URJ_JIM_IDLE state
/* silently skip initialization if TAP isn't in RUNTEST/IDLE state
this is required to avoid interfering with detect when initbus
is contained in the part description file
URJ_BUS_INIT() will be called latest by URJ_BUS_PREPARE() */

@ -571,7 +571,7 @@ zefant_xs3_bus_init (urj_bus_t *bus)
if (urj_tap_state (chain) != URJ_TAP_STATE_RUN_TEST_IDLE)
{
/* silently skip initialization if TAP isn't in RUNTEST/URJ_JIM_IDLE state
/* silently skip initialization if TAP isn't in RUNTEST/IDLE state
this is required to avoid interfering with detect when initbus
is contained in the part description file
URJ_BUS_INIT() will be called latest by URJ_BUS_PREPARE() */

@ -48,17 +48,17 @@ cmd_part_run (urj_chain_t *chain, char *params[])
urj_part_t *part = urj_tap_chain_active_part (chain);
if (part == NULL)
// retain error state
return 1;
part->alias = malloc (strlen (params[2]) + 1);
part->alias = strdup (params[2]);
if (part->alias == NULL)
{
urj_error_set(URJ_ERROR_OUT_OF_MEMORY, "malloc(%zd) fails",
strlen (params[2]) + 1);
urj_error_set(URJ_ERROR_OUT_OF_MEMORY, "strdup(%s) fails",
params[2]);
return -1;
}
strcpy (part->alias, params[2]);
return 1;
}
}
@ -92,8 +92,6 @@ cmd_part_run (urj_chain_t *chain, char *params[])
}
if (i < chain->parts->len)
n = i;
else
return -1;
}

@ -46,10 +46,16 @@ cmd_peek_run (urj_chain_t *chain, char *params[])
return -1;
if (!urj_bus)
{
printf (_("Error: Bus missing.\n"));
return 1;
}
if (!urj_bus->driver)
{
printf (_("Error: Bus driver missing.\n"));
return 1;
}
do
{
if (urj_cmd_get_number (params[j], &adr))
@ -109,12 +115,16 @@ cmd_poke_run (urj_chain_t *chain, char *params[])
return -1;
if (!urj_bus)
{
printf (_("Error: Bus missing.\n"));
return 1;
}
if (!urj_bus->driver)
{
printf (_("Error: Bus driver missing.\n"));
return 1;
}
URJ_BUS_PREPARE (urj_bus);
while (k < pars)

@ -85,7 +85,7 @@ cmd_pod_help (void)
printf (_("Usage: %s SIGNAL=# [SIGNAL=# ...]\n"
"Set state of POD signal(s) to 0 or 1.\n"
"\n"
"SIGNAL TCK,TMS, TDI, TRST, or URJ_JIM_RESET\n"
"SIGNAL TCK,TMS, TDI, TRST, or RESET\n"
"# 0 or 1\n"), "pod");
}

@ -67,8 +67,8 @@ urj_jim_print_tap_state (char *rof, urj_jim_device_t *dev)
switch (dev->tap_state & 7)
{
case 0:
printf ((dev->tap_state ==
URJ_JIM_RESET) ? "URJ_JIM_RESET" : "URJ_JIM_IDLE");
printf ((dev->tap_state == URJ_JIM_RESET) ? "URJ_JIM_RESET"
: "URJ_JIM_IDLE");
break;
case 1:
printf ("SELECT");

@ -243,10 +243,10 @@ urj_svf_map_state (int state)
switch (state)
{
case URJ_JIM_RESET:
case RESET:
jtag_state = URJ_TAP_STATE_TEST_LOGIC_RESET;
break;
case URJ_JIM_IDLE:
case IDLE:
jtag_state = URJ_TAP_STATE_RUN_TEST_IDLE;
break;
case DRSELECT:
@ -579,15 +579,15 @@ urj_svf_all_care (char **string, double number)
* state : required end state (SVF parser encoding)
* ***************************************************************************/
void
urj_svf_endxr (urj_svf_parser_priv_t *priv,
enum URJ_SVF_generic_irdr_coding ir_dr, int state)
urj_svf_endxr (urj_svf_parser_priv_t *priv, enum generic_irdr_coding ir_dr,
int state)
{
switch (ir_dr)
{
case URJ_SVF_generic_ir:
case generic_ir:
priv->endir = urj_svf_map_state (state);
break;
case URJ_SVF_generic_dr:
case generic_dr:
priv->enddr = urj_svf_map_state (state);
break;
}
@ -626,12 +626,11 @@ urj_svf_frequency (urj_chain_t *chain, double freq)
* 0 : error occurred
* ***************************************************************************/
int
urj_svf_hxr (enum URJ_SVF_generic_irdr_coding ir_dr,
struct ths_params *params)
urj_svf_hxr (enum generic_irdr_coding ir_dr, struct ths_params *params)
{
if (params->number != 0.0)
printf (_("Warning %s: command %s not implemented\n"), "svf",
ir_dr == URJ_SVF_generic_ir ? "HIR" : "HDR");
ir_dr == generic_ir ? "HIR" : "HDR");
return (1);
}
@ -841,13 +840,13 @@ urj_svf_state (urj_chain_t *chain, urj_svf_parser_priv_t *priv,
* ***************************************************************************/
int
urj_svf_sxr (urj_chain_t *chain, urj_svf_parser_priv_t *priv,
enum URJ_SVF_generic_irdr_coding ir_dr,
struct ths_params *params, YYLTYPE *loc)
enum generic_irdr_coding ir_dr, struct ths_params *params,
YYLTYPE *loc)
{
urj_svf_sxr_t *sxr_params;
int len, result = 1;
sxr_params = (ir_dr == URJ_SVF_generic_ir) ?
sxr_params = (ir_dr == generic_ir) ?
&(priv->sir_params) : &(priv->sdr_params);
/* remember parameters */
@ -883,7 +882,7 @@ urj_svf_sxr (urj_chain_t *chain, urj_svf_parser_priv_t *priv,
{
printf (_
("Error %s: first %s command after length change must have a TDI value.\n"),
"svf", ir_dr == URJ_SVF_generic_ir ? "SIR" : "SDR");
"svf", ir_dr == generic_ir ? "SIR" : "SDR");
result = 0;
}
sxr_params->no_tdi = 0;
@ -905,7 +904,7 @@ urj_svf_sxr (urj_chain_t *chain, urj_svf_parser_priv_t *priv,
len = (int) sxr_params->params.number;
switch (ir_dr)
{
case URJ_SVF_generic_ir:
case generic_ir:
/* is SIR large enough? */
if (priv->ir->value->len != len)
{
@ -921,7 +920,7 @@ urj_svf_sxr (urj_chain_t *chain, urj_svf_parser_priv_t *priv,
}
break;
case URJ_SVF_generic_dr:
case generic_dr:
/* check data register SDR */
if (priv->dr->in->len != len)
{
@ -948,16 +947,15 @@ urj_svf_sxr (urj_chain_t *chain, urj_svf_parser_priv_t *priv,
/* fill register with value of TDI parameter */
if (!urj_svf_copy_hex_to_register (sxr_params->params.tdi,
ir_dr ==
URJ_SVF_generic_ir ? priv->ir->
value : priv->dr->in))
ir_dr == generic_ir ? priv->ir->value
: priv->dr->in))
return (0);
/* shift selected instruction/register */
switch (ir_dr)
{
case URJ_SVF_generic_ir:
case generic_ir:
urj_svf_goto_state (chain, URJ_TAP_STATE_SHIFT_IR);
urj_tap_chain_shift_instructions_mode (chain,
sxr_params->params.tdo ? 1 : 0,
@ -971,7 +969,7 @@ urj_svf_sxr (urj_chain_t *chain, urj_svf_parser_priv_t *priv,
loc);
break;
case URJ_SVF_generic_dr:
case generic_dr:
urj_svf_goto_state (chain, URJ_TAP_STATE_SHIFT_DR);
urj_tap_chain_shift_data_registers_mode (chain,
sxr_params->params.
@ -1089,12 +1087,11 @@ urj_svf_trst (urj_chain_t *chain, urj_svf_parser_priv_t *priv, int trst_mode)
* 0 : error occurred
* ***************************************************************************/
int
urj_svf_txr (enum URJ_SVF_generic_irdr_coding ir_dr,
struct ths_params *params)
urj_svf_txr (enum generic_irdr_coding ir_dr, struct ths_params *params)
{
if (params->number != 0.0)
printf (_("Warning %s: command %s not implemented\n"), "svf",
ir_dr == URJ_SVF_generic_ir ? "TIR" : "TDR");
ir_dr == generic_ir ? "TIR" : "TDR");
return (1);
}

@ -30,8 +30,11 @@
#define MAX_PATH_STATES 64
/* Coding for commands referring either to IR or DR */
enum URJ_SVF_generic_irdr_coding
{ URJ_SVF_generic_ir, URJ_SVF_generic_dr };
enum generic_irdr_coding
{
generic_ir,
generic_dr
};
struct tdval
@ -130,16 +133,16 @@ void urj_svf_flex_deinit (void *);
int urj_svf_bison_init (urj_svf_parser_priv_t *, FILE *, int, int);
void urj_svf_bison_deinit (urj_svf_parser_priv_t *);
void urj_svf_endxr (urj_svf_parser_priv_t *, enum URJ_SVF_generic_irdr_coding,
void urj_svf_endxr (urj_svf_parser_priv_t *, enum generic_irdr_coding,
int);
void urj_svf_frequency (urj_chain_t *, double);
int urj_svf_hxr (enum URJ_SVF_generic_irdr_coding, struct ths_params *);
int urj_svf_hxr (enum generic_irdr_coding, struct ths_params *);
int urj_svf_runtest (urj_chain_t *, urj_svf_parser_priv_t *,
struct runtest *);
int urj_svf_state (urj_chain_t *, urj_svf_parser_priv_t *,
struct path_states *, int);
int urj_svf_sxr (urj_chain_t *, urj_svf_parser_priv_t *,
enum URJ_SVF_generic_irdr_coding, struct ths_params *,
enum generic_irdr_coding, struct ths_params *,
struct YYLTYPE *);
int urj_svf_trst (urj_chain_t *, urj_svf_parser_priv_t *, int);
int urj_svf_txr (enum URJ_SVF_generic_irdr_coding, struct ths_params *);
int urj_svf_txr (enum generic_irdr_coding, struct ths_params *);

@ -64,7 +64,7 @@ static void urj_svf_free_ths_params(struct ths_params *);
%token EMPTY
%token ENDDR ENDIR
%token FREQUENCY HZ
%token STATE URJ_JIM_RESET URJ_JIM_IDLE
%token STATE RESET IDLE
%token TDI TDO MASK SMASK
%token TRST ON OFF Z ABSENT
%token HDR HIR SDR SIR TDR TIR
@ -98,12 +98,12 @@ line
svf_statement
: ENDIR stable_state ';'
{
urj_svf_endxr(priv_data, URJ_SVF_generic_ir, $<token>2);
urj_svf_endxr(priv_data, generic_ir, $<token>2);
}
| ENDDR stable_state ';'
{
urj_svf_endxr(priv_data, URJ_SVF_generic_dr, $<token>2);
urj_svf_endxr(priv_data, generic_dr, $<token>2);
}
| FREQUENCY ';'
@ -121,7 +121,7 @@ svf_statement
struct ths_params *p = &(priv_data->parser_params.ths_params);
p->number = $2;
urj_svf_hxr(URJ_SVF_generic_dr, p);
urj_svf_hxr(generic_dr, p);
urj_svf_free_ths_params(p);
}
@ -130,7 +130,7 @@ svf_statement
struct ths_params *p = &(priv_data->parser_params.ths_params);
p->number = $2;
urj_svf_hxr(URJ_SVF_generic_ir, p);
urj_svf_hxr(generic_ir, p);
urj_svf_free_ths_params(p);
}
@ -185,7 +185,7 @@ svf_statement
int result;
p->number = $2;
result = urj_svf_sxr(chain, priv_data, URJ_SVF_generic_dr, p, &@$);
result = urj_svf_sxr(chain, priv_data, generic_dr, p, &@$);
urj_svf_free_ths_params(p);
if (!result) {
@ -200,7 +200,7 @@ svf_statement
int result;
p->number = $2;
result = urj_svf_sxr(chain, priv_data, URJ_SVF_generic_ir, p, &@$);
result = urj_svf_sxr(chain, priv_data, generic_ir, p, &@$);
urj_svf_free_ths_params(p);
if (!result) {
@ -223,7 +223,7 @@ svf_statement
int result;
p->number = $2;
result = urj_svf_txr(URJ_SVF_generic_dr, p);
result = urj_svf_txr(generic_dr, p);
urj_svf_free_ths_params(p);
if (!result) {
@ -238,7 +238,7 @@ svf_statement
int result;
p->number = $2;
result = urj_svf_txr(URJ_SVF_generic_ir, p);
result = urj_svf_txr(generic_ir, p);
urj_svf_free_ths_params(p);
if (!result) {
@ -285,8 +285,8 @@ ths_opt_param
;
stable_state
: URJ_JIM_RESET
| URJ_JIM_IDLE
: RESET
| IDLE
| DRPAUSE
| IRPAUSE
;
@ -364,8 +364,8 @@ all_states
| IRUPDATE
| IRPAUSE
| DRPAUSE
| URJ_JIM_RESET
| URJ_JIM_IDLE
| RESET
| IDLE
;
path_states

@ -239,7 +239,7 @@ static struct rwtable
{ "HDR", HDR },
{ "HIR", HIR },
{ "HZ", HZ },
{ "URJ_JIM_IDLE", URJ_JIM_IDLE },
{ "IDLE", IDLE },
{ "IN", IN },
{ "INOUT", INOUT },
{ "IRCAPTURE", IRCAPTURE },
@ -257,7 +257,7 @@ static struct rwtable
{ "OUT", OUT },
{ "PIO", PIO },
{ "PIOMAP", PIOMAP },
{ "URJ_JIM_RESET", URJ_JIM_RESET },
{ "RESET", RESET },
{ "RUNTEST", RUNTEST },
{ "SCK", SCK },
{ "SDR", SDR },

@ -202,7 +202,7 @@ typedef struct
uint8_t high_byte_value;
uint8_t high_byte_dir;
/* the following variables store the bit position of TRST and URJ_JIM_RESET (SRST)
/* the following variables store the bit position of TRST and RESET (SRST)
for XOR'ing with the default values of low_byte_value and high_byte_value
allowed values:
< 0 : feature not used
@ -1276,7 +1276,7 @@ ft2232_set_signal_schedule (params_t *params, int mask, int val,
low_or |= BITMASK_TDI;
if (sigs & URJ_POD_CS_TMS)
low_or |= BITMASK_TMS;
/* TRST and URJ_JIM_RESET (SRST) are XOR'ed to the default value since
/* TRST and RESET (SRST) are XOR'ed to the default value since
the right value depends on the external circuitry (inverter or not) */
if ((sigs & URJ_POD_CS_TRST) == 0)
if (params->bit_trst >= 0)

Loading…
Cancel
Save