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

<<< Previous CBOLD Reference Home Next >>>

 

7.2.4. Connections to Two-Port Parts

Ports of two-port parts may be connected as discussed above as well as with the ^ operator.

Statements using the ^ operator can be more concise than the equivalent statements using the << operator, especially when making Compound Connections.

The port to which the ^ operator makes a connection depends on the position of the part (left or right) with respect to the ^:

VCC           ^ Pullup;       // connect Pullup's first port to this module's VCC port
Pulldown      ^ GND;          // connect Pulldown's second port to this module's GND port
"MY_NODE"     ^ MyResistor;   // connect MyResistor's first port to the connection named MY_NODE
MyCapacitor   ^ "MY_NODE";    // connect MyCapacitor's second port to the connection named MY_NODE

The following statement is legal, but results in an automatically-named net:

MyCapacitor   ^ MyResistor;               // connect MyCapacitor's second port to MyResistor's first port

To assign a name to the net, use the following form instead:

MyCapacitor   ^ "MY_NODE" ^ MyResistor;   // connect MyCapacitor's second port to MyResistor's first port and name the connection MY_NODE

Port order is determined by the order in which ports are registered. "First port" means the first port registered.

The ^ operator may also be used to make a connection to a single-port part, as long as the single-port part is the right operand.

As a matter of good style, the ^ operator should not be used with polarized parts such as diodes.

 

<<< Previous CBOLD Reference Home Next >>>

Legal Copyright © 2007 by Coolquest, Inc. Contact