Download Single Function - Digital Systems - Lecture Slides and more Slides Digital Systems Design in PDF only on Docsity!
Single Function Quine-McCluskey 2-Level
Minimization
Basic Two-Level Minimization Steps
The basic steps are the same for K-Map and Quine McCluskey (QM):
- Form all PIs
- Determine a minimum cost set of PIs to cover all minterms (MTs)
- Determine EPIs, include them in the final expression and delete all MTs they cover
- Determine a min cost set of the remaining PIs to cover the remaining MTs (this is a really hard problem—NP-hard, i.e., takes a worst-case exponential computation time to solve optimally
of
1’s
MT/
DC
ABCD
of
1’s
Impl. ABCD Diff. set
PI 1
1,3 00x1 2 1,5 0x01 4 1,9 x001 8 2,3 001x 1 2,6 0x10 4 8,9 100x 1
3,7 0x11 4 5,7 01x1 2 5,13 x101 8 6,7 011x 1 9,13 1x01 4
Impl. ABCD Diff. set PI 2 1, 3 5, 7
0xx1 2,
PI 3 1, 5
xx01 4,
PI 4 2, 3
0x1x 1,
Necessary conditions for combining 2 implicants to form a larger implicant that covers them (if the conditions are met, then we need to look at the ternary notations to determine combinability ) :
- Two MTs/DCs in only adj. groups can be combined only if their integer values differ by a power of 2
- Two implicants in adj. groups can be combined only if their difference sets are the same and the pairwise absolute differences of their MT/DC list arranged in increasing order are the same and a power of 2 (e.g.: (i) g=(1,3), h=(5,7), |(1,3)-(5,7)| = (4,4) and g,h are combinable—same # that is a power of 2; the # 4 is added to the diff. set of the combined implicants to obtain the diff. set of the larger implicant. (ii) g=(3,7), h=(9,13), |(3,7)-(9,13)| = (6,6) and thus g,h are not combinable—same # but not a power of 2
Tricks for quick PI formation
Docsity.com
QM: The PI Table (PIT)—Min-Cost MT Covering
QM: The PIT—Min-Cost MT Covering (cont.)
QM: The PIT—Min-Cost MT Covering (cont.)
C C
C
C
Covering by one PI/row of another
Covering by one MT/col of another
A row Ri is said to cover row Rj, if Ri has X’s in all the cols that Rj has X’s in (& possibly more) A col Ci is said to cover col Cj, if Ci has X’s in all the rows that Cj has X’s in (and possibly more)
- Identify “pseudo-EPIs” (EPIs in the reduced PIT), and remove them (inclusion removal —removal from PIT, and inclusion in the min. expression) and the MTs they cover.
- Repeat above steps until all MTs covered
Note: Both the row covering and col covering rules reduce the complexity of the min-cost covering problem. However, row-covering does not necessarily preserve optimality (why?), while col-covering does.
In these cases both PIs cover each other, But that may not always be the case
Exclusion deletions
Docsity.com
QM: The PIT—Min-Cost MT Covering (cont.)
C C
C
C
Covering by one MT/col Exclusion deletions of another
Inclusion deletions
Pseudo-EPIs
PI
PI
f = PI1 + PI2 + PI3 + PI
QM: The PI Table—Min-Cost MT Covering (cont.)
Better heuristics than random choice can be used, as shown in subsequent slides
QM: The Iterative Technique for Min-Cost Covering
- In the PI Table (PIT), identify all EPIs, include them in the minimized expression & delete MTs they cover
- Repeat
- While there are MTs remaining to be covered and the reduced PIT (RPIT) is not cyclic do - Again check if EPIs can be identified in the RPIT—these new EPIs are called pseudo or secondary EPIs - While no pseudo EPIs can be identified do - If there are still MTs in the RPIT, reduce the RPIT further by using only one row or col covering rule w/ priority given to applying the col covering rule first if both rules are applicable - End While
- End While
- If the RPIT is cyclic, make it acyclic by choosing a PI for inclusion in the min expression that covers the max # of remaining MTs (break ties based on smaller cost —number of literals in the PI’s product term, and break further ties randomly)
- Until(all MTs are covered)
- Row covering rule ( Rule 1 ): If row i covers row j, delete the covered (subset) row, row j. If both rows i and j cover each other, delete the row w/ higher cost (# of literals)
- Col covering rule ( Rule 2 ): If col i covers col j delete the covering (superset) column, col i. If both cols I and j cover each other, then delete one of them arbitrarily Docsity.com
Column 1 Column2 Column
G1 1 0001 00-1(1,3) 0--1(1,3,5,7)
2 0010 0-01(1,5) --01(1,5,9,13) 8 1000 -001(1,9) 0-1-(2,3,6,7) 001-(2,3)
G2 3 0011 0-10(2,6)
5 0101 100-(8,9) 6 0110 9 1001 0-11(3,7) 01-1(5,7)
G3 7 0111 -101(5,13)
13 1101 011-(6,7) 1-01(9,13)
PI Table
PIs 1 3 5 6 9 PI 1 PI 2 PI 3
PI 4
PI 2
PI 3
f = PI 3 + PI 4 = CD + AC
__*
Pseudo EPI
EPI
Covering arrows
1
1
1
Delete either col 1 or 5
3
1
1 1 2
Cyclic PI Table (Contd.)
- Rule 3 : Heuristic for breaking the cycle in a cyclic PI chart
- Choose a PI that covers the largest # of min terms
- Break a tie by choosing the PI that has the least cost (fewest literals).
- Break a further tie by choosing a PI in the tie arbitrarily.
PIs 2 4 5 6 PI 2 PI 3 PI 4 PI 5 PI 6
- For previous example, # of MT’s covered are given to be the same
- If cost is not taken into account - Choose PI 1 arbitrarily
(remove it and all MTs
it covers)
right
* f=PI 1 + PI 3 +PI 5
3
1 2
2 2
4 5
Cost = 5+5+5=
5 5
c
c
c
Docsity.com
Cyclic PI Table (Contd.)
- Taking cost into account
- By cost choose PI 4 first
PIs 1 2 3 5 PI 1 PI 2 PI 3 PI 5
PI^ PI^6 6
PI 5
PI 4
PI 3
PI 2
PI 1
PIs 1 2 3 4 5 6
__*
__*
__*
f PI 4 PI 2 PI (^6) Cost = 4+5+5 = 14
cost=2+3+3=
= + +
1 2
3
4
(^3 4 )