Concatenation on the Left Hand Side of an Assignment 
Author Message
 Concatenation on the Left Hand Side of an Assignment

This was posted for Paul Menchini.  Please direct e-mail to the addresses below.


> I tried to do the following assignment:

>    cout & sum <= a + b + cin;

> It seems that this is considered a syntax error because signal assignments
> can only be made to static signal names.  My question is why isn't a
> concatenation appropriate for the left-hand side of an assignment?  Even
> though it is not a name, its width and type can be determined during
> elaboration.

This is indeed a syntax error, but not for the reason you cite.  In the current
(1987) version of the language, the target of a signal assignment statement may
either be a (static) signal name or an aggregate of (locally static) signal
names.  Not included are concatenations of signal names.  (This paragraph is
also true for variable assignments if you everywhere subsitute "variable" for

Two-and-a-half weeks ago, I presented to the IEEE VASG a case for targets in
the form of concatenations; incredibly (to me ;-), there seems to be
insufficient support to include these in the 1992 version of the language.

> Also, this same problem seems to exist for aliases.  I can't declare an
> alias for a concatenation of two or more signals.

An alias is alternative name for an *object*, while a concatenation is a value.
Thus, aliases can be made only for signals, variables, or constants, or
elements or slices of array objects or fields of record objects.  There are no
plans to change this for 1992.

--Paul J. Menchini
  Principal Scientist
  CLSI Solutions, Inc.

uucp:     ...!uunet!clsi!mench
US Mail:  CLSI Solutions, Inc.
          P.O. Box 13036
          Research Triangle Park, NC  27709-3036
Voice:    919-361-1913
FAX:      919-361-2642

"If an undetectable error occurs, the processor continues as if no error had
occurred." -- IBM S/360 Principles of Operation

"The base type of a type mark is, by definition, the base type of the type or
subtype denoted by the type mark."  -- IEEE Std. 1076-1987

Sat, 25 Dec 1993 22:40:58 GMT  
 [ 1 post ] 

 Relevant Pages 

1. illegal left-hand-side assignment

2. illegal left-hand side error

3. Illegal left-hand-side error.

4. Bit select adressing on left hand side

5. Reusing left side of assignments

6. Scale on right-hand side of ?

7. bidirectional port assignment and concatenation

8. String concatenation and assignments

9. Report cuts off left-hand edge in XP Pro

10. Franz's right vs left hands

11. BUG: Checkbuttons in Windows 98 do not have the left-hand tick

12. Left handed mouse problems


Powered by phpBB® Forum Software