RE: [sv-bc] 'inside' on real operands

From: Stuart Sutherland <stuart_at_.....>
Date: Mon Sep 10 2007 - 08:47:57 PDT
Would using reals with the inside operator be useful for Verilog-AMS?  If
not, I agree with prohibiting reals as operands of inside.  If the
Verilog-AMS committee sees this as useful, then we should define the
behavior and any caveats.

Stu
~~~~~~~~~~~~~~~~~~~~~~~~~
Stuart Sutherland
Sutherland HDL, Inc.
stuart@sutherland-hdl.com
503-692-0898
 

> -----Original Message-----
> From: owner-sv-bc@server.eda.org 
> [mailto:owner-sv-bc@server.eda.org] On Behalf Of Jonathan Bromley
> Sent: Monday, September 10, 2007 7:04 AM
> To: Geoffrey.Coram; Alsop, Thomas R
> Cc: Bresticker, Shalom; sv-bc
> Subject: RE: [sv-bc] 'inside' on real operands
> 
> > A "user beware" note in the LRM might be appropriate, but I agree
> > that users should be able to use inside for reals if they want.
> 
> Whilst this makes sense from a language design point of view,
> I think it's very dangerous.  The obvious intuitive interpretation
> of "inside" for reals is "somewhere within this real range". 
> When combined with the fact that wildcard comparison makes no
> sense for reals, and the fragility of == on reals, I think the
> balance should be in favour of prohibiting reals as operands
> of 'inside' if the right-hand operand is considered to be 
> a countable set of values.  Furthermore, if we preserve the
> present meaning of 'inside' whereby its RHS specifies a set
> of values, then a real range such as [1.0:2.0] makes no sense.
> 
> I completely agree with Steven Sharp that the following
> would be both reasonable and (very) useful...
> 
>   R inside {[1.0:2.0], [3.0:4.5]}
> 
> and I think that's what users would expect to be able to
> do - but that makes a specification of a set with an 
> uncountable number of members; and it suggests that 
> putting anything *except* such ranges on the RHS of 
> an 'inside' with real LHS would need to be specified to
> be erroneous.
> -- 
> Jonathan Bromley, Consultant
> 
> DOULOS - Developing Design Know-how
> VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services
> 
> Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, 
> Hampshire, BH24 1AW, UK
> Tel: +44 (0)1425 471223                   Email: 
> jonathan.bromley@doulos.com
> Fax: +44 (0)1425 471573                           Web: 
> http://www.doulos.com
> 
> The contents of this message may contain personal views which 
> are not the views of Doulos Ltd., unless specifically stated.
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> 
> 
> 



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Sep 10 08:48:24 2007

This archive was generated by hypermail 2.1.8 : Mon Sep 10 2007 - 08:48:37 PDT