(
state transition diagram)
and Figure 7.19 (
state transition table)
using toggle flip-flops. In this section, you will see three more implementations of this counter, using R-S, J-K, and D storage elements.(
see Figures 7.18, 7.19, and 7.20)
. Step 4, remapping the next state functions into control inputs for the chosen flip-flop, is the one step that depends on the type of flip-flop selected. R-S Excitation Table We start with the excitation table for the R-S flip-flop, which is given in Figure 7.28.
The state transitions are now encoded in terms of the R and S inputs that cause the flip-flops to make those transitions. For example, if the flip-flop's current state is 0 and the next state is also to be 0, we can accomplish this by setting the S input to 0 and the R input to either 0 (
hold current state)
or 1 (
reset current state)
. We complete the remaining three entries of the tables in a similar manner.
Remapped State Transition Table The next step is to reexpress the state transition table in terms of the R and S inputs to the three state flip-flops C, B, and A. This is shown in Figure 7.29.
We complete the remapped state transition table as follows. First we examine how the state bit is to change-for example, from a 0 to a 1. We use this information and the R-S excitation table to determine the R and S inputs needed to make that transition happen. We repeat the procedure for each state bit (
column)
and each state transition (
row)
of the state transition table.
Let's see how we obtained the table of Figure 7.29. In the transition from state 000 to 010, C changes from 0 to 0, B from 0 to 1, and A from 0 to 0. The A and C transitions are implemented by the R and S inputs X and 0. The 0-to-1 transition for B is accomplished by setting R and S to 0 and 1, respectively. For the state transition 010 to 011, C goes from 0 to 0, B from 1 to 1, and A from 0 to 1. Based on the excitation table, C's R and S inputs should be X and 0, B's inputs are 0 and X, and A's are 0 and 1. We determine the rest of the transitions in a similar -manner.
Remapped K-maps and Counter Schematic Figure 7.30 shows the re-mapped K-maps. The minimized next-state functions
This implementation requires 4 gates and 10 literals. If we factor the expression for RB, that is, RB =
B(
A +
C)
, we can save another gate and a literal. The implementation logic is shown in Figure 7.31: 3 gates, 9 -literals, and a total of 12 wires if we consider the flip-flop inputs. We do not count the clock in this tabulation. The figure doesn't show the reset logic.
(
hold)
or 1 (
reset)
. In a 0-to-1 transition, J should be set to 1 with K at 0 (
set)
or 1 (
toggle)
. We handle the 1-to-0 transition and 1-to-1 transition similarly. State Transition Table and Remapped Next-State Functions The state transition table and the remapped next-state functions are given in Figure 7.33.
Let's examine the first two state transitions, from 000 to 010 and from 010 to 011. For the first transition C stays at 0, B toggles from 0 to 1, and A holds at 0. For this transition C's J, K inputs are 0, X (
0-to-0 transition)
; B's inputs are 1, X (
0-to-1 transition)
; and A's inputs are the same as C's. For the second state transition, C holds at 0, B holds at 1, and A toggles from 0 to 1. The excitation table tells us that the J, K inputs should be 0, X for C; X, 0 for B; and 1, X for A.
Remapped K-maps and Counter Schematic Because it eliminates the forbidden state, the J-K flip-flop's excitation table contains many more don't-care conditions than in the R-S case. As you would expect, this leads to an implementation with a reduced gate and literal count.
Figure 7.34 shows the K-maps for the remapped next-state functions. The reduced expressions become
This implementation reduces the gate count to two and the literals to seven. The implementation logic appears in Figure 7.35. The wire count for this implementation is nineJC =
A KC=
JB=
1 KB=
A+
C JA=
B KA=
C
(
we don't count the hardwired input for JB and again don't show the reset logic)
.This implementation requires three gates and six literals and is shown in Figure 7.36DC =
A DB=
DA=
B
(
reset logic is not shown)
. Again, the wire count is nine.(
Figure 7.24)
(
Figure 7.31)
(
Figure 7.35)
D flip-flops: 3 gates, 5 literals, 9 wires (
Figure 7.36)
Although it is difficult to generalize from a single example, J-K flip-flops usually yield the most gate- and literal-efficient implementations. Since the R-S flip-flop behavior is a proper subset of a J-K, there is never any advantage in using R-S devices as counter storage elements. In fact, you would be hard pressed to find them in the usual parts catalogs (
although R-S latches are readily available)
.
T flip-flops are well suited for implementing straightforward binary counters, but their advantage is mitigated when the counter must follow a sequence that is not in direct binary order. In the example of this section, the T flip-flop implementation was worst by a wide margin.
Although they do not often yield the most gate-efficient solution, D flip-flops have some important advantages. First, they simplify the design procedure, allowing you to skip the next-state remapping step. Tools like espresso and misII can be applied to the state transition table, treated as a truth table, to obtain a minimized implementation rapidly.
Second, if wiring complexity rather than gate count dominates the design, D flip-flops usually have the advantage (
in our example, the D and J-K implementations had the same wiring complexity)
. Only a single input must be routed to a D flip-flop, compared to two inputs in the case of a J-K storage element.
Wiring complexity is especially important when using programmable logic technologies. Often the number of functional outputs supported by a programmable logic part is more constrained than the complexity of the logic that can be implemented, such as the number of product terms.
Finally, D storage elements are particularly transistor efficient in MOS VLSI technologies, as we saw in Chapter 6. J-K flip-flops require many more transistors for their implementation.
To summarize, for conventional packaged MSI/SSI TTL design, J-K flip-flops are usually preferable, especially when the design criterion is minimum gate and literal count. D-type devices are preferred when designing with programmable logic or in technologies more highly integrated than TTL, where minimum wire count or a simplified design procedure is the goal.
[Top] [Next] [Prev]