diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 5fe03bc6..f49e72d2 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,9 @@ +2008-02-19 Arnim Laeuger + + * src/bsdl/bsdl_flex.l (bsdl_flex_set_bin_x), src/bsdl/bsdl.h, + src/bsdl/bsdl_bison.y (Init_Text): properly support COMPLIANCE_PATTERNS + -> fix for [ 1896382 ] + 2008-02-18 Arnim Laeuger * src/bsdl/bsdl.c, src/bsdl/bsdl_flex.l, src/bsdl/bsdl_bison.y, diff --git a/jtag/src/bsdl/bsdl.h b/jtag/src/bsdl/bsdl.h index ab04f630..3e24037a 100644 --- a/jtag/src/bsdl/bsdl.h +++ b/jtag/src/bsdl/bsdl.h @@ -144,6 +144,7 @@ void bsdl_flex_switch_buffer(void *, const char *); int bsdl_flex_get_compile_errors(void *); int bsdl_flex_postinc_compile_errors(void *); int bsdl_flex_get_lineno(void *); +void bsdl_flex_set_bin_x(void *); /* BSDL parser declarations */ parser_priv_t *bsdl_parser_init(FILE *); diff --git a/jtag/src/bsdl/bsdl_bison.y b/jtag/src/bsdl/bsdl_bison.y index a7d944ce..bb691063 100644 --- a/jtag/src/bsdl/bsdl_bison.y +++ b/jtag/src/bsdl/bsdl_bison.y @@ -191,7 +191,7 @@ void yyerror(parser_priv_t *, const char *); %type QUOTED_STRING %type BINARY_PATTERN %type Binary_Pattern -%type Pattern_List +%type Binary_Pattern_List %type DECIMAL_NUMBER %type REAL_NUMBER %type Cell_Function @@ -515,6 +515,8 @@ Physical_Pin_List: Physical_Pin ; Physical_Pin : IDENTIFIER { free($1); } + | IDENTIFIER LPAREN DECIMAL_NUMBER RPAREN + { free($1); } | DECIMAL_NUMBER ; VHDL_Tap_Signals : VHDL_Tap_Signal @@ -574,12 +576,12 @@ BSDL_Opcode_Table: Opcode_Desc BUMP_ERROR; YYABORT; } ; -Opcode_Desc : IDENTIFIER LPAREN Pattern_List RPAREN +Opcode_Desc : IDENTIFIER LPAREN Binary_Pattern_List RPAREN { bsdl_add_instruction(priv_data, $1, $3); } ; -Pattern_List : Binary_Pattern +Binary_Pattern_List : Binary_Pattern { $$ = $1; } - | Pattern_List COMMA Binary_Pattern + | Binary_Pattern_List COMMA Binary_Pattern { Print_Warning(priv_data, _("Multiple opcode patterns are not supported, first pattern will be used")); @@ -870,10 +872,15 @@ VHDL_Compliance_Patterns: ATTRIBUTE COMPLIANCE_PATTERNS OF IDENTIFIER BSDL_Compliance_Pattern { free($4); } ; -BSDL_Compliance_Pattern: LPAREN Physical_Pin_List RPAREN - LPAREN BIN_X_PATTERN RPAREN - { free($5); } +BSDL_Compliance_Pattern : LPAREN Physical_Pin_List RPAREN + {bsdl_flex_set_bin_x(priv_data->scanner);} + LPAREN Bin_X_Pattern_List RPAREN ; +Bin_X_Pattern_List : BIN_X_PATTERN + { free($1); } + | Bin_X_Pattern_List COMMA BIN_X_PATTERN + { free($3); } + ; Quoted_String : QUOTED_STRING {Init_Text(priv_data); Store_Text(priv_data, $1); diff --git a/jtag/src/bsdl/bsdl_flex.l b/jtag/src/bsdl/bsdl_flex.l index 137d9b18..b25932cf 100644 --- a/jtag/src/bsdl/bsdl_flex.l +++ b/jtag/src/bsdl/bsdl_flex.l @@ -338,7 +338,7 @@ Compliance_Patterns COMPLIANCE_PATTERNS {Runbist_Execution} {return(RUNBIST_EXECUTION); } {Intest_Execution} {return(INTEST_EXECUTION); } {Bsdl_Extension} {return(BSDL_EXTENSION); } -{Compliance_Patterns} {yyextra->Base = BIN_X; return(COMPLIANCE_PATTERNS); } +{Compliance_Patterns} {yyextra->Base = DECIMAL; return(COMPLIANCE_PATTERNS); } {Boundary} {return(BOUNDARY); } {Bypass} {return(BYPASS); } {Highz} {return(HIGHZ); } @@ -564,3 +564,9 @@ int bsdl_flex_get_lineno(yyscan_t scanner) { return yyget_lineno(scanner); } + +void bsdl_flex_set_bin_x(yyscan_t scanner) +{ + scan_extra_t *extra = yyget_extra(scanner); + extra->Base = BIN_X; +}