Next: The Component Class
Up: Hardware Description Using C++
Previous: Hardware Description Using C++
When one thinks of circuit elements, a myriad of objects
immediately comes to mind. These devices include wires, AND
gates, transistors, input and output ports, RS-latches, HIGH and LOW
signals and so on. For the purpose of this report, objects which are
at the digital level and above will only be considered.
Therefore, switch level devices such as transistors will not be
considered.
One possible way to classify these numerous objects is to
consider all the circuit entities at their highest level
of abstraction and attempt to group objects which have
similar properties under the same base class. From this,
three very general classes are formed:
- Component -- All elements derived from this class
process input signals and generate output signals to the
objects to which they are connected. It is possible for one
component to be part of another component. Circuit elements
which can be considered as kind of components would include
AND gates, RS-latches and random functional blocks.
- Connector -- All elements derived from this class
would be responsible for connecting components with other
components or with the external world. Each connector is
part of a component at some level of abstraction.
Since a connector can ``feed'' one or more components
via fan-out, a list of components can be considered part of a
connector. Some circuit elements which are kind of
connectors include wires, and I/O ports.
- Signals -- Objects instantiated from this class
are passed from component to component via the connectors.
As will be shown later, a list of signals can be considered
as part of a wire. This report will consider signals
as two entities: a signal value (such as HIGH, LOW or X)
and an associated unit of time. Since signals are used almost
exclusively during the simulation of circuitry, a detailed
analysis of this class will be postponed until the next chapter.
As alluded to above, linked list classes are required for
components and signals. As will be shown in the next section,
the need will also arise for a linked list class for I/O
ports. Due to the current lack of parameterized types in the
C++ language, some duplication of code is necessary to create
the three linked list classes. Fortunately, the replication
of code is relatively small.
Next: The Component Class
Up: Hardware Description Using C++
Previous: Hardware Description Using C++
Donald Craig
Sat Jul 13 16:02:11 NDT 1996