Next: , Up: Connections


6.1 Scalar instance connections

CAST allowed a definition to be connected with fewer port arguments than port parameters, assuming that the trailing ports remain unconnected externally. HAC forbids this error-prone mismatch, and requires one to pass in blanks in place of all unconnected ports, even trailing ports.

For example, given a defproc (define) inv with three bool (node) ports and external nodes x, y, z, The following table shows what declaration connections are legal:

declaration CAST HAC
inv x; valid valid
inv x(); valid invalid
inv x(x, y, z); valid valid
inv x(x, y); valid invalid
inv x(x); valid invalid
inv x(x, , z); valid valid
inv x(x, , ); valid valid
inv x(x, y, ); valid valid

The three invalid HAC examples are invalid because the definition of inv requires exactly three port arguments, where only fewer were given.

The above examples show a declaration with port connection in one statement. HAC allows declarations and port connections to be decoupled, so the following examples would be legal:

     bool i, o;
     inv x;
     x(i, o);
     inv y;
     y(i, );
     y(, o);
     y( , );