Subject: RE: Summary of PSL Reserved Words and Operators
From: Erich Marschner (erichm@cadence.com)
Date: Wed Sep 10 2003 - 17:20:49 PDT
Richard, Steve,
Let me point out that there are several varieties of conjunction in PSL, and that having different operators (such as &&, &) can help improve readability rather than cause confusion.
The following operations exist in PSL statements:
'and' -- the VHDL Boolean conjunction operator
'and' -- the PSL operator used for conjunction of properties (overloading the Boolean 'and')
&& -- the PSL operator used for length-matching conjunction of sequences
& -- the PSL operator used for non-length-matching conjunction of sequences
Since a property is similar to a function that returns a Boolean value, it makes sense to use the same 'and' for Booleans and for properties.
It is conceivable that 'and' could also be used for conjunction of sequences - as in {{a;b} and {c;d}}. But it is clear that we cannot use the same operator for both length-matching conjunction (both sequences must be of the same length) AND non-length-matching conjunction (both sequences start at the same time, but they can be of different lengths). So at least one of these will need to be something other than 'and'.
Operators & and && visually imply 'and', and their similarity to each other (and joint difference from 'and') reflects the fact that both operations are conjunction of sequences rather than boolean/property values. The && form suggests symmetry (two &s) and therefore length-matching; the simpler form & does not have the length-matching implication.
In practice, the ability to distinguish between conjunction of Booleans/properties vs. conjunction of sequences tends to improve readability of PSL statements. For example, consider this:
{{a and b} and {c and d}}
{{{a} and {b}} and {c and d}}
Only the braces indicate which 'and' is Boolean conjunction and which is sequence conjunction. In contrast, consider this:
{{a and b} && {c and d}}
{{{a} && {b}} & {c and d}}
The Boolean conjunctions stand out now, and the sequence conjunctions (both types) are easily identified by the operators.
Regards,
Erich
-------------------------------------------
Erich Marschner, Cadence Design Systems
Senior Architect, Advanced Verification
Phone: +1 410 750 6995 Email: erichm@cadence.com
Vmail: +1 410 872 4369 Email: erichm@comcast.net
-----Original Message-----
From: WallaceRiM@aol.com [mailto:WallaceRiM@aol.com]
Sent: Tuesday, September 09, 2003 7:02 AM
To: vhdl-200x-asr@eda.org
Subject: Re: Summary of PSL Reserved Words and Operators
Steve,
Overloading of "&", "+", "*" for PSL.
Users of the language would have no problem using "+" or "*" correctly. I do think that the "&" operator may be a problematic operator, not because of the overloading but, due to the length matching semantics on cycles versus the user's inclination to see it as an AND of resultant Booleans and not sequences. This observation echoes your own below with a different focus on how the operator may be confused by the user.
Cheers,
Richard
In a message dated 9/8/2003 3:23:44 PM Mountain Daylight Time, SBailey@model.com writes:
Subj: RE: Summary of PSL Reserved Words and Operators
Date: 9/8/2003 3:23:44 PM Mountain Daylight Time
From: SBailey@model.com
To: vhdl-200x-asr@eda.org
Thanks Richard for your comments. They provide additional information for my initial tables.
In reviewing Richard's comments, I find that I need to clarify some of the original comments I had made. Specifically, the comments about consistency/confusion in the use of &, + and * operators between traditional VHDL meaning and the new meanings added in a PSL context. My concern with these operators are related to the potential confusion in the user's mind and not in the ability to unambiguously parse them. For the latter, I agree with Richard's comments that the parsing aspect should not be a difficult problem to solve. However, for the former, I remain concerned about the application of the same operator symbol to different contexts with the "&" operator being more problematic than "+" or "*" as the PSL meaning is not really analogous to the existing VHDL meaning.
-Steve Bailey
-----Original Message-----
From: owner-vhdl-200x-asr@eda.org [mailto:owner-vhdl-200x-asr@eda.org]On Behalf Of WallaceRiM@aol.com
Sent: Sunday, September 07, 2003 10:03 AM
To: vhdl-200x-asr@eda.org
Subject: Re: Summary of PSL Reserved Words and Operators
Hi all,
Here are my comments for the PSL reserved words and operators.
Cheers,
Richard Wallace
This archive was generated by hypermail 2b28 : Wed Sep 10 2003 - 17:21:52 PDT