diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 5c069f67..6bbb1488 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,8 @@ +2003-08-12 Marcel Telka + + * src/bsdl2jtag.c (endline): Added support for "downto" in bit vectors and "observe_only" (patch 787346, + Brad Parker). + 2003-08-11 Marcel Telka * src/cmd/Makefile.am (libcmd_a_SOURCES): Added include.c. diff --git a/jtag/NEWS b/jtag/NEWS index 279f3f40..ea13d08f 100644 --- a/jtag/NEWS +++ b/jtag/NEWS @@ -22,6 +22,7 @@ jtag-0.5: more info, thanks to Ramses VI). * Fixed invalid memory allocation size (core dump) in jtag_parse_line() function. * Added new 'include' command. + * Added support for "downto" in bit vectors and "observe_only" (patch 787346, Brad Parker). * Minor bugs fixed. jtag-0.4 (2003-05-29): diff --git a/jtag/THANKS b/jtag/THANKS index 26a809cf..71b7f452 100644 --- a/jtag/THANKS +++ b/jtag/THANKS @@ -7,6 +7,7 @@ Chris Ellec Jachym Holecek August Hörandl Stas Khirman +Brad Parker Christian Pellegrin Ramses VI Holger Schurig diff --git a/jtag/src/bsdl2jtag.c b/jtag/src/bsdl2jtag.c index c8e5e73b..6e68f9cc 100644 --- a/jtag/src/bsdl2jtag.c +++ b/jtag/src/bsdl2jtag.c @@ -185,6 +185,9 @@ int endline(void) { if(!strncasecmp(type, "input", 5)) { bs_bits[bit].type=BSBIT_INPUT; } else + if(!strncasecmp(type, "observe_only", 12)) { + bs_bits[bit].type=BSBIT_INPUT; + } else if(!strncasecmp(type, "OUTPUT", 6)) { bs_bits[bit].type=BSBIT_OUTPUT; } else @@ -254,9 +257,14 @@ int endline(void) { pins_num++; sscanf(pline, "%s %s %n\n", pins[pins_num], tmp, &i); if(!strncmp(pline+i, "bit_vector", 10)) { - int f,t; + int f,t,n; strcpy(tmp, pins[pins_num]); - sscanf(pline+i, "bit_vector ( %i to %i )", &f, &t); + n = sscanf(pline+i, "bit_vector ( %i to %i )", &f, &t); + if (n < 2) + n = sscanf(pline+i, "bit_vector ( %i downto %i )", &f, &t); + if (n < 2) { + exit(1); + } while (f<=t) { sprintf(pins[pins_num], "%s%i",tmp,f); f++;