### Serie (array) of signals

• Defining a serie (array) of signals

• Fact:

• We often use a serie of signals

Examples:

 The address bus consists of 32/64 bits (signals) The data bus consists of 32/64 bits (signals)

• Defining multiple signals:

 ``` Signal signalName[N]; // Unnamed Sig( signalName, N ); // Named (shorthand) Defines the signals: signalName[0], signalName[1], ..., signalName[N-1] ```

Examples:

 ``` Signal x[4]; // Defines: x[0], x[1], x[2], x[3], no display name Sig( x, 4 ); // Defines: x[0], x[1], x[2], x[3], with display name "x" ```

• Using an array of signals

• Ways to use an array of signals

• Each individual signal in an array of signals is identified by an index.

Example:

 ``` Signal x[4]; Individual signals: x[0] x[1] x[2] x[3] Sig( x, 4 ); Individual signals: x[0] x[1] x[2] x[3] ```

An individual signal is used just like any ordinary signal

Example:

 ``` Signal x[4]; Signal out1, out2; And("aa", (x[0],x[1]), out1); And("aa", (x[2],x[3]), out2); ```

• You can pass an entire array as parameter to a (C) function (component)

Example:

 ``` Signal x[4]; Signal out; And("aa", x, out1); // Same as: And("aa", (x[3],x[2],x[1],x[0]), out); ```

Note:

 The order of the signal array is inverted !!!! That's because we often use 0 for the index last (right most) signal