> Is that straightforward? It sounds like the right approach. The patch is tested OK with Altera CPLD. Test output: > svf simple.svf svf processing file: "simple.svf" "FREQUENCY 9000000.00 HZ" 9000 kHz "TRST ABSENT" "ENDDR IDLE" "ENDIR IRPAUSE" "STATE IDLE" "SIR 10 TDI ( 2C C ) " "( 2C C )" comment: parsed OK, svf_copy_hexstring_to_binary will handle the spaces "RUNTEST IDLE 18003 TCK ENDSTATE IDLE" "SIR 10 TDI (203) " "(203)" comment: original format is OK "RUNTEST 93 TCK"
> The usual solution for preprocessors is to replace all sequences > of whitespace (including CR, LF, TAB, space, maybe more) with one > single space. I haven't fixed this problem. And it will not be much difficult to fix it. I can't test it on all CPLD/FPGAs, so just wait for BUG reporters. SVF specification doesn't definitely demonstrate about this. > If the $SUBJECT patch is omitted, what problem crops up? Errors will occur saying that no taps is enabled, but svf command runs OK when connect to telnet 4444 port. See attached log.txt. 2010/1/24 David Brownell <davi...@pacbell.net> > On Sunday 24 January 2010, simon qian wrote: > > Yes, you are right. > > Not all spaces should be removed here. > > > > Actually, svf_parser_parse_cmd_string should be modified to make every > think > > between '(' and ')' one parameter. > > Is that straightforward? It sounds like the right approach. > > > > Another problem: > > Should '\n' and '\r' be replaced with space? > > The usual solution for preprocessors is to replace all sequences > of whitespace (including CR, LF, TAB, space, maybe more) with one > single space. > > > > Current parser will omit '\n' and '\r', but in case there is no space at > the > > end of line and at the start of next line. > > See example below: > > PIOMAP(IN STROBE > > IN ALE); > > This will be parsed as "PIOMAP (IN STROBEIN ALE) ". > > Not healthy. :( > > If the $SUBJECT patch is omitted, what problem crops up? > > - Dave > > > > > 2010/1/24 David Brownell <davi...@pacbell.net> > > > > > On Saturday 23 January 2010, simon qian wrote: > > > > > > > > "TDI( 1234 )" should be OK. > > > > "TDI( 1 2 3 4 )" could even be parsed. > > > > > > But (eventually) > > > > > > PIOMAP (IN STROBE > > > IN ALE > > > OUT DISABLE > > > OUT ENABLE > > > OUT CLEAR > > > IN SET); > > > > > > is going to require the spaces, right? (Example cut/paste > > > from the SVF spec.) So dropping spaces is odd... > > > > > > I see that svf_copy_hexstring_to_binary() already has some > > > code to skip spaces ... isn't that behaving? > > > > > > > > > I looked at the SVF spec and it's kind of weak in terms of > > > basic lexical issues like where spaces are allowed or not. > > > Agreed that allowing whitespace in long hex strings makes > > > a lot of sense, especially if some tools generate them > > > (so there's a "de facto" requirement to allow them). > > > > > > - Dave > > > > > > > > > > > > -- > > Best Regards, SimonQian > > http://www.SimonQian.com <http://www.simonqian.com/> > > > > > -- Best Regards, SimonQian http://www.SimonQian.com
Info : Versaloon(0x14)by Simon(compiled on Jan 14 2010) Info : buffer size for USB is 12288 bytes Info : Target runs at 3100 mV Info : VSLLink_20080905 by Simon(compiled on Jan 14 2010) Info : vsllink run in NORMAL mode Info : VSLLink JTAG Interface ready Info : RCLK (adaptive clock speed) Warn : There are no enabled taps. AUTO PROBING MIGHT NOT WORK!! Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -expected-id 0x020a10dd ..." Warn : AUTO auto0.tap - use "... -irlen 2" Error: IR capture error at bit 2, saw 0x3FFFFFFFFFFFFD55 not 0x...3 Info : JTAG tap: auto0.tap tap/device found: 0x020a10dd (mfg: 0x06e, part: 0x20a1, ver: 0x0) Error: IR capture error at bit 2, saw 0x05 not 0x...3 Command handler execution failed Warn : jtag initialization failed; try 'jtag init' again. Warn : gdb services need one or more targets defined Info : accepting 'telnet' connection from 0 svf processing file: "simple.svf" "FREQUENCY 9000000.00 HZ" 9000 kHz "TRST ABSENT" "ENDDR IDLE" "ENDIR IRPAUSE" "STATE IDLE" "SIR 10 TDI ( 2C C ) " "( 2C C )" "RUNTEST IDLE 18003 TCK ENDSTATE IDLE" "SIR 10 TDI (203) " "(203)" "RUNTEST 93 TCK" "SDR 13 TDI (0089) " "(0089)" "SIR 10 TDI (205) " "(205)" "RUNTEST 93 TCK" "SDR 16 TDI (FFFF) TDO (8232) MASK (FFFF) " "(FFFF)" "(8232)" "(FFFF)" "SDR 16 TDI (FFFF) TDO (2AA2) " "(FFFF)" "(2AA2)" "SDR 16 TDI (FFFF) TDO (4A82) " "(FFFF)" "(4A82)" "SDR 16 TDI (FFFF) TDO (0C2C) " "(FFFF)" "(0C2C)" "SDR 16 TDI (FFFF) TDO (0000) " "(FFFF)" "(0000)" "SIR 10 TDI (203) " "(203)" "RUNTEST 93 TCK" "SDR 13 TDI (0011) " "(0011)" "SIR 10 TDI (2F2) " "(2F2)" "RUNTEST 9000003 TCK" "SIR 10 TDI (203) " "(203)" "RUNTEST 93 TCK" "SDR 13 TDI (0001) " "(0001)" "SIR 10 TDI (2F2) " "(2F2)" "RUNTEST 9000003 TCK" "SIR 10 TDI (203) " "(203)" "RUNTEST 93 TCK" "SDR 13 TDI (0000) " "(0000)" "SIR 10 TDI (2F2) " "(2F2)" "RUNTEST 9000003 TCK" "STATE IDLE" 5188 ms used svf file programmed successfully for 33 commands Info : dropped 'telnet' connection - error -400
svf_all_content_between()_is_one_parameter.patch
Description: Binary data
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development