Design of Logic Systems
Design of Logic Systems Second edition D. Lewin Formerly Professor of Computer Science and Information Engineering, University of Sheffield D. Protheroe Lecturer in Electronic Engineering, South Bank University, London SPRINGER-SCIENCE+BUSINESS MEDIA, B.V.
First edition 1985 Reprinted 1985, 1986, 1987, 1989, 1991 Second edition 1992 1985 D. Lewin, 1992 D. Lewin and D. Protheroe Originally published by Chapman & Hali in 1985 Typeset in 10/12 Times by Excel Typesetters Ltd, Hong Kong Printed and Bound in Hong Kong ISBN 978-0-412-42890-6 DOI 10.1007/978-1-4899-6856-2 ISBN 978-1-4899-6856-2 (ebook) Apart from any fair dealing for the purposes of research or private study, or criticism or review, as permitted under the UK Copyright Designs and Patents Act, 1988, this publication may not be reproduced, stored, or transmitted, in any form or by any means, without the prior permission in writing of the publishers, or in the case of reprographic reproduction only in accordance with the terms of the licences issued by the Copyright Licensing Agency in the UK, or in accordance with the terms of licences issued by the appropriate Reproduction Rights Organization outside the UK. Enquiries conceming reproduction outside the terms stated here should be sent to the publishers at the London address printed on this page. The publisher makes no representation, express or implied, with regard to the accuracy of the information contained in this book and cannot accept any legal responsibility or liability for any errors or omissions that maybe made. A catalogue record for this book is available from the British Library Library of Congress Cataloging-in-Publication data available
Contents Preface to the second edition Preface to the first edition ix xi I Introduction to digital systems 1.1 Introduction 1.2 Design of logic systems 1.3 Number systems 1.4 The binary system References and bibliography Tutorial problems I 1 2 9 11 26 27 2 Principles of switching algebra 2.1 Introduction 2.2 Set theory 2.3 Algebra of sets 2.4 Venn diagrams 2.5 Boolean algebra 2.6 Switching algebra 2.7 Derivation and classification of switching functions 2.8 Temporal behaviour of switching circuits 2.9 Multi-valued logic References and bibliography Tutorial problems 3 Design of combinational circuits 3.1 Introduction 3.2 Design example 1 3.3 Minimization of switching equations 3.4 Graphical methods 3.5 Reduced expressions 3.6 Design example 2 3.7 Tabular methods of minimization 3.8 Selecting a minimal PI subset 3.9 Algebraic solution of prime implicant tables 3.10 'Don't care' conditions 3.11 Minimization of multiple-output circuits 29 29 29 30 32 32 36 40 47 50 54 55 58 58 59 60 63 72 73 76 78 82 83 86
o [~-------- CONTENTS 3.12 Minimization using topological methods 93 3.13 Criteria for circuit minimization 101 References and bibliography 105 Tutorial problems 105 4 Digital circuit components 109 4.1 Introduction 109 4.2 Implementation techniques 110 4.3 Device technology 112 4.4 Logic families 118 4.5 Programmable logic devices 128 4.6 Custom and semi-custom devices 132 4.7 Physical design considerations 137 References and bibliography 143 Tutorial problems 144 5 Implementation of combinational circuits 148 5.1 Introduction 148 5.2 NANDINOR implementation 148 5.3 Implementation using MSI-Ievel components 158 5.4 Implementation using PLDs 172 5.5 Circuit hazards 185 5.6 Design verification 190 References and bibliography 195 Tutorial problems 196 6 Sequential circuits 200 6.1 Introduction 200 6.2 Bistable circuits 201 6.3 Sequential MSI modules 210 6.4 Counter design 214 6.5 Functional definition 223 6.6 Linear sequential circuits 235 References and bibliography 246 Tutorial problems 247 7 Design of synchronous sequential circuits 252 7.1 Introduction 252 7.2 State minimization 253 7.3 State assignment 266 7.4 Analysis of sequential machines 277 7.5 Systematic techniques for sequential circuit implementation 284 References and bibliography 290 Tutorial problems 291
[~-~--~~~~-~-~~------. CONTENTS ----~ ~~J [~~J 8 Design of asynchronous circuits 298 8.1 Introduction 298 8.2 Problem definition 299 8.3 State diagrams and flow tables 302 8.4 Internal state reduction and merging 304 8.5 Secondary state assignment 311 8.6 Secondary excitation and output functions 316 8.7 Design example 321 8.8 VLSI realization 327 8.9 Further aspects of the state-assignment problem 328 8.10 Circuit hazards 344 8.11 Self-timed circuits 352 8.12 Directed graph methods 357 References and bibliography 364 Tutorial problems 365 9 Design of regular arrays 368 9.1 Introduction 368 9.2 Iterative circuits 369 9.3 Symmetric functions 378 9.4 Cellular arrays 384 9.5 Sequential arrays 395 References and bibliography 399 Tutorial problems 400 10 Digital circuit testing and design for testability 403 10.1 Introduction 403 10.2 Basic concepts 405 10.3 Test generation for combinational logic 409 10.4 Testing sequential circuits 423 10.5 Design for testability 425 10.6 Boundary scan testing 437 10.7 Built-in self-test 441 10.8 Self-checking and fault-tolerant circuits 446 10.9 Fault simulation 447 References and bibliography 451 Tutorial problems 453 II System design and design automation 456 11.1 Introduction 456 11.2 Design methodologies 459 11.3 Logic synthesis 464 11.4 Behavioural synthesis 467 11.5 Hardware description languages 475
~I ~--------------------------------------------~ CONTENTS 11.6 VHDL References and bibliography 480 505 Appendix ANSIIIEEE logic symbols Solutions to tutorial problems Index 508 514 695
Preface This book provides coverage of the topics required for intermediate and advanced courses in digital design. The design of logic systems requires the solution of a wide range of problems from theoretical analysis to physical construction and test. The designer must both select and use the most appropriate design techniques and specify the technology and type of components to be used in order to produce a product which both meets its specification and incurs the minimum design time and cost. Many books in this area are either largely theoretical, offering little indication of the practical values of the methods presented, or are cookbooks of pre-designed circuits, providing the reader with few techniques to synthesize original designs. This book integrates the two approaches, emphasizing the value of formal methods to ensure the correct operation of complex digital circuits, while always illustrating their practical application by reference to existing designs and components. Designers must also be aware of the economic factors relating to design, manufacture and test, and these are presented throughout the book. This is a major revision and updating of the previous edition, and now includes the following topics: system-level design techniques, emphasizing the division between datapath and controller, plus techniques for system decomposition; criteria for circuit minimization viewed in the context of technological and economic factors; emphasis upon the use of PLD and ASIC components; increased coverage of new technologies and logic families; introduction of physical design considerations - layout requirements, line reflections, etc.; emphasis upon CAD tools for design verification; increased coverage of sequential circuit timing parameters, metastability, etc.; synchronization of autonomous systems; full coverage of asynchronous design has been retained, and now includes self-timed circuits; applications of iterative arrays and systolic arrays; extension of scan-path testing to include JTAG boundary-scan; fault simulation for test verification; built-in-self-test for complex designs;
C=x J Lc= P_R_E_F_A_C_E_T_O TH_E SE_C_O_N_D E_D_IT_IO_N ~ techniques for logic synthesis and design automation; language-based design using VHDL, including case studies; design environments and tools. All chapters contain a bibliography, primarily containing references to readily available papers and articles, but also including a number of early papers which have established concepts or techniques now regarded as being of fundamental importance. These references serve both to give some historical perspective to what is often perceived to be a very young subject, and to show that theoretical principles established long before the development of current manufacturing technologies may still be used to produce innovative designs. In keeping with the previous edition, each chapter is supported by a range of tutorial problems with worked solutions. I would like to express my thanks and acknowledge the contributions made by the following to the production of this edition: to Professor Agnes Kaposi for her insights into design techniques and problem solving; to my colleagues, Graham Gare, for providing corrections to the previous edition and additional tutorial questions, and Roger Freeman, for tracking down sources of reference material; to the reviewer, Professor Peter Ivey of Sheffield University, for his helpful suggestions regarding the style and content of this new edition; to Andrew Marshall and Bill Campbell of Synopsys Inc. for their help in providing practical information on VHDL and logic synthesis tools; to Chris Dace and Steve Collis of Mentor Graphics (UK) Ltd. for their considerable assistance in providing the cellular telephone controller design case study featured in Chapter 11. Finally, I thank my family, without whose support this book could not have been completed. My wife Elaine is entirely responsible for the manuscript being produced correctly and on time, while my sons Daniel and William have helped with the typing. DP 1992.
Preface to the first edition Then you better start swimmin' Or you'll sink like a stone For the times they are a-changin' BOB DYLAN Logic design is the process of interconnecting logic elements or modules to perform a specific function or task; as such it is fundamental to all digital engineering applications ranging from microprocessors through to information and communication systems. Switching theory, which is the formal basis of logic design, is concerned with the theory of producing viable, working structures in terms of logic elements and their interconnections to meet a particular functional input-output specification. Since the last edition of this book in 1974, advances in microelectronics have brought about a considerable change in digital design practice. The major causal factors are the commercial availability of 8- and 16-bit programmable microprocessors, which can replace hardwired logic circuits by software, and the use of semi-custom and custom LSI and VLSI circuits. It may be thought that the versatility of the microprocessor has made switching theory obsolete, replacing the need for logic design with programming techniques, but this is far from the case. A digital system does not consist solely of a microprocessor chip, but involves many other logic circuits in interfacing it to the external world. Moreover, the design of the microprocessor chip itself demands considerable logic design expertise. Thus, the need still remains for engineers and computer scientists to have a firm foundation in switching theory and logic design - as shown by their inclusion in most engineering core curricula. The objective of the first edition of this book was 'to describe, from an engineering viewpoint, those methods of designing logical circuits which have evolved as useful and practical techniques, from the vast amount of published work on switching theory'. This objective is still appropriate for the third edition, particularly so in the case of the fundamental aspects of switching theory which continue to remain highly relevant. However, with the requirement to design systems using MSIILSI circuit modules, and more recently the ability to custom design LSINLSI circuits - systems on a chip - the application of the theory, particularly the criteria adopted for minimization etc., has radically changed. For
~I L- PREFACE TO THE FIRST EDITION ~ example, when designing using subsystem modules, the criterion changes from minimizing the number of gates and inputs to reducing the number of module types and their interconnections. Similarly, at the silicon chip level, the prime requirements are to utilize regular structures and minimize surface area and interconnections. There is an obvious and urgent need to develop new logical configurations and methods of representation and design which are more appropriate to realizing complex logic circuits in silicon (and any other) technologies. However, though many of these problems are difficult and their solutions still being sought, there are numerous ways in which existing theory can be suitably extended or modified to assist in the design process. Thus, the major change in this new edition is the underlying emphasis on how switching theory can be applied to the design of systems using LSI and VLSI circuits. In particular, new chapters have been included on Design Methods and Tools, Logic Circuit Testing and Reliable Design including the state-machine approach to design, logic simulation and testing, failure-tolerant and self-testing circuits, linear circuits, array and cellular structures including uncommitted and programmable logic arrays (ULAs and PLAs). In addition the opportunity has been taken to update the basic material, including the bibliography and reference sources, and to extend the tutorial problems section. The book is primarily intended as a text for undergraduate courses on logic and digital systems design in universities and polytechnics and as an introduction to the topic for postgraduate students. However, since the book requires no previous knowledge of the subject and is written in a tutorial style with numerous worked examples, it would be suitable for anyone who wished to acquire a working knowledge of logic design. Finally I would like to express my thanks to all my students and colleagues who both knowingly and unknowingly have helped towards the development of this text. In particular I would like to thank Mrs Anne Steven without whose care and expert typing skills the final manuscript would not have been produced. D.L.