Digital System Design Using Verilog�(21EC32)
Course Syllabus
2
M1. Principles of Combinational Logic
M2. Logic Design with MSI Components and Programmable Logic Devices
M3. Flip-Flops and its Applications
M4. Introduction to Verilog ,Verilog Data flow description
M5. Verilog Behavioral description ,Verilog Structural description
Course Outcomes
3
CO1 | Develop simplified switching equation using Karnaugh Maps and Quine-McClusky techniques. |
CO2 | Analyze and design for Combinational Circuits by understanding the operation of decoders, encoder, multiplexers, adder, subtractors, comparators. |
CO3 | Analyze the concepts of Flip Flops (SR,D,T, and JK) and to design the synchronous sequential circuits. |
CO4 | Understand Verilog constructs and design combinational and sequential circuits using data flow description. |
CO5 | Understand Verilog constructs and design combinational and sequential circuits using data flow description. |
Text Books
4
“Digital logic Applications and Design”,John M. Yarbrough, Cengage/Thomson Learning, 2001. ISBN 981-240-062-1.
“Digital Principles and Design” , Donald D, Givone, Mc Graw Hill, 2002. ISBN 978-0-07-052906-9.
Text Books
5
“HDL Programming VHDL and Verilog” by Nazeih M Botros, 2009 reprint, Dreamtech press.
References
6
1. Fundamentals of logic design, by Charles H Roth Jr., Cengage Learning
2. Logic Design, by Sudhakar Samuel, Pearson/ Sanguine, 2007
3. Fundamentals of HDL, by Cyril P R, Pearson/Sanguine 2010
Lesson Plan
7
SN | DATE PLANNED | TOPIC | DATE ENGAGED | REMARKS |
1.1 | | Definition of Combinational Logic | | |
1.2 | | Canonical forms | | |
1.3 | | Generation of switching equations from truth tables | | |
1.4 | | Karnaugh maps-3,4 variables | | |
1.5 | | Incompletely specified functions (Don‘t care terms) | | |
1.6 | | Simplifying Max term equations | | |
1.7 | | Quine-McCluskey minimization technique | | |
1.8 | | Quine-McCluskey using don‘t care terms | | |
1.9 | | Reduced prime implicants Tables | | |
Need for Digital Electronics and Applications
Applications:
8
Combinational Logic Design :Boolean Logic
9
Combinational Logic Design :Boolean Logic
10
Boolean Laws and Theorems
11
Standard Forms of Boolean Expressions
12
Sum-of-Products (SOP)
13
Boolean Laws and Theorems
14
The Sum-of-Products (SOP) Form
15
Implementation of an SOP
16
X=AB+BCD+AC
A
B
B
C
D
A
C
X
A
B
B
C
D
A
C
X
General Expression 🡪 SOP
ex:
17
The Standard SOP Form
18
Minterm And Maxterm
19
Converting Product Terms to Standard SOP
20
Converting Product Terms to Standard SOP (example)
21
8
Binary Representation of a Standard Product Term
22
Product-of-Sums (POS)
23
The Product-of-Sums (POS) Form
24
Implementation of a POS
25
X=(A+B)(B+C+D)(A+C)
A
B
B
C
D
A
C
X
The Standard POS Form
26
Converting a Sum Term to Standard POS
27
Converting a Sum Term to Standard POS (example)
28
Binary Representation of a Standard Sum Term
29
SOP/POS
30
Converting Standard SOP to Standard POS
31
Converting Standard SOP to Standard POS
32
Converting Standard SOP to Standard POS (example)
33
Boolean Expressions & Truth Tables
34
Converting SOP Expressions to Truth Table Format
35
Converting SOP Expressions to Truth Table Format (example)
36
Inputs | Output | Product Term | ||
A | B | C | X | |
0 | 0 | 0 | | |
0 | 0 | 1 | | |
0 | 1 | 0 | | |
0 | 1 | 1 | | |
1 | 0 | 0 | | |
1 | 0 | 1 | | |
1 | 1 | 0 | | |
1 | 1 | 1 | | |
Inputs | Output | Product Term | ||
A | B | C | X | |
0 | 0 | 0 | | |
0 | 0 | 1 | | |
0 | 1 | 0 | | |
0 | 1 | 1 | | |
1 | 0 | 0 | | |
1 | 0 | 1 | | |
1 | 1 | 0 | | |
1 | 1 | 1 | | |
Inputs | Output | Product Term | ||
A | B | C | X | |
0 | 0 | 0 | | |
0 | 0 | 1 | 1 | |
0 | 1 | 0 | | |
0 | 1 | 1 | | |
1 | 0 | 0 | 1 | |
1 | 0 | 1 | | |
1 | 1 | 0 | | |
1 | 1 | 1 | 1 | |
Inputs | Output | Product Term | ||
A | B | C | X | |
0 | 0 | 0 | 0 | |
0 | 0 | 1 | 1 | |
0 | 1 | 0 | 0 | |
0 | 1 | 1 | 0 | |
1 | 0 | 0 | 1 | |
1 | 0 | 1 | 0 | |
1 | 1 | 0 | 0 | |
1 | 1 | 1 | 1 | |
Converting POS Expressions to Truth Table Format
37
Converting POS Expressions to Truth Table Format (example)
38
Inputs | Output | Product Term | ||
A | B | C | X | |
0 | 0 | 0 | | |
0 | 0 | 1 | | |
0 | 1 | 0 | | |
0 | 1 | 1 | | |
1 | 0 | 0 | | |
1 | 0 | 1 | | |
1 | 1 | 0 | | |
1 | 1 | 1 | | |
Inputs | Output | Product Term | ||
A | B | C | X | |
0 | 0 | 0 | | |
0 | 0 | 1 | | |
0 | 1 | 0 | | |
0 | 1 | 1 | | |
1 | 0 | 0 | | |
1 | 0 | 1 | | |
1 | 1 | 0 | | |
1 | 1 | 1 | | |
Inputs | Output | Product Term | ||
A | B | C | X | |
0 | 0 | 0 | 0 | |
0 | 0 | 1 | | |
0 | 1 | 0 | 0 | |
0 | 1 | 1 | 0 | |
1 | 0 | 0 | | |
1 | 0 | 1 | 0 | |
1 | 1 | 0 | 0 | |
1 | 1 | 1 | | |
Inputs | Output | Product Term | ||
A | B | C | X | |
0 | 0 | 0 | 0 | |
0 | 0 | 1 | 1 | |
0 | 1 | 0 | 0 | |
0 | 1 | 1 | 0 | |
1 | 0 | 0 | 1 | |
1 | 0 | 1 | 0 | |
1 | 1 | 0 | 0 | |
1 | 1 | 1 | 1 | |
Determining Standard Expression from a Truth Table
39
Determining Standard Expression from a Truth Table
40
Determining Standard Expression from a Truth Table (example)
41
POS
SOP
I/P | O/P | ||
A | B | C | X |
0 | 0 | 0 | 0 |
0 | 0 | 1 | 0 |
0 | 1 | 0 | 0 |
0 | 1 | 1 | 1 |
1 | 0 | 0 | 1 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 1 |
1 | 1 | 1 | 1 |
The Karnaugh Map
42
The Karnaugh Map
43
What is K-Map?
44
Karnaugh maps
45
For the case of 2 variables, we form a map consisting of 22=4 cells
as shown in Figure
A
B
0
1
0
1
Cell = 2n ,where n is a number of variables
00 | 10 |
01 | 11 |
A
B
0
1
0
1
| |
| |
A
B
0
1
0
1
| |
| |
Maxterm
Minterm
0
2
1
3
The 3 Variable K-Map
46
C AB | 0 | 1 |
00 | | |
01 | | |
11 | | |
10 | | |
Karnaugh maps
47
| | | |
| | | |
| | | |
| | | |
AB
CD
00
01
11
10
00
01
11
10
5
3
1
7
6
2
0
4
9
15
13
11
10
14
12
8
The 4-Variable K-Map
48
CD AB | 00 | 01 | 11 | 10 |
00 | | | | |
01 | | | | |
11 | | | | |
10 | | | | |
Cell Adjacency
49
CD AB | 00 | 01 | 11 | 10 |
00 | | | | |
01 | | | | |
11 | | | | |
10 | | | | |
K-Map SOP Minimization
50
Mapping a Standard SOP Expression
51
C AB | 0 | 1 |
00 | | |
01 | | |
11 | | |
10 | | |
1
Mapping a Standard SOP Expression (full example)
The expression:
52
C AB | 0 | 1 |
00 | | |
01 | | |
11 | | |
10 | | |
000
001
110
100
1
1
1
1
Practice:
Mapping a Nonstandard SOP Expression
53
Mapping a Nonstandard SOP Expression
54
Mapping a Nonstandard SOP Expression
55
K-Map Simplification of SOP Expressions
Grouping the 1s
56
Grouping the 0’s and 1’s
Objective is to maximize the number of elements in a group and to minimize the number of groups.
57
Number of Input literals to represent the group on K-MAP
58
NO OF Adjacent cells Group | NAMED | NUMBER OF INPUT LITERALS TO REPRESENT THE GROUP Two-variable K-Map | NUMBER OF INPUT LITERALS TO REPRESENT THE GROUP Three-variable K-Map | NUMBER OF INPUT LITERALS TO REPRESENT THE GROUP four-variable K-Map | NUMBER OF INPUT LITERALS TO REPRESENT THE GROUP five-variable K-Map |
1 | Single | 2 | 3 | 4 | 5 |
2 | Pair | 1 | 2 | 3 | 4 |
4 | Quad | F=1 or 0 | 1 | 2 | 3 |
8 | Octet | | F=1 or 0 | 1 | 2 |
16 | ---- | | | F=1or 0 | 1 |
32 | ---- | | | | F=1 or 0 |
Grouping the 1s (example)
59
C AB | 0 | 1 |
00 | 1 | |
01 | | 1 |
11 | 1 | 1 |
10 | | |
C AB | 0 | 1 |
00 | 1 | 1 |
01 | 1 | |
11 | | 1 |
10 | 1 | 1 |
Grouping the 1s (example)
60
CD AB | 00 | 01 | 11 | 10 |
00 | 1 | 1 | | |
01 | 1 | 1 | 1 | 1 |
11 | | | | |
10 | | 1 | 1 | |
CD AB | 00 | 01 | 11 | 10 |
00 | 1 | | | 1 |
01 | 1 | 1 | | 1 |
11 | 1 | 1 | | 1 |
10 | 1 | | 1 | 1 |
Determining the Minimum SOP Expression from the Map
61
Determining the Minimum SOP Expression from the Map
3. When all the minimum product terms are derived from the K-map, they are summed to form the minimum SOP expression.
62
Determining the Minimum SOP Expression from the Map (example)
63
CD AB | 00 | 01 | 11 | 10 |
00 | | | 1 | 1 |
01 | 1 | 1 | 1 | 1 |
11 | 1 | 1 | 1 | 1 |
10 | | 1 | | |
Determining the Minimum SOP Expression from the Map (exercises)
64
C AB | 0 | 1 |
00 | 1 | |
01 | | 1 |
11 | 1 | 1 |
10 | | |
C AB | 0 | 1 |
00 | 1 | 1 |
01 | 1 | |
11 | | 1 |
10 | 1 | 1 |
Determining the Minimum SOP Expression from the Map (exercises)
65
CD AB | 00 | 01 | 11 | 10 |
00 | 1 | 1 | | |
01 | 1 | 1 | 1 | 1 |
11 | | | | |
10 | | 1 | 1 | |
CD AB | 00 | 01 | 11 | 10 |
00 | 1 | | | 1 |
01 | 1 | 1 | | 1 |
11 | 1 | 1 | | 1 |
10 | 1 | | 1 | 1 |
Practicing K-Map (SOP)
66
Mapping Directly from a Truth Table
67
I/P | O/P | ||
A | B | C | X |
0 | 0 | 0 | 1 |
0 | 0 | 1 | 0 |
0 | 1 | 0 | 0 |
0 | 1 | 1 | 0 |
1 | 0 | 0 | 1 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 1 |
1 | 1 | 1 | 1 |
C AB | 0 | 1 |
00 | | |
01 | | |
11 | | |
10 | | |
1
1
1
1
Few definitions of Important terms
68
Determination of Simplified Boolean function in SOP and POS Form
69
PAIR (horizontal direction) | Derived product term | Derived sum term | Pair (Vertical direction) | Derived product term | Derived sum term |
(0,1) | | A | (0,2) | | B |
(2,3) | A | | (1,3) | B | |
Determination of Simplified Boolean function in SOP and POS Form
70
PAIR (horizontal direction) | Derived product term | Derived sum term | Pair (Vertical direction) | Derived product term | Derived sum term | Pair(on rolling over K-MAP) | Derived Product terms | Derived Sum terms |
(0,1) | X Y | X + Y | (0,4) | Y Z | Y + Z | (0 , 2) | X Z | X + Z |
(1,3) | X Z | X + Z | (1,5) | Y Z | Y + Z | (4, 6) | X Z | X + Z |
(3,2) | X Y | X + Y | (3,7) | Y Z | Y + Z | | | |
(4,5) | X Y | X + Y | (2,6) | Y Z | Y + Z | | | |
(5,7) | X Z | X + Z | | | | | | |
(7,6) | X Y | X + Y | | | | | | |
Complete K-MAP Simplication Process
71
Karnaugh MAP with “Don’t Care” Conditions
72
“Don’t Care” Conditions
73
INPUTS | O/P | |||
A | B | C | D | Y |
0 | 0 | 0 | 0 | 0 |
0 | 0 | 0 | 1 | 0 |
0 | 0 | 1 | 0 | 0 |
0 | 0 | 1 | 1 | 0 |
0 | 1 | 0 | 0 | 0 |
0 | 1 | 0 | 1 | 0 |
0 | 1 | 1 | 0 | 0 |
0 | 1 | 1 | 1 | 1 |
1 | 0 | 0 | 0 | 1 |
1 | 0 | 0 | 1 | 1 |
1 | 0 | 1 | 0 | X |
1 | 0 | 1 | 1 | X |
1 | 1 | 0 | 0 | X |
1 | 1 | 0 | 1 | X |
1 | 1 | 1 | 0 | X |
1 | 1 | 1 | 1 | X |
CD AB | 00 | 01 | 11 | 10 |
00 | | | | |
01 | | | 1 | |
11 | x | x | x | x |
10 | 1 | 1 | x | x |
Without “don’t care”
With “don’t care”
K-Map POS Minimization
74
Mapping a Standard POS Expression (full example)
The expression:
75
C AB | 0 | 1 |
00 | | |
01 | | |
11 | | |
10 | | |
000
010
110
101
0
0
0
0
K-map Simplification of POS Expression
76
C AB | 0 | 1 |
00 | | |
01 | | |
11 | | |
10 | | |
0
0
0
0
0
1
1
1
Quine-MCCluskey Minimization technique
77
QM-Method
2) Finding the essential prime implicants of the function ,as well as the prime implicants that are necessary to cover the function using prime implicant.
78
QM-Method Procedure
79
QM-Method Procedure
80
Quine-McCluskey Method
81
Tabular Representations
82
1
1
1
1
1
WX
YZ
00
01
11
10
00
01
11
10
1
1
1
1
F = X & Y # !W & Y & !Z
# W & !Y & Z # !W & X
!W & X
01--
!W & Y & !Z
0-10
X & Y
-11-
W & !Y & Z
1-01
Prime Implicants
83
F = X & !Y & Z
# !X & !Z
# !X & Y
Each product term
is an implicant
A product term that cannot have any of its
variables removed and still imply the logic
function is called a prime implicant.
Prime Implicants
84
X
YZ
00
01
11
10
0
1
1
1
1
1
F = Y & !Z
# X
1
-10
1--
Prime Implicants
85
F = Y & !Z
# X
X
YZ
00
01
11
10
0
1
1
1
1
1
1
Minterm X Y Z F
0 O O O 0
1 0 0 1 0
2 0 1 0 1
3 1 1 1 0
4 1 O O 1
5 1 0 1 1
6 1 1 0 1
7 1 1 1 1
-10
1--
Finding Prime Implicants
86
2 0 1 0
4 1 O 0
5 1 0 1
6 1 1 0
7 1 1 1
Step 1
Step 2
(2,6) - 1 0
(4,5) 1 0 -
(4,6) 1 - 0
(5,7) 1 - 1
(6,7) 1 1 -
Step 3
(4,5,6,7) 1 - -
(4,6,5,7) 1 - -
All unchecked entries are Prime Implicants
-10 Y & !Z
1-- X
Prime Implicants
87
F = Y & !Z
# X
X
YZ
00
01
11
10
0
1
1
1
1
1
1
Minterm X Y Z F
0 O O O 0
1 0 0 1 0
2 0 1 0 1
3 1 1 1 0
4 1 O O 1
5 1 0 1 1
6 1 1 0 1
7 1 1 1 1
-10
1--
Essential Prime Implicants
88
1
1
1
1
1
WX
YZ
00
01
11
10
00
01
11
10
1
1
1
1
1
Find the essential
prime implicants
using the Q-M
method.
Essential Prime Implicants
89
1
1
1
1
1
WX
YZ
00
01
11
10
00
01
11
10
1
1
1
1
1
minterms
0 0000
1 0001
2 0010
8 1000
3 0011
5 0101
10 1010
7 0111
14 1110
15 1111
Finding Prime Implicants
90
0 0000
1 0001
2 0010
8 1000
3 0011
5 0101
10 1010
7 0111
14 1110
15 1111
Step 1
Step 2
(0,1) 000-
(0,2) 00-0
(0,8) -000
(1,3) 00-1
(1,5) 0-01
(2,3) 001-
(2,10) -010
(8,10) 10-0
(3,7) 0-11
(5,7) 01-1
(10,14) 1-10
(7,15) -111
(14,15) 111-
Step 3
(0,1,2,3) 00--
(0,2,1,3) 00--
(0,2,8,10) -0-0
(0,8,2,10) -0-0
(1,5,3,7) 0--1
(1,3,5,7) 0--1
6 Prime Implicants
1-10
-111
111-
00--
-0-0
0--1
Find Essential Prime Implicants
91
Prime
Implicant
Covered
minterms
1-10
-111
111-
00--
-0-0
0--1
Minterms
0 1 2 3 5 7 8 10 14 15
10,14
7,15
14,15
0,1,2,3
0,2,8,10
1,3,5,7
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
*
3 Prime Implicants
92
1
1
1
1
1
WX
YZ
00
01
11
10
00
01
11
10
1
1
1
1
1
0--1
-0-0
111-
!W & Z
W & X & Y
!X & !Z
F = !W & Z # W & X & Y # !X & !Z
University Questions
1 Explain the following canonical form:
i) F(X,Y,Z)=X+XY+XZ
ii) F(X,Y,Z)=(X+Z)(X+Y)(Y+Z) 10M
2. Find the minimal POS expression of incompletely specified Boolean function using K-Map. 05M
f(a,b,c,d)=ΠM(1,2,3,4,9,10)+πd(0,4,15).
3. Find all the minimal SOP expression of f(a,b,c,d)=Σ(6,7,9,10,13)+Σd(1,4,5,11,15) using K-Map. 05M
4. Find all the Prime Implicants of the function:
f(a,b,c,d)= Σ(7,9,12,13,14,15)+ Σd(4,11) using Quine-McClusky’s Algorithm. 10M
5. For a given incomplete Boolean function ,find the minimal sum and minimal Product expression using MEV technique taking least significant bit as map entered variable.
f(a,b,c,d)= Σ(1,5,6,7,9,11,12,13)+ Σd(0,3,4) 10M
6. Simplify the following function using Quine-McClusky’s method and realize the simplified using Nor gates. P=f(w,x,y,z)= Σ m(7,9,12,13,14,15)+ Σ d(4,11) 12M
7. Simplify f(a,b,c,d)= Σ m(0,4,5,6,13,14,15)+ Σ d(2,7,8,9)using MEV technique using basic gates. 08M
93
University Questions
8. Reduce the following Boolean function using K-Map and Realize the simplified expression using NAND gates.
T=f(a,b,c,d)= Σ m(1,3,4,5,13,15)+d(8,9,10,11) 08M
9. Convert the following Boolean function into their proper canonical form in decimal notation.
i) M=P(Q+S) ii)N=(W+X)(Y+Z) 07M
10. Define combinational logic. Two Motors M2 and M1 are controlled by three sensors S1,S2,S3.One motor M2 is to run anytime when all three sensors are on. The other M1 is to run whenever sensors S2 or S1 but not both are on and S3 is off. For all sensors combination where M1 is on ,M2 is to be off except when all sensors are off and then both motors remain off. Construct the truth table and write the Boolean output equation. 05M
94
Assignment Questions
a) f(A,B,C,D)= Σm(7,13,14,15)
b) f(w,x,y,z)= Σm(2,3,12,13,14,15)
a) f(a,b,c,d)=ΠM(0,1,2,3,4,10,11)
b) f(w,x,y,z)=ΠM(1,3,5,7,13,15)
a) f=ΠM(0,1,2,3,5,6,10,11) d=ΠM(13,14,15)
b)f =Σm(1,3,5,7,13,15) d=Σm(0,2,6)
95