[sv-bc] RE: Mantis 1523 conditional operator with arrays

From: Arturo Salz <Arturo.Salz@synopsys.com>
Date: Thu Sep 22 2011 - 09:31:22 PDT

On remaining question is should the same casting rules apply to arrays? For example, an array of real vs an array of shortreal/integer.

                Arturo

From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Bresticker, Shalom
Sent: Thursday, September 22, 2011 3:48 AM
To: sv-bc@eda.org
Subject: [sv-bc] RE: Mantis 1523 conditional operator with arrays

By the way, the text in 11.8.1 and 11.8.2 that covers real needs to be extended to shortreal also.

Shalom

From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Bresticker, Shalom
Sent: Thursday, September 22, 2011 1:44 PM
To: sv-bc@eda.org
Subject: [sv-bc] FW: Mantis 1523 conditional operator with arrays

Hi,

I realized that the changes I suggested in my previous mail do not take into consideration that SV has shortreal as well as real. So here is a revised revision:

Change the following wording in the current proposal:

"For integral expressions, if the cond_predicate evaluates to an ambiguous value and the expressions are not logically equivalent, their results shall be combined bit by bit using Table 11-20 to calculate the final result unless either the first or second expression is real, in which case the result shall be 0."

to

"When both the first and second expressions are of integral types, if the cond_predicate evaluates to an ambiguous value and the expressions are not logically equivalent, their results shall be combined bit by bit using Table 11-20 to calculate the final result."

Change the following LRM text:

"The conditional operator can be used with nonintegral types (see 6.11.1) and aggregate expressions (see 11.2.2) using the following rules:
- If both the first expression and second expression are of integral types, the operation proceeds as defined.
- If the first expression or second expression is an integral type and the opposing expression can be implicitly cast to an integral type, the cast is made and proceeds as defined."

to

"The conditional operator can be used with nonintegral types (see 6.11.1) and aggregate expressions (see 11.2.2) using the following rules:
- If both the first expression and second expression are of integral types, the operation proceeds as defined.
- If both expressions are real, then the resulting type is real. If one expression is real and the other expression is shortreal or integral, the other expression is cast to real, and the resulting type is real. If one expression is shortreal and the other expression is integral, the integral expression is cast to shortreal, and the resulting type is shortreal.
- Otherwise, if the first expression or second expression is of an integral type and the other expression can be implicitly cast to an integral type, the cast is made and proceeds as defined above for integral types."

Shalom

From: Rich, Dave [mailto:Dave_Rich@mentor.com]
Sent: Tuesday, September 20, 2011 5:55 PM
To: Bresticker, Shalom; Steven Sharp; sv-bc@eda.org
Subject: RE: Mantis 1523 conditional operator with arrays

Hi Shalom,

We discussed the fact that the behavior of real types was not accurate, nor likely to reach consensus. Further, this mantis item is addressing a different area.

I would really appreciate it if you could come up with wording that would remove your objections. Preferably, we should pass this at the champions committee and make the LRM better, and file another mantis issue to address the existing issues with reals. That is the role of the champion committee.

Dave
---------------------------------------------------------------------
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<http://www.mailscanner.info/>, 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<http://www.mailscanner.info/>, 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<http://www.mailscanner.info/>, 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 Thu Sep 22 09:34:38 2011

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2011 - 09:34:45 PDT