Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Digital logic and microprocessor design with VHDL
Nội dung xem thử
Mô tả chi tiết
SAC 11 K E M T 1 I E O D lA C D D A T
Enoch 0. Hwang
Digital Logic and
Microprocessor Design
with VHDL
( o n lro l
In p iils
I )utu
Inpuls
C o n tro l I );K;i
( h n p u ls ( )ulpuis
Enoch O. Hwang
La Sierra University
Riverside
T H O M S O N
Canada Mexico Singapore Spain United Kingdom United States
T I H O I V I S O I M
---------- * ------------- -
Digital Logic and M icroproccssor Design uitli N 111)1
In I n o c h (). I h v a n u
A sso ciate \ iee-President
¿nid Id it o r ia l D irector:
I vclyn Veilcli
Puhlisher:
Kill Slcnquisi
SjiIon and M arketing M anager:
John More
I )evelopm ental K d ilo r:
Kamilah Keid Burrell
Perm issions ( oordinator:
Vicki Ciould
Prodmtion Services:
K P k I ditoiul Sei nices
( op\ I riitor:
SIcIIn ( ICI Liv'l KlK v. ll! I
Proofrearier:
K »m. kernan ShclK < icri»ci Knecht I
Indexen
I nik. I) u I Iwanü
Production Manager:
Ken.ile \k ( Ins
( real ist* D irector:
\ni»cla < luei
Inferior D esign:
( atmela Pereil.i
( o%er Design:
\ndrcw \danis
( oinposilor:
Pie11 \ . Ine
Prinler:
11.insecnlinenl.il l’rintim:
( O P Y K K illl (< 2(HK> h\ Nelson. .1 di\i*
sion ol lliomson ( an.»da Limited.
Prinled and houiul in ( 'anada
2 3 4 1)7 t)(i 05
l-oi niore inlormation contaei Nelson.
1120 Birclim ount Koad. loronlo. Ontario.
( anada. M I K 5( i4.
( )r you ean \isii our Inlernel sile al
hilp:// \n uw.nelson.com
Librarv ol ( oneress ( onlrol Number:
2IHM I17355
IS B N : 0-5344h5*>3-5
A I I K K . I I I S K l S l K \ I I ) N o p a i l o l
Ih is w o r k c o v c r c d I n ih c c o p v i i u h t h e r e in
111 in h e i c p i o d u c c d . i r a n s c r i b c d . o r u s e d
in .hin l o r m «»1 In a m in e a n s u r a p lu c .
e l c c l i o n i e . or m e c h a m e a l . m e l in l im ! p h o l o
e o p N in if r e c o r d i n u . lapint*. W e b d i s t i ih u
iii'ii. t »1 i n l o i m a l i o n s lo r a e e a n d rel 1 ie \a l
sn > l e m s ns 11 h « » i n i h e N v r i l l e n p e r m i s s i o n o l
l l i / p u b l i s h e i
h * i |>eiinissi«ui io use m a t e r ia l I r o m lliis
I e nl “ i p r o i l u e i . s i i h m i l .1 re iju c s i o n l i n e al
nnvsnn l l i m o s o n i i f h i s . e o i n
I sers 1 lloit Ilas b e e il n ia d e lo Ir a c c o w n
e i I n p *»l a l l c o p M i ü h l i n a l e n a l a n d •“
se m e p e in iis s io n t i o m e o p s i i u h l h o l d
e i s In ih e e s e n l o l a n s i|iie s lio n arism t*
a s t o i l u us». o l a n s i n a l e n a l . ssc ssill h e
p l e a v i l Io m a k e I h e n e c c s s a i ) c o i r c c l io i i s
111 l u t u u p r in iim ts
\ ‘leia ** a I 1 .1 1l c m . u k a n d s c r v ic c 111.11 k ol
X ’leia t o i p o r a i i o n 111 l l i c l n i l e d S l a l e s
a n d o i h e i c o u n t rie s . A l t e r a p r o d u e t s a ie
t h e m le l l e e iu a l p r o p c r l x o l A l l e r a ( o r p o
r a t i o n a n d a i e p r o le e le il I n c o p w i u h l l.iws
a in l o i k 0 1 m o i e l S a i u l l o i c m n p a t e n l s
a i u l p a l e n t a p p l i e a l i o n s .
North Xm erica
\ eis» »11
112<> hirchm ount Koad
loionio. ( )nlaiio \ 1! K i-l
( anada
Vsia
I hoinson I e .11 nini!
s Shenton Was »ul ol
I l( liuildm u
Siiiuapore in»ssiis
Xusiralia/New /.calaml
lliom son l.eainuii!
Iu 2 Dodds Street
S< tiilhhank. \ k hu 1.1
XiM ialia 'IHM'
I.nropc/M iddle I ¡ist/ Xlrica
I liomson I earniii!1
Iliiih llo lb o in llouse
sli s | Itedloid Konn
I omlon W ( IK 41 K
l 'niled kiih'dom
I al in \m erica
lliom son I earmiit!
Seiieca
( oloni.» Polanco
I 15hl) Mexico I ) I
Mexico
Spain
Param nlo
( alle Ma^allanes. ’s
2NI)I s Madrid. Spain
To my wife and children, Windy, Jonathan, f//7í/ Michelle
Contents
Preface xv
About the Author xix
• • # ##••••••••«*•
1 Designing Microprocessors 1
1.1 Overview of a Microprocessor 3
1.2 Design Abstraction Levels 5
1.3 Examples of a 2-to-1 Multiplexer 7
1.3.1 Behavioral Level 7
1.3.2 Gate Level 8
1.3.3 Transistor Level 10
1.4 Introduction to VHDL 10
1.5 Synthesis 13
1.6 Going Forward 14
1.7 Summary Checklist 14
1.8 Problems 16
• • • • • • •
2 Digital Circuits 17
2.1 Binary Numbers 18
2.2 Binary Switch 22
2.3 Basic Logic Operators and Logic Expressions 23
2.4 Truth Tables 24
2.5 Boolean Algebra and Boolean Functions 25
2.5.1 Boolean Algebra 25
'2.5.2 Duality Principle 28
2.5.3 Boolean Functions and their Inverses 29
v
2.6 Minterr-;.- u ■ Maxterms 33
2.6.1 Mint pi ms 33
* 2.6.2 Maxtor ms 36
2.7 Canonical, Standard, and Non-Standard Forms 38
2.8 Logic Gates and Circuit Diagrams 39
2.9 Designing a Car Security System 43
2.10 VHDL for Digital Circuits 45
2.10.1 VHDL Code for a 2-Input NAND Gate 46
2.10.2 VHDL Code for a 3-Input NOR Gate 47
2.10.3 VHDL Code for a Function 48
2.11 Summary Checklist 49
2.12 Problems 50
3 Combinational Circuits 54
3.1 Analysis of Combinational Circuits 55
3.1.1 Using a Truth Table 56
3.1.2 Using a Boolean Function 59
3.2 Synthesis of Combinational Circuits 60
’ 3.3 Technology Mapping 63
3.4 Minimization of Combinational Circuits 67
3.4.1 Karnaugh Maps 67
3.4.2 Don't-Cares 74
’ 3.4.3 Tabulation Method 75
' 3.5 Timing Hazards and Glitches 77
3.5.1 Using Glitches 79
3.6 BCD to 7-Segment Decoder 80
3.7 VHDL tor Combinational Circuits 82
3.7.1 Structural BCD to 7-Segment Decoder 83
3.7.2 Dataflow BCD to 7-Segment Decoder 88
3.7.3 Behavioral BCD to 7-Segment Decoder 89
3.8 Summaiy CheckIist 91
3.9 Problems 92
• ••#«** 1 ‘ * ..........
4 Standard Combinational Components 98
4.1 Signal Naming Conventions 99
4.2 Adder 100
4.2.1 Full Adder 100
4.2.2 Ripple-Carry Adder 101
'4.2.3 Carry Lookahead Adder 102
Contents
4.3 Two's Complement Binary Numbers 105
4.4 Subtractor 108
4.5 Adder-Subtractor Combination 109
4.6 Arithmetic Logic Unit 114
4.7 Decoder 117
4.8 Encoder 12 2
*4.8.1 Priority Encoder 123
4.9 Multiplexer 124
‘4.9.1 Using Multiplexers to Implement a Function 128
4.10 Tri-State Buffer 128
4.11 Comparator 130
4.12 Shifter 134
*4.12.1 Barrel Shifter 135
•4.13 Multiplier 136
4.14 Summary Checklist 139
4.15 Problems 139
f # • ••••••••••*•*
5 Implementation Technologies 145
5.1 Physical Abstraction 146
5.2 Metal-Oxide-Semiconductor Field-Effect Transistor (MOSFET) 147
5.3 CMOS Logic 148
5.4 CMOS Circuits 150
5.4.1 CMOS Inverter 151
5.4.2 CMOS NAND Gate 152
5.4.3 CMOS AND Gate 154
5.4.4 CMOS NOR and OR Gates 155
5.4.5 Transmission Gate 155
5.4.6 2-Input Multiplexer CMOS Circuit 156
5.4.7 CMOS XOR and XNOR Gates 158
5.5 Analysis of CMOS Circuits 159
'5.6 Using ROMs to Implement a Function 161
'5.7 Using PLAs to Implement a Function 164
5.8 Using PALs to Implement a Function 168
'5.9 Complex Programmable Logic Device (CPLD) 170
'5.10 Field Programmable Gate Array (FPGA) 173
5.11 Summary Checklist 175
5.12 Problems 175