Coolquest, Inc. Home Products Support About Contact
cbold_logo_gif C++BOLD Reference Manual cbold_logo_gif

<<< Previous CBOLD Reference Home Next >>>

 

7.2.2. Named Connections

In the preceding examples, the designer did not specify names for connections. This is not only legal, but also typical of most connections at deeper levels of the hierarchy. There is no need to name most connections, because user-assigned names at higher levels of the hierarchy will override user-assigned names at deeper levels.

There are cases when a user-assigned name is desirable, either for convenience or because the connection is confined to some low level of a hierarchy. In these cases, the user can specify the name of a connection using a string literal:

"FEEDBACK"  << Amp.OUT1;          // create a named subbus called FEEDBACK, connect Amp's OUT1 port to it
"FEEDBACK"  << Amp.IN1_N;         // connect Amp's IN1_N port to the existing FEEDBACK subbus
"/NC"       << Amp.OUT2;          // connect Amp's unused OUT2 port to the global no-connect net
"DATA"      << Ram.D;             // create a 32-bit wide subbus named DATA, connect Ram's D port to it
"DATA"      << Flash.D;           // legal only if Flash.D is 32 bits wide, else runtime error

If the designer had connected Amp.OUT1 to Amp.IN1_N without naming the connection, the connection would have been assigned an automatic name, such as SB__017. Such automatically assigned names are overridden by any user-assigned names.

As illustrated by the DATA connections, a named connection has a range that is the same as the first port range added to the connection, and all subsequent port ranges added to the connection must match the width of the existing connection.

 

<<< Previous CBOLD Reference Home Next >>>

Legal Copyright © 2007 by Coolquest, Inc. Contact