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

From: Geoffrey.Coram <geoffrey.coram_at_.....>
Date: Mon Sep 10 2007 - 06:38:32 PDT
Of course, the "==" operator isn't very reliable for floating-point
numbers: I've seen the C operator fail because a number was stored
in a 64-bit memory location and an 80-bit register and the two
representations differed somewhere after bit 64.

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.

-Geoffrey



Alsop, Thomas R wrote:
> I didn’t see any response to this.  I think Shalom is right.  Tables 
> 11-2 and 11-3 needs to be updated to reflect that the inside operator 
> can be used for real operands.  Not sure how this will need to be worded 
> in the table, but it’s well worded in 11.4.14:
> 
>  
> 
> The *inside *operator uses the equality ( == ) operator on nonintegral 
> expressions to perform the comparison.
> 
> If no match is found, the *inside *operator returns 1'b0. Integral 
> expressions use the wildcard equality
> 
> (==?) operator so that an x or z bit in a value in the set is treated as 
> a do-not-care in that bit position (see
> 
> 11.4.7). As with wildcard equality, an x or z in the expression on the 
> left-hand side of the inside operator is
> 
> not treated as a do-not-care.
> 
>  
> 
> -Tom
> 
>  
> 
> ------------------------------------------------------------------------
> 
> *From:* owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] 
> *On Behalf Of *Bresticker, Shalom
> *Sent:* Monday, September 03, 2007 6:36 AM
> *To:* sv-bc
> *Subject:* [sv-bc] 'inside' on real operands
> 
>  
> 
> Hi,
> 
> Table 11-3 says that the 'inside' set membership operator cannot be used 
> on real operands.
> 
> But 11.4.14 says, "The inside operator uses the equality ( == ) operator 
> on nonintegral expressions to perform the comparison."
> 
> The equality operator is legal for real operands, so why can 'inside' 
> not be used?
> 
> Thanks,
> Shalom

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

This archive was generated by hypermail 2.1.8 : Mon Sep 10 2007 - 06:38:58 PDT