Preface |
|
xv | |
About the Author |
|
xxi | |
Chapter 1 Introduction to Microprocessor Design |
|
1 | (17) |
|
1.1 Overview of Microprocessor Design |
|
|
3 | (3) |
|
1.2 Design Abstraction Levels |
|
|
6 | (1) |
|
1.3 Examples of a 2-to-1 Multiplexer |
|
|
7 | (4) |
|
|
7 | (2) |
|
|
9 | (2) |
|
|
11 | (1) |
|
1.4 Introduction to Hardware Description Language |
|
|
11 | (4) |
|
|
15 | (1) |
|
|
16 | (1) |
|
|
17 | (1) |
Chapter 2 Fundamentals of Digital Circuits |
|
18 | (47) |
|
|
19 | (8) |
|
|
20 | (1) |
|
2.1.2 Converting between Binary and Decimal |
|
|
20 | (3) |
|
2.1.3 Octal and Hexadecimal Notations |
|
|
23 | (2) |
|
2.1.4 Binary Number Arithmetic |
|
|
25 | (2) |
|
|
27 | (5) |
|
2.2.1 Two's Complement Representation |
|
|
27 | (2) |
|
|
29 | (1) |
|
2.2.3 Signed Number Arithmetic |
|
|
30 | (2) |
|
|
32 | (1) |
|
2.4 Basic Logic Operators and Logic Expressions |
|
|
33 | (2) |
|
|
35 | (1) |
|
|
36 | (2) |
|
2.7 Boolean Algebra and Boolean Equations |
|
|
38 | (8) |
|
|
38 | (3) |
|
|
41 | (1) |
|
2.7.3 Boolean Functions and Their Inverses |
|
|
41 | (5) |
|
2.8 Minterms and Maxterms |
|
|
46 | (6) |
|
|
46 | (3) |
|
|
49 | (3) |
|
2.9 Canonical, Standard, and Non-Standard Forms |
|
|
52 | (1) |
|
|
53 | (1) |
|
2.11 Designing a Car Security System |
|
|
54 | (3) |
|
2.12 Verilog and VHDL Code for Digital Circuits |
|
|
57 | (2) |
|
2.12.1 Verilog Code for a Boolean Function |
|
|
57 | (1) |
|
2.12.2 VHDL Code for a Boolean Function |
|
|
58 | (1) |
|
|
59 | (6) |
Chapter 3 Combinational Circuits |
|
65 | (47) |
|
3.1 Analysis of Combinational Circuits |
|
|
66 | (6) |
|
3.1.1 Using a Truth Table |
|
|
67 | (3) |
|
3.1.2 Using a Boolean Function |
|
|
70 | (2) |
|
3.2 Synthesis of Combinational Circuits |
|
|
72 | (4) |
|
3.2.1 Using Only NAND Gates |
|
|
75 | (1) |
|
3.3 Minimization of Combinational Circuits |
|
|
76 | (13) |
|
|
77 | (1) |
|
|
78 | (7) |
|
|
85 | (1) |
|
|
86 | (3) |
|
3.4 Timing Hazards and Glitches |
|
|
89 | (3) |
|
|
91 | (1) |
|
3.5 BCD to 7-Segment Decoder |
|
|
92 | (3) |
|
3.6 Verilog and VHDL Code for Combinational Circuits |
|
|
95 | (11) |
|
3.6.1 Structural Verilog Code |
|
|
95 | (2) |
|
3.6.2 Structural VHDL Code |
|
|
97 | (4) |
|
3.6.3 Dataflow Verilog Code |
|
|
101 | (1) |
|
|
102 | (1) |
|
3.6.5 Behavioral Verilog Code |
|
|
103 | (1) |
|
3.6.6 Behavioral VHDL Code |
|
|
104 | (2) |
|
|
106 | (6) |
Chapter 4 Standard Combinational Components |
|
112 | (45) |
|
4.1 Signal Naming Conventions |
|
|
113 | (1) |
|
|
114 | (3) |
|
|
117 | (6) |
|
|
117 | (1) |
|
|
118 | (2) |
|
4.3.3 Carry-Lookahead Adder |
|
|
120 | (3) |
|
|
123 | (2) |
|
4.5 Adder-Subtractor Combination |
|
|
125 | (4) |
|
4.6 Arithmetic Logic Unit |
|
|
129 | (8) |
|
|
137 | (3) |
|
|
140 | (2) |
|
|
142 | (4) |
|
|
146 | (3) |
|
|
149 | (2) |
|
|
151 | (6) |
Chapter 5 Sequential Circuits |
|
157 | (58) |
|
|
159 | (1) |
|
|
160 | (3) |
|
5.3 Car Security System-Version 2 |
|
|
163 | (1) |
|
|
164 | (1) |
|
|
164 | (2) |
|
|
166 | (1) |
|
5.7 Verilog and VHDL Code for Memory Elements |
|
|
166 | (3) |
|
5.7.1 VHDL Code for a D Latch with Enable |
|
|
168 | (1) |
|
5.7.2 Verilog Code for a D Latch with Enable |
|
|
169 | (1) |
|
|
169 | (2) |
|
|
171 | (5) |
|
5.9.1 Alternative Smaller Circuit |
|
|
175 | (1) |
|
5.10 D Flip-Flop with Enable |
|
|
176 | (4) |
|
5.10.1 Asynchronous Inputs |
|
|
177 | (3) |
|
5.11 Description of a Flip-Flop |
|
|
180 | (1) |
|
5.11.1 Characteristic Table |
|
|
180 | (1) |
|
5.11.2 Characteristic Equation |
|
|
180 | (1) |
|
|
180 | (1) |
|
|
181 | (1) |
|
|
182 | (6) |
|
|
188 | (9) |
|
|
190 | (2) |
|
|
192 | (5) |
|
|
197 | (8) |
|
5.15.1 Serial-to-Parallel Shift Register |
|
|
199 | (1) |
|
5.15.2 Serial-to-Parallel and Parallel-to-Serial Shift Register |
|
|
200 | (2) |
|
5.15.3 Linear Feedback Shift Register |
|
|
202 | (3) |
|
|
205 | (5) |
|
|
205 | (2) |
|
5.16.2 Binary Up Counter with Parallel Load |
|
|
207 | (3) |
|
|
210 | (1) |
|
|
211 | (4) |
Chapter 6 Finite-State Machines |
|
215 | (68) |
|
6.1 Finite-State Machine Models |
|
|
217 | (4) |
|
|
221 | (3) |
|
6.3 Analysis of Finite-State Machines |
|
|
224 | (10) |
|
6.3.1 Next-State Equations |
|
|
225 | (1) |
|
|
226 | (2) |
|
|
228 | (1) |
|
|
228 | (1) |
|
|
229 | (1) |
|
|
230 | (4) |
|
6.4 Synthesis of Finite-State Machines |
|
|
234 | (5) |
|
|
235 | (1) |
|
|
236 | (1) |
|
6.4.3 Next-State Equations |
|
|
237 | (1) |
|
6.4.4 Output Table and Output Equations |
|
|
237 | (1) |
|
|
238 | (1) |
|
6.5 Optimizations for FSMs |
|
|
239 | (4) |
|
|
239 | (1) |
|
|
240 | (3) |
|
|
243 | (1) |
|
6.6 FSM Construction Examples |
|
|
243 | (18) |
|
6.6.1 Car Security System-Version 3 |
|
|
243 | (2) |
|
6.6.2 Modulo-6 Up-Counter |
|
|
245 | (4) |
|
|
249 | (2) |
|
6.6.4 Simple Microprocessor Control Unit |
|
|
251 | (3) |
|
6.6.5 Elevator Controller Using a Moore FSM |
|
|
254 | (4) |
|
6.6.6 Elevator Controller Using a Mealy FSM |
|
|
258 | (3) |
|
6.7 Verilog and VHDL Code for FSM Circuits |
|
|
261 | (9) |
|
6.7.1 Behavioral Verilog Code for a Moore FSM |
|
|
261 | (4) |
|
6.7.2 Behavioral Verilog Code for a Mealy FSM |
|
|
265 | (1) |
|
6.7.3 Behavioral VHDL Code for a Moore FSM |
|
|
266 | (3) |
|
6.7.4 Behavioral VHDL Code for a Mealy FSM |
|
|
269 | (1) |
|
|
270 | (13) |
Chapter 7 Dedicated Microprocessors |
|
283 | (80) |
|
|
286 | (1) |
|
7.2 Constructing the Datapath |
|
|
287 | (15) |
|
7.2.1 Selecting Registers |
|
|
293 | (1) |
|
7.2.2 Selecting Functional Units |
|
|
294 | (1) |
|
7.2.3 Data Transfer Methods |
|
|
295 | (2) |
|
7.2.4 Generating Status Signals |
|
|
297 | (5) |
|
7.3 Constructing the Control Unit |
|
|
302 | (18) |
|
7.3.1 Deriving the Control Signals |
|
|
303 | (2) |
|
7.3.2 Deriving the State Diagram |
|
|
305 | (7) |
|
|
312 | (3) |
|
7.3.4 Deriving the FSM Circuit |
|
|
315 | (5) |
|
7.4 Constructing the Complete Microprocessor |
|
|
320 | (3) |
|
7.5 Dedicated Microprocessor Construction Examples |
|
|
323 | (18) |
|
7.5.1 Greatest Common Divisor |
|
|
323 | (7) |
|
7.5.2 High-Low Number Guessing Game |
|
|
330 | (7) |
|
7.5.3 Traffic Light Controller |
|
|
337 | (4) |
|
7.6 Verilog and VHDL Code for Dedicated Microprocessors |
|
|
341 | (15) |
|
|
342 | (9) |
|
|
351 | (3) |
|
|
354 | (2) |
|
|
356 | (7) |
Chapter 8 General-Purpose Microprocessors |
|
363 | (52) |
|
8.1 Overview of the CPU Design |
|
|
364 | (2) |
|
8.2 The EC-1 General-Purpose Microprocessor |
|
|
366 | (10) |
|
|
366 | (1) |
|
|
367 | (2) |
|
|
369 | (4) |
|
|
373 | (1) |
|
|
373 | (2) |
|
|
375 | (1) |
|
8.2.7 Hardware Implementation |
|
|
375 | (1) |
|
8.3 The EC-2 General-Purpose Microprocessor |
|
|
376 | (12) |
|
|
376 | (1) |
|
|
377 | (2) |
|
|
379 | (5) |
|
|
384 | (1) |
|
|
384 | (3) |
|
8.3.6 Hardware Implementation |
|
|
387 | (1) |
|
8.4 Extending the EC-2 Instruction Set |
|
|
388 | (3) |
|
8.5 Using and Interfacing the EC-2 |
|
|
391 | (4) |
|
|
395 | (4) |
|
8.6.1 Basic Pipelined Processor |
|
|
395 | (2) |
|
|
397 | (2) |
|
8.7 Verilog and VHDL Code for General-Purpose Microprocessors |
|
|
399 | (12) |
|
|
399 | (6) |
|
|
405 | (6) |
|
|
411 | (4) |
Chapter 9 Interfacing Microprocessors |
|
415 | (71) |
|
9.1 Multiplexing 7-Segment LED Display |
|
|
416 | (4) |
|
9.1.1 Theory of Operation |
|
|
416 | (1) |
|
|
417 | (3) |
|
9.2 Issues with Interfacing Switches |
|
|
420 | (7) |
|
9.3 3 x 4 Keypad Controller |
|
|
427 | (4) |
|
9.3.1 Theory of Operation |
|
|
427 | (2) |
|
|
429 | (2) |
|
9.4 PS2 Keyboard and Mouse |
|
|
431 | (13) |
|
9.4.1 Theory of Operation-PS2 Keyboard |
|
|
431 | (1) |
|
9.4.2 Controller Design-PS2 Keyboard |
|
|
432 | (4) |
|
9.4.3 Theory of Operation-PS2 Mouse |
|
|
436 | (2) |
|
9.4.4 Controller Design-PS2 Mouse |
|
|
438 | (6) |
|
9.5 RS-232 Controller for Bluetooth Communication |
|
|
444 | (6) |
|
9.5.1 Theory of Operation-RS-232 |
|
|
445 | (1) |
|
9.5.2 Controller Design-RS-232 |
|
|
446 | (3) |
|
|
449 | (1) |
|
9.6 Liquid-Crystal Display Controller |
|
|
450 | (7) |
|
9.6.1 Theory of Operation |
|
|
450 | (2) |
|
|
452 | (5) |
|
9.7 VGA Monitor Controller |
|
|
457 | (10) |
|
9.7.1 Theory of Operation |
|
|
457 | (3) |
|
|
460 | (6) |
|
|
466 | (1) |
|
9.8 A/D Controller for Temperature Sensor |
|
|
467 | (8) |
|
9.8.1 Theory of Operation |
|
|
467 | (2) |
|
|
469 | (5) |
|
|
474 | (1) |
|
9.9 I2C Bus Controller for Real-Time Clock |
|
|
475 | (9) |
|
9.9.1 Theory of Operation |
|
|
475 | (3) |
|
|
478 | (5) |
|
|
483 | (1) |
|
|
484 | (2) |
Appendix A Xilinx Development Tutorial |
|
486 | (26) |
|
|
486 | (6) |
|
A.1.1 Creating a New Project |
|
|
486 | (3) |
|
A.1.2 Specifying the FPGA |
|
|
489 | (3) |
|
A.2 Creating a New Schematic Source File |
|
|
492 | (8) |
|
A.2.1 Drawing Your Schematic Circuit |
|
|
493 | (2) |
|
A.2.2 Creating and Using a Schematic Symbol |
|
|
495 | (2) |
|
A.2.3 Editing a Schematic Symbol |
|
|
497 | (3) |
|
A.2.4 Using a Schematic Symbol in Another Project |
|
|
500 | (1) |
|
A.3 Creating a New Verilog or VHDL Source File |
|
|
500 | (1) |
|
A.4 Setting the Top-Level Module Design File |
|
|
500 | (1) |
|
A.5 Mapping the I/O Signals |
|
|
500 | (3) |
|
A.5.1 Using PlanAhead for Mapping the Pins |
|
|
501 | (2) |
|
A.5.2 Faster Alternative Method for Mapping the Pins |
|
|
503 | (1) |
|
A.6 Synthesis and Implementation |
|
|
503 | (2) |
|
A.7 Programming the Circuit to the FPGA |
|
|
505 | (4) |
|
|
509 | (3) |
Appendix B Altera Development Tutorial |
|
512 | (21) |
|
|
512 | (4) |
|
B.1.1 Creating a New Project |
|
|
512 | (2) |
|
B.1.2 Specifying the FPGA |
|
|
514 | (2) |
|
B.2 Using the Graphic Editor |
|
|
516 | (5) |
|
B.2.1 Starting the Graphic Editor |
|
|
516 | (1) |
|
|
516 | (1) |
|
B.2.3 Inserting Logic Symbols |
|
|
517 | (1) |
|
B.2.4 Selecting, Moving, Copying, and Deleting Logic Symbols |
|
|
518 | (1) |
|
B.2.5 Making and Naming Connections |
|
|
519 | (2) |
|
B.2.6 Selecting, Moving, and Deleting Connection Lines |
|
|
521 | (1) |
|
B.3 Managing Files in a Project |
|
|
521 | (2) |
|
B.3.1 Design Files in a Project |
|
|
522 | (1) |
|
B.3.2 Creating a New Verilog or VHDL Source File |
|
|
522 | (1) |
|
B.3.3 Opening a Design File |
|
|
522 | (1) |
|
B.3.4 Adding Design Files to a Project |
|
|
523 | (1) |
|
B.3.5 Deleting Design Files from a Project |
|
|
523 | (1) |
|
B.3.6 Setting the Top-Level Entity Design File |
|
|
523 | (1) |
|
|
523 | (1) |
|
B.4 Analysis and Synthesis |
|
|
523 | (1) |
|
B.5 Creating and Using a Logic Symbol |
|
|
524 | (1) |
|
B.6 Mapping the I/O Signals |
|
|
525 | (2) |
|
B.6.1 Faster Alternative Method for Mapping the Pins |
|
|
527 | (1) |
|
B.7 Fitting the Netlist and Pins to the FPGA |
|
|
527 | (1) |
|
B.8 Programming the Circuit to the FPGA |
|
|
528 | (1) |
|
|
529 | (4) |
Appendix C Verilog Summary |
|
533 | (20) |
|
C.1 Basic Language Elements |
|
|
533 | (7) |
|
|
533 | (1) |
|
|
534 | (1) |
|
|
534 | (1) |
|
|
534 | (1) |
|
C.1.5 Numbers and Strings |
|
|
534 | (1) |
|
|
535 | (1) |
|
|
536 | (1) |
|
|
536 | (1) |
|
|
537 | (2) |
|
|
539 | (1) |
|
|
540 | (8) |
|
|
540 | (1) |
|
|
541 | (1) |
|
|
542 | (1) |
|
|
542 | (2) |
|
|
544 | (1) |
|
|
545 | (1) |
|
|
545 | (1) |
|
|
546 | (1) |
|
|
547 | (1) |
|
|
547 | (1) |
|
C.2.11 Behavioral Model Example |
|
|
548 | (1) |
|
|
548 | (2) |
|
C.3.1 Continuous Assignment |
|
|
549 | (1) |
|
C.3.2 Conditional Assignment |
|
|
549 | (1) |
|
C.3.3 Dataflow Model Example |
|
|
550 | (1) |
|
|
550 | (3) |
|
|
550 | (1) |
|
C.4.2 User-Defined Module |
|
|
551 | (2) |
Appendix D VHDL Summary |
|
553 | (25) |
|
D.1 Basic Language Elements |
|
|
553 | (11) |
|
|
553 | (1) |
|
|
554 | (1) |
|
|
554 | (1) |
|
|
554 | (1) |
|
|
554 | (3) |
|
|
557 | (1) |
|
|
558 | (1) |
|
|
559 | (1) |
|
|
560 | (2) |
|
|
562 | (2) |
|
D.2 Behavioral Model-Sequential Statements |
|
|
564 | (6) |
|
|
564 | (1) |
|
D.2.2 Sequential Signal Assignment |
|
|
564 | (1) |
|
D.2.3 Variable Assignment |
|
|
565 | (1) |
|
|
565 | (1) |
|
|
565 | (1) |
|
|
566 | (1) |
|
|
566 | (1) |
|
|
567 | (1) |
|
|
567 | (1) |
|
|
567 | (1) |
|
|
567 | (1) |
|
|
567 | (1) |
|
|
568 | (1) |
|
|
569 | (1) |
|
D.2.15 Behavioral Model Example |
|
|
570 | (1) |
|
D.3 Dataflow Model-Concurrent Statements |
|
|
570 | (3) |
|
D.3.1 Concurrent Signal Assignment |
|
|
570 | (1) |
|
D.3.2 Conditional Signal Assignment |
|
|
571 | (1) |
|
D.3.3 Selected Signal Assignment |
|
|
571 | (1) |
|
D.3.4 Dataflow Model Example |
|
|
572 | (1) |
|
D.4 Structural Model-Concurrent Statements |
|
|
573 | (3) |
|
D.4.1 COMPONENT Declaration |
|
|
573 | (1) |
|
|
574 | (1) |
|
|
574 | (1) |
|
|
575 | (1) |
|
D.4.5 Structural Model Example |
|
|
575 | (1) |
|
|
576 | (2) |
|
|
576 | (1) |
|
D.5.2 CONV_STD_LOGIC_VECTOR(,) |
|
|
577 | (1) |
Index |
|
578 | |