In SV, the number BNF is unsigned. A sign is added as a unary plus or minus operator that precedes the number.
Note that the seed of the digital $random must be a variable.
Shalom
> -----Original Message-----
> From: owner-verilog-ams@eda.org [mailto:owner-verilog-ams@eda.org] On
> Behalf Of Dave Miller
> Sent: Wednesday, May 23, 2012 22:46
> To: Paul Floyd
> Cc: verilog-ams@eda-stds.org
> Subject: Re: $arandom/$rdist_ seeds
>
> Hi Paul, well yes it should allow them.
> But the issue is a lot deeper than that.
>
> In LRM 2.2 we had the definition:
> decimal_number ::=
> [ sign ] unsigned_num
>
> But in 2.3 we changed that to:
> decimal_number ::=
> unsigned_number
> | [ size ] decimal_base unsigned_number
> | [ size ] decimal_base x_digit { _ }
> | [ size ] decimal_base z_digit { _ }
>
> It looks like we inherited it blindly from digital.
>
> If I look at Digital 1364 1995 it is defined as
> decimal_number ::=
> [ sign ] unsigned_number
> | [ size ] decimal_base unsigned_number
>
> But 1364-2001 (and hence SV 1800)
> decimal_number ::=
> unsigned_number
> | [ size ] decimal_base unsigned_number
> | [ size ] decimal_base x_digit { _ }
> | [ size ] decimal_base z_digit { _ }
>
> So is this a bug in digital? In 1800-2009, If I look at the rule for
> primary
> (one of the basic building blocks for an expression) it uses
> primary_literal,
> which uses number, which uses decimal_number. But that doesn't allow
> signed
> values? So we can't have -ve numbers anymore?
>
> Dave
>
> On 05/23/2012 12:11 PM, Paul Floyd wrote:
> > Hi
> >
> > The seeds for these system functions can be "decimal_number". The
> EBNF for that is
> >
> > decimal_number ::=
> > unsigned_number
> > | [ size ] decimal_base unsigned_number
> > | [ size ] decimal_base x_digit { _ }
> > | [ size ] decimal_base z_digit { _ }
> >
> > I can't see how negative numbers are allowed. Shouldn't that
> possibility be
> >
> > "[sign]decimal_number"?
> >
> > Regards
> > Paul
>
> --
> ==============================================
> -- David Miller
> -- Design Technology (Austin)
> -- Freescale Semiconductor
> -- Ph : 512 996-7377 Fax: x7755
> ==============================================
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed May 23 12:54:39 2012
This archive was generated by hypermail 2.1.8 : Wed May 23 2012 - 12:54:39 PDT