RE: [sv-ac] RE: comments on 3525

From: Eduard Cerny <Eduard.Cerny@synopsys.com>
Date: Thu Jun 28 2012 - 08:46:12 PDT

Yes, I think simulators use if - else w/o ";", but since it is a statement like case-endcase, the question of ";" is as valid as in the case of "case".
ed

From: Ben Cohen [mailto:hdlcohen@gmail.com]
Sent: Thursday, June 28, 2012 11:43 AM
To: Eduard Cerny
Cc: Dana Fisman Ofek; John Havlicek; sv-ac@eda.org
Subject: Re: [sv-ac] RE: comments on 3525

A simulator I tried accepts if(b) p1 else p2
and rejects if (b) p1; else p2;
Also, I tried it with p1 or p2 being a named property or a property expression (e.g., a |=> b // without the ";")
Ben
On Thu, Jun 28, 2012 at 8:31 AM, Eduard Cerny <Eduard.Cerny@synopsys.com<mailto:Eduard.Cerny@synopsys.com>> wrote:
But we are still left with if-else. Should it be as

if (b) p1; else p2;

or as
if(b) p1 else p2

?
Thanks
ed

From: owner-sv-ac@eda.org<mailto:owner-sv-ac@eda.org> [mailto:owner-sv-ac@eda.org<mailto:owner-sv-ac@eda.org>] On Behalf Of Dana Fisman Ofek
Sent: Thursday, June 28, 2012 11:26 AM
To: John Havlicek; sv-ac@eda.org<mailto:sv-ac@eda.org>
Subject: [sv-ac] RE: comments on 3525

Hi John,

If we just add the semicolon in the property_case_item as follows

property_case_item::=

           expression_or_dist { , expression_or_dist } : property_expr ;
           | default [ : ] property_expr

wouldn't we enjoy both? (I.e. the first example below would be legal as you want it to and weird stuff like
 a ##1 b; or c; until d will be illegal).

Best,
Dana

From: owner-sv-ac@eda.org<mailto:owner-sv-ac@eda.org> [mailto:owner-sv-ac@eda.org<mailto:owner-sv-ac@eda.org>] On Behalf Of John Havlicek
Sent: Thursday, June 28, 2012 10:51 AM
To: sv-ac@eda.org<mailto:sv-ac@eda.org>
Subject: [sv-ac] comments on 3525

Hi Folks:

I've looked quickly over Mantis 3525.

I think I understand the concern. When we created the current two-level syntax (property_expr and property_statement), we were trying to allow the user to write "if ... else" and "case" properties in a way that would look like procedural code. So, for example, we wanted to enable (and in some cases enforce) writing ";" to terminate a case item, and this would enable a property case to look like

   property foo;
      case (sel)
         a1: p1;
         a2: p2;
         default: p;
      endcase
   endproperty

From my understanding of 3525, this will now be illegal, both because of the missing ";" between "endcase" and "endproperty" and also because of the ";"s appearing after "p1", "p2", and "p". So in 3525 syntax, this would be rewritten as

   property foo;
      case (sel)
         a1: p1
         a2: p2
         default: p
      endcase;
   endproperty

My naïve conjecture is that everything legal in 3525 is already currently legal, but a lot of stuff that is currently legal becomes illegal in 3525. I realize that the cyclic syntax is very liberal and that a lot of the stuff that is legal now and that becomes illegal in 3525 is strange looking (like inserting ";" willy-nilly in property expressions, or gratuitously after "endcase", etc.). But there is also some not-so-strange looking stuff (like the first example above) that becomes illegal in 3525.

Can we find a better balance?

John Havlicek
johnh@cadence.com<mailto:johnh@cadence.com>
Received on Thu, 28 Jun 2012 15:46:12 +0000

This archive was generated by hypermail 2.1.8 : Thu Jun 28 2012 - 08:46:20 PDT