Subject: Re: [sv-bc] Specs for atoi(), atohex(), ...,atoreal(), itoa(), ...?
From: Rishiyur S. Nikhil (nikhil@bluespec.com)
Date: Tue Feb 10 2004 - 10:35:17 PST
Arturo, ok, thanks, I will suggest some text to clarify this.
(I'm doing a detailed review of Chapter 3, which I hope
to post to sv-bc later today.)
Nikhil
Arturo Salz wrote:
> Nikhil,
>
> The intent of the atoi() -like methods is to parse the string in the
> corresponding radix, and also allowing for Verilog's "_" as an
> arbitrary separator. They were not intended to parse width, tick,
> or base specification. I believe another method that converts a
> string from an arbitrary radix, which is selected by parsing the
> optional tick...base, would be useful.
>
> Similarly, the itoa()-like methods are only intended to produce the
> ASCII straight-forward representation, not the full Verilog syntax.
> I believe that is clear.
>
> Arturo
>
> ----- Original Message -----
> From: "Rishiyur S. Nikhil" <nikhil@bluespec.com>
> To: "Sv-Bc" <sv-bc@eda.org>
> Sent: Tuesday, February 10, 2004 9:38 AM
> Subject: [sv-bc] Specs for atoi(), atohex(), ...,atoreal(), itoa(), ...?
>
>
> The string methods in Sections 3.7.9 thru 3.7.15, i.e., the 'atoi()'-like
> methods and the 'itoa()' like methods seem underspecified.
>
> In the 'atoi()'-like methods (atoi, atohex, atooct, atobin, atoreal),
> should they be specified to parse the full Verilog integer and real
> constant syntax?
>
> (I don't think we can appeal to the C standard for atoi() because
> C's numeric constants have different syntax from Verilog's).
>
> Similarly, do the 'itoa()'-like methods produce a full Verilog-syntax
> integer constant (including the width, tick, base, ....)?
>
> Nikhil
>
>
>
This archive was generated by hypermail 2b28 : Tue Feb 10 2004 - 10:42:00 PST