properly support COMPLIANCE_PATTERNS -> fix for [ 1896382 ]

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1058 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Arnim Läuger 17 years ago
parent 13e049d101
commit 2d235f584d

@ -1,3 +1,9 @@
2008-02-19 Arnim Laeuger <arniml@users.sourceforge.net>
* 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 <arniml@users.sourceforge.net>
* src/bsdl/bsdl.c, src/bsdl/bsdl_flex.l, src/bsdl/bsdl_bison.y,

@ -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 *);

@ -191,7 +191,7 @@ void yyerror(parser_priv_t *, const char *);
%type <str> QUOTED_STRING
%type <str> BINARY_PATTERN
%type <str> Binary_Pattern
%type <str> Pattern_List
%type <str> Binary_Pattern_List
%type <integer> DECIMAL_NUMBER
%type <str> REAL_NUMBER
%type <integer> 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);

@ -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); }
<REG>{Boundary} {return(BOUNDARY); }
<REG>{Bypass} {return(BYPASS); }
<REG>{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;
}

Loading…
Cancel
Save