Subject: RE: [sv-ec] Clarifications to the string types
From: Ryan, Ray (Ray_Ryan@mentorg.com)
Date: Fri Feb 27 2004 - 12:00:13 PST
I believe there also needs some clarification as to whether
0 bytes are converted to blanks when an integral type is
assigned to a string variable.
I.E.
bit [4*8:1] ival1 = "d"; // ival = 32'h00000064
string str1 = ival;
At this point what is the value of str ?
32'h00000064
32'h20202064
8'h64
Also, what is the output if the next statement is
$display (" <%s>, <%0s>, <%s>, <%0s>", str, str, ival, ival );
Ray
> -----Original Message-----
> From: owner-sv-ec@server.eda.org
> [mailto:owner-sv-ec@server.eda.org] On Behalf Of Dave Rich
> Sent: Thursday, February 26, 2004 3:41 PM
> To: sv-ec@server.eda.org
> Subject: [sv-ec] Clarifications to the string types
>
>
> The attached clarifications update terminology relating to
> strings to be
> in line with the rest of the document, clarifies the behavior
> of string
> operations to be backward compatible with Verilog-2001.
>
> It also changes the behavior of $bits to be mathematically
> correct and
> return 0 when used on dynamically sized objects, such as
> strings, that
> are currently empty.
>
> --
> --
> David.Rich@Synopsys.com
> Technical Marketing Consultant and/or
> Principal Product Engineer
> http://www.SystemVerilog.org
> tele: 650-584-4026
> cell: 510-589-2625
>
>
>
This archive was generated by hypermail 2b28 : Fri Feb 27 2004 - 12:07:42 PST