Professional Documents
Culture Documents
19 Pragmatic Two Level Optimization
19 Pragmatic Two Level Optimization
F D(A C) ■
The foregoing example shows that the don’t-care minterms in the map are
initially considered as representing both 0 and 1. The 0 or 1 value that is eventually
assigned depends on the optimization process. Due to this process, the optimized
function will have a 0 or 1 value for each minterm of the original function, includ-
ing those that were initially don’t cares. Thus, although the outputs in the initial
specification may contain Xs, the outputs in a particular implementation of the
specification are only 0s and 1s.
MORE OPTIMIZATION This supplement gives a procedure for selecting prime impli-
cants that guarantees an optimum solution. In addition, it presents a symbolic
method for performing prime-implicant generation and a tabular method for
prime-implicant selection.
FIGURE 2-18
Simplified Espresso Algorithm
CD C CD C
AB 00 01 11 10 AB 00 01 11 10
0 1 3 2 0 1 3 2
00 1 1 1 00 1 1 1
4 5 7 6 4 5 7 6
01 1 1 1 1 01 1 1 1 1
12 13 15 14 B 12 13 15 14 B
11 11
A A
8 9 11 10 8 9 11 10
10 1 1 10 1 1
D D
(a) Original function F and cover F (b) After EXPAND
CD C CD C
AB 00 01 11 10 AB 00 01 11 10
0 1 3 2 1 3 2
00 d* 1 d 00 d0 1 d
5
01 d
4
d* d
7
d
6
01 d4 d5 d7 d6
13 15 14 B 13 15 14 B
12 12
11 11
A A
8 9 11 10 8 9 11 10
10 d* d 10 d d
D D
(c) After ESSENTIAL (d) After IRREDUNDANT _COVER
CD C CD C
AB 00 01 11 10 AB 00 01 11 10
0 1 3 2 0 1 3 2
00 d 1 d 00 d 1 d
4 5 4 5
01 d d d7 d6 01 d d d7 d6
B B
12 13 15 14 12 13 15 14
11 11
A A
8 9 11 10 8 9 11 10
10 d d 10 d d
D D
(e) After REDUCE (f) After EXPAND
CD C
AB 00 01 11 10
0 1 3 2
00 1 1 1
4 5
01 1 1 17 16
B
12 13 15 14
11
A
8 9 11 10
10 1 1
D
(g) After IRREDUNDANT_COVER,
LAST_GASP, and QUIT
FIGURE 2-19
Espresso Example
ManoCh02v4.fm Page 76 Thursday, May 3, 2007 5:13 PM
must be selected. Next, the new Cost must be evaluated to see if it has improved.
Based on the K-map in Figure 2-19(d), Cost has been reduced to 14. This solution
represents a local minimum Cost.
REDUCE is applied next to attempt to move away from the local minimum
Cost to a lower Cost. There is only one implicant BCD under consideration, so
there is no need for ordering the implicants. From the K-map in Figure 2-19(d), the
only square containing a 1 is square 3, so BCD can be reduced to A BCD, as shown
in Figure 2-19(e).
Application of EXPAND replaces A BCD with the largest implicant that
covers square 3, AC. Next, IRREDUNDANT_COVER finds that all implicants are
required. The result, shown in Figure 2-19(f), gives Cost = 13.
Repetition of REDUCE, EXPAND, and IRREDUNDANT_COVER still
yields Cost = 13, so the next step is LAST_GASP. This step yields no new result,
since only one square, 3, remains to be covered. Since the Cost is still 13, the next
step is QUIT. The essential primes are returned to the solution to give the final
result in Figure 2-19(g). The equation for the result is:
F( A, B, C, D ) A D AB ABD AC ■
Figure 2-20(a) gives the two-level implementation of G, which has a gate-input cost
of 17. Now suppose that we apply the distributive law of Boolean algebra to G to
give
G AB( C D ) E A( C D )F
G ( AB AF )( C D ) E
This increases the cost to 12. But by factoring out A from AB + AF, we obtain
G A(B F)(C D) E