[vhdl-200x-ft] Status of FT10B wrt variable assignments

From: Peter Ashenden <peter_at_.....>
Date: Thu Mar 17 2005 - 01:28:29 PST
Folks,

What is the status FT10B with respect to variable assignment statements?

The proposal document suggests that variable assignment be revised to
specify simple and selected forms, but to omit a conditional form, as this
could be written using a conditional expression on the right-hand side of a
simple assignment.  However, the LRM change section includes a conditional
form of variable assignment.  What is the agreed approach?

I think that, if we include selected variable assignment, we should also
include conditional variable assignment, independent of if expressions.
Otherwise, we will end up with an incomplete parallel between signal and
variable assignments, and that will confuse users.

Consider the allowed forms of sequential signal assignment under the
proposal:

(s1) target <= waveform;

(s2) with expression select
       target <= waveform when choices,
                 waveform when choices,
                 waveform when choices;

(s3) target <= waveform when condition else
               waveform when condition else
               waveform;

(s4) target <= waveform when condition else
               waveform when condition else
               waveform when condition;

If we include selected but not conditional variable assignment, the allowed
forms (assuming if expressions are included) would be:

(v1) target := expression;

(v2) with expression select
       target := expression when choices,
                 expression when choices,
                 expression when choices;

(v3) target := expression if condition,
               expression if condition,
               expression;

Form v1 parallels s1, and v2 parallels s2.

Form v3 is semantically similar to s3, but is syntactically different.
However, the syntax is sufficiently similar to the s3 form that people will
get confused between the two.  ("Do I put a comma or "else" here, and is it
"if" or "when".)

There is no variable assignment form to parallel s4, since the syntax for if
expressions doesn't allow for a final conditional alternative.  (The reason
is to avoid ambiguity - see FT10A, "Further Study".)  This would cause
further irregularity and hence further confusion.

Comments?

Cheers,

PA

--
Dr. Peter J. Ashenden                        peter@ashenden.com.au
Ashenden Designs Pty. Ltd.                   www.ashenden.com.au
PO Box 640                                   Ph:  +61 8 8339 7532
Stirling, SA 5152                            Fax: +61 8 8339 2616
Australia                                    Mobile: +61 414 70 9106
Received on Thu Mar 17 01:28:27 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 17 2005 - 01:28:50 PST