100% found this document useful (2 votes)
22 views

Digital Logic & Microprocessor Design With Interfacing, 2nd Edition Enoch O. Hwang - eBook PDF pdf download

The document is a PDF eBook titled 'Digital Logic & Microprocessor Design With Interfacing, 2nd Edition' by Enoch O. Hwang, which covers various aspects of digital logic and microprocessor design. It includes chapters on microprocessor design, digital circuits, combinational and sequential circuits, and finite-state machines, among other topics. The eBook is published by Cengage Learning and is available for download from ebooksecure.com.

Uploaded by

kansiagansiu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
22 views

Digital Logic & Microprocessor Design With Interfacing, 2nd Edition Enoch O. Hwang - eBook PDF pdf download

The document is a PDF eBook titled 'Digital Logic & Microprocessor Design With Interfacing, 2nd Edition' by Enoch O. Hwang, which covers various aspects of digital logic and microprocessor design. It includes chapters on microprocessor design, digital circuits, combinational and sequential circuits, and finite-state machines, among other topics. The eBook is published by Cengage Learning and is available for download from ebooksecure.com.

Uploaded by

kansiagansiu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 83

Digital Logic & Microprocessor Design With

Interfacing, 2nd Edition Enoch O. Hwang - eBook


PDF download

https://ebooksecure.com/download/digital-logic-microprocessor-
design-with-interfacing-2nd-edition-ebook-pdf/

Download full version ebook from https://ebooksecure.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebooksecure.com
to discover even more!

(eBook PDF) Digital Logic Circuit Analysis and Design


2nd Edition

http://ebooksecure.com/product/ebook-pdf-digital-logic-circuit-
analysis-and-design-2nd-edition/

(eBook PDF) Digital Design with RTL Design VHDL and


Verilog 2nd

http://ebooksecure.com/product/ebook-pdf-digital-design-with-rtl-
design-vhdl-and-verilog-2nd/

(eBook PDF) Advanced Digital Design with the Verilog


HDL 2nd Edition

http://ebooksecure.com/product/ebook-pdf-advanced-digital-design-
with-the-verilog-hdl-2nd-edition/

(eBook PDF) Starting Out with Programming Logic and


Design 4th

http://ebooksecure.com/product/ebook-pdf-starting-out-with-
programming-logic-and-design-4th/
Starting Out With Programming Logic and Design, 6e 6th
Edition Tony Gaddis - eBook PDF

https://ebooksecure.com/download/starting-out-with-programming-
logic-and-design-6e-ebook-pdf/

(eBook PDF) Programming Logic & Design Comprehensive


9th Edition

http://ebooksecure.com/product/ebook-pdf-programming-logic-
design-comprehensive-9th-edition/

Digital System Design with FPGA: Implementation Using


Verilog and VHDL 1st Edition Unsalan - eBook PDF

https://ebooksecure.com/download/digital-system-design-with-fpga-
implementation-using-verilog-and-vhdl-ebook-pdf/

Programming Logic & Design, Comprehensive 9th edition


Joyce Farrell - eBook PDF

https://ebooksecure.com/download/programming-logic-design-
comprehensive-9th-edition-ebook-pdf/

(eBook PDF) Digital Design: With an Introduction to the


Verilog HDL, VHDL, and System Verilog 6th Edition

http://ebooksecure.com/product/ebook-pdf-digital-design-with-an-
introduction-to-the-verilog-hdl-vhdl-and-systemverilog-6th-
edition/
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Digital Logic and
Microprocessor Design
with Interfacing

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Digital Logic and
Microprocessor Design
with Interfacing
2nd Edition

Enoch O. Hwang
La Sierra University
Riverside, California, USA

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Digital Logic and Microprocessor Design with © 2018, 2006 Cengage Learning®
Interfacing, Second Edition
ALL RIGHTS RESERVED. No part of this work covered by
Enoch O. Hwang
the copyright herein may be reproduced or distributed
Product Director, Global Engineering: in any form or by any means, except as permitted by U.S.
Timothy L. Anderson copyright law, without the prior written permission of the
copyright owner.
Associate Media Content Developer:
Ashley Kaupert
For product information and technology assistance, contact us at
Product Assistant: Alexander Sham
Cengage Learning Customer & Sales Support, 1-800-354-9706.
Marketing Manager: Kristin Stine For permission to use material from this text or product,
Director, Higher Education Production: submit all requests online at www.cengage.com/permissions.
Sharon L. Smith Further permissions questions can be emailed to
[email protected].
Senior Content Project Manager: Kim Kusnerak
Production Service: SPi Global
Library of Congress Control Number: 2016952181
Senior Art Director: Michelle Kunkler
ISBN: 978-1-305-85945-6
Cover/Internal Designer: Red Hangar Design, LLC
Cover/Internal Image: Jonathan Y. Hwang
Cengage Learning
Intellectual Property
20 Channel Center Street
Analyst: Christine Myaskovsky Boston, MA 02210
Project Manager: Sarah Shainwald USA
Text and Image Permissions Researcher:
Kristiina Paul Cengage Learning is a leading provider of customized
Manufacturing Planner: Doug Wilke learning solutions with employees residing in nearly
40 different countries and sales in more than 125 countries
around the world. Find your local representative at
www.cengage.com.

Cengage Learning products are represented in Canada by


Nelson Education Ltd.

To learn more about Cengage Learning Solutions, visit


www.cengage.com/engineering.

Purchase any of our products at your local college store or


at our preferred online store www.cengagebrain.com.

Unless otherwise noted, all items © Cengage Learning.

Printed in the United States of America


Print Number: 01 Print Year: 2016

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
To my wife Windy,
the love of my life,
for her endless love and support.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
CONTENTS

Preface................................................................................................................................... xv
About the Author................................................................................................................... xxi

CHAPTER 1
Introduction to Microprocessor Design 1
1.1 Overview of Microprocessor Design ................................................................................ 3
1.2 Design Abstraction Levels............................................................................................... 6
1.3 Examples of a 2-to-1 Multiplexer.................................................................................... 7
1.3.1 Behavioral Level ................................................................................................. 7
1.3.2 Gate Level........................................................................................................... 9
1.3.3 Transistor Level ................................................................................................ 11
1.4 Introduction to Hardware Description Language ........................................................... 11
1.5 Synthesis ...................................................................................................................... 15
1.6 Going Forward.............................................................................................................. 16
1.7 Problems ...................................................................................................................... 17

CHAPTER 2
Fundamentals of Digital Circuits 18
2.1 Binary Numbers............................................................................................................ 19
2.1.1 Counting in Binary ........................................................................................... 20
2.1.2 Converting between Binary and Decimal .......................................................... 20
2.1.3 Octal and Hexadecimal Notations .................................................................... 23
2.1.4 Binary Number Arithmetic ............................................................................... 25
2.2 Negative Numbers ........................................................................................................ 27
2.2.1 Two’s Complement Representation ................................................................... 27
2.2.2 Sign Extension .................................................................................................. 29
2.2.3 Signed Number Arithmetic ............................................................................... 30
2.3 Binary Switch ............................................................................................................... 32
2.4 Basic Logic Operators and Logic Expressions............................................................... 33
2.5 Logic Gates .................................................................................................................. 35
2.6 Truth Tables ................................................................................................................. 36
2.7 Boolean Algebra and Boolean Equations ....................................................................... 38
2.7.1 Boolean Algebra ............................................................................................... 38
2.7.2 Duality Principle............................................................................................... 41
2.7.3 Boolean Functions and Their Inverses .............................................................. 41

vii

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
viii Contents

2.8 Minterms and Maxterms .............................................................................................. 46


2.8.1 Minterms .......................................................................................................... 46
2.8.2 Maxterms ......................................................................................................... 49
2.9 Canonical, Standard, and Non-Standard Forms ............................................................ 52
2.10 Digital Circuits............................................................................................................. 53
2.11 Designing a Car Security System .................................................................................. 54
2.12 Verilog and VHDL Code for Digital Circuits ................................................................ 57
2.12.1 Verilog Code for a Boolean Function................................................................ 57
2.12.2 VHDL Code for a Boolean Function................................................................ 58
2.13 Problems ...................................................................................................................... 59

CHAPTER 3
Combinational Circuits 65
3.1 Analysis of Combinational Circuits............................................................................... 66
3.1.1 Using a Truth Table .......................................................................................... 67
3.1.2 Using a Boolean Function ................................................................................ 70
3.2 Synthesis of Combinational Circuits ............................................................................. 72
3.2.1 Using Only NAND Gates ................................................................................. 75
3.3 Minimization of Combinational Circuits ....................................................................... 76
3.3.1 Boolean Algebra ............................................................................................... 77
3.3.2 Karnaugh Maps................................................................................................ 78
3.3.3 Don’t-Cares ...................................................................................................... 85
3.3.4 Tabulation Method ........................................................................................... 86
3.4 Timing Hazards and Glitches........................................................................................ 89
3.4.1 Using Glitches .................................................................................................. 91
3.5 BCD to 7-Segment Decoder.......................................................................................... 92
3.6 Verilog and VHDL Code for Combinational Circuits .................................................... 95
3.6.1 Structural Verilog Code .................................................................................... 95
3.6.2 Structural VHDL Code .................................................................................... 97
3.6.3 Dataflow Verilog Code.....................................................................................101
3.6.4 Dataflow VHDL Code.....................................................................................102
3.6.5 Behavioral Verilog Code ..................................................................................103
3.6.6 Behavioral VHDL Code ..................................................................................104
3.7 Problems .....................................................................................................................106

CHAPTER 4
Standard Combinational Components 112
4.1 Signal Naming Conventions .........................................................................................113
4.2 Multiplexer..................................................................................................................114
4.3 Adder ..........................................................................................................................117
4.3.1 Full Adder .......................................................................................................117
4.3.2 Ripple-Carry Adder.........................................................................................118
4.3.3 Carry-Lookahead Adder .................................................................................120

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Contents ix

4.4 Subtractor ...................................................................................................................123


4.5 Adder-Subtractor Combination ....................................................................................125
4.6 Arithmetic Logic Unit..................................................................................................129
4.7 Decoder.......................................................................................................................137
4.8 Tri-State Buffer...........................................................................................................140
4.9 Comparator .................................................................................................................142
4.10 Shifter .........................................................................................................................146
4.11 Multiplier ....................................................................................................................149
4.12 Problems .....................................................................................................................151

CHAPTER 5
Sequential Circuits 157
5.1 Bistable Element..........................................................................................................159
5.2 SR Latch.....................................................................................................................160
5.3 Car Security System—Version 2 ..................................................................................163
5.4 SR Latch with Enable..................................................................................................164
5.5 D Latch .......................................................................................................................164
5.6 D Latch with Enable ....................................................................................................166
5.7 Verilog and VHDL Code for Memory Elements ...........................................................166
5.7.1 VHDL Code for a D Latch with Enable ..........................................................168
5.7.2 Verilog Code for a D Latch with Enable ..........................................................169
5.8 Clock...........................................................................................................................169
5.9 D Flip-Flop..................................................................................................................171
5.9.1 Alternative Smaller Circuit ..............................................................................175
5.10 D Flip-Flop with Enable...............................................................................................176
5.10.1 Asynchronous Inputs.......................................................................................177
5.11 Description of a Flip-Flop............................................................................................180
5.11.1 Characteristic Table .........................................................................................180
5.11.2 Characteristic Equation ...................................................................................180
5.11.3 State Diagram ..................................................................................................180
5.12 Register .......................................................................................................................181
5.13 Register File ................................................................................................................182
5.14 Memories ....................................................................................................................188
5.14.1 ROM................................................................................................................190
5.14.2 RAM ...............................................................................................................192
5.15 Shift Registers .............................................................................................................197
5.15.1 Serial-to-Parallel Shift Register ........................................................................199
5.15.2 Serial-to-Parallel and Parallel-to-Serial Shift Register......................................200
5.15.3 Linear Feedback Shift Register ........................................................................202
5.16 Counters......................................................................................................................205
5.16.1 Binary Up Counter ..........................................................................................205
5.16.2 Binary Up Counter with Parallel Load ............................................................207

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
x Contents

5.17 Timing Issues...............................................................................................................210


5.18 Problems .....................................................................................................................211

CHAPTER 6
Finite-State Machines 215
6.1 Finite-State Machine Models.......................................................................................217
6.2 State Diagrams............................................................................................................221
6.3 Analysis of Finite-State Machines ...............................................................................224
6.3.1 Next-State Equations .......................................................................................225
6.3.2 Next-State Table ..............................................................................................226
6.3.3 Output Equations ............................................................................................228
6.3.4 Output Table....................................................................................................228
6.3.5 State Diagram ..................................................................................................229
6.3.6 Example...........................................................................................................230
6.4 Synthesis of Finite-State Machines ..............................................................................234
6.4.1 State Diagram ..................................................................................................235
6.4.2 Next-State Table ..............................................................................................236
6.4.3 Next-State Equations .......................................................................................237
6.4.4 Output Table and Output Equations................................................................237
6.4.5 FSM Circuit.....................................................................................................238
6.5 Optimizations for FSMs ..............................................................................................239
6.5.1 State Reduction................................................................................................239
6.5.2 State Encoding.................................................................................................240
6.5.3 Unused States ..................................................................................................243
6.6 FSM Construction Examples.......................................................................................243
6.6.1 Car Security System—Version 3.......................................................................243
6.6.2 Modulo-6 Up-Counter.....................................................................................245
6.6.3 One-Shot Circuit..............................................................................................249
6.6.4 Simple Microprocessor Control Unit ...............................................................251
6.6.5 Elevator Controller Using a Moore FSM ........................................................254
6.6.6 Elevator Controller Using a Mealy FSM .........................................................258
6.7 Verilog and VHDL Code for FSM Circuits ..................................................................261
6.7.1 Behavioral Verilog Code for a Moore FSM......................................................261
6.7.2 Behavioral Verilog Code for a Mealy FSM ......................................................265
6.7.3 Behavioral VHDL Code for a Moore FSM......................................................266
6.7.4 Behavioral VHDL Code for a Mealy FSM ......................................................269
6.8 Problems .....................................................................................................................270

CHAPTER 7
Dedicated Microprocessors 283
7.1 Need for a Datapath ....................................................................................................286
7.2 Constructing the Datapath...........................................................................................287
7.2.1 Selecting Registers ...........................................................................................293
7.2.2 Selecting Functional Units...............................................................................294

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Contents xi

7.2.3 Data Transfer Methods....................................................................................295


7.2.4 Generating Status Signals ................................................................................297
7.3 Constructing the Control Unit......................................................................................302
7.3.1 Deriving the Control Signals............................................................................303
7.3.2 Deriving the State Diagram .............................................................................305
7.3.3 Timing Issues ...................................................................................................312
7.3.4 Deriving the FSM Circuit ................................................................................315
7.4 Constructing the Complete Microprocessor ..................................................................320
7.5 Dedicated Microprocessor Construction Examples.......................................................323
7.5.1 Greatest Common Divisor ...............................................................................323
7.5.2 High-Low Number Guessing Game.................................................................330
7.5.3 Traffic Light Controller....................................................................................337
7.6 Verilog and VHDL Code for Dedicated Microprocessors..............................................341
7.6.1 FSM1D Model ...............................................................................................342
7.6.2 FSMD Model ..................................................................................................351
7.6.3 Algorithmic Model ..........................................................................................354
7.7 Problems .....................................................................................................................356

CHAPTER 8
General-Purpose Microprocessors 363
8.1 Overview of the CPU Design .......................................................................................364
8.2 The EC-1 General-Purpose Microprocessor .................................................................366
8.2.1 Instruction Set .................................................................................................366
8.2.2 Datapath..........................................................................................................367
8.2.3 Control Unit ....................................................................................................369
8.2.4 Complete Circuit..............................................................................................373
8.2.5 Sample Program...............................................................................................373
8.2.6 Simulation........................................................................................................375
8.2.7 Hardware Implementation ...............................................................................375
8.3 The EC-2 General-Purpose Microprocessor .................................................................376
8.3.1 Instruction Set .................................................................................................376
8.3.2 Datapath..........................................................................................................377
8.3.3 Control Unit ....................................................................................................379
8.3.4 Complete Circuit..............................................................................................384
8.3.5 Sample Program...............................................................................................384
8.3.6 Hardware Implementation ...............................................................................387
8.4 Extending the EC-2 Instruction Set..............................................................................388
8.5 Using and Interfacing the EC-2....................................................................................391
8.6 Pipelining ....................................................................................................................395
8.6.1 Basic Pipelined Processor.................................................................................395
8.6.2 Pipeline Hazards ..............................................................................................397
8.7 Verilog and VHDL Code for General-Purpose Microprocessors ...................................399
8.7.1 FSM1D Model ...............................................................................................399
8.7.2 FSMD Model ..................................................................................................405
8.8 Problems .....................................................................................................................411

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
xii Contents

CHAPTER 9
Interfacing Microprocessors 415
9.1 Multiplexing 7-Segment LED Display .........................................................................416
9.1.1 Theory of Operation........................................................................................416
9.1.2 Controller Design ............................................................................................417
9.2 Issues with Interfacing Switches ...................................................................................420
9.3 3 3 4 Keypad Controller ..............................................................................................427
9.3.1 Theory of Operation........................................................................................427
9.3.2 Controller Design ............................................................................................429
9.4 PS2 Keyboard and Mouse............................................................................................431
9.4.1 Theory of Operation—PS2 Keyboard .............................................................431
9.4.2 Controller Design—PS2 Keyboard ..................................................................432
9.4.3 Theory of Operation—PS2 Mouse ..................................................................436
9.4.4 Controller Design—PS2 Mouse .......................................................................438
9.5 RS-232 Controller for Bluetooth Communication .........................................................444
9.5.1 Theory of Operation—RS-232 ........................................................................445
9.5.2 Controller Design—RS-232 .............................................................................446
9.5.3 Implementation................................................................................................449
9.6 Liquid-Crystal Display Controller................................................................................450
9.6.1 Theory of Operation........................................................................................450
9.6.2 Controller Design ............................................................................................452
9.7 VGA Monitor Controller .............................................................................................457
9.7.1 Theory of Operation........................................................................................457
9.7.2 Controller Design ............................................................................................460
9.7.3 Implementation................................................................................................466
9.8 A/D Controller for Temperature Sensor........................................................................467
9.8.1 Theory of Operation........................................................................................467
9.8.2 Controller Design ............................................................................................469
9.8.3 Implementation................................................................................................474
9.9 I2C Bus Controller for Real-Time Clock.......................................................................475
9.9.1 Theory of Operation........................................................................................475
9.9.2 Controller Design ............................................................................................478
9.9.3 Implementation................................................................................................483
9.10 Problems .....................................................................................................................484

APPENDIX A
Xilinx Development Tutorial 486
A.1 Starting ISE ................................................................................................................486
A.1.1 Creating a New Project ....................................................................................486
A.1.2 Specifying the FPGA .......................................................................................489

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Contents xiii

A.2 Creating a New Schematic Source File.........................................................................492


A.2.1 Drawing Your Schematic Circuit......................................................................493
A.2.2 Creating and Using a Schematic Symbol..........................................................495
A.2.3 Editing a Schematic Symbol ............................................................................497
A.2.4 Using a Schematic Symbol in Another Project.................................................500
A.3 Creating a New Verilog or VHDL Source File..............................................................500
A.4 Setting the Top-Level Module Design File ....................................................................500
A.5 Mapping the I/O Signals..............................................................................................500
A.5.1 Using PlanAhead for Mapping the Pins...........................................................501
A.5.2 Faster Alternative Method for Mapping the Pins.............................................503
A.6 Synthesis and Implementation......................................................................................503
A.7 Programming the Circuit to the FPGA.........................................................................505
A.8 Problems .....................................................................................................................509

APPENDIX B
Altera Development Tutorial 512
B.1 Starting Quartus .........................................................................................................512
B.1.1 Creating a New Project ....................................................................................512
B.1.2 Specifying the FPGA .......................................................................................514
B.2 Using the Graphic Editor .............................................................................................516
B.2.1 Starting the Graphic Editor .............................................................................516
B.2.2 Drawing Tools..................................................................................................516
B.2.3 Inserting Logic Symbols ..................................................................................517
B.2.4 Selecting, Moving, Copying, and Deleting Logic Symbols...............................518
B.2.5 Making and Naming Connections ...................................................................519
B.2.6 Selecting, Moving, and Deleting Connection Lines..........................................521
B.3 Managing Files in a Project .........................................................................................521
B.3.1 Design Files in a Project...................................................................................522
B.3.2 Creating a New Verilog or VHDL Source File .................................................522
B.3.3 Opening a Design File......................................................................................522
B.3.4 Adding Design Files to a Project......................................................................523
B.3.5 Deleting Design Files from a Project................................................................523
B.3.6 Setting the Top-Level Entity Design File .........................................................523
B.3.7 Saving the Project.............................................................................................523
B.4 Analysis and Synthesis.................................................................................................523
B.5 Creating and Using a Logic Symbol .............................................................................524
B.6 Mapping the I/O Signals..............................................................................................525
B.6.1 Faster Alternative Method for Mapping the Pins.............................................527
B.7 Fitting the Netlist and Pins to the FPGA......................................................................527
B.8 Programming the Circuit to the FPGA.........................................................................528
B.9 Problems .....................................................................................................................529

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
xiv Contents

APPENDIX C
Verilog Summary 533
C.1 Basic Language Elements ............................................................................................533
C.1.1 Keywords.........................................................................................................533
C.1.2 Comments........................................................................................................534
C.1.3 Identifiers.........................................................................................................534
C.1.4 Signals .............................................................................................................534
C.1.5 Numbers and Strings .......................................................................................534
C.1.6 Constants.........................................................................................................535
C.1.7 Data Types.......................................................................................................536
C.1.8 Data Operators ................................................................................................536
C.1.9 Module ............................................................................................................537
C.1.10 Module Parameter ...........................................................................................539
C.2 Behavioral Model ........................................................................................................540
C.2.1 Assignment ......................................................................................................540
C.2.2 initial................................................................................................................541
C.2.3 always ..............................................................................................................542
C.2.4 Event Control ..................................................................................................542
C.2.5 begin-end .........................................................................................................544
C.2.6 if-then-else .......................................................................................................545
C.2.7 case, casex, casez ..............................................................................................545
C.2.8 for ....................................................................................................................546
C.2.9 while ................................................................................................................547
C.2.10 function..........................................................................................................547
C.2.11 Behavioral Model Example ............................................................................548
C.3 Dataflow Model...........................................................................................................548
C.3.1 Continuous Assignment...................................................................................549
C.3.2 Conditional Assignment ..................................................................................549
C.3.3 Dataflow Model Example................................................................................550
C.4 Structural Model .........................................................................................................550
C.4.1 Built-in Gates...................................................................................................550
C.4.2 User-Defined Module ......................................................................................551
C.4.3 Structural Model Example...............................................................................552

APPENDIX D
VHDL Summary 553
D.1 Basic Language Elements ............................................................................................553
D.1.1 Keywords.........................................................................................................553
D.1.2 Comments........................................................................................................554
D.1.3 Identifiers.........................................................................................................554
D.1.4 Data Objects ....................................................................................................554
D.1.5 Data Types.......................................................................................................554
D.1.6 Data Operators ................................................................................................557
D.1.7 ENTITY ..........................................................................................................558

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Contents xv
D.1.8 ARCHITECTURE..........................................................................................559
D.1.9 GENERIC.......................................................................................................560
D.1.10 PACKAGE ....................................................................................................562
D.2 Behavioral Model—Sequential Statements...................................................................564
D.2.1 PROCESS........................................................................................................564
D.2.2 Sequential Signal Assignment ..........................................................................564
D.2.3 Variable Assignment ........................................................................................565
D.2.4 WAIT...............................................................................................................565
D.2.5 IF-THEN-ELSE..............................................................................................565
D.2.6 CASE...............................................................................................................566
D.2.7 NULL..............................................................................................................566
D.2.8 FOR ................................................................................................................567
D.2.9 WHILE............................................................................................................567
D.2.10 LOOP ............................................................................................................567
D.2.11 EXIT .............................................................................................................567
D.2.12 NEXT............................................................................................................567
D.2.13 FUNCTION..................................................................................................568
D.2.14 PROCEDURE ..............................................................................................569
D.2.15 Behavioral Model Example............................................................................570
D.3 Dataflow Model—Concurrent Statements....................................................................570
D.3.1 Concurrent Signal Assignment ........................................................................570
D.3.2 Conditional Signal Assignment........................................................................571
D.3.3 Selected Signal Assignment..............................................................................571
D.3.4 Dataflow Model Example................................................................................572
D.4 Structural Model—Concurrent Statements ..................................................................573
D.4.1 COMPONENT Declaration ............................................................................573
D.4.2 PORT MAP .....................................................................................................574
D.4.3 OPEN ..............................................................................................................574
D.4.4 GENERATE ...................................................................................................575
D.4.5 Structural Model Example...............................................................................575
D.5 Conversion Routines.....................................................................................................576
D.5.1 CONV_INTEGER( )......................................................................................576
D.5.2 CONV_STD_LOGIC_VECTOR( , )...............................................................577
Index .....................................................................................................................................578

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
P R E FA C E

This book is about the digital logic design of microprocessors, and is intended to
provide both an understanding of the basic principles of digital logic design, and how
these fundamental principles are applied in the building of complex microproces-
sor circuits using current technologies. Although the basic principles of digital logic
design have not changed, the design process and the implementation of the circuits
have. With the advances in fully integrated modern hardware computer-aided design
(CAD) tools for logic synthesis, simulation, and the implementation of digital circuits
in field-programmable gate arrays (FPGAs), it is now possible to design and imple-
ment complex digital circuits very easily and quickly
quickly.
Many excellent books on digital logic design have followed the traditional approach
of introducing the basic principles and theories of digital logic design and the building
of separate standard combinational and sequential components. However, students
are left to wonder about the purpose of these individual components and how they
are used in the building of more complex digital circuits, such as microcontrollers
and microprocessors that are used in controlling real-world electronic devices. The
primary goal of this book is to fill in this gap by going beyond the logic principles and
the building of basic standard components. The book discusses in detail how the basic
components are combined together to form datapaths, how control units are designed,
and how these two main components (datapath and control unit) are connected
together to produce actual dedicated custom microprocessors and general-purpose
microprocessors. The book ends with an entire chapter containing many examples on
how microprocessors are interfaced with real-world devices.
Many texts on digital logic design and implementation techniques mainly focus on
the logic gate level. At this low level, it is difficult to discuss larger and more complex
circuits that are beyond the standard combinational and sequential circuits. However,
with the introduction of the register-transfer technique for designing datapaths and
the concept of a finite-state machine for control units, we can easily design a dedicated
microprocessor for any arbitrary algorithm and then implement it on a FPGA chip
to execute that algorithm. The book uses an easy-to-understand ground-up approach
with complete circuit diagrams, and both Verilog and VHDL codes, starting with the
building of basic digital components. These components are then used in the build-
ing of more complex components, and finally the building of the complete dedicated
microprocessor circuit. The construction of a general-purpose microprocessor then
comes naturally as a generalization of a dedicated microprocessor. At the end, stu-
dents will have a complete understanding of how to design, construct, and implement
fully working custom microprocessors.

xvii

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
xviii PReFACe

Design of Circuits using Verilog and VHDL


Although this book provides coverage on both Verilog and VHDL for all of the
circuits, this information can be omitted entirely while gaining an understanding of
digital circuits and their design. For an introductory course in digital logic design,
learning the basic principles is more important than learning how to use a hardware
description language (HDL). In fact, instructors may find that students can get lost
in learning the principles while trying to learn the language at the same time. With
this in mind, the Verilog and VHDL code in the text is totally independent of the
presentation of each topic and may be skipped without any loss of continuity
continuity.
On the other hand, by studying the HDL codes, the student can not only learn
the use of a hardware description language but also learn how digital circuits can be
designed automatically using a synthesizer. This book provides an introduction to
both Verilog and VHDL and uses the “learn-by-examples” approach. In writing either
Verilog or VHDL code at the dataflow and behavioral levels, the student will see the
power and usefulness of a state-of-the-art hardware CAD synthesis tool.

New to This Edition


In this newly revised second edition, a new chapter on interfacing microprocessors
with external devices has been added. Just knowing how to design and implement a
microprocessor is not sufficient. The main purpose and usage of a microprocessor is
to control external devices. This entire chapter contains many real-world examples on
interfacing microprocessors with external devices. Students can use these examples to
help them in doing their final projects.
Throughout the book, many new examples have been added and old examples
updated. This new edition also covers the usage of both Verilog and VHDL, the two
industry standard hardware description languages for describing digital circuits. All
circuit examples, in addition to having schematic diagrams, also include codes written
in both VHDL and Verilog.
In addition to the Altera FPGA development software, a new section in the
Appendix is added for using the Xilinx FPGA development software. Using either
the Altera or the Xilinx FPGA development software and their respective FPGA
hardware development boards, students can actually implement these microprocessor
circuits and see them execute, both in software simulation and in hardware. The book
contains many interesting examples with complete schematic diagrams and Verilog
and VHDL codes for implementing them in hardware. With the hands-on exercises,
students will learn not only the principles of digital logic design but, also in practice,
how circuits are implemented using current technologies.
To actually see your own microprocessor come to life in real hardware and being
able to control real-world external devices is an exciting experience. Hopefully, this
will help students to not only remember what they have learned but will also get them
interested in the world of microprocessor controllers and digital circuit design.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
PReFACe xix

Using This Book


This book can be used in either an introductory or a more advanced course in digital
logic design. For an introductory course with no previous background in digital logic,
Chapters 1 and 2 are intended to provide the fundamental basic concepts in digital
logic design, while Chapters 3 and 4 cover the design of combinational circuits and
standard combinational components. Chapter 5 on the design of sequential circuits
can be introduced and lightly covered.
An advanced digital logic design course will start with sequential circuits in
Chapter 5, and the design of finite-state machines in Chapter 6. Chapters 7 and 8
cover the design of datapaths and control units, and the building of dedicated and
general-purpose microprocessors. Finally, Chapter 9 concludes with the interfacing of
microprocessors with the external world.
It is strongly recommended that a lab component be fully integrated with the lecture.
With an integrated lab, students can have a hands-on learning experience alongside the
theoretical concepts that they have learned in class. In fact, many teachers find that too
often not enough hours are given to the lab. As we probably know, it is often easier to
understand the theory, but to actually implement a circuit and to get it to work requires
much more detail and time. Ready-to-use labs that complement the lecture are available
for download from the teachers’ resource website at https://login.cengage.com.
Chapter 1—Introduction to Microprocessor Design gives an overview of the var-
ious components of a microprocessor circuit and the different abstraction levels in
which digital circuits can be designed.
Chapter 2—Fundamentals of Digital Circuits provides the basic principles and
theories for designing digital logic circuits by introducing binary numbers, the use of
truth tables, Boolean algebra, and how the theories get translated into logic gates and
circuit diagrams. Also a brief introduction to Verilog and VHDL is given.
Chapter 3—Combinational Circuits shows how combinational circuits are ana-
lyzed, synthesized, and optimized.
Chapter 4—Standard Combinational Components discusses the standard combi-
national components that are used as building blocks for larger digital circuits. These
components include the adder, subtractor, arithmetic logic unit, decoder, multiplexer,
tri-state buffer, comparator, shifter, and multiplier. In a hierarchical design, these com-
ponents will be used in the building of the datapath used in the microprocessor.
Chapter 5—Sequential Circuits introduces latches and flip-flops as basic storage
elements and then continues with larger storage components such as registers, register
files, and memories. Special sequential components such as shift registers and counters
are also covered.
Chapter 6—Finite-State Machines shows how finite-state machines are analyzed,
synthesized, and optimized.
Chapter 7—Dedicated Microprocessors first introduces the need for a datapath,
and then explains how a control unit, in the form of a finite-state machine, is used to

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
xx PReFACe

control the datapath. The chapter expands further showing how dedicated micropro-
cessors are constructed by connecting the datapath and the control unit together as
one coherent circuit.
Chapter 8—General-Purpose Microprocessors continues on from Chapter 7 to
suggest that a general-purpose microprocessor is really a dedicated microprocessor
that is dedicated to only read, decode, and execute instructions. The chapter discusses
the complete design and construction of two simple general-purpose microprocessors
with their own custom instruction set, and how programs written in machine language
are executed on them. The highlight of this chapter and this book is that these two
fully-working general-purpose microprocessors can be implemented in hardware and
have programs executed by them.
Chapter 9—Interfacing Microprocessors provides several complete examples on
how to interface microprocessors with real-world external devices. Examples include
interfacing with a real-time clock IC using the I2C protocol, Bluetooth communication
using RS-232, and drawing graphics on a VGA monitor.
The Appendixes provide tutorials on using both the Altera and Xilinx software
development tools, and summaries on the Verilog and VHDL hardware description
languages.

Supplements
Resources for the book can be found at https://login.cengage.com/. The instructor site
is password protected and requires a verified instructor login to access the site.

Student Resources
● Chapter on Implementation Technologies
● Labs for each chapter
● All of the example codes from the book in VHDL and Verilog
● Altera FPGA development software download
● Xilinx FPGA development software download

Instructor Resources
● Chapter on Implementation Technologies
● Labs for each chapter
● PowerPoint lecture slides
● Solutions to problems at the end of each chapter
● All of the example codes from the book in VHDL and Verilog
● Altera FPGA development software download
● Xilinx FPGA development software download

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
PReFACe xxi

Acknowledgments
I want to thank Professor Zhiguo Shi, Ph.D., and many of his graduate students from
Zhejiang University, Hangzhou, China, for translating this book into Chinese. In the
process, we have become lasting friends.
I also want to thank the following reviewers for their constructive feedback:
Christopher Doss, North Carolina A&T State University
Eric Durant, Milwaukee School of Engineering
Rajiv JJ. Kapadia, Minnesota State University, Mankato
Emma Regentova, University of Nevada, Las Vegas
Darrin Rothe, Milwaukee School of Engineering
I wish to acknowledge and thank the Global Engineering team at Cengage Learn-
ing for their dedication to this new book:
Timothy Anderson, Product Director; Ashley Kaupert, Associate Media Content
Developer; Kim Kusnerak, Senior Content Project Manager; Kristin Stine, Mar-
keting Manager; Elizabeth Brown, Learning Solutions Specialist; and Alexander
Sham, Product Assistant. They have skillfully guided every aspect of this text’s
development and production to successful completion.
I also want to thank the College of Information Science and Electronic Engineer-
ing at Zhejiang University for inviting me as a visiting professor to teach their Digital
Systems Design course (in English) using the contents of this book. During this time, I
was able to gather many valuable ideas and feedbacks from the bright and enthusiastic
students on how to make the book better. As a result, numerous changes have been
made. This book truly is field-tested.
I also want to thank my school, La Sierra University in sunny California, for giv-
ing me the time off to be at Zhejiang University and to work on this book. It would
have been extremely difficult without this extra time.
Finally, I want to thank my wife, Windy, for her support and giving me the time
to focus and to finish this book.

Enoch O. Hwang, Ph.D.


Riverside, California

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
ABOUT THE AUTHOR

Enoch Hwang has a Ph.D. in Computer Science from the University


of California, Riverside. He is currently a professor of computer sci-
ence at La Sierra University in Southern California teaching digital
logic and microprocessor design. In 2015, he was invited as a visit-
ing professor to Zhejiang University in Hangzhou, China, where he
taught their Digital Systems Design course. Many new ideas from
that class have been incorporated into this edition of the book.
Even from his childhood days, he has been fascinated with elec-
tronic circuits. In one of his first experiments, he attempted to connect
a microphone to the speaker inside a portable radio through the ear-
phone plug. Instead of hearing sound from the microphone through
the speaker, smoke was seen coming out of the radio. Thus ended that
experiment and his family’s only radio. He now continues his interest
in digital circuits with research in embedded microprocessor systems,
controller automation, power optimization, and robotics.

xxiii

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
CHAPTER 1

Introduction to
Microprocessor Design

Control Data
Inputs Microprocessor Inputs

'0'
Control Unit 8 Datapath
MUX
ff
Output
Next- State ALU
state Memory
Logic Control 8
Logic Register Signals ff
Register

Status 8
Signals
Control Data
Outputs Outputs

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
2 CHAPTER 1 IntroductIon to MIcroprocessor desIgn

Electronic devices are an integral part of our lives. Every day and everywhere we
see and use electronic devices, from cellular telephones to electronic billboards, cars,
toys, TVs, elevators, musical greeting cards, personal computers, traffic lights, and
many more. Inside each and every one of them, there is a microprocessor that controls
their operations. Microprocessors are at the heart of all of these “smart” devices.
Their smartness is a direct result of the work of the microprocessor, without which
none of these electronic devices would be able to operate as they do.
There are generally two types of microprocessors: general-purpose microprocessors
and dedicated microprocessors. General-purpose microprocessors, such as the Intel
Core™ i7 CPU shown in Figure 1.1(a) can perform different tasks under the control
of different software programs. General-purpose microprocessors typically are much
more powerful in terms of processing power and speed. However, they usually require
external components for their memory and supporting input/output (I/O) peripherals.
They are used in all personal computers.
Dedicated microprocessors, also known as microcontrollers or application-specific
integrated circuits (ASICs), on the other hand, are designed to perform just one specific
task. For example, inside your cell phone is a dedicated microcontroller that does noth-
ing else but control its entire operation. Microcontrollers therefore are usually not as
powerful (because they do not need to perform so many tasks) as a microprocessor and
are much smaller in size. However, they usually will have the memory and supporting
I/O peripherals included inside the chip, hence the entire system can be on a single chip.
For example, the Atmel ATtiny13A microcontroller shown in Figure 1.1(b) has built-in
flash memory, electrically erasable programmable read-only memory (EEPROM), static
random-access memory (SRAM), general-purpose I/Os, timers, serial interface, and ana-
log-to-digital converters (ADC). Dedicated microcontrollers are used in almost all smart
electronic devices. Although the small dedicated microcontrollers are not as powerful
and are slower in speed as compared to general-purpose microprocessors, they are being
sold much more and are used in a lot more places than general-purpose microprocessors.
© Oleksiy Maksymenko Photography /

Dmitry S. Gordienko /
Alamy Stock Photo

Shutterstock.com

(a) (b)
FIGURE 1.1 Microprocessors: (a) General-purpose Intel Core™ i7 CPU; (b) Dedicated
Atmel ATtiny13A microcontroller.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
1.1 overvIew of MIcroprocessor desIgn 3

In this book, I will show you in detail how to design, implement, and interface a
microprocessor. At the end, you will be able to design your own custom microproces-
sor and use it to control your own electronic device. I will use a hands-on approach to
guide you step-by-step through the entire design process with complete circuits that
you actually can implement in hardware. The exciting part is that at the end, you can
actually, very easily and inexpensively, implement your own custom microprocessor in
a real integrated circuit (IC) and see that it really can execute software programs, make
lights flash, or do whatever you have designed it to do.
We will start with the fundamentals of digital logic circuit design in Chapter 2, which
will provide you with a good foundation and basic building blocks for creating larger and
more complex digital circuits. Chapters 3 and 4 will discuss the design of simple digital
circuits and common circuits that are used as building blocks for larger circuits. Chapter
5 talks about the design of memory circuits. Typically, an introduction to digital logic
design course will cover the materials from Chapters 1 to 5 only. Moving on to more
advanced digital logic design, Chapter 6 talks about control unit circuits. Chapter 7 talks
about the datapath and how to connect it with the control unit to produce a dedicated
microcontroller. Chapter 8 extends the dedicated microcontroller from Chapter 7 to
produce a general-purpose microprocessor. Finally, Chapter 9 concludes with examples
of how to interface these microprocessors and microcontrollers in the real world.

1.1 Overview of Microprocessor Design


The microprocessor or microcontroller is an electronic digital logic circuit that is imple-
mented inside an IC chip. Any digital electronic circuit at the lowest physical level
understands only whether there is electricity or no electricity, which is typically rep-
resented by the use of a 1 or a 0. The question is how do we design a microprocessor
so that it can understand the 1s and 0s, and then do something meaningful with that
understanding? To design a microprocessor is to design its logic circuit to do whatever
it is intended to do. To implement the microprocessor is to put the logic circuit of the
microprocessor onto an IC chip.
Previously, making an IC chip with any circuit was a long and expensive pro-
cess. With the advance of large-capacity field-programmable gate array (FPGA) chips,
digital circuits of almost any size can be implemented in a chip easily and quickly.
Moreover, because FPGA chips are erasable, you can use the same FPGA chip over and
over again to implement different circuits. If you put an adder circuit in the FPGA chip,
that chip will be an adder, and if you put a traffic light controller circuit in the FPGA
chip, that chip will be a traffic light controller. So implementing any digital circuit in a
FPGA chip is quite simple. The challenge now is how to design the circuit; how do we
design the adder circuit or the traffic light controller circuit?
A block diagram of a microprocessor circuit is shown in Figure 1.2. As you can
see, it is divided into two main parts: the control unit and the datapath. The datap-
ath is responsible for the execution of all of the microprocessor’s data operations,
such as the addition of two numbers inside the arithmetic logic unit (ALU). The dat-
apath also includes registers for the temporary storage of data and comparators for
testing data values. These and many other functional units are connected together

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
4 CHAPTER 1 IntroductIon to MIcroprocessor desIgn

Control Data
Inputs Inputs

'0'
Control Unit 8 Datapath
MUX
ff
Output
Next- State ALU
state Memory
Logic Control 8
Logic Register Signals ff
Register

Status 8
Signals
Control Data
Outputs Outputs

FIGURE 1.2 Internal parts of a microprocessor.

with multiplexers and data signal lines. The data signal lines are for transferring data
between two functional units. Sometimes, several data signal lines are grouped together
to form a bus. The width of the bus (i.e., the number of data signal lines in the group) is
annotated next to the bus line. In the figure, the bus lines are thicker and are 8-bit wide.
Multiplexers, also known as MUXs, are for selecting data from two or more sources to
go to one destination. In the figure, a 2-to-1 multiplexer is used to select between the
input data and the constant “0” to go to the left operand of the ALU. The output of the
ALU is connected to the input of the register. The output of the register is connected
to three different destinations: (1) the right operand of the ALU; (2) an OR gate used
as a comparator for the test “not equal to 0”; and (3) a tri-state buffer, which is used to
control the output of the data from the register.
Even though the datapath is capable of performing all of the microprocessor’s data
operations, it cannot, however, do it on its own. In order for the datapath to execute the
operations automatically and correctly, a control unit is required. The control unit, also
known as the controller, controls all of the operations of the datapath and therefore,
the operations of the entire microprocessor. The control unit is also called a finite-state
machine (FSM) because it is a machine that executes by going from one state to another,
and there are only a finite number of states for the machine to go to. The control unit is
made up of three parts: (1) the next-state logic; (2) the state memory; and (3) the output
logic. The purpose of the state memory is to remember the current state that the FSM
is in. The next-state logic is the circuit that determines what the machine’s next state
should be. The output logic is the circuit that generates the actual control signals for
controlling the datapath and/or external devices.
Every digital logic circuit, regardless of whether it is part of the control unit or
the datapath, is categorized as either a combinational circuit or a sequential circuit.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
1.1 overvIew of MIcroprocessor desIgn 5

A combinational circuit is one where the output of the circuit is dependent only on the
current inputs to the circuit, and therefore has no memory about what has happened
before. For example, an adder is a combinational circuit because it will produce a sum
when given any two input numbers.
A sequential circuit, on the other hand, is dependent not only on the current inputs,
but also on all of the previous inputs. In other words, a sequential circuit has to remem-
ber its past history. For example, a register is a sequential circuit because it can remember
a value indefinitely. Because sequential circuits are dependent on the history, they must
contain memory elements to remember that history. Combinational circuits, on the other
hand, do not need to remember the history, and so they do not have memory elements.
An analogy of the difference between a combinational circuit and a sequential cir-
cuit is the combination lock that we are familiar with. There are actually two different
types of combination locks as shown in Figure 1.3. For the lock in Figure 1.3(a), you
just turn the three number dials in any order you like to the correct number and the lock
will open. For the lock in Figure 1.3(b), you also have three numbers that you need to
turn to, but you need to turn to these three numbers in the correct sequence. If you turn
to these three numbers in the wrong sequence the lock will not open even if you have
the numbers correct. The lock in Figure 1.3(a) is like a combinational circuit where the
order in which the inputs are entered into the circuit does not matter, whereas, a sequen-
tial circuit is like the lock in Figure 1.3(b) where the sequence of the inputs does matter.
Examples of combinational circuits inside the microprocessor include the ALU,
multiplexers, tri-state buffers, and comparators in the datapath, and the next-state logic
and output logic circuits in the control unit. Examples of sequential circuits include
the register for the state memory in the control unit and the registers in the datapath.
Nattawat Kaewjirasit / Shutterstock.com

Cloud7Days / Shutterstock.com

(a) (b)
FIGURE 1.3 Two types of combination locks: (a) the order in which you enter the
numbers does not matter; (b) the order in which you enter the numbers does matter.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
6 CHAPTER 1 IntroductIon to MIcroprocessor desIgn

All digital logic circuits, whether they are combinational or sequential, are made up of
the three basic logic gates: AND, OR, and NOT gates. From these three basic gates, the most
powerful computer can be made. Furthermore, these basic gates are built using transis-
tors—the fundamental building blocks for all digital logic circuits. Transistors are simply
electronic binary switches that can be turned on and off. The 1s and 0s that we, as com-
puter scientists, often talk about are used to represent the on and off states of a transistor.
To summarize, transistors, as the lowest-level building blocks, are used to build
the basic logic gates. Logic gates are connected together to form either combinational
circuits or sequential circuits. The difference between these two types of circuits is only
in the way the logic gates are connected together. Certain combinational circuits and
sequential circuits are used as standard building blocks for larger circuits and so are
kept in standard libraries. These standard combinational and sequential components
are connected together to form either the datapath or the control unit. Finally, com-
bining the datapath and the control unit together will produce the circuit for either a
dedicated or a general-purpose microprocessor.

1.2 Design Abstraction Levels


Digital circuits can be designed at any one of several abstraction levels. When designing
a circuit at the transistor level, which is the lowest level, you are dealing with discrete
transistors and connecting them together to form the circuit. The next level up in the
abstraction is the gate level. At this level, you are working with logic gates to build the
circuit. In using logic gates, a designer usually creates standard combinational and
sequential components for building larger circuits. In this way, a very large circuit, such
as a microprocessor, can be built in a hierarchical fashion. Design methodologies have
shown that solving a problem hierarchically is always easier than trying to solve the
entire problem as a whole from the ground up. These combinational and sequential
components are used at the register-transfer level to build the datapath and the control
unit in the microprocessor. At the register-transfer level, we are concerned with how the
data is transferred between the various registers and functional units to realize or solve
the problem at hand. Finally, at the highest level, called the behavioral level, we can
describe the behavior or operation of the circuit using a high-level hardware description
language, and we can use a synthesizer, which is equivalent to a compiler, to automati-
cally generate the logic circuit for it. Designing at this level does not require knowledge
of the underlying logic gates and circuits because the synthesizer will automatically
create the logic circuit for you. This is very similar to writing a computer program
using a high-level programming language, and then using the compiler to automatically
translate the program into machine language that the computer can execute.
An important point to realize is that there are many different ways to create
the same functional circuit. Although they are all functionally equivalent, they are
different in other respects, such as the actual circuit (how the transistors or gates
are connected together), size (how big the circuit is or how many transistors or gates
it uses), speed (how long it takes for the output result to be valid), cost (how much
it costs to manufacture), and power usage (how much power it uses). Hence, when
designing a circuit, in addition to being functionally correct, we also should consider

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
1.3 exaMples of a 2-to-1 MultIplexer 7

the economic versus performance tradeoffs. In this book, we will focus mainly on how
to design a functionally correct circuit with some discussion about how to optimize
the circuit size.

1.3 Examples of a 2-to-1 Multiplexer


As an introduction example, let us look at the design of the 2-to-1 multiplexer from
different abstraction levels. At this point, don’t worry too much if you don’t understand
the details of how all of these circuits are built. This example is intended just to give
you an idea of what the circuit looks like at the different abstraction levels. We will get
to the details in the rest of the book.
The multiplexer is a component that is used a lot in the datapath. An analogy for
the operation of the 2-to-1 multiplexer is similar in principle to a railroad switch in
which two railroad tracks are to be merged onto one track. The switch controls which
one of the two trains on the two separate tracks will move onto the one track. Similarly,
the 2-to-1 multiplexer has two data inputs, d1 and d0, and a select input, s. The select
input determines which data from the two data inputs will pass to the output, y.
Figure 1.4 shows the graphical symbol, also referred to as the logic symbol, for the
2-to-1 multiplexer. From looking at the logic symbol, you can tell how many signal lines
the 2-to-1 multiplexer has, and the name or function designated for each line. For the
2-to-1 multiplexer, there are two data input signals, d1 and d0, a select input signal, s,
and an output signal, y.
d1 d0

1.3.1 Behavioral Level


s 1 0
We can describe the operation of the 2-to-1 multiplexer simply
(using the same names as in the logic symbol) by saying that
y
if s 5 0 then d0 passes to y,
FIGURE 1.4 Logic
otherwise symbol for the
2-to-1 multiplexer.
d1 passes to y

Or more precisely, the value that is at d0 passes to y if s 5 0, and the value that is
at d1 passes to y if s 5 1.
We use a hardware description language (HDL), which is quite similar to many
high-level computer programming languages, to describe the circuit at the behavioral
level. When describing a circuit at this level, you would write basically the same thing
as in the description, except that you have to use the correct syntax required by the
hardware description language. Figure 1.5 shows the description of the 2-to-1 multi-
plexer using the hardware description language called Verilog, and Figure 1.6 shows
the description of the same 2-to-1 multiplexer using another hardware description
language called VHDL, which stands for VHSIC Hardware Description Language
(VHSIC, in turn, stands for Very High Speed Integrated Circuit). Verilog and VHDL
are two standard hardware description languages used for digital logic design.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
8 CHAPTER 1 IntroductIon to MIcroprocessor desIgn

module multiplexer (
input s,
input d0,
input d1,
output reg y
);
always @ (s or d0 or d1) begin
if (s == 0) begin
y = d0;
end else begin
y = d1;
end
end
endmodule

FIGURE 1.5 Behavioral Verilog code for a 2-to-1 multiplexer.

In the Verilog code shown in Figure 1.5, the declaration of the component begins
with the keyword module followed by the name of the component, which in the exam-
ple, is the user identifier multiplexer. All of the words used in Verilog are case sen-
sitive. The input and output interface signals are listed next using the keywords input
and output. For ease of reference, the user-defined names used for these signals match
those shown earlier in the logic symbol. The always block is followed by its sensitivity
list of signals inside the parentheses. The always block is executed each and every time
when any one of the signals in the sensitivity list changes value. The statements inside
the always block (bracketed by the begin and end keywords) are executed sequen-
tially. In the example, there is only one if-then-else statement inside the block.
Like any if statement in other programming languages, the assignment statement y
= d0 is executed when the condition “s equals to 0” is true, otherwise the assignment
statement y = d1 is executed. For the two assignment statements, the value for the
expression on the right side of the equal sign is assigned to the signal on the left side
of the equal sign. Notice that the output signal y on the left side of the equal sign is
declared as a reg because assignment statements inside the always block cannot
drive a wire data type, but can only drive a register or an integer data type. Finally,
the module is terminated with the keyword endmodule. A summary of the Verilog
language can be found in Appendix C.
In the VHDL code shown in Figure 1.6, the LIBRARY and USE statements are simi-
lar to the “#include” and “using namespace” preprocessor commands in C11. None
of the words used in VHDL is case sensitive, however, in the examples, the keywords
are shown in upper case. The IEEE library contains the definition for the STD_LOGIC
type used in the declaration of signals. The ENTITY section declares the interface for
the circuit by specifying the input and output signals of the circuit. In this example,
there are three input signals of type STD_LOGIC and one output signal also of type
STD_LOGIC. Again, the names used for these signals match those shown earlier in the
logic symbol. The ARCHITECTURE section defines the actual operation of the circuit.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
1.3 exaMples of a 2-to-1 MultIplexer 9

LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY multiplexer IS PORT (
s, d0, d1: IN STD_LOGIC;
y: OUT STD_LOGIC);
END multiplexer;
ARCHITECTURE Behavioral OF multiplexer IS
BEGIN
PROCESS(s, d0, d1)
BEGIN
IF (s = '0') THEN
y <= d0;
ELSE
y <= d1;
END IF;
END PROCESS;
END Behavioral;
FIGURE 1.6 Behavioral VHDL code for a 2-to-1 multiplexer.

The ARCHITECTURE keyword is followed by a user identifier name and the entity that
it is for. The PROCESS block with its sensitivity list is like the always block in Verilog.
The operation of the multiplexer is defined in the conditional IF-THEN-ELSE statement.
The two signal assignment statements, which use the symbol ,5 to denote the signal
assignment, in conjunction with the IF-THEN-ELSE statement, says that the signal y gets
the value of d0 if s is equal to 0; otherwise, y gets the value of d1. The PROCESS block is
terminated by the END PROCESS statement, and the ARCHITECTURE block is terminated by
the END keyword followed by the name of this architecture. A summary of the VHDL
language can be found in Appendix D.
Having written the behavioral code, either in Verilog or VHDL, we will use a syn-
thesizer to automatically construct the netlist (which is the circuit connections) that
will operate according to the description of the code. As you can see, when designing
circuits at the behavioral level, we do not need to know what logic gates are needed or
how they are connected together. We only need to know their interface and functional
operation, and then describe it using an HDL.

1.3.2 Gate Level


At the gate level, you can draw a schematic diagram or circuit diagram, which shows
how the logic gates are connected together. Two different schematic diagrams of a
2-to-1 multiplexer circuit are shown in Figures 1.7(a) and (b). In Figure 1.7(a), the
circuit uses three NOT gates ( ), four 3-input AND gates ( ), and one 4-input OR gate
( ). In Figure 1.7(b), only one NOT gate, two 2-input AND gates, and one 2-input OR
gate are needed. Although one circuit is larger (in terms of the number of gates needed)
than the other, both of these circuits realize the same 2-to-1 multiplexer function.
Therefore, when we want to actually implement a 2-to-1 multiplexer circuit, we will
want to use the second, smaller circuit rather than the first.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
10 CHAPTER 1 IntroductIon to MIcroprocessor desIgn

s d1 d0

d0

y s y

d1
(a) (b)
FIGURE 1.7 Gate level circuit diagram for the 2-to-1 multiplexer: (a) circuit using
eight gates; (b) circuit using four gates.

At the gate level, you also can describe the 2-to-1 multiplexer using a truth table or
with a Boolean equation as shown in Figures 1.8(a) and (b), respectively. For the truth
table, we list all possible combinations of the binary values for the three inputs, s, d0,
and d1, and then determine what the output value y should be based on the functional
description of the circuit. We see that for the first four rows of the table when s 5 0,
y has the same values as d0; whereas, in the last four rows when s 5 1, y has the same
values as d1.
The Boolean equation in Figure 1.8(b) can be derived from either the schematic
diagram or the truth table. The first equality in Figure 1.8(b) matches the truth table
in Figure 1.8(a) and also the schematic diagram in Figure 1.7(a). The second equality
in Figure 1.8(b) matches the schematic diagram in Figure 1.7(b). To derive the first
equality equation from the truth table, we look at all of the rows where the output y is
a 1. Each of these rows results in a term in the equation. For each term, the variable is
primed 1 r 2 when the value of the variable is a 0, and unprimed when the value of the
variable is a 1. For example, the first term s rd1rd0 in the equation is obtained from the
first row in the truth table where y is a 1, since s is a 0, d1 is a 0 and d0 is a 1.

s d1 d0 y
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
y 5 s rd1rd0 1 s rd1d0 1 sd1d0r 1 sd1d0
1 1 1 1 5 s rd0 1 sd1
(a) (b)
FIGURE 1.8 Gate level description of the 2-to-1 multiplexer: (a) using a truth table;
(b) using a Boolean equation.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
1.4 IntroductIon to Hardware descrIptIon language 11

d0
Vcc

s y

d1

FIGURE 1.9 Transistor circuit for the 2-to-1 multiplexer.

1.3.3 Transistor Level


The 2-to-1 multiplexer circuit at the transistor level is shown in Figure 1.9. It contains
six transistors, three of which are P-type metal-oxide semiconductor (PMOS) transis-
tors ( ), and three are N-type metal-oxide semiconductor (NMOS) transistors ( ).
The pair of transistors on the left forms a NOT gate for the signal s, while the two pairs
of transistors on the right form two transmission gates. The transmission gate allows
or disallows the data signal d0 or d1 to pass through, depending on the control signal s.
The top transmission gate is turned on when s is a 0, and the bottom transmission gate
is turned on when s is a 1. Hence, when s is 0, the value at d0 is passed to y, and when
s is 1, the value at d1 is passed to y.
A more detailed discussion about how to design digital circuits at the transistor
level can be found in the online chapter on Implementation Technologies.

1.4 Introduction to Hardware Description Language


The popularity of using hardware description languages (HDL) to design digital cir-
cuits began in the mid-1990s when commercial synthesis tools became available. Two
popular HDLs used by many engineers today are VHDL and Verilog. VHDL was
sponsored and developed jointly by the U.S. Department of Defense and the Institute
of Electrical and Electronic Engineers (IEEE) in the mid-1980s. It was standardized by
the IEEE in 1987 (VHDL-87), and later extended in 1993 (VHDL-93). Verilog, on the
other hand, was first introduced in 1984, and again later in 1988, as a proprietary hard-
ware description language by two companies: Synopsys and Cadence Design Systems.
Both Verilog and VHDL, in many respects, are similar to a regular computer
programming language, such as C. For example, it has constructs for variable assign-
ments, conditional statements, loops, and functions (just to name a few). In a computer
programming language, a compiler is used to translate the high-level source code to
machine code. In HDL, however, a synthesizer is used to translate the source code

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
12 CHAPTER 1 IntroductIon to MIcroprocessor desIgn

to a description of the actual hardware circuit that implements the code. From this
description, which we call a netlist, the actual, physical digital device that realizes the
source code can be made automatically. Accurate functional and timing simulation of
the code is also possible in order to test the correctness of the circuit.
We saw in the previous section how we used Verilog and VHDL to describe the
2-to-1 multiplexer at the behavioral level. HDL also can be used to describe a circuit at
other levels. Figure 1.10 shows the VHDL code for the multiplexer written at the data-
flow level. The main difference between the behavioral VHDL code shown in Figure 1.6
and the dataflow VHDL code is that, in the behavioral code, there is a PROCESS block
statement; whereas, in the dataflow code, there is no PROCESS statement. Statements
within a PROCESS block are executed sequentially as in a computer program, while state-
ments outside a PROCESS block (including the PROCESS block itself) are executed concur-
rently or in parallel. The signal assignment statement, using the symbol <=, is derived
directly from the Boolean equation for the multiplexer, as shown in Figure 1.8(b), using
the built-in VHDL operators: AND, OR, and NOT.
The corresponding Verilog version of the 2-to-1 multiplexer written at the dataflow
level is shown in Figure 1.11. For Verilog, the assign keyword is used for the signal
assignment, and the symbols &, 0 , and , are used for the logical operators AND, OR,
and NOT, respectively.
In addition to the behavioral and dataflow levels, we also can write HDL code at
the structural level. Figure 1.13 shows the Verilog code for the multiplexer written at
the structural level and Figure 1.14 shows the VHDL code. The code is based on the
circuit shown in Figure 1.7(b) and duplicated here in Figure 1.12.

LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY multiplexer IS PORT(
s, d0, d1: IN STD_LOGIC;
y: OUT STD_LOGIC);
END multiplexer;
ARCHITECTURE Dataflow OF multiplexer IS
BEGIN
y <= ((NOT s) AND d0) OR (s AND d1);
END Dataflow;

FIGURE 1.10 Dataflow level VHDL description of the 2-to-1 multiplexer.

module multiplexer (
input s, d0, d1,
output y
);
assign y = ((~s) & d0) | (s & d1);
endmodule

FIGURE 1.11 Dataflow level Verilog description of the 2-to-1 multiplexer.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
1.4 IntroductIon to Hardware descrIptIon language 13

d0 snd0
U2
U1
sn
s U4 y

U3
d1 sd1

FIGURE 1.12 2-to-1 multiplexer circuit.

module multiplexer (
input s, d0, d1,
output y
);
wire sn,snd0,sd1;
// first parameter is the output;
// remaining parameters are the inputs
not U1(sn,s);
and U2(snd0,sn,d0);
and U3(sd1,s,d1);
or U4(y,snd0,sd1);
endmodule

FIGURE 1.13 Structural Verilog code for the 2-to-1 multiplexer.

----------------- NOT gate -----------------------


LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY notgate IS PORT(
i: IN STD_LOGIC;
o: OUT STD_LOGIC);
END notgate;
ARCHITECTURE Dataflow OF notgate IS
BEGIN
o <= NOT i;
END Dataflow;
----------------- 2-input AND gate ---------------
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY and2gate IS PORT(
i1, i2: IN STD_LOGIC;
o: OUT STD_LOGIC);
END and2gate;

FIGURE 1.14 Structural VHDL code for the 2-to-1 multiplexer.


(continued on next page)

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
14 CHAPTER 1 IntroductIon to MIcroprocessor desIgn

ARCHITECTURE Dataflow OF and2gate IS


BEGIN
o <= i1 AND i2;
END Dataflow;
----------------- 2-input OR gate ----------------
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY or2gate IS PORT(
i1, i2: IN STD_LOGIC;
o: OUT STD_LOGIC);
END or2gate;
ARCHITECTURE Dataflow OF or2gate IS
BEGIN
o <= i1 OR i2;
END Dataflow;
----------------- 2-to-1 multiplexer ------------
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY multiplexer IS PORT(
s, d0, d1: IN STD_LOGIC;
y: OUT STD_LOGIC);
END multiplexer;
ARCHITECTURE Structural OF multiplexer IS
COMPONENT notgate PORT(
i: IN STD_LOGIC;
o: OUT STD_LOGIC);
END COMPONENT;
COMPONENT and2gate PORT(
i1, i2: IN STD_LOGIC;
o: OUT STD_LOGIC);
END COMPONENT;
COMPONENT or2gate PORT(
i1, i2: IN STD_LOGIC;
o: OUT STD_LOGIC);
END COMPONENT;
SIGNAL sn, snd0, sd1: STD_LOGIC;
BEGIN
U1: notgate PORT MAP(s, sn);
U2: and2gate PORT MAP(d0, sn, snd0);
U3: and2gate PORT MAP(d1, s, sd1);
U4: or2gate PORT MAP(snd0, sd1, y);
END Structural;
FIGURE 1.14 Structural VHDL code for the 2-to-1 multiplexer.

In the structural Verilog code shown in Figure 1.13, the keywords (not, and, or) for
the various gates are used. The first parameter for these gate statements is the output from
the gate. The remaining parameters in the statements are the inputs to the gate. The wire

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
1.5 sYntHesIs 15

keyword defines user identifiers using the wire data type for connecting the gates together
based on the schematic diagram. For example, looking at the schematic diagram, the NOT
gate labeled U1 has s as the input and sn as the output. Hence in the corresponding code,
we have the statement not U1(sn, s). The user-identifier name U1 in the statement
is optional, and is added only for easy identification of the gate in the circuit.
The structural VHDL code shown in Figure 1.14 looks more complicated than
the Verilog code, but it actually does the same thing. The three different gates (notgate,
and2gate, and or2gate) used in the circuit are declared and defined first using the ENTITY
and ARCHITECTURE statements, respectively. After this, the multiplexer is declared (also
with the ENTITY statement). The actual, structural definition of the multiplexer is in the
ARCHITECTURE section for multiplexer. First of all, the COMPONENT statements specify
what components are used in the circuit. The SIGNAL statement declares the three inter-
nal signals (sn, snd0, and sd1) that will be used in the connection of the circuit. Finally,
the PORT MAP statements declare the instances of the gates used in the circuit and specify
how they are connected using the external and internal signals. So if you ignore all of
the preliminary declaration stuff, the last few statements in the VHDL code matches
the statements in the Verilog code.
The focus of this book is not to teach the details of how to write Verilog or VHDL
codes. Because these two hardware description languages are quite similar to high-level
computer languages such as C, which you already should be familiar with, we will take the
approach of learning by examples. Throughout the book, there are Verilog and VHDL
codes for all of the circuits discussed, and in the appendix there is a syntax summary of the
two languages for your reference. By looking at the examples and the summary references,
you should be able to write codes using these languages to describe your digital circuits.

1.5 Synthesis
Given a gate-level circuit diagram, such as the one shown in Figure 1.7, you actually
can get some discrete logic gates and manually connect them together with wires on
a breadboard. Traditionally, this is how electronic engineers actually designed and
implemented digital logic circuits. However, this is not how electronic engineers design
circuits anymore. They write programs, such as the one in Figure 1.6, just like what
computer programmers do. The question is how does the program that describes the
operation of the circuit actually get converted to the physical circuit?
The problem here is similar to translating a computer program written in a high-
level language to machine language for a particular computer to execute. For a computer
program, we use a compiler to do the translation. For translating a digital logic circuit,
we use a synthesizer. Instead of using a high-level computer language to describe a
computer program, we use a hardware description language (HDL) to describe the oper-
ations of a digital logic circuit. Writing a description of a digital logic circuit is similar to
writing a computer program except that a different language is used. A synthesizer then
is used to translate the HDL program into the circuit netlist. A netlist is a description of
how a circuit actually is realized or connected using basic gates. This translation process
from an HDL description of a circuit to its netlist is referred to as synthesis.
The netlist from the output of the synthesizer can be used directly to implement
the actual circuit in a FPGA IC chip. With this final step, the creation of a digital

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
16 CHAPTER 1 IntroductIon to MIcroprocessor desIgn

circuit that is implemented fully in an IC chip can be done easily. The appendices
give a tutorial of the complete process: from writing the Verilog or VHDL code to
synthesizing the circuit and uploading the netlist to a FPGA chip using an FPGA
development board.

1.6 Going Forward


We will now embark upon a journey that will take you from a simple transistor to the
construction of a microprocessor. Figure 1.2 will serve as our guide and map. If you
get lost on the way, and do not know where a particular component fits in the overall
picture, just refer to this map. At the end, you will be able to design your own custom
microprocessor. The exciting part is that this is not just talk and theories. You will be
able to implement and try out all of the circuits on a real FPGA chip. You will be able
to make lights flash, motors run, and execute your own software program on your own
custom microprocessor.
Figure 1.15 is an actual picture of the circuitry inside an Intel Pentium 4 CPU.
When you reach the end of this book, you still may not be able to design the cir-
cuit for the P4 because of lack of resources, but you certainly will know how it is
designed, because you actually will have designed and implemented a real working
microprocessor yourself.

Getty Images / Handout

FIGURE 1.15 The internal circuitry of the Intel Pentium 4 CPU.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
1.7 probleMs 17

1.7 PROBLEMS
1.1. Find out the approximate number of general-purpose microprocessors
sold in your country in the most recent year versus the number of dedi-
cated microprocessors sold.
1.2. Compile a list of devices controlled by a microprocessor that you use
during one regular day.
1.3. Describe what your regular daily routine would be like if no electrical
power (including battery power) were available.
1.4. What are the inputs and outputs for the following systems?
a) Traffic light
b) Heart pacemaker
c) Microwave oven
d) Musical greeting card
e) Hard disk drive (not the entire personal computer)
1.5. The speed of a microprocessor is often measured by its clock frequency.
What is the clock frequency of the fastest general-purpose microprocessor
available today?
1.6. Compare some typical clock speeds between general-purpose micropro-
cessors and dedicated microprocessors.
1.7. Summarize the mainstream generations of the Intel general-purpose
microprocessors used in personal computers, starting with the 8086 CPU.
List the year introduced, the clock speed, and the number of transistors in
each.
1.8. The first-generation PC uses the Intel 8088 with approximately 29,000
transistors. Approximately how many transistors are in the Intel Core
i7 (Quad) CPU? Approximately how many transistors are in the Xilinx
Virtex-7 FPGA? Approximately how many transistors are in the Altera
Stratix V FPGA?
1.9. Using Figure 1.11 as a template, write the dataflow Verilog code for the
2-to-1 multiplexer circuit shown in Figure 1.7(a).
1.10. Using Figure 1.13 as a template, write the structural Verilog code for the
2-to-1 multiplexer circuit shown in Figure 1.7(a).
1.11. Using Figure 1.10 as a template, write the dataflow VHDL code for the
2-to-1 multiplexer circuit shown in Figure 1.7(a).
1.12. Using Figure 1.14 as a template, write the structural VHDL code for the
2-to-1 multiplexer circuit shown in Figure 1.7(a).
1.13. Do the Xilinx ISE tutorial in Appendix A.
1.14. Do the Altera Quartus tutorial in Appendix B.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
CHAPTER 2

Fundamentals of Digital Circuits

Control Data
Inputs Microprocessor Inputs

'0'
Control Unit 8 Datapath
MUX
ff
Output
Next- State ALU
state Memory
Logic Control 8
Logic Register Signals ff
Register

Status 8
Signals
Control Data
Outputs Outputs

18

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
2.1 BInARY nUMBeRs 19

Our world is an analog world. Measurements that we make of the physical objects
around us are never in discrete units, but rather in a continuous range. We talk about
physical constants such as 2.718281828. . . or 3.141592. . . . To build analog devices
that can process these values accurately is next to impossible. Even building a simple
analog radio requires very accurate adjustments of frequencies, voltages, and currents
at each part of the circuit. If we were to use voltages to represent the constant 3.14, we
would have to build a component that will give us exactly 3.14 volts every time. This is
again impossible because the manufacturing process is imperfect, and each component
produced will be slightly different from the others. Even if the manufacturing process
could be made as perfect as we can get, we still would not be able to get 3.14 volts from
this component every time we use it. The reason is that the physical elements used in
producing the component behave differently in different environments, such as tem-
perature, pressure, and gravitational force, just to name a few. Therefore, even if the
manufacturing process is perfect, using this component in different environments will
not give us exactly 3.14 volts every time.
To make things simpler, we work with a digital abstraction of our analog world.
Instead of working with an infinite continuous range of values, we use just two values,
1 and 0, to represent the two states, on and off, in a digital electronic circuit. It cer-
tainly is much easier to control and work with two values rather than an infinite range
of values. We call these two values binary values because there are only two of them.
A single 0 or a single 1 is a binary digit or bit for short (where “bi” comes from the first
two letters of the word “binary,” and “t” comes from the last letter of the word “digit”).
This sounds great, but we have to remember that the underlying building block for our
digital circuits is still based on an analog world.
This chapter provides the theoretical foundations for building digital logic circuits
using logic gates, the basic building blocks for all digital circuits. We start with an intro-
duction on working with binary numbers and performing simple arithmetic in binary.
We then will introduce the basic logic gates for building digital circuits. Next, we cover
the basic theory of Boolean algebra, Boolean functions, and how to use and manipulate
them. Many students may find these theories to be boring and difficult to understand,
but let me encourage you to grind through it patiently. The good news is that I will
try to keep them as short and simple as possible. You also will find that many of the
Boolean theorems are very familiar, because they are similar to the algebra theorems
that you already learned in your high school math class. Finally, we conclude with an
example of building a simple digital circuit.

2.1 Binary Numbers


Because digital circuits deal with binary values, we will begin with an introduction to
binary numbers. A bit, having a value of either 0 or 1, can represent only two things
or two pieces of information. It is, therefore, necessary to group together many bits to
represent more pieces of information. A string of n bits can represent 2n different pieces
of information. For example, a string of two bits can represent four different things

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
20 CHAPTER 2 FUnDAMentALs oF DIGItAL CIRCUIts

using the four unique combinations: 00, 01, 10, and 11. By using different encoding
techniques, a group of bits can be used to represent different information, such as a
number, a letter of the alphabet, a character symbol, or a command for the micropro-
cessor to execute.
Instead of working with the more familiar decimal numbers that consist of decimal
digits, we work with binary numbers, which consist of a string of bits. However, the
use of binary numbers is just a convenient form of representation for a string of bits,
because we can just as well use octal, decimal, or hexadecimal numbers to represent
this group of bits. In fact, you will find that hexadecimal numbers often are used as a
shorthand notation for binary numbers.

2.1.1 Counting in Binary


The decimal number system that we all are familiar with is a positional system. In
other words, the value of the digit is dependent on the position of the digit within the
number. For example, in the decimal number 48, the decimal digit 4 has a greater value
than the decimal digit 8 because it is in the tens position, whereas the digit 8 is in the
unit position.
The binary number system is also a positional system, with the only difference
between the two systems being that the binary system is a base-2 system, using only two
digits, 0 and 1, instead of a base-10 system, using ten digits, 0 to 9. So for the binary
number 101, the leftmost 1 has a larger value than the rightmost 1.
Counting in binary is just like counting in decimal. When we count in decimal, we
count from 0 to 9. After reaching 9 (the last digit) we go back to 0, and have a carry of
a 1 by incrementing the next digit to the left by 1, giving us 10. Doing the same thing in
binary, we count from 0 to 1 (which is the last digit in the binary system). After reach-
ing 1, we go back to 0, and increment the next bit to the left by 1, giving us 10. Although
we use the number 10 in both systems, they are different because one is in base ten and
the other is in base two, and so they have different values. To avoid confusion, we will
use a subscript to denote what base the number is in, for example, 102 is the number
10 in base 2, and 1010 is the same number, but in base 10. Continuing with the count in
binary, the next few numbers in sequence are 11, 100, 101, 110, 111, and 1000.
The binary numbers from 0 to 15 (decimal) are shown in Figure 2.1. The range
from 0 to 15 has 16 different combinations. We need a 4-bit binary number (i.e., a string
of four bits) to represent this range because 24 5 16. The count from 0 to 15 in binary
is shown in the second column. The corresponding octal (base 8) and hexadecimal
(base 16) numbers also are shown in the figure. We will discuss them further in later
sections.

2.1.2 Converting between Binary and Decimal


The decimal value of a binary number can be found just like that for a decimal number,
except that we raise the base number 2 to a power rather than the base number 10 to
a power. The rightmost digit or bit is raised to the power 0, the next digit or bit to the
left is raised to the power 1, then the next one to the power 2, and so on. For example,
the value for the decimal number 658 is

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-202
Another Random Scribd Document
with Unrelated Content
Il eut ce qu'on te donne
Ce fils du roi d'Édone

Insulteur de l'autel.

Et Bacchus le fit taire


En l'enfermant sous terre

Dans un rocher cruel.

Nouvelle réflexion salutaire et nouvel et dernier exemple:


Sur la rive traîtresse
Où l'on voit Salmydesse

En proie à tous les vents

La marâtre effrénée
Des deux fils de Phinée

Les enterra vivants.

Et leur mère, ô ma fille,


Était de la famille

D'Érechthée! et ses jeux,

Borée étant son père,


Affrontaient le tonnerre

Sur les monts orageux!

Sur la glace, intrépide


Et fière et plus rapide

Qu'un cheval furieux

Elle allait sans rien craindre.


La Parque sut atteindre

Cette fille des Dieux!

Antigone sort.
Mon ami ces vers lyriques de messieurs Paul Meurice et Auguste
Vacquerie ne valent pas les stances de Pierre Corneille. Vous
connaissez les causes de cette imparité. Messieurs Paul Meurice et
Auguste Vacquerie ne sont ou n'étaient pas des poètes comparables
à l'ancien Pierre Corneille. D'ailleurs il est plus difficile de traduire en
poète que de donner, de produire, soi-même en poète. Je vous
assure que ces plaintes et ces consolations, s'il est permis de les
nommer ainsi, étaient redoutables quand elles étaient chantées à la
scène, et qu'elles étaient accompagnées.
—Je les entendis, docteur, au temps que j'étais jeune. Les
lamentations harmonieuses d'Antigone et les lâches consolations
harmonieuses du chœur me paraissaient redoutables, mais
nullement épouvantables comme les imaginations de l'enfer chrétien.
Jamais les païens, qui aimaient la vie et la beauté, n'ont pu ni voulu
réussir à de telles épouvantes. Il faut qu'il y ait au fond du sentiment
chrétien une épouvantable complicité, une hideuse complaisance à la
maladie et à la mort. Vous ne m'en ferez pas dédire.
—Les lamentations antiques et les consolations du chœur vous
paraissaient harmonieuses représentées sur la scène aux Français.
Nul doute qu'elles ne fussent harmonieuses représentées devant les
Athéniens. Mais j'ai peur que dès ce temps-là, mon ami, la maladie
et la souffrance, la mort et l'exil ne fussent pas harmonieux aux
misérables qui les enduraient dans la réalité. Il y a loin de la douleur
tragique aux laideurs de la réalité. Vous n'avez pas oublié toutes les
horreurs de l'histoire ancienne, les horreurs barbares, que les
Hellènes ont connues, et, aussi, les horreurs helléniques, les haines
et les guerres civiles parmi les cités et dans les cités, les massacres
et les ravages, puis la haine et la guerre des pauvres et des riches,
les tyrannies, les oligarchies et les démagogies, et, déjà, la triste
résignation dure d'Hésiode. Non, mon ami, je ne suis pas fasciné par
la mémoire de mes versions grecques au point d'avoir oublié cela.
—Moi non plus, docteur, et je ne voulais pas instituer une cité
antique harmonieuse et factice. Mais vous n'allez pas non plus
m'instituer une cité antique identique au moyen âge de la chrétienté.
Sans faire aucune espèce de métaphysique, je suis bien forcé
d'accepter qu'il y a eu un génie antique et un génie chrétien et que
le génie chrétien est à beaucoup d'égards différent du génie antique.
Cela étant admis, je prétends, et je maintiens, et je maintiendrai
toujours que le génie chrétien est beaucoup plus favorable à toute
maladie. Quand nous disons que l'Église catholique est opposée au
socialisme—et c'est cela qui rend si délicate la situation des
socialistes chrétiens sincères, très peu nombreux en France—nous
n'entendons pas seulement par là qu'elle veut tenir des militants
exilés des biens de ce monde: nous entendons plus profondément
qu'elle veut tenir d'anciens militants exilés des biens éternels, qu'elle
admet côte à côte une Église triomphante et un Enfer, une résidence
de béatitude et une résidence de maladie et de mort. Là est
vraiment le non possumus. Imaginé ou non pour épouvanter les
pécheurs, l'enfer a plus encore épouvanté les chrétiens les meilleurs.
—Vous me l'avez déjà dit.
—Je vous demande pardon. Mais cette épouvante me tient au
cœur.
—Elle vous empêche de réserver que nous ne croyons pas aux
propositions de la foi catholique parce que ce n'est pas vrai.
—J'essayais de comparer seulement, docteur, l'idée que nous
avons de ce que nous voulons à l'égard de la maladie et de la mort à
l'idée que les chrétiens ont de ce qu'ils croient aux mêmes égards.
Leur épouvante me tient à l'âme. Il n'y a pas seulement, des
catholiques à nous, la distance d'une imagination vaine à une sincère
critique universelle; cela ne serait rien en comparaison de ce qu'il y
a: mais vraiment il y a l'inconciliabilité d'une imagination perverse à
une raison modeste amie de la santé. J'ai pensé beaucoup à cela
pendant plusieurs années que mes amis Marcel et Pierre Baudouin
travaillaient à un drame en trois pièces qu'ils finirent d'écrire en juin
1897 et que les imprimeurs finirent d'imprimer en décembre de la
même année.

—Au revoir, mon ami, me dit le docteur, et portez-vous bien. Je


reviendrai vous voir encore une fois, car je sais les honneurs que les
gens bien portants doivent aux convalescents. Puis c'est vous qui
reviendrez chez moi.
—Car je sais les honneurs que les simples citoyens doivent aux
moralistes. Revenez vite, monsieur l'honorable, revenez bientôt.
—Je ne saurais, car j'ai beaucoup de commissions à faire à Paris.
—Hâtez-vous, monsieur le commissionnaire, hâtez-vous, car
j'attends mon cousin.
—Qui donc ce cousin?
—Et quand mon cousin est là, docteur, on ne peut plus causer
tranquille. Mon cousin n'aimera pas beaucoup les lenteurs et les
longueurs de nos dialectiques attentives. C'est un garçon impatient.
—Mais qui donc, ce cousin?
—Je vous dis qu'il est impatient comme vous. Sachez donc, ô
docteur, que j'ai en province un cousin que je nomme
respectueusement et familièrement mon grand cousin, et qui moins
respectueusement, et plus familièrement, me nomme
réciproquement son petit cousin. Cet intitulé tient à ce qu'il est plus
vieux que moi et qu'ainsi quand j'étais petit lui au contraire il était
grand. Et nous avons continué à nous intituler ainsi d'autant plus
commodément qu'il est grand et fort, haut en épaules, tandis que je
suis petit et bas. Il est de son métier ouvrier fumiste.
—Ouvrier fumiste?
—Ouvrier fumiste. Comme le nom l'indique, il travaille à tous les
appareils qui produisent de la fumée, aux cheminées, poêles,
fourneaux et calorifères. Il ne vient nullement à Paris, comme un
lecteur astucieux pourrait l'en soupçonner faussement, pour
introduire quelque variété en nos débats. Car nous n'avons que faire
de nous varier, docteur?—Nous ne causons pas pour nous varier,
mais nous cherchons la vérité. Il accourt à Paris pour l'Exposition.
—Naturellement, puisqu'il vient de la province.
Il accourt à Paris pour l'Exposition. Universelle. C'est-à-dire
interprovinciale, internationale, et aussi intermétropolitaine. On lui a
dit qu'il y avait à l'Exposition des cheminées monumentales, sans
compter la tour Eiffel, des tuyaux de poêle extraordinaires, des
fourneaux compliqués, des chaufferettes agencées pour la plus
grande gloire de l'industrie nationale et des calorifères bien faits
pour témoigner de la grandeur de l'esprit humain. Comme homme,
comme Français, comme fumiste, mon cousin accourt à l'Exposition,
déjà glorieux de la gloire commune et de la gloire professionnelle.
Mon grand cousin est un garçon qui aime à voir par lui-même. Il
devait arriver cette semaine.
—Cette semaine? L'Exposition n'ouvre que le 14 avril.
—Justement. Mon cousin prétend que pour bien voir ces
machines-là il faut les voir avant qu'elles aient commencé. Une idée
à lui.
—Comment serait-il entré?
—Il est des accommodements. Quelque camarade en fumisterie
lui aurait prêté sa carte d'exposant. Mon cousin comptait venir cette
semaine. Il escomptait l'adoucissement habituel de la température
en cette saison. Quand la température est plus douce, la fumisterie
est moins urgente. Mais l'adoucissement escompté n'est pas venu.
Mon cousin nous arrivera dès qu'il pourra quitter pour quelque
temps son travail.
—Quel est son caractère?
—Je ne sais pas si vous lui plairez.
—Je ne sais pas non plus s'il me plaira.
—C'est un grand bon garçon malin. Ancien élève des Frères des
Écoles chrétiennes, il a pour les chers Frères un peu de
reconnaissance et beaucoup de mauvaises paroles. Il a eu son
certificat d'études. Il a beaucoup lu de mauvais romans, de
feuilletons, qui n'ont pour ainsi dire pas laissé trace en son
imagination. Il a une belle écriture douce qui ne lui ressemble pas. Il
calcule parfaitement, et c'est lui qui fait les comptes de son patron.
Une bonne instruction primaire. Bon ouvrier, comme ouvrier. Habile
de ses mains. Comme il travaille dans une toute petite maison de
province—le patron, deux compagnons, un ou deux goujats—il fait
un peu de tous les métiers: maçon, carreleur, plâtrier, marbrier,
serrurier, tôlier, et non pas seulement pur fumiste. Audacieux, et
téméraire même: ainsi le veut le métier. Les fumistes sont encore
plus téméraires que les couvreurs, puisque les cheminées sont plus
hautes que les toits. D'ailleurs ce qui nous semble témérité chez eux
est une espèce particulière de sérénité, une accoutumance à
demeurer dans les hauteurs. Il aime à causer. Vous parlez à lui, vous
allez, vous allez, vous parlez devant lui. Enfin à un mot, à un geste,
vous vous apercevez qu'il vous faisait poser, qu'il vous faisait
marcher, qu'il faisait la bête, qu'il savait parfaitement ce qu'il vous a
fait dire. C'est une espèce d'humeur qui m'a semblé très fréquente
parmi les ouvriers, au moins en cette province, en particulier parmi
les ouvriers du bâtiment. Les ouvriers du bâtiment sont
naturellement des faiseurs de palabres, des organisateurs de
conférences. La place publique et la rue leur est naturelle. Beaucoup
de blague, souvent de bonne blague, surtout de blague à froid. Tous
les jours il achète sa Petite République, chez la marchande de
journaux, qui lui garde aussi les romans populaires paraissant en
livraisons. Il doit acheter aussi l'Histoire Socialiste, parce qu'elle est
socialiste, parce qu'il aime l'histoire, parce qu'elle paraît en livraisons
identiques, parce que l'éditeur est le même, c'est encore du Rouff.
Mon cousin lit tout cela en mangeant, à déjeuner, lit la Petite
République et croit assez que c'est arrivé, lit ses livraisons et sait
parfaitement que ce n'est pas arrivé, lit son Histoire et croit tout à
fait que cela est arrivé. Mon cousin est un socialiste classé. Il vient
me demander compte.
—Vous demander compte?
—Me demander compte. Mon cousin est, vous le pensez bien,
membre—et membre très actif—du Groupe d'études sociales
d'Orléans, adhérent au Parti ouvrier français. Un vote régulier du
groupe, auquel mon cousin avait pris part, m'avait institué délégué
de ce groupe au futur ancien Congrès général des Organisations
Socialistes Françaises. Heureusement que le Conseil national veillait.
Survint le bon guesdiste, le fidèle dûment recommandé. Le groupe
eut une seconde réunion, beaucoup plus régulière que la première,
procéda ensuite à un second vote, beaucoup plus régulier que le
premier. La minorité me demeura fidèle. Mais la majorité me renia.
Mon cousin, ayant été de la minorité, prétend que je fus moralement
son délégué au Congrès.
—Je ne sais pas bien ce que c'est qu'un délégué moral.
—Moi non plus. Mais mon cousin est entêté. Il nous dira ce qu'il
veut dire.
—Et de combien était cette minorité fidèle?
—Quoique absent, j'obtins quatre voix.
—Avouez que c'est bien peu. La majorité infidèle était sans doute
au moins égale à cinq voix?
—Égale à cinq voix, docteur, elle eût été valable. Mais elle était
beaucoup plus considérable: elle montait jusqu'à six voix—sur dix
votants. Il n'y eut aucune abstention.—Au revoir.

Le docteur en allé revint sur ses pas:


—J'allais vous laisser le livre que j'avais apporté. Je n'y pensais
plus. Il faut que je le rende avant les vacances de Pâques à la
bibliothèque où je l'ai emprunté. Ce sont les Provinciales. Quand
votre cousin vous demandera compte, vous pourrez lui faire
quelques citations intéressantes:
«Et si la curiosité me prenait de savoir si ces propositions sont dans
Jansénius, son livre n'est pas si rare, ni si gros, que je ne le pusse lire tout
entier pour m'en éclaircir, sans en consulter la Sorbonne.»

—Ne croyez pas, docteur, que mon grand cousin ni ses camarades
entendent ces allusions.
—S'il est ainsi que vous me l'avez dit, je suis assuré qu'il entendra
au moins ce qui suit:
«Il n'y eut jamais de jugement moins juridique, et tous les statuts de la
Faculté de théologie y furent violés. On donna pour commissaires à M.
Arnauld ses ennemis déclarés, et l'on n'eut égard ni à ses récusations ni à
ses défenses; on lui refusa même de venir en personne dire ses raisons.
Quoique par les statuts les moines ne doivent pas se trouver dans les
assemblées au nombre de plus de huit, il s'y en trouva toujours plus de
quarante, et pour empêcher ceux de M. Arnauld [c'est-à-dire les amis, les
partisans d'Arnauld] de dire tout ce qu'ils avaient préparé pour sa défense,
le temps que chaque docteur devrait dire son avis fut limité à une demi-
heure. On mit pour cela sur la table une clepsydre, c'est-à-dire une
horloge de sable, qui était la mesure de ce temps; invention non moins
odieuse en de pareilles occasions que honteuse dans son origine, et qui,
au rapport du cardinal Palavicin, ayant été proposée au concile de Trente
par quelques-uns, fut rejetée par tout le concile. Enfin, dans le dessein
d'ôter entièrement la liberté des suffrages, le chancelier Séguier, malgré
son grand âge et ses incommodités, eut ordre d'assister à toutes ces
assemblées.
Près de quatre-vingts des plus célèbres docteurs, voyant une procédure
si irrégulière, résolurent de s'absenter, et aimèrent mieux sortir de la
Faculté que de souscrire à la censure. M. de Lannoy même, si fameux par
sa grande érudition, quoiqu'il fît profession publique d'être sur la grâce
d'un autre sentiment que saint Augustin, sortit aussi comme les autres, et
écrivit contre la censure une lettre où il se plaignait avec beaucoup de
force du renversement de tous les privilèges de la Faculté.»

Allons, au revoir, au revoir. Ce que je vous ai lu n'est pas du


Pascal. C'est un exposé que Racine a fait dans une Histoire de Port-
Royal qu'il a laissée en manuscrit, et qu'on a placée depuis dans ses
œuvres. M. Havet nous a donné cet exposé au commencement des
remarques sur la première provinciale. Quand le gouvernement et le
pape étaient d'accord, on ne tenait pas compte de la règle faite
contre les moines.
ENTRE DEUX TRAINS
5 mai 1900,
Le samedi saint, comme je l'avais annoncé à la troisième page de
la couverture du septième cahier, j'administrai, de une heure à
quatre heures et demie, au siège de ces cahiers, chez mon ami
Tharaud, 19, rue des Fossés-Saint-Jacques, solitaire. Les Parisiens
étaient partis pour la province. Et les provinciaux n'étaient pas venus
à Paris. Un coup de sonnette. Mon ami René Lardenois.
—Bonjour. Je viens te dire bonjour entre deux trains. Je suis arrivé
à onze heures cinquante-neuf en gare d'Orléans, ce matin. Ou du
moins je devais arriver à onze heures cinquante-neuf. Mais les trains
ont souvent un peu de retard, à cause des vacances.
—Tu es toujours à Bayonne?
—J'ai tant roulé que je ne regardais plus même l'heure aux
cadrans intérieurs des gares. Je confondais le jour et la nuit, ce qui
est la dernière des perversités.—Oui, toujours, au Lycée de Bayonne.
J'avais demandé le Nord-Est. Mes parents demeurent à Belval. C'est
la dernière station avant Mézières. Une simple halte. A défaut du
Nord-Est, j'avais au moins demandé le Nord. A défaut du Nord,
j'avais au moins demandé l'Est. On m'a nommé à Bayonne. Un bon
lycée. Je repars ce soir à huit heures quarante-cinq, par la gare du
Nord. Je serai chez moi demain matin à huit heures, dimanche de
Pâques. Mais il y aura du retard, à cause des fêtes. Ainsi j'ai un
quart d'heure à passer avec toi, montre en main. J'ai un tas de
courses à faire dans Paris, et les rues sont toujours aussi
impraticables. J'avais un quart d'heure. Il me reste encore dix
minutes.
Et il posa sa montre sur la table.
—En dix minutes on ne peut rien dire. Ce n'est pas la peine de
commencer. Nous parlerons de tes cahiers quand nous aurons le
temps.
—Nous parlerons de ta province et de ta classe quand nous
aurons le temps.
—Aux grandes vacances, au commencement d'août, je passerai
plusieurs jours à Paris.
—L'Exposition?
—Naturellement. Ne suis-je pas provincial? Et puis vous, les
Parisiens, vous raillez, pour avoir l'air spirituels, mais vous y allez
tout de même. Seulement, comme vous êtes lâches, vous faites
semblant d'y aller pour piloter vos cousins. Vous êtes bien contents,
d'avoir des cousins. A peine le tien, le fumiste Orléanais, nous avait-il
annoncé sa venue éventuelle que déjà M. Serge Basset, du Matin,
avait sur le dos, depuis trois jours, son cousin Bernard, notable
commerçant de Quimper-Corentin, si nous le voulons, en tout cas un
cousin plus sérieux que le tien, et plus rapide.
—Que veux-tu, mon ami, le sien est un cousin quotidien et le mien
n'est qu'un modeste cousin bimensuel, à peu près bimensuel.
—Parlons des copains.
—Quand es-tu parti?
—Les vacances commençaient mercredi soir. Mais j'avais jeudi
matin une répétition que je ne pouvais pas, et que je ne voulais pas
remettre.
—Tu donnes des leçons?
—Non, je les vends.
—C'est ce que je voulais dire.
—Parlons proprement.
—Ce mot que tu as dit—et par manière de plaisanterie je faisais le
dégoûté en souriant—me paraît peu compatible avec la dignité des
professions libérales.
—Mettons que je suis fort obligeant, fort officieux; et sans que je
me connaisse fort bien en lettres françaises, en lettres latines et en
lettres grecques, je laisse les parents de mes élèves apporter chez
moi de tous côtés ceux qui sont timides en grec, en latin, et en
français, et qui cependant, pour des raisons purement
désintéressées, désirent, comme on dit, subir heureusement la
première partie des épreuves du baccalauréat classique
—et j'en donne à mes amis pour de l'argent.
—Tu possèdes bien tes auteurs.
—Ce n'est pas étonnant: je m'en nourris.
—Alors?
—Alors, j'ai donné ma leçon jeudi matin. Puis j'ai fait le voyage en
plusieurs fois. Jeudi je suis allé de Bayonne à Bordeaux, vendredi de
Bordeaux à Tours, aujourd'hui samedi de Tours à la rue des Fossés-
Saint-Jacques. Cette nuit, en pleine nuit, j'aurai encore plus de trois
heures et demie à passer à Laon. Total: quatre jours au moins.
Autant pour le retour, le nostos, hélas! non convoité. Total général:
huit à neuf jours. Nous rentrons de mardi matin en huit...
—Le mardi de la Quasimodo?
—C'est cela. Il faut que je sois rentré de la veille au soir, si je ne
veux pas dormir en classe. Il faut donc que dès jeudi soir je pense
au départ et que vendredi matin je quitte mes parents, comme le
conscrit:
Adieu mon père, adieu ma mère,
J'ons tiré un mauvais numéro.

J'aurai eu cinq jours de vacances. Le gouvernement encourage


peu la vie de famille. As-tu vu quelqu'un?
—Je n'ai vu personne encore et, sans doute, je ne verrai
personne. Aucun de nos camarades ne m'est signalé. L'année
dernière, il en était venu beaucoup pour les vacances de Pâques.
—Ce n'est nullement que le monde nous abandonne. Jusqu'à
l'année dernière le congrès des professeurs de l'enseignement
secondaire avait lieu à Pâques. Cette année-ci on le tiendra au mois
d'août.
—J'entends: ce sera un des innombrables congrès qui font partie
de l'exposition.
—Ils ne sont pas innombrables: il y en avait cent vingt-six
d'annoncés avant le commencement de l'exposition.
—Ce n'est rien. De qui tiens-tu, monsieur, ces renseignements
officiels?
—Sache que le citoyen sténographe est mon ami. Aussi m'a-t-il
envoyé en province un papier, une piqûre officielle.
—Une piqûre: tu parles comme un brocheur.
—Parlons proprement. Tiens: République française—
—Liberté, égalité, fraternité—
—Non, cela ne se met que sur les monuments publics.
—Ministère du commerce, de l'industrie, des postes et des
télégraphes—
—et de l'Exposition.
—Surtout de l'exposition. Mais cela n'est pas officiel.
—Comme tu parles bien. On voit bien que tu es devenu
ministériel.
—Exposition universelle internationale de 1900.—Liste des congrès
internationaux de 1900.—Vraiment j'ai passé là un bon quart
d'heure. Il y a le congrès de l'Acétylène avec le congrès des
Actuaires, le congrès de l'Alimentation rationnelle du bétail, le
congrès d'Aquiculture et de Pêche. Tu connais l'aquiculture?
—Non seulement je la connais, mais je la pratique: j'ai dans mon
bassin deux poissons rouges et un brun vert.
—Il y a le congrès d'Arboriculture et de pomologie, celui des
Bibliothécaires. Le papier officiel ne porte pas seulement les noms
des congrès, la date et la durée, mais il donne encore les noms des
présidents et des secrétaires généraux des commissions
d'organisation. Le congrès d'Agriculture a pour président un certain
monsieur Méline, rue de Commailles, 4, et le congrès des sciences
de l'Écriture a pour secrétaire général un M. Varinard, 8, rue
Servandoni.
—Comme on se retrouve.
—Tous les oubliés reparaissent ici. M. Léon Bourgeois, rue
Palatine, 5, préside à l'organisation de trois congrès: celui de l'École
de l'Exposition, celui de l'Éducation physique,—
—Et celui de l'Éducation morale—
—Non: et celui de l'Éducation sociale.—
—Ah ah! Selon les doux et mesurés élancements de la solidarité
radicale—
—M. Casimir-Perier, rue Nitot, 23, a aussi ses trois congrès: le
congrès d'Assistance publique et de bienfaisance privée,—
—Utile.
—celui de l'Enseignement agricole, et, vers la fin, celui des
Stations agronomiques. Il y a le congrès des méthodes d'Essai des
matériaux.
—Très utile.
—Oui. Et le congrès pour l'étude des Fruits à pressoir. Celui des
Mathématiciens a pour secrétaire général un M. Laisant, avenue
Victor-Hugo, 162. Il y a le congrès du Matériel théâtral, sans date ni
durée, non plus que le congrès pour l'unification du Numérotage des
fils des textiles. Celui des Associations de Presse n'a ni date, ni
durée, ni président, ni secrétaire général, ainsi que celui de la
Ramie. Qu'est-ce que la ramie?
Je sautai sur mon petit Larousse. Le mot n'y était pas.
—La ramie est une espèce d'ortie, urtica utilis, qui pousse en
abondance à Java, et dont on fait des fils, des câbles et même des
tissus.
—Tu sais tout?
—La culture générale, aidée d'un vieux dictionnaire que j'ai à la
maison. Il y a l'inévitable congrès de la paix, ironique plus
douloureusement encore cette année. M. Boutroux, rue Saint-
Jacques, 260, préside à l'organisation du congrès de Philosophie. As-
tu quelque idée de ce que c'est: un congrès de philosophie.
—Je n'en ai aucune image intéressante.
—Il y a dans Descartes, au discours de la Méthode pour bien
conduire sa raison et chercher la vérité dans les sciences, à la fin de
la troisième partie, un passage où ce philosophe réprouve non
seulement le congrès, mais la simple fréquentation mutuelle des
philosophes:
—Le voici:
—«Mais ayant le cœur assez bon pour ne vouloir point qu'on me prît
pour autre chose que je n'étais, je pensai qu'il fallait que je tâchasse par
tous les moyens à me rendre digne de la réputation qu'on me donnait; et
il y a justement huit ans que ce désir me fit résoudre à m'éloigner de tous
les lieux où je pouvais avoir des connaissances, et à me retirer ici,—en
Hollande—en un pays où la longue durée de la guerre a fait établir de tels
ordres, que les armées qu'on y entretient ne semblent servir qu'à faire
qu'on y jouisse des fruits de la paix avec d'autant plus de sûreté, et où,
parmi la foule d'un grand peuple fort actif, et plus soigneux de ses propres
affaires que curieux de celles d'autrui, sans manquer d'aucune des
commodités qui sont dans les villes les plus fréquentées, j'ai pu vivre aussi
solitaire et retiré que dans les déserts les plus écartés.»

—Je lis au cours de la sixième partie:


«Mais je crois être d'autant plus obligé à ménager le temps qui me
reste, que j'ai plus d'espérance de le pouvoir bien employer; et j'aurais
sans doute plusieurs occasions de le perdre si je publiais les fondements
de ma physique; car encore qu'ils soient presque tous si évidents qu'il ne
faut que les entendre pour les croire, et qu'il n'y en ait aucun dont je ne
pense pouvoir donner des démonstrations, toutefois, à cause qu'il est
impossible qu'ils soient accordants avec toutes les diverses opinions des
autres hommes, je prévois que je serais souvent diverti par les oppositions
qu'ils feraient naître.»

—A la suite:
«On peut dire que ces oppositions seraient utiles tant afin de me faire
connaître mes fautes, qu'afin que, si j'avais quelque chose de bon, les
autres en eussent par ce moyen plus d'intelligence; et, comme plusieurs
peuvent plus voir qu'un homme seul, que, commençant dès maintenant à
s'en servir, ils m'aidassent aussi de leurs inventions.»

Cela serait favorable, sinon au congrès, du moins au commerce


des philosophes, au travail en commun, à la mutualité.
«Mais encore que je me reconnaisse extrêmement sujet à faillir, et que
je ne me fie quasi jamais aux premières pensées qui me viennent,
toutefois l'expérience que j'ai des objections qu'on me peut faire
m'empêche d'en espérer aucun profit: car j'ai déjà souvent éprouvé les
jugements tant de ceux que j'ai tenus pour mes amis que de quelques
autres à qui je pensais être indifférent, et même aussi de quelques-uns
dont je savais que la malignité et l'envie tâcheraient assez à découvrir ce
que l'affection cacherait à mes amis; mais il est rarement arrivé qu'on
m'ait objecté quelque chose que je n'eusse point du tout prévue, si ce
n'est qu'elle fût fort éloignée de mon sujet, en sorte que je n'ai quasi
jamais rencontré aucun censeur de mes opinions qui ne me semblât ou
moins rigoureux ou moins équitable que moi-même. Et je n'ai jamais
remarqué non plus—
Ceci va non seulement contre tout congrès et tout commerce de
philosophes, mais contre toute académie et contre la vénérable
institution des thèses:
—Et je n'ai jamais remarqué non plus, que par le moyen des disputes
qui se pratiquent dans les écoles, on ait découvert aucune vérité qu'on
ignorât auparavant; car pendant que chacun tâche de vaincre, on s'exerce
bien plus à faire valoir la vraisemblance qu'à peser les raisons de part et
d'autre; et ceux qui ont été longtemps bons avocats ne sont pas pour cela
par après meilleurs juges.»

—M. Boutroux ne présiderait donc pas à l'organisation d'un


congrès de philosophie—car ces raisons doivent lui sembler valoir,
non pas seulement parce qu'elles sont de Descartes, mais parce
qu'elles ont de la valeur—s'il n'avait sans doute résolu de conduire
souvent sa raison et ses actions selon les trois ou quatre maximes
de la morale que Descartes s'était formée par provision. Je lis au
commencement de la troisième partie:
«La première était d'obéir aux lois et aux coutumes de mon pays,
retenant constamment la religion en laquelle Dieu m'a fait la grâce d'être
instruit dès mon enfance, et me gouvernant en toute autre chose suivant
les opinions les plus modérées et les plus éloignées de l'excès qui fussent
communément reçues en pratique par les mieux sensés de ceux avec
lesquels j'aurais à vivre. Car, commençant dès lors à ne compter pour rien
les miennes propres, à cause que je les voulais toutes remettre à
l'examen, j'étais assuré de ne pouvoir mieux que de suivre celles des
mieux sensés. Et encore qu'il y en ait peut-être d'aussi bien sensés parmi
les Perses ou les Chinois que parmi nous, il me semblait que le plus utile
était de me régler selon ceux avec lesquels j'aurais à vivre; et que, pour
savoir quelles étaient véritablement leurs opinions, je devais plutôt
prendre garde à ce qu'ils pratiquaient qu'à ce qu'ils disaient, non
seulement à cause qu'en la corruption de nos mœurs il y a peu de gens
qui veuillent dire tout ce qu'ils croient, mais aussi à cause que plusieurs
l'ignorent eux-mêmes; car l'action de la pensée par laquelle on croit une
chose étant différente de celle par laquelle on connaît qu'on la croit, elles
sont souvent l'une sans l'autre. Et, entre plusieurs opinions également
reçues, je ne choisissais que les plus modérées, tant à cause que ce sont
toujours les plus commodes pour la pratique, et vraisemblablement les
meilleures, tout excès ayant coutume d'être mauvais, comme aussi afin de
me détourner moins du vrai chemin, en cas que je faillisse, que si, ayant
choisi l'un des extrêmes, c'eût été l'autre qu'il eût fallu suivre.»

Or il est incontestable que les lois, les coutumes et la religion de


ce pays, c'est de faire l'exposition universelle, et quand on n'a pas
l'honneur de la faire—
—On a du moins l'honneur de l'avoir entreprise.
—Non, mais on a l'honneur d'y aller, et l'honneur de chanter en
son honneur un Te Deum laïque d'honneur. Ainsi font nos
philosophes. Ils contribuent leur philosophie à la splendeur de
l'exposition. Ils exposent en congrès leurs philosophies, ou leur
philosophie, ou leurs personnes philosophiques.
—Allons, allons, admettons qu'ils y aillent par provision, qu'ils se
gouvernent en ceci suivant les opinions les plus modérées et les plus
éloignées de l'excès, qu'ils suivent les opinions des mieux sensés;
admettons que ce ne seront pas des philosophes internationaux
réunis en congrès, mais que ce seront des congressistes
internationaux qui d'ailleurs et de leur métier seront des philosophes
ou des professeurs de philosophie.
—Comment, comment?
—Rien, je distingue et je concilie.
—Ah bien.—Il y a le congrès du Repos du dimanche, le congrès
des Sapeurs-pompiers (des officiers et sous-officiers), celui de
Sociologie coloniale, celui des Spécialités pharmaceutiques. Je pense
que des sténographes sténographieront le congrès de Sténographie:
on n'est jamais si bien servi que par soi-même.
—Et l'on n'est jamais trahi que par les siens. Il y a le congrès des
Syndicats agricoles, et c'est M. le marquis de Vogüé, rue Fabert, 2,
qui préside à son organisation. Il y a le congrès du Tabac (contre
l'abus). Je ne vois aucun congrès antialcoolique, et c'est dommage.
—Il n'y a que le congrès Végétarien. Encore n'a-t-il ni Président, ni
Secrétaire général.
—En revanche il y a deux congrès pour l'Alcoolisation française.
—Comment deux congrès pour l'Alcoolisation française.
—Mon ami si on les nommait ainsi on ne pourrait pas décemment
donner la croix d'honneur aux Présidents et la rosace violette aux
Secrétaires généraux. Et alors à quoi servirait le Congrès? A quoi
servirait la grande Exposition? Mais rassure-toi: le premier sera le
congrès du commerce des Vins, Spiritueux et Liqueurs; le second
sera modestement le congrès de Viticulture. Nous devons
encourager la viticulture, la sylviculture, l'Horticulture, que préside
humblement M. Viger, de Châteauneuf-sur-Loire ou des environs, 55,
rue des Saints-Pères, Paris, sans doute avec la finesse épaisse un
peu antisémitique et grasse qui lui est habituelle. Toutes les gloires
nationales que ces présidents, les gloires modestes et les gloires
proprement glorieuses. M. Gaston Boissier, 23, quai Conti, préside à
l'organisation de l'Histoire comparée. Les congrès des
enseignements sont nombreux: congrès des Associations des
anciens élèves des Écoles supérieures de commerce; de l'Éducation
physique et de l'Éducation sociale, déjà nommés, celui de
l'Enseignement agricole, déjà nommé, celui de l'Enseignement du
dessin, celui de l'Enseignement des langues vivantes, celui des
Sociétés laïques d'Enseignement populaire, celui de l'Enseignement
primaire, celui de l'Enseignement secondaire, celui de
l'Enseignement des sciences sociales, celui de l'Enseignement
supérieur, celui de l'Enseignement technique, commercial et
industriel, celui de l'Épicerie—Non, je suis allé trop loin sur la liste.
Rends-moi mon papier, imprimé à l'Imprimerie nationale. Tu n'as vu
personne, alors? Que devient notre ami Gaston Desbois?
—Il va bien. Il est marié. Il est abonné aux cahiers. Il s'est abonné
à vingt francs. Il était riche, quand il s'est abonné. Je viens de lui
faire son changement d'adresse.
—Il a déménagé?
—Oui, on l'a déménagé.
—Comment ça? il était en rhétorique à Bordeaux?
—Oui, on lui a donné de l'avancement. On l'a envoyé en troisième
au Lycée de Vesoul. Pour le récompenser d'avoir travaillé aux
Universités populaires.
—Ah oui, aux petits teigneux? Il était aussi des petits teigneux?
—Comment, des petits teigneux? Quels petits teigneux?
—Tu n'as donc pas lu l'interview de Guesde, que lui a prise un
rédacteur du Temps.
—Ah! c'est ça tes petits teigneux! Si, je l'ai lue. Non seulement je
l'ai lue dans la Petite République—
—Malheureusement la Petite République ne donnait qu'un extrait,
comme toujours.
—Non seulement je l'ai lue dans la Petite République, mais le
prochain cahier, si les nécessités de la mise en pages nous le
permettent, la donnera tout entière d'après le Temps, avec les
annexes.
—Alors depuis ce temps-là, en province, on ne s'appelle plus que
les petits teigneux: Bonjour, teigneux, bonjour.—Comment va la
teigne?—Allons, au revoir, teigneux. Ce n'est pas spirituel. C'est
comme toutes les plaisanteries scolaires, militaires, célibataires et
régimentaires. Mais il faut nous pardonner cela.—Ainsi ce vieux
Desbois est devenu teigneux. Écoute, ça me fait plaisir. Quand il
était en Sorbonne, il esthétisait un peu. Mais ça devait se passer,
parce que c'était un bon garçon, très sincère. Je suis content qu'il en
soit. Quand tu le verras, tu lui donneras le bonjour pour moi. On
n'aurait pas dit, dans le temps, qu'il serait des premiers à trinquer.
—Oui, et sérieusement. Il avait un recteur qui n'était pas assez
teigneux. Un soir il avait osé dire au peuple que l'hypothèse de Dieu
n'était pas plus intéressante que l'hypothèse du droit de propriété.
Alors, tu comprends, la circulaire Leygues—
—J'entends bien. C'est vraiment un très brave garçon. Et notre
camarade Léon Deschamps?
—Il a encore été refusé à l'agrégation de grammaire. Alors il
enseigne le français et l'allemand au collège de Coulommiers. C'est
un bon poste. Il est près de Paris.
—Le français et l'allemand? Mais il me semble qu'il voulait devenir
latiniste. Il travaillait de préférence le latin, à l'école—
—Le français, l'allemand, l'histoire de l'art et un peu de
philosophie. Toujours la culture générale.
—Cela me rappelle avantageusement un vieil ami de ma famille,
un ancien instituteur, qui était devenu professeur de français et de
gymnastique à la pension Vion, à Gien. Mais il y a longtemps.
—Deschamps vient à Paris de loin en loin.
—Il a tout de même plus de deux heures de chemin de fer. Je
connais bien Coulommiers. J'y ai fait mes vingt-huit jours.
—Il s'est abonné à huit francs, parce qu'il n'est pas riche. Il est à
dix-huit cents.
—Teigneux?
—Teigneux.
—Bien. Raoul Duchêne?
—Il vient d'avoir un garçon. J'ai reçu la circulaire. Il était à Brest,
en seconde. On l'a récemment envoyé à Chambéry, en troisième. Il
avait dit devant plusieurs instituteurs que l'hypothèse du droit de
propriété ne s'imposait pas plus dans les relations sociales que
l'hypothèse de Dieu ne s'impose dans les enquêtes scientifiques.
—Ça ne m'étonne pas de lui. Toujours il a dit partout ce qu'il
pensait et toujours il a pensé cela.
—Toujours.
—Il est abonné?
—Je lui sers éventuellement les cahiers. Il ne m'a pas répondu
encore.
—Il s'abonnera.
—Il s'abonnera.
—Tout de même c'est amusant, que ce soient Desbois et Duchêne
ensemble qui aient payé les premiers pour les Universités populaires.
Tu te rappelles un peu le léger dédain que Desbois avait pour les
manifestations intempestives et un peu ridicules de Duchêne? Et tu
te rappelles tout le mépris que manifestait hautement Duchêne pour
les esthétismes de Desbois? Il est admirable que tout cela ait aussi
bien tourné.
—Ils étaient aussi profondément, aussi sincèrement, aussi
professionnellement universitaires l'un que l'autre, Desbois avec ses
excès de finesse, et Duchêne avec ses excès de simplicité rugueuse.
Alors quand ils ont été lâchés dans la vie, invinciblement ils ont fait
tous les deux leur métier d'universitaires, qui consiste à enseigner.
Ils ont pris leur travail au sérieux. Ils ont pris leur classe au sérieux.
Ils ont eu sur leurs élèves, ou du moins sur la plupart de leurs
élèves, ou, au pis aller, sur quelques-uns de leurs élèves, une
heureuse influence. Et comme ils n'enseignaient pas encore assez à
leur gré, ils ont naturellement pensé à enseigner le peuple. Comme
ils n'enseignaient pas assez dans la journée, ils ont naturellement
pensé à enseigner le soir. Ils ont à plaisir aggravé ce métier
d'universitaire, qui est un des plus onéreux, des plus meurtriers. Ils
ont enseigné. Ils ont surenseigné. Ils continueront. Et quand un jour,
sous le prochain ministère Méline—Ribot—Barthou—Poincaré—
Leygues—Charles—Dupuy—Deschanel—Sarrien—Léon—Bourgeois—
Mesureur—Lockroy—Peytral—Zévaès—car ce ministère espéré finira
bien par nous tomber sur le dos—quand un jour le hasard des
persécutions gouvernementales antiteigneuses les aura tous les
deux assemblés en quelque trou perdu de province où ils crèveront
communément de faim, tous les deux, l'ancien esthète et l'ancien
brutal pourront se donner une poignée de mains solide. Et quand
sera venu le Jour du Jugement dernier, qui est une hypothèse,
quand Dieu, qui est une hypothèse, pèsera dans sa balance
hypothétique les actions non hypothétiques des hommes, il se
trouvera que ces deux professeurs, l'ancien esthète et l'ancien
brutal, auront plus fait pour préparer ce que nous nommons
indivisiblement la révolution sociale et la révolution morale que tout
le Comité général ensemble.
—Tais-toi, tais-toi, mon vieux, tu t'emballes, et cela t'empêche de
parler proprement. Tu voulais dire sans doute que ces deux
professeurs, nos anciens camarades, auront plus fait pour préparer
la révolution sociale que nos dignitaires du Comité général n'auront
fait pour la discréditer et pour l'enrayer.
—C'est cela que je voulais dire.
—Je te demande pardon. C'est une habitude que j'ai, de corriger
toujours tout ce qu'on me dit, et tout ce qu'on dit devant moi,
comme si c'étaient des devoirs ou des leçons. Ne m'en veuille pas.
C'est une habitude professionnelle. Je n'en ai pas honte. Mon père
est incapable de marcher vite, parce qu'il est paysan. Et puis, crois-
tu que toi-même tu ne sois pas universitaire?
—Je le sais bien.
—Crois-tu que tes cahiers ne soient pas universitaires?
—Je le sais bien!
—Crois-tu qu'il n'y ait pas dans ce que tu écris aux cahiers des
insistances maladroites qui sentent leur professeur?
—Je le sais bien.
—A la bonne heure.—Qu'est devenu notre ancien camarade
Hubert Plantagenet, qui passa plus d'un an de sa vie aux dialogues
de Platon?
—Il enseigne la philosophie à Coutances. Il a donné récemment
une conférence publique et populaire sur l'alcoolisme. J'attends qu'il
me l'envoie. Il a laissé supposer à tous ces Normands, m'a-t-on dit,
qu'ils n'étaient pas la première et la seule race du monde. Il a laissé
supposer qu'il n'est ni beau, ni bon, ni bien—ni patriotique de se
soûler. Ces nouveautés pénétraient dans la mémoire des assistants.
—Julien Desnoyers?
—Il enseigne les sciences naturelles dans une région voisine. Il fait
bon ménage avec les instituteurs. Il a donné récemment une
conférence publique et populaire sur la géologie. On m'a dit qu'il
avait tout simplement déclaré en commençant à ses auditeurs que
lorsqu'on veut étudier scientifiquement la création du monde, et
toute son histoire, on examine attentivement les pierres et les eaux,
les couches de terrains, et la lente action des eaux sur les formations
des couches de terrains, mais qu'on ne se guide pas aveuglément
sur la sainte Bible. Il ne parla pas de la lutte des classes.
—L'auditoire?
—L'auditoire fut un peu étonné, mais entendit bien.
—François Desmarais?
—Toujours agrégé, heureux, prospère. Syndicataire aux cahiers. Il
m'envoie ponctuellement dix francs par mois.
—Tiens, cela me fait penser que j'ai un mois de retard. Mars et
avril.
—Rassure-toi: je te les aurais demandés directement.
Ici, mon ami René Lardenois, m'ayant demandé si j'avais la
monnaie de cinquante francs, que j'avais, me donna dix francs pour
ses deux mois.
—Il vaut mieux que je te les donne tout de suite. En rentrant de
chez moi, je n'aurai plus un sou. Et puis je n'aurai pas le temps de
m'arrêter à Paris.
La vue de la monnaie que je lui rendais sembla déterrer de sa
mémoire une réflexion négligemment ensevelie.
—Crois-tu, me dit-il brusquement, que la vie et le budget de tes
cahiers ne soient pas une vie et un budget universitaires?
—Je le sais bien.
—Ta classe et tes leçons payantes, ce sont les abonnements à huit
francs, les abonnements à vingt francs, les souscriptions mensuelles
régulières et les souscriptions extraordinaires.
—Je le sais bien, mais plus libres.
—Naturellement, tout à fait libres.—Et tes abonnements gratuits,
ce sont nos conférences et nos leçons populaires.
—Je le sais bien.
—La preuve en est que ce sont nos salaires de classe et de leçons
qui nourrissent tes cahiers.
—Je le sais mieux que toi.
—Mes cinq francs par mois représentent une demi-heure de leçon.
Tu ne le sais pas mieux que moi.
—Je voulais dire que je m'en suis aperçu avant toi, puisque c'est
l'économie même de ces cahiers.
—Parlons peu, mais parlons bien. Parlons proprement. Et Lucien
Deslandes?
—Pas plus agrégé qu'avant, toujours timide, malade et
malheureux. Il est en congé en Sologne chez ses parents, qui sont
pauvres. Il m'envoie ponctuellement à la fin de chaque mois une
souscription de vingt sous, exactement de vingt-et-un sous, sept
timbres de trois sous dans la lettre où il me donne de ses nouvelles.
C'est quelqu'un de vraiment rare.
—Il a des sentiments rares et son cœur est muni de tristesse.
Dans ton avant-dernier cahier tu as parlé finalement de notre ami
Pierre Baudouin. Qu'est-il devenu?
—Marcel Baudouin est mort. Pierre Baudouin a été sérieusement
malade. Je suis allé le voir la semaine passée.
—Il demeure toujours à la campagne?
—Oui, en Seine-et-Oise, à une heure de Paris-Luxembourg. Je suis
allé le voir, sachant que le docteur n'aurait pas le temps de revenir
me voir de sitôt.
—Le docteur n'est pas revenu?
—Non, il m'a fait dire que les commissions qu'il avait à faire à Paris
étaient beaucoup plus longues et plus difficiles et plus ingrates qu'on
ne pouvait raisonnablement le penser. Il ne pouvait donc venir chez
moi et il était inutile que j'allasse le demander chez lui. Je suis allé
voir Pierre Baudouin dans la maison de campagne où il demeure.
C'était à l'aube du printemps. Les arbres en fleurs avaient des
teintes et des lueurs, des nuances claires et neuves et blanches de
bonheur insolent semblables aux nuances que les Japonais ont
fidèlement vues et qu'ils ont représentées. Les branches des arbres
des bois transparaissaient merveilleusement au travers des
bourgeons et des feuilles ou des fleurs moins épaisses comme la
charpente osseuse d'un vertébré transparaît dans les images
radiographiées de son corps. Notre ami Pierre Baudouin, qui est un
classique, et même, en un sens, un conservateur, me dit qu'il
redoutait l'incertitude anxieuse de cette jeunesse et la transparence
mystérieuse des arbres. Il attendait impatiemment l'heure prochaine
où les arbres auront leur beauté pleine, où le feuillage épais cachera
normalement, naturellement, décemment, convenablement,
modestement la charpente intérieure. Il admet qu'en hiver les arbres
à feuilles caduques soient des squelettes, parce que l'hiver est la
saison de la mort. Mais il demande qu'aussitôt que la saison de vie a
rayonné du soleil et rejailli de la terre nourrice, les arbres se vêtent
rapidement de leur feuillage habituel. Car il convient, me disait-il,
que nos regards humains nous donnent humainement les images
végétales des végétaux patients. Mais il ne convient pas que nos
regards humains nous donnent d'eux sans appareil je ne sais quelle
image mystérieuse, animale et radioscopée.
—Je le reconnais bien là. Il est toujours aussi extraordinaire.
—Mais il n'en est pas moins capable d'accepter la beauté de ce
printemps. Vois, me disait-il, aucun arbre à fleurs, soigneusement et
artificiellement cultivé par des jardiniers décorateurs, n'est aussi
beau que les fleurs utiles des arbres à fruits. Quelle fleur de parade,
quels catalpas, quels magnolias et quels paulownias sont aussi
beaux que ce vieux poirier tout enneigé de ses flocons de fleurs?
Quel enseignement pour qui sait voir.
—Je le reconnais bien là: il déteste le langage figuré, mais il est
passionné d'instituer des paraboles. Parfois il est extraordinairement
sage, et souvent je me demande s'il n'est pas un peu fou. Croit-il
toujours que l'on ne peut parler aux hommes sinon en instituant des
dialogues.
—Il veut toujours instituer. Et c'est un spectacle touchant,
lamentable et ridicule que celui de ce pauvre garçon qui ne sait pas
bien comme il fera pour donner du pain l'année prochaine à sa
femme et à ses enfants, mais qui attend comme une bête de somme
que la vie ingrate lui laisse l'espace d'instituer des dialogues, des
histoires, des poèmes et des drames ainsi que pouvaient le faire les
auteurs des âges moins pressés.
—Il a toujours cette incapacité parfaite à sentir le ridicule?
—Toujours. Aucun homme, autant que j'en connaisse, n'est plus
incapable que lui de s'apercevoir comme il est parfois ridicule.
—C'est un garçon extraordinaire. Croit-il toujours que l'on ait le
droit de lancer dans la circulation un drame en trois pièces comptant
un nombre incalculable d'actes bizarres, avec des indications
ridicules, exigeant, tout compte fait, six ou huit heures de
représentation, d'une représentation qui ne viendra jamais, exigeant,
en attendant, 752—je dis sept cent cinquante-deux pages
d'impression, d'ailleurs non foliotées, ce qui, vraiment, n'est pas
commode, pages dont la moitié sont restées tout à fait blanches, ou
à peu près, et dont la seconde moitié portent de si rares et de si
singulières écritures que, vraiment, ce n'était pas la peine,—un
volume, si j'ai bonne mémoire, mesurant vingt-cinq centimètres de
long sur presque seize centimètres et demi de large et au moins
quatre centimètres et demi d'épaisseur, mesurée au dos,—et pesant,
tout sec, entends bien: pesant 1 kilo 520—un kilogramme cinq cent
vingt grammes, c'est-à-dire plus d'un kilo et demi, plus de trois
livres.
—Il ne désespère pas de faire un jour des livres dont le poids aille
jusqu'à passer deux kilos et qui sans doute serviront à ceux qui les
auront de la main de l'auteur, car personne jamais ne les achètera.
Ceux qui les auront de la main de l'auteur et qui, n'ayant aucun
jardin à labourer, seront forcés de faire de la gymnastique en
chambre, seront heureux d'avoir à leur disposition des livres aussi
lourds, qui les dispenseront d'acheter des haltères.
—Croit-il toujours qu'il faille aligner à la fin des livres les noms,
tous les noms de tous les citoyens qui les ont industriellement faits,
compositeurs, metteur en pages, correcteur, imprimeurs, prote et
ceux que j'ignore?
—Toujours. Il cherche le moyen d'y mettre aussi les fondeurs de
caractères et les fabricants de papier. Il finira par les chiffonniers qui
ont ramassé le chiffon.
—Il finira par avoir l'air d'être payé pour faire de la réclame.
—Il finira suspect: encres Lorilleux, papier Darblay, d'Essonnes.
—Que pense-t-il des cahiers?
—Je le lui ai demandé: Je suis ton ami, me répondit-il. Quel
dommage que tu passes tout ton temps, que tu dépenses tous tes
soins à un travail aussi futile. Qu'importent ces quinzaines? Et
qu'importent les événements de ces quinzaines? Et qu'importent ces
attaques et ces accusations quinzenières. Je sais aussi bien que toi,
—sans en avoir l'air, car je ne suis pas nouvelliste et je n'en fais pas
profession,—je sais aussi bien que toi que M. Vaillant est devenu un
redoutable maître d'école et M. Guesde un archevêque dangereux
pour la santé sociale. Je sais aussi bien que toi que M. Alexandre
Zévaès est un misérable escroc de consciences, en admettant qu'il
n'ait jamais été un jeune escroc d'argent. Je sais tout cela. Et j'en
sais bien d'autres. Mais qu'importe le passage de ces misérables
événements? Le temps que vous passez, les forces que vous
dépensez à ces attaques et à ces accusations est la contribution que
vous faites aux méfaits de ces gens. Vous accroissez l'effet nuisible
de leurs combinaisons si par vous, et autant qu'il est en vous, elles
sont cause efficiente qu'un honnête homme ait sa vie honnête
interceptée, ait son travail honnête interrompu. Vous alourdissez
inconsidérément—A ce moment je le priai de me reparler à la
deuxième personne du singulier, puisque ces cahiers n'engagent que
ma responsabilité personnelle, individuelle.—Tu alourdis
inconsidérément ta vie et ta pensée, inconsidérément la vie et la
pensée de tes amis, camarades, correspondants et lecteurs en les
appesantissant sur ces laideurs et sur ces vilenies. Cela est mal sain.
Mieux vaut garder son âme sereine et traiter les grandes questions.
J'espérai un moment que tes cahiers tourneraient ainsi. L'heureux et
providentiel avertissement de la grippe, ainsi que l'auraient nommé
nos amis chrétiens, faillit te détourner des contingences vaines. Alors
tu revins au Pascal. Mais pour traiter honnêtement cette grande
question de l'immortalité de l'âme ou de sa mortalité, je ne dis pas
pour l'épuiser, à peine les cahiers entiers d'une année entière, ou
plutôt à peine les cahiers entiers de quatre ou cinq ans pouvaient-ils
suffire. Mais tu as redouté le ridicule, qui n'existe pas, et qui n'est
qu'une imagination sociale; toi qui n'es pas un peureux, tu as
redouté le ridicule, et pourtant le ridicule n'est qu'une imagination
des peureux. Et tu as redouté l'autorité des censeurs, toi qui fais
profession d'ignorer toutes les autorités. Pressé de toutes ces peurs,
tu nous as donné quelques misérables citations du grand Pascal,
citations lamentablement mesquines et déplorablement tronquées et
inconvenablement brèves: au lieu qu'il était honnête simplement de
nous donner des citations quatorze ou quinze fois plus longues,
puisque les citations capitales afférentes à la question que tu osais
mettre en cause étaient au moins quatorze ou quinze fois plus
longues. Tu as négligé tout bonnement,—et cela serait scandaleux
s'il y avait quelque scandale,—tu as négligé bonnement cette
considération que toute la démonstration de la vérité de la foi
chrétienne, et la théorie du miracle, et celle des prophéties, pour
m'en tenir aux toutes prochaines, sont liées indissolublement à cette
question de la vie et de la mort. Comment en effet examiner
utilement la question de l'immortalité de l'âme ou de sa mortalité si
l'on n'a pas examiné d'abord la question de savoir si vraiment il y a
eu quelque miracle, et, avant tout, ce que c'est qu'un miracle et
surtout la question capitale de savoir si en un sens tout n'est pas
miracle, ou n'est pas un miracle. J'admets que l'on résolve ces
questions par la négative et pour ma part d'homme, après y avoir
longtemps pensé, crois bien que je suis disposé à nier qu'il y ait des
miracles particuliers ou individuels, tout en réservant pour longtemps
encore mon opinion sur la question de savoir s'il n'y a pas miracle ou
un miracle universel—car l'universel est d'atteinte un peu plus
difficile. Comment examiner un peu la question de l'immortalité de
l'âme si l'on n'a pas commencé par étudier la question du salut, qui
enveloppe celle de la grâce et de la prédestination. Et qui a
commencé à étudier à la question de la grâce et de la
prédestination, il sait bien quand il a commencé, mais il ne sait pas
bien quand il en finira. Et derechef et inversement, comment
aborder une seule des questions qui sont afférentes à cette vie avant
d'avoir au moins essayé d'examiner la question de la vie et de la
survie et de la mort. Comment procéder à l'action quotidienne, et
comment se guider aux incessantes combinaisons inévitables,
comment voter aux élections municipales voisines si l'on n'a pas
commencé par essayer au moins de commencer d'examiner les
grands problèmes. Sinon, et si vous êtes aveugle, qu'importent les
spectacles accidentels; et si vous êtes sourd, qu'importent les
auditions accidentelles. Mais tu as été lâche, tu as eu peur de
l'opinion; qui sait? tu as sans doute eu peur de tes abonnés, de tes
souscripteurs, que sais-je? malgré ce que tu dis au commencement
de la deuxième page de ta couverture, que la souscription ne
confère aucune autorité sur la rédaction ni sur l'administration: ces
fonctions demeurent libres. Ainsi tu as préféré maltraiter les
questions, parce que tu t'es imaginé, comme un ignorant que tu es,
qu'elles ne se défendent pas. Et tu as préféré maltraiter Pascal,—car
c'était le maltraiter, que de le citer aussi brièvement,—parce qu'il est
mort, et que tu crois qu'il ne peut plus rien dire,—au lieu de te
représenter, comme tu le devais selon les conseils de ta cupidité
naturelle, qu'étant mort il ne pouvait te réclamer aucun droit
d'auteur et qu'ainsi tu pouvais en citer tant que tu voulais sans
alourdir ce que tu nommes l'établissement de tes cahiers. Mais non,
tu préfères t'attaquer au citoyen Lafargue, un homme qui n'existe
pas, que pas un de tes lecteurs ne connaît, qui n'est ni un orateur, ni
un savant, ni un écrivain, ni un homme d'action, ni un auteur, ni un
homme, et en qui je soupçonne à présent que tu introduis
arbitrairement quelque apparence d'existence pour avoir ensuite le
facile plaisir de le combattre. Vanité littéraire de ce facile plaisir.
Comment n'as-tu pas vu, si tu es sincère, que tu fais le jeu de ces
gens-là quand tu imprimes leurs discours et quand tu les critiques.
N'as-tu pas vu que tu fais le jeu de ces joueurs-là, que tu leur
donnes une importance artificielle, et qu'ainsi que je te l'ai dit, le
méfait le plus redoutable qu'ils pourraient commettre serait de
s'imposer à l'attention de braves gens, comme le sont sans doute la
plupart de tes lecteurs, de distraire les honnêtes gens de leur vie et
les travailleurs de leur travail et les ouvriers de leur œuvre.
Là est le vice capital de tes cahiers: ils sont intéressants. Je ne te
reproche pas, comme on l'a fait, qu'ils sont trop personnels, trop
individuels, et qu'on t'y voit trop. D'abord cela n'est pas
rigoureusement exact. Et ensuite j'aime encore mieux qu'on parle et
qu'on écrive à la première personne du singulier, et même à la
troisième, comme César, mais en se nommant, que de se manifester
sous le nom de critique objective ou de méthode proprement
sociologique. Votre ami Pascal me semble avoir été injustement
sévère à l'égard des écrivains et en général des auteurs. Ce mot
d'écrivains, et surtout ce beau mot d'auteurs, pour qui l'entend au
sens originel, a un sens professionnel très honorable et tout ce que
l'on peut dire c'est qu'il y a beaucoup moins de bons auteurs que de
bons charpentiers. Mais ce n'est pas de la faute aux bons auteurs s'il
y avait et surtout s'il y a plus de mauvais auteurs que de mauvais
charpentiers. Ou plutôt c'est un peu de la faute aux bons auteurs,
qui sont trop faciles aux camaraderies littéraires; mais ce n'est pas
beaucoup de leur faute; et si l'on avait le temps d'essayer d'en faire
le calcul, on s'apercevrait aisément que la faute en est aux mauvais
auteurs eux-mêmes, et surtout au public et aux snobs, qui est
beaucoup trop indulgent pour cette espèce d'exercices. Croyez bien
que si le public avait reçu comme il convenait ce Cyrano de
Bergerac, dont les journaux ont dit tant de bien, M. Edmond Rostand
n'aurait jamais osé lui proposer ce jeune Aiglon, dont les journaux
ont dit tant de bien. «Quand on voit le style naturel», dit Pascal, «on
est tout étonné et ravi; car on s'attendait de voir un auteur, et on
trouve un homme. Au lieu que ceux qui ont le goût bon, et qui en
voyant un livre croient trouver un homme, sont tout surpris de
trouver un auteur. Plus poetice quam humane locutus es. Ceux-là
honorent bien la nature, qui lui apprennent qu'elle peut parler de
tout, et même de théologie.» Passage auquel M. Havet a mis les
notes suivantes: après style naturel: «C'est-à-dire, quand on voit que
le style est naturel.» Après: et on trouve un homme, il nous renvoie
à Méré, Discours de la Conversation, page 76: «Je disais à quelqu'un
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about testbank and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!

ebooksecure.com

You might also like