Assignments may also be made to vectors of signals. When a value is assigned to a concatenation of boolean variables, or to a binary variable, the following rules apply:
For example,
[x,y] := [1,1,0];is equivalent to
x := 1; y := 0;
That is, the leftmost (high order) bit is dropped to make the vectors the same length.
On the other hand
[x,y] := 1;is equivalent to
x := 0; y := 1;since the integer is coerced to a vector, and then truncated to length 2.
The assignment
[x,y,z] := [1,0];is equivalent to
x := 0; y := 1; z := 0;since the vector on the right-hand-side is zero-extended.
Important note: A concatenation of signals may not be assigned a nondeterministic value. It is legal to assign a nondeterministic value to an array signal, however. Thus, for example:
[x,y] := {2,3};
is not legal, but
x : binary 1..0; x := {2,3};is acceptable. This restriction is made to guarantee that that the values of signals may always be chosen independently.