590 likes | 780 Views
The covering procedure. The covering procedure. The covering procedure. Remove rows with essential PI’s and any columns with x’s in those rows. The covering procedure. Remove rows that are covered by other rows Remove columns that cover other columns Why?. The covering procedure.
E N D
The covering procedure • Remove rows with essential PI’s and any columns with x’s in those rows
The covering procedure • Remove rows that are covered by other rows • Remove columns that cover other columns • Why?
The covering procedure • Remove rows that are covered by other rows • Remove columns that cover other columns
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
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
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); PI1 in this example
Cyclic PI chart After removing PI1, apply rules 1 and 2. Remove covered PI2 and PI6 PI3 and PI5 cover the resulting chart. Minimal cover: PI1, PI3, PI5
Cyclic PI charts • Example of cyclic PI chart of 4 variables 1 1 1 1 1 1 • Q: if PI’s covering 4 minterms are allowed, can one create a cyclic PI chart where no PIs are essential?
Cyclic PI charts • A: yes 1 1 1 1 1 1 1 1 1 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 2n-1 min/max terms – can there be a cyclic PI chart?
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
Multiple simultaneous outputs • In general, # of lists ≤ n+1 (n = # variables)
‘d’s are not in the charts, but are used for PIs • List 1, group 1 • Group 2, list 2 • Group 3, list 3
Multiple simultaneous outputs Why select PI3 over PI11? • PIs from higher-numbered list are likely to cover more PIs (not always true: don’t cares)
Hazards and K-maps • 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 t1 t3 t2 t1 = t2 = t3
Hazards and K-maps t1 t3 t2 t1 > t2 > t3
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:
Hazards and K-maps • Hazard-free circuit: • Cover each pairof adjacentminterms by adifferent 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
Hazards and K-maps • Static 0 hazards in POS circuits: • Identify the hazard(s): how many? Where?
Hazards and K-maps • Hazards identified and fixed? What is missing?
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
0001 0011 0101 0111 00-1 01-1 Prime number detector: F = (1, 2, 3, 5, 7, 11, 13) N3 N2 00 01 11 10 00 01 x x x N1 N0 11 x x x 10 x 0--1
Example: F = X’YZ’ + XZ + Y’Z
Prime implicants(maximal clusters) Another example:
Another example: distinguished cell: covered by only one prime implicant essential prime implicant: contains distinguished cell
Another example: primes, distinguished cells, essentials
Selecting essentials leaves an uncovered cell cover with simpler implicant: W’Z
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
Alas, no essential prime implicants branching: choose a cell and examine all implicants that cover that cell
Multiple functions can use separate Karnaugh maps
For more than 6 input variables, Karnaugh maps are difficult to manipulate Need computer program.... Quine-McCluskey algorithm
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;
Example in four variables 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 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
0101 1101 = 1000 1010 0010 = 1000 0101 & 1101 = 0101 1010 & 0010 = 0010 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
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 0101 1101 = 1000 1010 0010 = 1000 0101 & 1101 = 0101 1010 & 0010 = 0010 wx 00 01 11 10 yz 00 01 1 1 11 1 1 10
wx 00 01 11 10 yz 00 01 1 1 11 1 1 10 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
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