Re: errata/321: Table 29, 4.1.14, 2.5.1(3) , 3.9 -- size of unsized numbers and integer variables

From: Stephen Williams (steve@icarus.com)
Date: Fri Apr 04 2003 - 21:20:02 PST

  • Next message: Steven Sharp: "Re: errata/321: Table 29, 4.1.14, 2.5.1(3) , 3.9 -- size of unsized numbers and integer variables"

    Precedence: bulk

    The following reply was made to PR errata/321; it has been noted by GNATS.

    From: Stephen Williams <steve@icarus.com>
    To: "Brad Pierce" <Brad.Pierce@synopsys.com>
    Cc: etf-bugs@boyd.com
    Subject: Re: errata/321: Table 29, 4.1.14, 2.5.1(3) , 3.9 -- size of unsized numbers and integer variables
    Date: Fri, 04 Apr 2003 21:17:50 -0800

     Brad.Pierce@synopsys.com said:
    > I take this to mean that not only would {'b0, 'b1} and {2{'b0}} be
    > disallowed, so also would be { ~'b0 , ~'b1 } and {2{~('b0')}}.
    > Likewise, not only { 1, -1} and {2{-1}} would be disallowed, but so
    > also would be { 1'b1 + 1 } and {2{1'b1+1}}. Is that interpretation
    > correct?
     
     Ah, you struck on a pet peeve of mine. I've been through the wringer
     on this one, actually; I (Icarus Verilog) catch the cases you are
     pointing out as errors. Some other Verilog compilers, however, accept
     {15+1} as perfectly valid and I've therefore spent a great deal of
     time arguing with various would-be bug reporters over this.
     
     I therefore lobby that the standard explicitly say that operators with
     unsized operands are themselves unsized. I believe that the standard
     does already say as much in the roundabout way you suggest, but I think
     it warrants explicit mention.
     
     Also, we should resist the temptation to define integer variables as
     exactly 32 bits. "At least 32bits" is as it should be, more bits should
     be a legal implementation choice.
     --
     Steve Williams "The woods are lovely, dark and deep.
     steve at icarus.com But I have promises to keep,
     steve at picturel.com and lines to code before I sleep,
     http://www.picturel.com And lines to code before I sleep."
     
     



    This archive was generated by hypermail 2.1.4 : Fri Apr 04 2003 - 21:20:47 PST and
    sponsored by Boyd Technology, Inc.