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

<<< Previous CBOLD Reference Home Next >>>


2.4. Fundamentals

2.4.1. CBOLD Definitions

CBOLD defines several classes, functions, and operators. The ones used most commonly are shown in the table below.

TPart The base class that represents an electronic component such as an integrated circuit.
TModule The base class that represents a group of electronic components. A TModule is similar to the page of a schematic.
TPort The base class that allows connections to a TPart or a TModule. A TPort has one or more pins. When a TPort is a member of a TPart, the pins represent physical pins of the part. When a TPort is a member of a TModule, the pins do not physically exist, but they provide a means of making connections to the TModule's members.
TBundle The base class that holds groups of TPort's and/or TBundle's. TBundle's can greatly increase the order of a design, but their use is optional.
TPortRange The class that allows access to a range of pins within a port. Such a range is called a port range. TPortRange is largely transparent to the user, because operators in TPort automatically create TPortRange's as needed. For example, if P is a multi–pin port:
 Port1 << P;       // connect entire range of P to entire range of Port1
 Port2 << P(5);    // connect one pin of P to Port2
 Port3 << P(7,0);  // connect an eight–pin range of P to Port3
Parentheses are used to express port ranges, not square brackets. For details, see Port Range Implementation. An attempt to connect two port ranges of different widths results in a runtime error.
port An alias for TPort.
<< An operator that is used to make connections. This operator is overloaded several times, so its meaning depends on its operand types (e.g., char*, TPortRange, TBundle). See Connecting Functions and Operators.
^ An operator that can be used to make connections to one port of a two–terminal part. Like <<, this operator's meaning depends on its operand types. This operator only works with parts having exactly two ports. The advantages of this operator are concise expression of connections and convenience. The user does not specify ports when using the ^ operator. Instead, CBOLD finds the ports based on the position (left or right) of the ^ operator relative to the two-port part. For details, see Connecting Functions and Operators.
merge() A function that can be used to connect all of the pins of a port range to a single net. This function is most commonly used when several pins of a port need to be tied high or low or when they need to be tied to the global no-connect net.
wire(), wireall() Functions that can be used to automate otherwise tedious connections. E.g., wireall( GND ) connects this module's port named GND to the port named GND (if any) of each member module/part. Like <<, these functions have meanings that depend on their operand types. See Connecting Functions and Operators.


<<< Previous CBOLD Reference Home Next >>>

Legal Copyright © 2007 by Coolquest, Inc. Contact