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

<<< Previous CBOLD Reference Home Next >>>

 

7.2.8. The wire() Function

The wire() function is less commonly used than the wireall() function:

wire(      OE_N            );  // connect one port named OE_N to this module's OE_N port
wire( VCCINT_TM, "VCCINT"  );  // connect one port named VCCINT to this module's VCCINT_TM port
wire(     "/NC", "NC"      );  // connect one port named NC to the global no-connect net
wire(      VCCO, "VCCO", 2 );  // connect up to two ports named VCCO to this module's VCCO port

The above calls of wire() result in one port (or up to two ports in the last example) of a member module or part (but not bundle) being connected to the specified port of this module or the specified named connection.

A runtime error results if the CBOLD framework cannot find any matches for the specified port name or if the number of matching ports exceeds the third argument of the call (1 if the third argument is omitted).

The calls above could be replaced with equivalent use of the << operator. For example, if this module contains a part named Fifo that has a port named OE_N, the first example above could be replaced with:

OE_N << Fifo.OE_N;

The wire() function is most commonly used in wrapper modules, where it not only saves typing, but also emphasizes the intent of the designer: to make a port of a member module/part accessible as a port of the wrapper module.

The above forms of wire() ignore bundles, though it is legal for the first argument of the call to be a member port of a bundle that is a member of this module.

The next section describes a form of wire() intended for use with bundles.

 

<<< Previous CBOLD Reference Home Next >>>

Legal Copyright © 2007 by Coolquest, Inc. Contact