Connection Constraints regarding Arrays, Subscripts and Constants

1 Array Dimensionality Matching

The rule that connected connectors must have equivalent type is less strict concerning arrays that are members of connectors. If matching arrays in connected connectors have the same number of elements but different dimensionality, the dimensionality of the array with the lowest number of dimensions is increased by adding one-sized dimensions to the left until both arrays have the same dimensionality.





The connectors
ip and op do not have the same dimensionality, but the connect statement is still correct. This works since the dimensionality of op.signal is increased by one to become op.signal[1] before the connect statement is expanded to conventional equations. One-sized dimensions are added to the left in the list of dimensions, e.g. an array x[2,3] could be converted to x[1,1,2,3].



2 Constant Subscript Constraints

In order to simplify the analysis of connections and making the generation of connection equations possible at compile time, the following constraint applies:
Subscripts in a connector reference must be constant expressions.