From: Clifford E. Cummings (cliffc@sunburst-design.com)
Date: Wed Feb 09 2005 - 18:20:51 PST
Thanks to Steve and Neil for looking at this.
Comments below.
At 04:22 PM 2/9/2005, Steven Sharp wrote:
> >Attached is a uuencoded tar-file with escape-test-code and the outputs from
> >VCS 7.2 and ModelSim 6.0
> >
> >Hopefully the uuencoding will preserve all the interesting characters.
>
>My uudecode won't decode something containing a NUL character, so I
>can't read your file.
An if I embed the characters, they will probably disappear. Can you use
winzip to read the files to a PC?
> >The octal-13 character was also different (line feed or ^M), as were a few
> >other of the obscure-variety characters.
>
>Were you on a PC? This might be a classic carriage-return/linefeed
>versus linefeed issue.
I was on a PC when I ran the example.
> >I don't know if I agree that we should match Verilog-XL if we think it is
> >doing something wrong. Seems like we cleaned up a couple of Verilog-XL-isms
> >for IEEE Verilog-1995 and if we think printing a space when a
> >null-character was requested is wrong, I am inclined to say so.
>
>And do you have any real argument that this is wrong?
Not really. I just thought that printing a null character was the same as
printing a non-existent character, but I don't do a lot of work with null
characters so my opinion is probably not important :-)
>Note that NUL characters tend to mess up any application written in C.
>And if you tried to specify that NUL characters be printed out,
>simulators with I/O libraries written in C might start truncating
>outputs in a variety of unexpected ways. Have you ever tried printing
>out NUL characters using %c in the middle of a complex format? NC can
>do it, but I don't think most other simulators can.
We must be some-type-of geeks to spend this much time running simulations
and C-programs to enhance our knowledge of NUL characters. :-) :-)
I think I won't share these experiments and results with my wife and
daughters! :-)
> > I have not
> >tried this with C yet. Any takers?
>
>You can't print out an embedded NUL with %s in C, because a NUL will
>terminate the string.
>
>
> >I must admit that I would never base a Verilog-simulator-buying decision on
> >this, but we should probably clean it up.
>
>The current specification in the LRM is lacking, and should be clarified.
>This assumes that we can agree on what to specify. What XL does makes
>reasonable sense, and is the de facto standard. I don't see a reason to
>specify anything else.
If everyone or near-everyone agrees, I see no reason to oppose.
>Steven Sharp
>sharp@cadence.com
Regards - Cliff
----------------------------------------------------
Cliff Cummings - Sunburst Design, Inc.
14314 SW Allen Blvd., PMB 501, Beaverton, OR 97005
Phone: 503-641-8446 / FAX: 503-641-8486
cliffc@sunburst-design.com / www.sunburst-design.com
Expert Verilog, SystemVerilog, Synthesis and Verification Training
This archive was generated by hypermail 2.1.4
: Wed Feb 09 2005 - 18:05:59 PST
and
sponsored by Boyd Technology, Inc.