Transcription of DIGITAL ELECTRONICS AND DESIGN WITH VHDL
1 DIGITAL ELECTRONICS AND DESIGN with i11/28/07 5:35:00 PM11/28/07 5:35:00 ii11/28/07 5:35:00 PM11/28/07 5:35:00 PMDIGITAL ELECTRONICS AND DESIGN with VHDLV olnei A. Pedroniamsterdam boston heidelberg london new york oxford paris san diego san francisco singapore sydney tokyoMorgan Kaufmann is an imprint of iii11/28/07 5:35:00 PM11/28/07 5:35:00 PMPublishing Director Chris WilliamsPublisher Denise PenroseAcquisitions Editor Charles B. GlaserPublishing Services Manager George MorrisonSenior Production Editor Dawnmarie SimpsonAssistant Editor Matthew CaterProduction Assistant Lianne HongCover DESIGN Alisa AndreolaCover Illustration Gary RagliaComposition diacriTechCopy Editor Jeanne HansenProofreader Phyllis Coyne et al.
2 ProofreadingIndexer Joan GreenInterior printer Sheridan Books, printer Phoenix Color, Kaufmann Publishers is an imprint of Corporate Drive, Suite 400, Burlington, MA 01803, USAThis book is printed on acid-free paper. 2008 by Elsevier Inc. All rights used by companies to distinguish their products are often claimed as trademarks or registered trademarks. In all instances in which Morgan Kaufmann Publishers is aware of a claim, the product names appear in initial capital or all capital letters. Readers, however, should contact the appropriate companies for more complete information regarding trademarks and part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means electronic , mechanical, photocopying, scanning, or otherwise without prior written permission of the may be sought directly from Elsevier s Science & Technology Rights Department in Oxford, UK: phone: (+44) 1865 843830, fax: (+44) 1865 853333, E-mail: You may also complete your request online via the Elsevier homepage ( ), by selecting Support & Contact then Copyright and Permission and then Obtaining Permissions.
3 Library of Congress Cataloging-in-Publication DataPedroni, Volnei ELECTRONICS and DESIGN with vhdl / Volnei bibliographical references and 978-0-12-374270-4 (pbk. : alk. paper) 1. vhdl (Computer hardware description language) 2. DIGITAL integrated circuits DESIGN and construction Data processing. I. Title. 2008 2--dc22 2007032518 ISBN: 978-0-12-374270-4 For information on all Morgan Kaufmann publications,visit our Web site at or in the United States08 09 10 11 12 5 4 3 2 iv11/28/07 5:35:02 PM11/28/07 5:35:02 PMDedicated to Claudia, Patricia, Bruno, and Ricardo,who are my north, my sun, and my professors and students: This book resulted from years of hard work as a professor and designer in EE.
4 My deepest wish is to have it help in making your own work a little easier, which shall indeed be the only real measure of its success. As the builders say, the larger stones do not lie well without the lesser. Plato (428 348 bc) v11/28/07 5:35:02 PM11/28/07 5:35:02 vi11/28/07 5:35:02 PM11/28/07 5:35:02 PM ContentsPreface xix1 Introduction 1 Historical Notes 1 Analog versus DIGITAL 4 Bits, Bytes, and Words 5 DIGITAL Circuits 6 Combinational Circuits versus Sequential Circuits 10 Integrated Circuits 10 Printed Circuit Boards 11 Logic Values versus Physical Values 13 Nonprogrammable, Programmable, and Hardware Programmable 15 Binary Waveforms 15 DC, AC.
5 And Transient Responses 16 Programmable Logic Devices 18 Circuit Synthesis and Simulation with vhdl 19 Circuit Simulation with SPICE 19 Gate-Level versus Transistor-Level Analysis 202 Binary Representations 21 Binary Code 21 Octal and Hexadecimal Codes 24 Gray Code 24 BCD Code 25 Codes for Negative Numbers 26 Sign-Magnitude Code 26 One s Complement Code vii11/28/07 5:35:03 PM11/28/07 5:35:03 PM Binary Addition 27 Two s Complement Code 28 Floating-Point Representation 30 IEEE 754 Standard 30 Floating-Point versus Integer 33 ASCII Code 35 ASCII Code 35 Extended ASCII Code 36 Unicode 36 Unicode Characters 36 UTF-8 Encoding 36 UTF-16 Encoding 38 UTF-32 Encoding 39 Exercises 403 Binary Arithmetic 47 Unsigned Addition 47 Signed Addition and
6 Subtraction 49 Shift Operations 52 Unsigned Multiplication 54 Signed Multiplication 56 Unsigned Division 57 Signed Division 58 Floating-Point Addition and Subtraction 59 Floating-Point Multiplication 61 Floating-Point Division 62 Exercises 634 Introduction to DIGITAL Circuits 69 Introduction to MOS Transistors 69 Inverter and CMOS Logic 71 Inverter 71 CMOS Logic 72 Power Consumption 73 Power-Delay Product 74 Logic Voltages 75 Timing Diagrams for Combinational Circuits 75 AND and NAND Gates 77 OR and NOR Gates 79 XOR and XNOR Gates 81 Modulo-2 Adder 83 Buffer 84 Tri-State Buffer 85viii viii11/28/07 5:35:03 PM11/28/07 5:35.
7 03 PM Open-Drain Buffer 86 D-Type Flip-Flop 87 Shift Register 89 Counters 91 Pseudo-Random Sequence Generator 93 Exercises 945 Boolean Algebra 103 Boolean Algebra 103 Truth Tables 108 Minterms and SOP Equations 108 Maxterms and POS Equations 110 Standard Circuits for SOP and POS Equations 112 Karnaugh Maps 117 Large Karnaugh Maps 120 Other Function-Simplifi cation Techniques 121 The Quine-McCluskey Algorithm 121 Other Simplifi cation Algorithms 123 Propagation Delay and Glitches 123 Exercises 1256 Line Codes 133 The Use of Line Codes 133 Parameters and Types of Line Codes 135 Unipolar Codes 137 Polar Codes 138 Bipolar Codes 139 Biphase/Manchester Codes 139 MLT Codes 140 mB/nB Codes 140 PAM Codes 143 Exercises 1487 Error-Detecting/Correcting Codes
8 153 Codes for Error Detection and Error Correction 153 Single Parity Check (SPC) Codes 154 Cyclic Redundancy Check (CRC) Codes 155 Hamming Codes 156 Reed-Solomon (RS) Codes 159 Interleaving 161 Convolutional Codes 163 Contents ix11/28/07 5:35:03 PM11/28/07 5:35:03 PM Viterbi Decoder 167 Turbo Codes 170 Low Density Parity Check (LDPC) Codes 171 Exercises 1748 Bipolar Transistor 181 Semiconductors 181 The Bipolar Junction Transistor 183 I-V Characteristics 184 DC Response 185 Transient Response 189 AC Response 191 Modern BJTs 192 Polysilicon-Emitter BJT 192 Heterojunction Bipolar Transistor 193 Exercises 1949 MOS Transistor 197 Semiconductors 197 The Field-Effect Transistor (MOSFET)
9 198 MOSFET Construction 198 MOSFET Operation 200 I-V Characteristics 201 DC Response 202 CMOS Inverter 205 Transient Response 207 AC Response 209 Modern MOSFETs 210 Strained Si-SiGe MOSFETs 210 SOI MOSFETs 211 BiCMOS Technologies 211 Exercises 21210 Logic Families and I/Os 219 BJT-Based Logic Families 219 Diode-Transistor Logic 220 Transistor-Transistor Logic (TTL) 221 TTL Circuit 221 Temperature Ranges 222 TTL Versions 223 Fan-In and Fan-Out 224 Supply Voltage, Signal Voltages, and Noise Margin 224x x11/28/07 5:35:03 PM11/28/07 5:35.
10 03 PM Emitter-Coupled Logic 225 MOS-Based Logic Families 226 CMOS Logic 227 CMOS Circuits