Download presentation
Presentation is loading. Please wait.
Published byChristine Gallagher Modified over 9 years ago
1
The covering procedure
3
Remove rows with essential PI’s and any columns with x’s in those rows
4
The covering procedure Remove rows that are covered by other rows Remove columns that cover other columns Why?
5
The covering procedure Remove rows that are covered by other rows Remove columns that cover other columns
6
The covering procedure Rows PI’s –Covering row takes care of more minterms –Minterms included in a smaller (covered) row are also included in the bigger (covering) one –Can discard the small ones and use only the covering row; minterm coverage is preserved Columns min/max terms –Whenever a min/max term corresponding to a covered (smaller) column is included by some PI, the min/max term corresponding to the covering (bigger) column also gets included –Covering column can be dropped –Reduces # of PI’s that include this min/max term
7
Cyclic PI charts Cyclic PI charts have no essential PI’s –Cannot be reduced by rules 1 and 2 Example of cyclic PI chart of 3 variables BC A 00 01 11 10 0 1 1 1 1 1 1 1
8
Cyclic PI chart chosen PI Cyclic PI charts have no essential PI’s –Select the row with max number of x’s (randomly if more than one); PI 1 in this example
9
Cyclic PI chart After removing PI 1, apply rules 1 and 2. Remove covered PI 2 and PI 6 PI 3 and PI 5 cover the resulting chart. Minimal cover: PI 1, PI 3, PI 5
10
Cyclic PI charts Example of cyclic PI chart of 4 variables 1 1 1 Q: if PI’s covering 4 minterms are allowed, can one create a cyclic PI chart where no PIs are essential?
11
Cyclic PI charts A: yes 1 1 1 Q: what about a 4 variable K-map and groups of 8 ones? –In general n variable functions with a K-map and PIs covering 2 n-1 min/max terms – can there be a cyclic PI chart?
12
Incompletely specified functions When some of the minterms can be either 0 or 1, we can denote them by ‘d’ (don’t care) When simplifying, we use ‘d’s to generate PIs, but do not include them in the PI chart
13
Incompletely specified functions
15
Multiple simultaneous outputs
17
In general, # of lists ≤ n+1 (n = # variables)
18
‘d’s are not in the charts, but are used for PIs List 1, group 1 Group 2, list 2 Group 3, list 3
19
Multiple simultaneous outputs Why select PI 3 over PI 11 ? PIs from higher-numbered list are likely to cover more PIs (not always true: don’t cares)
20
Multiple simultaneous outputs
21
Static hazard or glitch: unwanted output transition when inputs change and the output should have remained the same For simplicity consider only a single input changes at a time Different gates have different propagation delays Hazards and K-maps
22
t 1 t 3 t 2 t 1 = t 2 = t 3
23
Hazards and K-maps t 1 t 3 t 2 t 1 > t 2 > t 3
24
Hazards and K-maps A hazard exists when a changing input requires corresponding minterms/maxterms to be covered by different product/sum terms Remove hazards by bridging the gaps on the K-map:
25
Hazards and K-maps Hazard-free circuit: Cover each pair of adjacent minterms by a different product term Deliberate redundancy like this makes circuits impossible to test completely Static 1 hazards: in SOP circuits: 1 0 1 Static 0 hazards: in POS circuits: 0 1 0
26
Hazards and K-maps Static 0 hazards in POS circuits: Identify the hazard(s): how many? Where?
27
Hazards and K-maps Hazards identified and fixed? What is missing?
28
Hazards and K-maps Dynamic hazards: –When input change requires output change –Occur when output makes more than one transition Always result from static hazards elsewhere –Eliminating the static hazards eliminates the dynamic ones as well
29
Prime number detector: F = (1, 2, 3, 5, 7, 11, 13) N3 N2 00011110 00 01xxx N1 N0 11xxx 10x 0--1 00-1 01-1 0001 0011 0101 0111
30
Karnaugh maps: 2, 3, and 4 variable
31
F = X’YZ’ + XZ + Y’Z Example:
32
Another example: Prime implicants (maximal clusters)
33
Prime number detector
35
Another example: distinguished cell: covered by only one prime implicant essential prime implicant: contains distinguished cell
36
Another example: primes, distinguished cells, essentials
37
Selecting essentials leaves an uncovered cell cover with simpler implicant: W’Z
38
Eclipsing (in reduced map) P eclipses Q if P covers all of Q’s ones if P is no more expensive (same or fewer literals), then choose P over Q
39
Alas, no essential prime implicants branching: choose a cell and examine all implicants that cover that cell
40
Don’t cares....
41
Multiple functions can use separate Karnaugh maps
42
...or can manage to find common terms...
43
For more than 6 input variables, Karnaugh maps are difficult to manipulate Need computer program.... Quine-McCluskey algorithm
44
typedef unsigned short WORD; /* assume 16-bit registers */ struct cube { WORD t; /* marks uncomplemented variables */ WORD f; /* marks complemented variables */ } typedef struct cube CUBE; CUBE P1, x, y, z;
45
Equation: w x’ y z’ + w’ x’ y z’ = x’ y z’ Karnaugh map: wx 00 01 11 10 yz 00 01 11 10 1 1 Example in four variables Cubes (last four bits): 1010 0010 = 1000 ==> single one in common position ==> combinable 0101 1101 = 1000 1010 & 0010 = 0010 ==> w now missing, new cube corresponds to z’ y z’ 0101 & 1101 = 0101
47
Start with minterms (0-cubes) Combine when possible to form (1-cubes).... Example: w’xy’z + wxy’z + w’xyz + wxyz = xz wx 00 01 11 10 yz 00 01 1 1 11 1 1 10 Cubes: 0101 1101 0111 1111 1010 0010 1000 0000 0101 1010 1101 0010 0111 1000 1111 0000 0101 1101 = 1000 1010 0010 = 1000 0101 & 1101 = 0101 1010 & 0010 = 0010
48
Start with minterms (0-cubes) Combine when possible to form (1-cubes).... Example: w’xy’z + wxy’z + w’xyz + wxyz = xz wx 00 01 11 10 yz 00 01 1 1 11 1 1 10 Cubes: 0101 1101 0111 1111 1010 0010 1000 0000 0101 1010 1101 0101 0010 0010 0111 1000 1111 0000 wx 00 01 11 10 yz 00 01 1 1 11 1 1 10 0101 1101 = 1000 1010 0010 = 1000 0101 & 1101 = 0101 1010 & 0010 = 0010
49
Start with minterms (0-cubes) Combine when possible to form (1-cubes).... Example: w’xy’z + wxy’z + w’xyz + wxyz = xz wx 00 01 11 10 yz 00 01 1 1 11 1 1 10 Cubes: 0101 1101 0111 1111 1010 0010 1000 0000 0101 1010 1101 0101 0010 0010 0111 0101 1000 1000 1111 1101 0111 0000 0000 0000 wx 00 01 11 10 yz 00 01 1 1 11 1 1 10
50
Continue to form 2-cubes Example: w’xy’z + wxy’z + w’xyz + wxyz = xz wx 00 01 11 10 yz 00 01 1 1 11 1 1 10 Cubes: 0101 0101 1101 0111 0010 1000 0000 0000 0101 0010 0101 1000 1101 0101 0000 0000 0111 0101 0000 0000
51
Read in all minterms (0-cubes); mark all 0-cubes “uncovered”; for (m = 0; m < Nvar; m++) for (j = 0; j < Ncubes[m]; j++) for (k = j + 1; k < Ncubes[m]; k++) if (combinable(cube[m][j], cube[m][k])) { mark cube[m][j] and cube[m][k] “covered” temp = combined cube; if (temp not already at level m + 1) { add temp to level m + 1; mark temp “uncovered” } } Quine-McCluskey Algorithm:
52
Manual algorithm: F = (2, 5, 7, 9, 13, 15) (variables WXYZ) 0010 0101 1001 0111 1101 1111 01-1 -101 1-01 -111 11-1 -1-1 uncovered terms
53
Manual algorithm: F = (2, 5, 7, 9, 13, 15) (variables WXYZ) 0010 0101x01-1x-1-1 1001x-101x 1-01 0111x-111x 1101x11-1x 1111x WX 00011110 00 YZ01111 1111 101 XZ WY’Z W’X’YZ’
54
Minterms Prime25791315 Implicants 0010x 1-01xx -1-1xxxx distinguished minterms (cells): 2, 5, 7, 9, 15 essential prime implicants: 0010, 1-01, -1-1 (all) F = 0010 + 1-01 + -1-1 = W’X’YZ’ + WY’Z + XZ
55
Not all prime implicants are necessarily essential distinguished cells essential implicants remainder C eclipses B and D Minimal form: A + E + C
56
Not all prime implicants are necessarily essential distinguished cells essential implicants remainder C eclipses B and D Minimal form: A + E + C
57
Not all prime implicants are necessarily essential distinguished cells essential implicants remainder C eclipses B and D Minimal form: A + E + C
58
Static hazard: X = Y = 1, Z falls from 1 to 0 Z’ XZ’Z’ XZ’ Consensus term Reconstruct Karnaugh map: F = XZ’ + YZ = XYZ’ + XY’Z’ + XYZ + X’YZ
59
Solution: add consensus term Z’ XZ’Z’ XZ’ Consensus term Z’ XZ’
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.