ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
description
Transcript of ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
![Page 1: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/1.jpg)
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS
DESIGNLecture 6Dr. ShiDept. of Electrical and Computer Engineering
![Page 2: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/2.jpg)
KARNAUGH MAPS
![Page 3: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/3.jpg)
Overview K-maps: an approach to minimize Boolean
functions Easy conversion from truth table to K-map to
minimized SOP representation. Simple rules (steps) used to perform
minimization Leads to minimized SOP representation.
Much faster and more more efficient than previous minimization techniques with Boolean algebra.
![Page 4: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/4.jpg)
Example: One-bit Adder
Adder
Cin
Cout
SBA
A B Cin S Cout0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1
+
Cout = A’*B*Cin + A*B’*Cin+A*B*Cin’ + A*B*CinRequires: 8 ANDs, 3 OrsHow to simplify???
![Page 5: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/5.jpg)
x y F0 0 10 1 11 0 01 1 0
Karnaugh maps
0 1yx
0
1
1
0 0
1
0 1yx
0
1
x’y’
xy’ xy
x’y
F = Σ(m0,m1) = x’y + x’y’
![Page 6: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/6.jpg)
x y F0 0 10 1 11 0 01 1 0
Karnaugh maps Alternate way of representing Boolean function
All rows of truth table represented with a square Each square represents a minterm
Easy to convert between truth table, K-map, and SOP Unoptimized form: number of 1’s in K-map equals
number of minterms (products) in SOP Optimized form: reduced number of minterms
0 1yx
0
1
1
0 0
1
0 1yx
0
1
x’y’
xy’ xy
x’y
x
yF = Σ(m0,m1) = x’y + x’y’
![Page 7: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/7.jpg)
Karnaugh Maps A Karnaugh map is a graphical tool for assisting in the general
simplification procedure. Two variable maps.
0A
1 01
B 0 101 F=AB +A’B 0A
1 11
B 0 101
°Three variable maps.
0A
1 11
000101
BC
01 1
11110
F=AB’C’ +AB C +ABC +ABC + A’B’C + A’BC’
F=AB +AB +AB
A B C F0 0 0 00 0 1 10 1 0 10 1 1 01 0 0 11 0 1 11 1 0 11 1 1 1
+
![Page 8: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/8.jpg)
Rules for K-Maps We can reduce functions by circling 1’s in the K-map Each circle represents minterm reduction Following circling, we can deduce minimized and-or
form.Rules to consider1.Every cell containing a 1 must be included at least
once.2.The largest possible “power of 2 rectangle” must be
enclosed.3.The 1’s must be enclosed in the smallest possible
number of rectangles.
![Page 9: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/9.jpg)
Karnaugh Maps A Karnaugh map is a graphical tool for assisting in the general
simplification procedure. Two variable maps.
0A
1 01
B 0 101 F=AB +A’B 0A
1 11
B 0 101 F=A+B
°Three variable maps.
F=A+B C +BC 0A
1 11
000101
BC
01 1
11110
F=AB +AB +AB
F=AB’C’ +AB C +ABC +ABC + A’B’C + A’BC’
![Page 10: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/10.jpg)
Karnaugh maps
Numbering scheme based on Gray–code e.g., 00, 01, 11, 10 Only a single bit changes in code for adjacent map cells This is necessary to observe the variable transitions
00 01ABC
0
1
11 10
C
B
A
F(A,B,C) = m(0,4,5,7)
G(A,B,C) = 0 0
0 0
1 1
1 1CB
A
1 0
0 0
0 1
1 1CB
A
A
= AC + B’C’
![Page 11: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/11.jpg)
More Karnaugh Map Examples
Examplesg = b'
0 101
ab
cab
0001111001
0 101
ab
cab
0001111001
0 10 1f = a
0 0 1 00 1 1 1
cout = ab + bc + ac
1 10 0
0 0 1 10 0 1 1
f = a
1. Circle the largest groups possible.2. Group dimensions must be a power of 2. 3. Remember what circling means!
![Page 12: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/12.jpg)
Application of Karnaugh Maps: The One-bit Adder
Adder
Cin
Cout
SBA
A B Cin S Cout0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1
+
S = A’B’Cin + A’BCin’ + AB’Cin’ + ABCinCout = A’BCin + A B’Cin + ABCin’ + ABCin
= A’BCin + ABCin + AB’Cin + ABCin + ABCin’ + ABCin
= BCin + ACin + AB
= (A’ + A)BCin + (B’ + B)ACin + (Cin’ + Cin)AB= 1·BCin + 1· ACin + 1· AB
How to use a KarnaughMap instead of the
Algebraic simplification?
![Page 13: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/13.jpg)
Application of Karnaugh Maps: The One-bit Adder
Adder
Cin
Cout
SBA
A B Cin S Cout0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1
+
Karnaugh Map for Cout
Now we have to cover all the 1s in theKarnaugh Map using the largestrectangles and as few rectanglesas we can.
A
B
Cin
00
01 1 1
01
![Page 14: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/14.jpg)
A
B
Cin
Application of Karnaugh Maps: The One-bit Adder
Adder
Cin
Cout
SBA
A B Cin S Cout0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1
+
00
0 011 1 1
Karnaugh Map for Cout
Now we have to cover all the 1s in theKarnaugh Map using the largestrectangles and as few rectanglesas we can.
Cout = ACin
![Page 15: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/15.jpg)
A
B
Cin
Application of Karnaugh Maps: The One-bit Adder
Adder
Cin
Cout
SBA
A B Cin S Cout0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1
+
00
0 011 1 1
Karnaugh Map for Cout
Now we have to cover all the 1s in theKarnaugh Map using the largestrectangles and as few rectanglesas we can.
Cout = Acin + AB
![Page 16: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/16.jpg)
A
B
Cin
Application of Karnaugh Maps: The One-bit Adder
Adder
Cin
Cout
SBA
A B Cin S Cout0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1
+
00
0 011 1 1
Karnaugh Map for Cout
Now we have to cover all the 1s in theKarnaugh Map using the largestrectangles and as few rectanglesas we can.
Cout = ACin + AB + BCin
![Page 17: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/17.jpg)
A
B
Cin
Application of Karnaugh Maps: The One-bit Adder
Adder
Cin
Cout
SBA
A B Cin S Cout0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1
+
01
1 100 1 0
Karnaugh Map for SS = A’BCin’
![Page 18: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/18.jpg)
A
B
Cin
Application of Karnaugh Maps: The One-bit Adder
Adder
Cin
Cout
SBA
A B Cin S Cout0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1
+
01
1 100 1 0
Karnaugh Map for SS = A’BCin’ + A’B’Cin
![Page 19: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/19.jpg)
A
B
Cin
Application of Karnaugh Maps: The One-bit Adder
Adder
Cin
Cout
SBA
A B Cin S Cout0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1
+
01
1 100 1 0
Karnaugh Map for SS = A’BCin’ + A’B’Cin + ABCin
![Page 20: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/20.jpg)
A
B
Cin
Application of Karnaugh Maps: The One-bit Adder
Adder
Cin
Cout
SBA A B Cin S Cout
0 0 0 0 00 0 1 1 00 1 0 1 00 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1
+
01
1 100 1 0
Karnaugh Map for SS = A’BCin’ + A’B’Cin + ABCin + AB’Cin’
No Possible Reduction!
Can you draw the circuit diagrams?
![Page 21: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/21.jpg)
Summary Karnaugh map allows us to represent
functions with new notation Representation allows for logic reduction.
Implement same function with less logic Each square represents one minterm Each circle leads to one product term Not all functions can be reduced Each circle represents an application of:
Distributive rule -- x(y + z) = xy + xz Complement rule – x + x’ = 1
![Page 22: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/22.jpg)
MORE KARNAUGH MAPS
![Page 23: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/23.jpg)
Overview Karnaugh maps with four inputs
Same basic rules as three input K-maps Understanding prime implicants
Related to minterms Covering all implicants Using Don’t Cares to simplify functions
Don’t care outputs are undefined Summarizing Karnaugh maps
![Page 24: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/24.jpg)
Karnaugh Maps for Four Input Functions
Represent functions of 4 inputs with 16 minterms Use same rules developed for 3-input functions Note bracketed sections shown in example.
![Page 25: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/25.jpg)
F(A,B,C,D) = m(0,2,3,5,6,7,8,10,11,14,15)F =
C + B’D’
Karnaugh map: 4-variable example
D
A
B
1 0
0 1
0 1
0 0
1 1
1 1
1 1
1 1C
+ A’BD
0 4
1 5
12 8
13 9
3 7
2 6
15 11
14 10
![Page 26: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/26.jpg)
A' B' D + A' C + B' C D
B C' D' + A C' + A B D'
LT =EQ =GT =
K-map for LT K-map for GT
Design examples
0 0
1 0
0 0
0 0 D
A
1 1
1 1
0 1
0 0B
C
K-map for EQ
1 0
0 1
0 0
0 0 D
A
0 0
0 0
1 0
0 1B
C
0 1
0 0
1 1
1 1 D
A
0 0
0 0
0 0
1 0B
C
Can you draw the truth table for these examples?
A'B'C'D' + A'BC'D + ABCD + AB'CD’
![Page 27: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/27.jpg)
A B C D
EQ
Physical Implementation ° Step 1: Truth table
° Step 2: K-map° Step 3: Minimized sum-of-products
° Step 4: Physical implementation with gates
K-map for EQ
1 0
0 1
0 0
0 0 D
A
0 0
0 0
1 0
0 1B
C
![Page 28: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/28.jpg)
Karnaugh Maps Four variable maps.
F=BC +CD + AC+ AD
0AB
1 10
00010001
CD
00 1
11110
F=ABC +ACD +ABC +AB CD +ABC +AB C
11 0
11110
11 1
1
° Need to make sure all 1’s are covered° Try to minimize total product terms. ° Design could be implemented using NANDs and NORs
![Page 29: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/29.jpg)
Product of Sums
![Page 30: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/30.jpg)
Product of Sums
![Page 31: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/31.jpg)
Product of Sums
![Page 32: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/32.jpg)
Product of Sums
![Page 33: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/33.jpg)
Product of Sums
![Page 34: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/34.jpg)
Product of Sums
![Page 35: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/35.jpg)
SoP from PoS
![Page 36: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/36.jpg)
Sum of Products
![Page 37: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/37.jpg)
SoP and PoS
![Page 38: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/38.jpg)
Quine-McClasky Algorithm Willard van Orman Quine 1908-2000
Professor at Harvard University Edward McCluskey, Jr. 1929-
Preofessor at Stanford University Hundreds of students in academia and
industry Jacob Abraham (UT Austin)
W. Kent Fuchs (Cornell) Weiping Shi
![Page 39: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/39.jpg)
DON’T CARES (ISFs)
![Page 40: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/40.jpg)
Karnaugh maps: Don’t cares
In some cases, outputs are undefined We “don’t care” if the logic produces a 0 or a 1 This knowledge can be used to simplify functions.
0 0
1 1
X 0
X 1D
A
1 1
0 X
0 0
0 0
B
C
CDAB
0001
1110
00 01 11 10- Treat X’s like either 1’s or 0’s- Very useful- OK to leave some X’s uncovered
![Page 41: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/41.jpg)
+ C’D
Karnaugh maps: Don’t cares
f(A,B,C,D) = m(1,3,5,7,9) + d(6,12,13) without don't cares
f =
0 0
1 1
X 0
X 1D
A
1 1
0 X
0 0
0 0
B
C
A’D
CDAB
0001
1110
00 01 11 10
C f0 00 11 01 10 00 11 X100110011
D0101010101010101
10100XX00
A0000000011111111
+
B0000111100001111
+
![Page 42: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/42.jpg)
Don’t Care Conditions In some situations, we don’t care about the value of a function for
certain combinations of the variables. these combinations may be impossible in certain contexts or the value of the function may not matter in when the combinations
occur In such situations we say the function is incompletely specified
and there are multiple (completely specified) logic functions that can be used in the design. so we can select a function that gives the simplest circuit
When constructing the terms in the simplification procedure, we can choose to either cover or not cover the don’t care conditions.
![Page 43: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/43.jpg)
Map Simplification with Don’t Cares
F=ACD+B+AC0AB
x x1
00010001
CD
0x 1
01110
1x 0
11110
11 1
x
0AB
x x1
00010001
CD
0x 1
01110
1x 0
11110
11 1
xF=ABCD+ABC+BC+AC
°Alternative covering.
![Page 44: ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN](https://reader035.fdocuments.net/reader035/viewer/2022062521/56814bbd550346895db890a8/html5/thumbnails/44.jpg)
Karnaugh maps: don’t cares (cont’d) f(A,B,C,D) = m(1,3,5,7,9) + d(6,12,13)
f = A'D + B'C'D without don't cares f = with don't cares
don't cares can be treated as1s or 0s
depending on which is more advantageous
0 0
1 1
X 0
X 1 D
A
1 1
0 X
0 0
0 0B
C
A'D
by using don't care as a "1"a 2-cube can be formed rather than a 1-cube to coverthis node
+ C'D