2008-05-21 Jie Zhang <jie.zhang@analog.com>

[ 1951767 ] bsdl2jtag cannot parse some bsdl files
   * src/bsdl2jtag.c (endline): Prevent `:' from being scanned in.


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1247 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Jie Zhang 17 years ago
parent b62752a299
commit aa42f12480

@ -1,3 +1,8 @@
2008-05-21 Jie Zhang <jie.zhang@analog.com>
[ 1951767 ] bsdl2jtag cannot parse some bsdl files
* src/bsdl2jtag.c (endline): Prevent `:' from being scanned in.
2008-05-21 Jie Zhang <jie.zhang@analog.com>
[ 1968455 ] Enter UPDATE state after register shift

@ -70,13 +70,13 @@ int endline(void) {
i=sscanf(pline, "attribute %s", att);
if(i!=1) return -1;
if(!strncmp(att, "INSTRUCTION_LENGTH", 18)) {
i=sscanf(pline, "attribute INSTRUCTION_LENGTH of %s : entity is %i ;", tmp, &j);
i=sscanf(pline, "attribute INSTRUCTION_LENGTH of %[^:] : entity is %i ;", tmp, &j);
if(i!=2) return -2;
IR_l=j;
mode=0;
} else
if(!strncmp(att, "BOUNDARY_LENGTH", 15)){
i=sscanf(pline, "attribute BOUNDARY_LENGTH of %s : entity is %i ;", tmp, &j);
i=sscanf(pline, "attribute BOUNDARY_LENGTH of %[^:] : entity is %i ;", tmp, &j);
if(i!=2) return -3;
BR_l=j;
bs_bits=malloc(BR_l * sizeof(struct bsbit));
@ -85,19 +85,19 @@ int endline(void) {
mode=0;
} else
if(!strncmp(att, "IDCODE_REGISTER", 15)) {
i=sscanf(pline, "attribute IDCODE_REGISTER of %s : entity is %n", tmp, &j);
i=sscanf(pline, "attribute IDCODE_REGISTER of %[^:] : entity is %n", tmp, &j);
if(i!=1) return -4;
memmove(pline, pline+j, strlen(pline+j)+1);
mode=4;
} else
if(!strncmp(att, "BOUNDARY_REGISTER", 17)) {
i=sscanf(pline, "attribute BOUNDARY_REGISTER of %s : entity is %n", tmp, &j);
i=sscanf(pline, "attribute BOUNDARY_REGISTER of %[^:] : entity is %n", tmp, &j);
if(i!=1) return -5;
memmove(pline, pline+j, strlen(pline+j)+1);
mode=5;
} else
if(!strncmp(att, "INSTRUCTION_OPCODE", 18)) {
i=sscanf(pline, "attribute INSTRUCTION_OPCODE of %s : entity is %n", tmp, &j);
i=sscanf(pline, "attribute INSTRUCTION_OPCODE of %[^:] : entity is %n", tmp, &j);
if(i!=1) return -6;
memmove(pline, pline+j, strlen(pline+j)+1);
mode=6;

Loading…
Cancel
Save