Moment Computation
5.5 Coupled Clusters
The previous section showed how to compute the moments of a single cluster assuming that all its inputs are known. For Rsim this is sufficient because the switched resistor model always yields clusters that are independent. Mom’s more general models, however, may include coupling between clusters which requires that multiple clusters be analyzed simultaneously.
Switch-level simulators usually exclude floating capacitors. However, Mom treats a floating capacitor as a bidirectional coupling which requires the simultaneous evaluation of both terminals. As outlined in Section 4.2 the computation of the moments proceeds by replacing capacitors with current sources. However, instead of inserting a single floating current source we insert two grounded current sources (Figure 55). When computing the
m p m p C p m k- k M M ) M - M ) k k C( C(
Figure 55: Floating capacitor connecting same cluster.
(
k
+1)st moments, the current of an inserted current source becomesi
c =C
(M
pk;M
mk) (67)where
M
pk andM
pk represent thek
th moments of voltages of the nodes connected to the plus and minus capacitor terminals, respectively.If both terminals are connected to the same cluster then the moment computation proceeds as for grounded capacitors. However, if the capacitor links two otherwise dis- connected clusters (Figure 56) then the moments for both clusters must be computed in
Cluster 1 Cluster 2
Figure 56: Capacitive Coupling Between Clusters.
lock step because the(
k
+1)st moments in each cluster depend upon the capacitor currentwhich, in turn, is a function of the
k
th moments of nodes in both clusters. Thus the 0th moments are computed for Cluster 1 and Cluster 2, followed by the 1st moments for Cluster 1 and Cluster 2, etc.Coupling between clusters can also be caused by dependent sources in the transistor models. To see this, consider the circuit in Figure 57. If T2 is modeled by the switched
Cluster 2 Cluster 1
T1
T2 n1
Figure 57: Gate to Channel Coupling.
resistor model then Clusters 1 and 2 are independent. Switching events in Cluster 1 (for example T1 changing regions) which affect waveforms in Cluster 1 (for example n1) won’t affect waveforms in Cluster 2 unless they cause T2 to change regions. However, consider what happens if T2 is our MOS Level-1 model biased into its saturation region. In that case T2’s drain current will be a continuous function of of T2’s gate voltage. In that case any changes to n1’s waveform will immediately affect waveforms in Cluster 2 even if T2 doesn’t change regions.
Thus if T2’s model includes a dependent source coupling its source and drain currents to its gate voltage, then any event that requires Mom to recompute the response of Cluster 1 (including its moments) also requires Mom to recompute the response of Cluster 2 (including its moments). This implies that not only must the moments be computed in lock step, but the
k
th moments of Cluster 1 must be computed before thek
th moments of Cluster2. This unidirectional coupling is represented by an arc between the clusters.
Another example of unidirectional coupling is illustrated by our bipolar model. Similar to the MOS example, the emitter and collector currents are dependent upon the base voltage. However, while the collector current depends upon the emitter voltage, the emitter current is independent of the collector voltage. This can be represented by an additional unidirectional coupling from the emitter to the collector (Figure 58). Thus we represent a
Cluster 3 Cluster 1
Cluster 2
Figure 58: Multiple Couplings for Bipolar Transistor. bipolar transistor with three arcs.
Note that for this particular model the “channel” of the bipolar transistor (the emitter– collector path) is represented by a unidirectional arc rather than a bidirectional edge. Therefore the base, emitter, and collector nodes may all reside in different clusters. In general, if either
y
12 ory
21 of a device model (See Equation 57) are equal to zero it canbe treated as a unidirectional coupling between possibly different clusters rather than as a branch that couples the two nodes into the same cluster. Later we shall see this allows a potentially more efficient evaluation.
Coupled clusters are collected into a group and represented by a directed graph.7 The moments of clusters in a group must be computed in lock step, and the arcs between clusters induce an ordering for the computation of each moment. If the directed graph is cycle free then the correct order for the evaluation of moments can be found via a topological sort of
the graph.8 In this case the group’s moments can be computed in linear time. If the directed graph has cycles then the group has feedback and no topological sort exists. Feedback is handled using tearing as described in a following section.
Figure 59 depicts a topological sort of the directed graph of an ECL gate. Note that
cluster 1 cluster 4 cluster 3 3 5 6 4 1 2 Vref1 Vref2 cluster 2 cluster 6 cluster 5
Figure 59: Topological Sort of ECL Gate.
since the bipolar model contains no edges, each node in the ECL gate is an independent cluster. The figure suggests that the directed graphs of most ECL current steering trees will, in fact, be cycle free. Thus it is possible to compute the moments of most ECL gates in linear time. In contrast, if the bipolar transistor were treated as an edge rather than an arc (Figure 60 shows what happens when the bipolar transistor model is a resistor.) then the resulting undirected graph would have a loop and it wouldn’t be possible to compute its moments in linear time. This elimination of loops from the graphs of ECL gates was the primary motivation behind neglecting the output conductance of bipolar transistors.
8A topological sort can be performed by depth first search with complexity
O
cluster 1 2 1 4 6 5 3
Figure 60: Resistor Model for Bipolar Transistor Results in Loops in ECL Gates