diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 64135dfd..89f123ad 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,5 +1,8 @@ 2009-03-08 Arnim Laeuger + * src/svf/svf.c, src/svf/svf_bison.y, src/svf/svf.h: + [ 2666261 ] Add pass/fail report to SVF player + * src/svf/svf.c: avoid double free for SIR/SDR parameter strings in case of a consistency check error diff --git a/jtag/src/svf/svf.c b/jtag/src/svf/svf.c index 7137846d..44c7ad38 100644 --- a/jtag/src/svf/svf.c +++ b/jtag/src/svf/svf.c @@ -387,7 +387,7 @@ svf_build_bit_string(char *hex_string, int len) * * Return value: * 1 : all ok - * 0 : error occured + * 0 : error occurred */ static int svf_copy_hex_to_register(char *hex_string, tap_register *reg) @@ -422,7 +422,7 @@ svf_copy_hex_to_register(char *hex_string, tap_register *reg) * * Return value: * 1 : tdo matches reg at all positions where mask is '1' - * 0 : tdo and reg do not match or error occured + * 0 : tdo and reg do not match or error occurred */ static int svf_compare_tdo(parser_priv_t *priv, char *tdo, char *mask, tap_register *reg, YYLTYPE *loc) @@ -511,7 +511,7 @@ svf_remember_param(char **rem, char *new) * * Return value: * 1 : all ok - * 0 : error occured + * 0 : error occurred */ static int svf_all_care(char **string, double number) @@ -592,7 +592,7 @@ svf_frequency(chain_t *chain, double freq) * * Return value: * 1 : all ok - * 0 : error occured + * 0 : error occurred * ***************************************************************************/ int svf_hxr(enum generic_irdr_coding ir_dr, struct ths_params *params) @@ -622,7 +622,7 @@ static void sigalrm_handler(int signal) * * Return value: * 1 : all ok - * 0 : error occured + * 0 : error occurred * ***************************************************************************/ int svf_runtest(chain_t *chain, parser_priv_t *priv, struct runtest *params) @@ -747,7 +747,7 @@ svf_runtest(chain_t *chain, parser_priv_t *priv, struct runtest *params) * * Return value: * 1 : all ok - * 0 : error occured + * 0 : error occurred * ***************************************************************************/ int svf_state(chain_t *chain, parser_priv_t *priv, struct path_states *path_states, @@ -778,7 +778,7 @@ svf_state(chain_t *chain, parser_priv_t *priv, struct path_states *path_states, * * Return value: * 1 : all ok - * 0 : error occured + * 0 : error occurred * ***************************************************************************/ int svf_sxr(chain_t *chain, parser_priv_t *priv, enum generic_irdr_coding ir_dr, @@ -911,6 +911,10 @@ svf_sxr(chain_t *chain, parser_priv_t *priv, enum generic_irdr_coding ir_dr, break; } + /* log mismatches */ + if (result == 0) + priv->mismatch_occurred = 1; + return(result); } @@ -930,7 +934,7 @@ svf_sxr(chain_t *chain, parser_priv_t *priv, enum generic_irdr_coding ir_dr, * * Return value: * 1 : all ok - * 0 : error occured + * 0 : error occurred * ***************************************************************************/ int svf_trst(chain_t *chain, parser_priv_t *priv, int trst_mode) @@ -998,7 +1002,7 @@ svf_trst(chain_t *chain, parser_priv_t *priv, int trst_mode) * * Return value: * 1 : all ok - * 0 : error occured + * 0 : error occurred * ***************************************************************************/ int svf_txr(enum generic_irdr_coding ir_dr, struct ths_params *params) @@ -1031,7 +1035,7 @@ svf_txr(enum generic_irdr_coding ir_dr, struct ths_params *params) * * Return value: * 1 : all ok - * 0 : error occured + * 0 : error occurred * ***************************************************************************/ void svf_run(chain_t *chain, FILE *SVF_FILE, int stop_on_mismatch, int print_progress, @@ -1132,6 +1136,8 @@ svf_run(chain_t *chain, FILE *SVF_FILE, int stop_on_mismatch, int print_progress priv.svf_trst_absent = 0; priv.svf_state_executed = 0; + priv.mismatch_occurred = 0; + /* set back flags for issued warnings */ priv.issued_runtest_maxtime = 0; @@ -1145,6 +1151,13 @@ svf_run(chain_t *chain, FILE *SVF_FILE, int stop_on_mismatch, int print_progress svf_bison_deinit(&priv); } + if (print_progress) { + if (priv.mismatch_occurred > 0) + printf( _("Mismatches occurred between scanned device output and expected TDO values.\n") ); + else + printf( _("Scanned device output matched expected TDO values.\n") ); + } + /* clean up */ /* SIR */ if (priv.sir_params.params.tdi) diff --git a/jtag/src/svf/svf.h b/jtag/src/svf/svf.h index cdd926c0..65103e9a 100644 --- a/jtag/src/svf/svf.h +++ b/jtag/src/svf/svf.h @@ -98,6 +98,7 @@ struct parser_priv { int svf_trst_absent; int svf_state_executed; uint32_t ref_freq; + int mismatch_occurred; /* protocol issued warnings */ int issued_runtest_maxtime; }; diff --git a/jtag/src/svf/svf_bison.y b/jtag/src/svf/svf_bison.y index cf8b1b79..a729eff4 100644 --- a/jtag/src/svf/svf_bison.y +++ b/jtag/src/svf/svf_bison.y @@ -411,7 +411,7 @@ direction void yyerror(YYLTYPE *locp, parser_priv_t *priv_data, chain_t *chain, const char *error_string) { - printf("Error occured for SVF command %s.\n", error_string); + printf("Error occurred for SVF command %s.\n", error_string); }