首页资源分类IC设计及制造 > VLSI Test Principles and Architectures Design for Testability

VLSI Test Principles and Architectures Design for Testability

已有 458837个资源

下载专区


TI最新应用解决方案

工业电子 汽车电子 个人消费电子

上传者其他资源

文档信息举报收藏

标    签: DFT

分    享:

文档简介

讲述DFT (Design for testability)的一本很全面的书

文档预览

测试压缩344 In Praise of VLSI Test Principles and Architectures: Design for Testability Testing techniques for VLSI circuits are today facing many exciting and complex challenges. In the era of large systems embedded in a single system-on-chip (SOC) and fabricated in continuously shrinking technologies, it is important to ensure correct behavior of the whole system. Electronic design and test engineers of today have to deal with these complex and heterogeneous systems (digital, mixed-signal, memory), but few have the possibility to study the whole field in a detailed and deep way. This book provides an extremely broad knowledge of the discipline, covering the fundamentals in detail, as well as the most recent and advanced concepts. It is a textbook for teaching the basics of fault simulation, ATPG, memory testing, DFT and BIST. However, it is also a complete testability guide for an engineer who wants to learn the latest advances in DFT for soft error protection, logic built-in self-test (BIST) for at-speed testing, DRAM BIST, test compression, MEMS testing, FPGA testing, RF testing, etc. Michel Renovell, Laboratoire d’Informatique, de Robotique et de Microe´lectronique de Montpellier (LIRMM), Montpellier, France This book combines in a unique way insight into industry practices commonly found in commercial DFT tools but not discussed in textbooks, and a sound treatment of the technical fundamentals. The comprehensive review of future test technology trends, including selfrepair, soft error protection, MEMS testing, and RF testing, leads students and researchers to advanced DFT research. Hans-Joachim Wunderlich, University of Stuttgart, Germany Recent advances in semiconductor manufacturing have made design for testability (DFT) an essential part of nanometer designs. The lack of an up-to-date DFT textbook that covers the most recent DFT techniques, such as at-speed scan testing, logic built-in self-test (BIST), test compression, memory built-in self-repair (BISR), and future test technology trends, has created problems for students, instructors, researchers, and practitioners who need to master modern DFT technologies. I am pleased to find a DFT textbook of this comprehensiveness that can serve both academic and professional needs. Andre Ivanov, University of British Columbia, Canada This is the most recent book covering all aspects of digital systems testing. It is a “must read” for anyone focused on learning modern test issues, test research, and test practices. Kewal K. Saluja, University of Wisconsin-Madison Design for testability (DFT) can no longer be considered as a graduate-level course. With growing design starts worldwide, DFT must be also part of the undergraduate curriculum. The book’s focus on VLSI test principles and DFT architectures, while deemphasizing test algorithms, is an ideal choice for undergraduate education. In addition, system-onchip (SOC) testing is one among the most important technologies for the development of ultra-large-scale integration (ULSI) devices in the 21st century. By covering the basic DFT theory and methodology on digital, memory, as well as analog and mixed-signal (AMS) testing, this book further stands out as one best reference book that equips practitioners with testable SOC design skills. Yihe Sun, Tsinghua University, Beijing, China This Page is Intentionally Left Blank VLSI TEST PRINCIPLES AND ARCHITECTURES The Morgan Kaufmann Series in Systems on Silicon Series Editor: Wayne Wolf, Princeton University The rapid growth of silicon technology and the demands of applications are increasingly forcing electronics designers to take a systems-oriented approach to design. This has led to new challenges in design methodology, design automation, manufacture and test. The main challenges are to enhance designer productivity and to achieve correctness on the first pass. The Morgan Kaufmann Series in Systems on Silicon presents high-quality, peer-reviewed books authored by leading experts in the field who are uniquely qualified to address these issues. The Designer’s Guide to VHDL, Second Edition Peter J. Ashenden The System Designer’s Guide to VHDL-AMS Peter J. Ashenden, Gregory D. Peterson, and Darrell A. Teegarden Readings in Hardware/Software Co-Design Edited by Giovanni De Micheli, Rolf Ernst, and Wayne Wolf Modeling Embedded Systems and SoCs Axel Jantsch ASIC and FPGA Verification: A Guide to Component Modeling Richard Munden Multiprocessor Systems-on-Chips Edited by Ahmed Amine Jerraya and Wayne Wolf Comprehensive Functional Verification Bruce Wile, John Goss, and Wolfgang Roesner Customizable Embedded Processors: Design Technologies and Applications Edited by Paolo Ienne and Rainer Leupers Networks on Chips: Technology and Tools Giovanni De Micheli and Luca Benini Designing SOCs with Configured Cores: Unleashing the Tensilica Diamond Cores Steve Leibson VLSI Test Principles and Architectures: Design for Testability Edited by Laung-Terng Wang, Cheng-Wen Wu, and Xiaoqing Wen Contact Information Charles B. Glaser Senior Acquisitions Editor Elsevier (Morgan Kaufmann; Academic Press; Newnes) (781) 313-4732 c.glaser@elsevier.com http://www.books.elsevier.com Wayne Wolf Professor Electrical Engineering, Princeton University (609) 258-1424 wolf@princeton.edu http://www.ee.princeton.edu/∼wolf/ VLSI TEST PRINCIPLES AND ARCHITECTURES DESIGN FOR TESTABILITY Edited by Laung-Terng Wang Cheng-Wen Wu Xiaoqing Wen AMSTERDAM • BOSTON • HEIDELBERG • LONDON NEW YORK • OXFORD • PARIS • SAN DIEGO SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO Morgan Kaufmann Publishers is an imprint of Elsevier Acquisitions Editor Publishing Services Manager Production Editor Assistant Editor Production Assistant Cover Design Cover Illustration Composition Technical Illustration Copyeditor Proofreader Indexer Interior printer Cover printer Charles B. Glaser George Morrison Dawnmarie Simpson Michele Cronin Melinda Ritchie Paul Hodgson ©Dennis Harms/Getty Images Integra Software Services Integra Software Services Sarah Fortener Phyllis Coyne et al. Proofreading Services Broccoli Information Management The Maple-Vail Book Manufacturing Group Phoenix Color Corporation Morgan Kaufmann Publishers is an imprint of Elsevier. 500 Sansome Street, Suite 400, San Francisco, CA 94111 This book is printed on acid-free paper. © 2006 by Elsevier Inc. All rights reserved. Designations 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 registration. No 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 publisher. Permissions may be sought directly from Elsevier’s Science & Technology Rights Department in Oxford, UK: phone: (+44) 1865 843830, fax: (+44) 1865 853333, E-mail: permissions@elsevier.com. You may also complete your request online via the Elsevier homepage (http://elsevier.com), by selecting “Support & Contact” then “Copyright and Permission” and then “Obtaining Permissions.” Library of Congress Cataloging-in-Publication Data VLSI test principles and architectures: design for testability/edited by Laung-Terng Wang, Cheng-Wen Wu, Xiaoqing Wen. p. cm. Includes bibliographical references and index. ISBN-13: 978-0-12-370597-6 (hardcover: alk. paper) ISBN-10: 0-12-370597-5 (hardcover: alk. paper) 1. Integrated circuits—Very large scale integration—Testing. 2. Integrated circuits—Very large scale integration—Design. I. Wang, Laung-Terng. II. Wu, Cheng-Wen, EE Ph.D. III. Wen, Xiaoqing. TK7874.75.V587 2006 621.39 5—dc22 2006006869 ISBN 13: 978-0-12-370597-6 ISBN 10: 0-12-370597-5 For information on all Morgan Kaufmann publications, visit our Web site at www.mkp.com or www.books.elsevier.com Printed in the United States of America 06 07 08 09 10 5 4 3 2 1 Working together to grow libraries in developing countries www.elsevier.com | www.bookaid.org | www.sabre.org CONTENTS Preface In the Classroom Acknowledgments Contributors About the Editors xxi xxiv xxv xxvii xxix 1 Introduction 1 Yinghua Min and Charles Stroud 1.1 Importance of Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Testing During the VLSI Lifecycle . . . . . . . . . . . . . . . . . . . . 2 1.2.1 VLSI Development Process . . . . . . . . . . . . . . . . . . . . 3 1.2.1.1 Design Verification . . . . . . . . . . . . . . . . . . 4 1.2.1.2 Yield and Reject Rate . . . . . . . . . . . . . . . . . 5 1.2.2 Electronic System Manufacturing Process . . . . . . . . . . . 6 1.2.3 System-Level Operation . . . . . . . . . . . . . . . . . . . . . 6 1.3 Challenges in VLSI Testing . . . . . . . . . . . . . . . . . . . . . . . . 8 1.3.1 Test Generation . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.3.2 Fault Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.3.2.1 Stuck-At Faults . . . . . . . . . . . . . . . . . . . . 12 1.3.2.2 Transistor Faults . . . . . . . . . . . . . . . . . . . 15 1.3.2.3 Open and Short Faults . . . . . . . . . . . . . . . . 16 1.3.2.4 Delay Faults and Crosstalk . . . . . . . . . . . . . . 19 1.3.2.5 Pattern Sensitivity and Coupling Faults . . . . . . 20 1.3.2.6 Analog Fault Models . . . . . . . . . . . . . . . . . 21 1.4 Levels of Abstraction in VLSI Testing . . . . . . . . . . . . . . . . . . 22 1.4.1 Register-Transfer Level and Behavioral Level . . . . . . . . . 22 1.4.2 Gate Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 1.4.3 Switch Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 1.4.4 Physical Level . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 viii Contents 1.5 Historical Review of VLSI Test Technology . . . . . . . . . . . . . . . 25 1.5.1 Automatic Test Equipment . . . . . . . . . . . . . . . . . . . . 25 1.5.2 Automatic Test Pattern Generation . . . . . . . . . . . . . . . 27 1.5.3 Fault Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . 28 1.5.4 Digital Circuit Testing . . . . . . . . . . . . . . . . . . . . . . 28 1.5.5 Analog and Mixed-Signal Circuit Testing . . . . . . . . . . . 29 1.5.6 Design for Testability . . . . . . . . . . . . . . . . . . . . . . . 29 1.5.7 Board Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 1.5.8 Boundary Scan Testing . . . . . . . . . . . . . . . . . . . . . . 32 1.6 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 1.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2 Design for Testability 37 Laung-Terng (L.-T.) Wang, Xiaoqing Wen, and Khader S. Abdel-Hafez 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 2.2 Testability Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 2.2.1 SCOAP Testability Analysis . . . . . . . . . . . . . . . . . . . 41 2.2.1.1 Combinational Controllability and Observability Calculation . . . . . . . . . . . . . . . 41 2.2.1.2 Sequential Controllability and Observability Calculation . . . . . . . . . . . . . . . 43 2.2.2 Probability-Based Testability Analysis . . . . . . . . . . . . . 45 2.2.3 Simulation-Based Testability Analysis . . . . . . . . . . . . . 47 2.2.4 RTL Testability Analysis . . . . . . . . . . . . . . . . . . . . . 48 2.3 Design for Testability Basics . . . . . . . . . . . . . . . . . . . . . . . . 50 2.3.1 Ad Hoc Approach . . . . . . . . . . . . . . . . . . . . . . . . . 51 2.3.1.1 Test Point Insertion . . . . . . . . . . . . . . . . . . 51 2.3.2 Structured Approach . . . . . . . . . . . . . . . . . . . . . . . 53 2.4 Scan Cell Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 2.4.1 Muxed-D Scan Cell . . . . . . . . . . . . . . . . . . . . . . . . 55 2.4.2 Clocked-Scan Cell . . . . . . . . . . . . . . . . . . . . . . . . . 56 2.4.3 LSSD Scan Cell . . . . . . . . . . . . . . . . . . . . . . . . . . 57 2.5 Scan Architectures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 2.5.1 Full-Scan Design . . . . . . . . . . . . . . . . . . . . . . . . . . 59 2.5.1.1 Muxed-D Full-Scan Design . . . . . . . . . . . . . . 59 2.5.1.2 Clocked Full-Scan Design . . . . . . . . . . . . . . 62 2.5.1.3 LSSD Full-Scan Design . . . . . . . . . . . . . . . . 62 2.5.2 Partial-Scan Design . . . . . . . . . . . . . . . . . . . . . . . . 64 2.5.3 Random-Access Scan Design . . . . . . . . . . . . . . . . . . 67 2.6 Scan Design Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 2.6.1 Tristate Buses . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 2.6.2 Bidirectional I/O Ports . . . . . . . . . . . . . . . . . . . . . . 71 Contents ix 2.6.3 Gated Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 2.6.4 Derived Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 2.6.5 Combinational Feedback Loops . . . . . . . . . . . . . . . . . 74 2.6.6 Asynchronous Set/Reset Signals . . . . . . . . . . . . . . . . . 75 2.7 Scan Design Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 2.7.1 Scan Design Rule Checking and Repair . . . . . . . . . . . . 77 2.7.2 Scan Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 2.7.2.1 Scan Configuration . . . . . . . . . . . . . . . . . . 79 2.7.2.2 Scan Replacement . . . . . . . . . . . . . . . . . . . 82 2.7.2.3 Scan Reordering . . . . . . . . . . . . . . . . . . . . 82 2.7.2.4 Scan Stitching . . . . . . . . . . . . . . . . . . . . . 83 2.7.3 Scan Extraction . . . . . . . . . . . . . . . . . . . . . . . . . . 83 2.7.4 Scan Verification . . . . . . . . . . . . . . . . . . . . . . . . . 84 2.7.4.1 Verifying the Scan Shift Operation . . . . . . . . . 85 2.7.4.2 Verifying the Scan Capture Operation . . . . . . . 86 2.7.5 Scan Design Costs . . . . . . . . . . . . . . . . . . . . . . . . . 86 2.8 Special-Purpose Scan Designs . . . . . . . . . . . . . . . . . . . . . . . 87 2.8.1 Enhanced Scan . . . . . . . . . . . . . . . . . . . . . . . . . . 87 2.8.2 Snapshot Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 2.8.3 Error-Resilient Scan . . . . . . . . . . . . . . . . . . . . . . . 90 2.9 RTL Design for Testability . . . . . . . . . . . . . . . . . . . . . . . . . 92 2.9.1 RTL Scan Design Rule Checking and Repair . . . . . . . . . 93 2.9.2 RTL Scan Synthesis . . . . . . . . . . . . . . . . . . . . . . . . 94 2.9.3 RTL Scan Extraction and Scan Verification . . . . . . . . . . 95 2.10 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 2.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 3 Logic and Fault Simulation 105 Jiun-Lang Huang, James C.-M. Li, and Duncan M. (Hank) Walker 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 3.1.1 Logic Simulation for Design Verification . . . . . . . . . . . 106 3.1.2 Fault Simulation for Test and Diagnosis . . . . . . . . . . . . 107 3.2 Simulation Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 3.2.1 Gate-Level Network . . . . . . . . . . . . . . . . . . . . . . . . 109 3.2.1.1 Sequential Circuits . . . . . . . . . . . . . . . . . . 109 3.2.2 Logic Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 3.2.2.1 Unknown State u . . . . . . . . . . . . . . . . . . . 111 3.2.2.2 High-Impedance State Z . . . . . . . . . . . . . . . 113 3.2.2.3 Intermediate Logic States . . . . . . . . . . . . . . 114 3.2.3 Logic Element Evaluation . . . . . . . . . . . . . . . . . . . . 114 3.2.3.1 Truth Tables . . . . . . . . . . . . . . . . . . . . . . 115 3.2.3.2 Input Scanning . . . . . . . . . . . . . . . . . . . . 115 x Contents 3.2.3.3 Input Counting . . . . . . . . . . . . . . . . . . . . . 116 3.2.3.4 Parallel Gate Evaluation . . . . . . . . . . . . . . . 116 3.2.4 Timing Models . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 3.2.4.1 Transport Delay . . . . . . . . . . . . . . . . . . . . 118 3.2.4.2 Inertial Delay . . . . . . . . . . . . . . . . . . . . . . 119 3.2.4.3 Wire Delay . . . . . . . . . . . . . . . . . . . . . . . 119 3.2.4.4 Functional Element Delay Model . . . . . . . . . . 120 3.3 Logic Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 3.3.1 Compiled-Code Simulation . . . . . . . . . . . . . . . . . . . 121 3.3.1.1 Logic Optimization . . . . . . . . . . . . . . . . . . 121 3.3.1.2 Logic Levelization . . . . . . . . . . . . . . . . . . . 123 3.3.1.3 Code Generation . . . . . . . . . . . . . . . . . . . . 124 3.3.2 Event-Driven Simulation . . . . . . . . . . . . . . . . . . . . . 125 3.3.2.1 Nominal-Delay Event-Driven Simulation . . . . . 126 3.3.3 Compiled-Code Versus Event-Driven Simulation . . . . . . . 129 3.3.4 Hazards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 3.3.4.1 Static Hazard Detection . . . . . . . . . . . . . . . 131 3.3.4.2 Dynamic Hazard Detection . . . . . . . . . . . . . 132 3.4 Fault Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 3.4.1 Serial Fault Simulation . . . . . . . . . . . . . . . . . . . . . . 133 3.4.2 Parallel Fault Simulation . . . . . . . . . . . . . . . . . . . . . 135 3.4.2.1 Parallel Fault Simulation . . . . . . . . . . . . . . . 135 3.4.2.2 Parallel-Pattern Fault Simulation . . . . . . . . . . 137 3.4.3 Deductive Fault Simulation . . . . . . . . . . . . . . . . . . . 139 3.4.4 Concurrent Fault Simulation . . . . . . . . . . . . . . . . . . 143 3.4.5 Differential Fault Simulation . . . . . . . . . . . . . . . . . . 146 3.4.6 Fault Detection . . . . . . . . . . . . . . . . . . . . . . . . . . 148 3.4.7 Comparison of Fault Simulation Techniques . . . . . . . . . 149 3.4.8 Alternatives to Fault Simulation . . . . . . . . . . . . . . . . . 151 3.4.8.1 Toggle Coverage . . . . . . . . . . . . . . . . . . . . 151 3.4.8.2 Fault Sampling . . . . . . . . . . . . . . . . . . . . 151 3.4.8.3 Critical Path Tracing . . . . . . . . . . . . . . . . . 152 3.4.8.4 Statistical Fault Analysis . . . . . . . . . . . . . . . 153 3.5 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 3.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 4 Test Generation 161 Michael S. Hsiao 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 4.2 Random Test Generation . . . . . . . . . . . . . . . . . . . . . . . . . . 163 4.2.1 Exhaustive Testing . . . . . . . . . . . . . . . . . . . . . . . . 166 4.3 Theoretical Background: Boolean Difference . . . . . . . . . . . . . . 166 4.3.1 Untestable Faults . . . . . . . . . . . . . . . . . . . . . . . . . 168 Contents xi 4.4 Designing a Stuck-At ATPG for Combinational Circuits . . . . . . . . 169 4.4.1 A Naive ATPG Algorithm . . . . . . . . . . . . . . . . . . . . . 169 4.4.1.1 Backtracking . . . . . . . . . . . . . . . . . . . . . . 172 4.4.2 A Basic ATPG Algorithm . . . . . . . . . . . . . . . . . . . . . 173 4.4.3 D Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 4.4.4 PODEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 4.4.5 FAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 4.4.6 Static Logic Implications . . . . . . . . . . . . . . . . . . . . . 187 4.4.7 Dynamic Logic Implications . . . . . . . . . . . . . . . . . . . 191 4.5 Designing a Sequential ATPG . . . . . . . . . . . . . . . . . . . . . . . 194 4.5.1 Time Frame Expansion . . . . . . . . . . . . . . . . . . . . . . 194 4.5.2 5-Valued Algebra Is Insufficient . . . . . . . . . . . . . . . . . 196 4.5.3 Gated Clocks and Multiple Clocks . . . . . . . . . . . . . . . 197 4.6 Untestable Fault Identification . . . . . . . . . . . . . . . . . . . . . . 200 4.6.1 Multiple-Line Conflict Analysis . . . . . . . . . . . . . . . . . 203 4.7 Designing a Simulation-Based ATPG . . . . . . . . . . . . . . . . . . . 207 4.7.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 4.7.2 Genetic-Algorithm-Based ATPG . . . . . . . . . . . . . . . . . 208 4.7.2.1 Issues Concerning the GA Population . . . . . . . 212 4.7.2.2 Issues Concerning GA Parameters . . . . . . . . . 213 4.7.2.3 Issues Concerning the Fitness Function . . . . . . 213 4.7.2.4 CASE Studies . . . . . . . . . . . . . . . . . . . . . 215 4.8 Advanced Simulation-Based ATPG . . . . . . . . . . . . . . . . . . . . 218 4.8.1 Seeding the GA with Helpful Sequences . . . . . . . . . . . . 218 4.8.2 Logic-Simulation-Based ATPG . . . . . . . . . . . . . . . . . 222 4.8.3 Spectrum-Based ATPG . . . . . . . . . . . . . . . . . . . . . . 225 4.9 Hybrid Deterministic and Simulation-Based ATPG . . . . . . . . . . 226 4.9.1 ALT-TEST Hybrid . . . . . . . . . . . . . . . . . . . . . . . . . 228 4.10 ATPG for Non-Stuck-At Faults . . . . . . . . . . . . . . . . . . . . . . 231 4.10.1 Designing an ATPG That Captures Delay Defects . . . . . . . 231 4.10.1.1 Classification of Path-Delay Faults . . . . . . . . . 233 4.10.1.2 ATPG for Path-Delay Faults . . . . . . . . . . . . . 236 4.10.2 ATPG for Transition Faults . . . . . . . . . . . . . . . . . . . 238 4.10.3 Transition ATPG Using Stuck-At ATPG . . . . . . . . . . . . 240 4.10.4 Transition ATPG Using Stuck-At Vectors . . . . . . . . . . . 240 4.10.4.1 Transition Test Chains via Weighted Transition Graph . . . . . . . . . . . . . . . . . . . 241 4.10.5 Bridging Fault ATPG . . . . . . . . . . . . . . . . . . . . . . . 244 4.11 Other Topics in Test Generation . . . . . . . . . . . . . . . . . . . . . 246 4.11.1 Test Set Compaction . . . . . . . . . . . . . . . . . . . . . . . 246 4.11.2 N-Detect ATPG . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 4.11.3 ATPG for Acyclic Sequential Circuits . . . . . . . . . . . . . . 247 4.11.4 IDDQ Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 4.11.5 Designing a High-Level ATPG . . . . . . . . . . . . . . . . . . 248 4.12 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 4.13 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 xii Contents 5 Logic Built-In Self-Test 263 Laung-Terng (L.-T.) Wang 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 5.2 BIST Design Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 5.2.1 Unknown Source Blocking . . . . . . . . . . . . . . . . . . . . 267 5.2.1.1 Analog Blocks . . . . . . . . . . . . . . . . . . . . . 267 5.2.1.2 Memories and Non-Scan Storage Elements . . . . 268 5.2.1.3 Combinational Feedback Loops . . . . . . . . . . . 268 5.2.1.4 Asynchronous Set/Reset Signals . . . . . . . . . . . 268 5.2.1.5 Tristate Buses . . . . . . . . . . . . . . . . . . . . . 269 5.2.1.6 False Paths . . . . . . . . . . . . . . . . . . . . . . . 270 5.2.1.7 Critical Paths . . . . . . . . . . . . . . . . . . . . . . 270 5.2.1.8 Multiple-Cycle Paths . . . . . . . . . . . . . . . . . 270 5.2.1.9 Floating Ports . . . . . . . . . . . . . . . . . . . . . 270 5.2.1.10 Bidirectional I/O Ports . . . . . . . . . . . . . . . . 271 5.2.2 Re-Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 5.3 Test Pattern Generation . . . . . . . . . . . . . . . . . . . . . . . . . . 271 5.3.1 Exhaustive Testing . . . . . . . . . . . . . . . . . . . . . . . . 275 5.3.1.1 Binary Counter . . . . . . . . . . . . . . . . . . . . 275 5.3.1.2 Complete LFSR . . . . . . . . . . . . . . . . . . . . 275 5.3.2 Pseudo-Random Testing . . . . . . . . . . . . . . . . . . . . . 277 5.3.2.1 Maximum-Length LFSR . . . . . . . . . . . . . . . 278 5.3.2.2 Weighted LFSR . . . . . . . . . . . . . . . . . . . . 278 5.3.2.3 Cellular Automata . . . . . . . . . . . . . . . . . . . 278 5.3.3 Pseudo-Exhaustive Testing . . . . . . . . . . . . . . . . . . . . 281 5.3.3.1 Verification Testing . . . . . . . . . . . . . . . . . . 282 5.3.3.2 Segmentation Testing . . . . . . . . . . . . . . . . . 287 5.3.4 Delay Fault Testing . . . . . . . . . . . . . . . . . . . . . . . . 288 5.3.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 5.4 Output Response Analysis . . . . . . . . . . . . . . . . . . . . . . . . . 290 5.4.1 Ones Count Testing . . . . . . . . . . . . . . . . . . . . . . . . 291 5.4.2 Transition Count Testing . . . . . . . . . . . . . . . . . . . . . 291 5.4.3 Signature Analysis . . . . . . . . . . . . . . . . . . . . . . . . . 292 5.4.3.1 Serial Signature Analysis . . . . . . . . . . . . . . . 292 5.4.3.2 Parallel Signature Analysis . . . . . . . . . . . . . . 294 5.5 Logic BIST Architectures . . . . . . . . . . . . . . . . . . . . . . . . . . 296 5.5.1 BIST Architectures for Circuits without Scan Chains . . . . 296 5.5.1.1 A Centralized and Separate Board-Level BIST Architecture . . . . . . . . . . . . . . . . . . . 296 5.5.1.2 Built-In Evaluation and Self-Test (BEST) . . . . . 297 5.5.2 BIST Architectures for Circuits with Scan Chains . . . . . . 297 5.5.2.1 LSSD On-Chip Self-Test . . . . . . . . . . . . . . . 297 5.5.2.2 Self-Testing Using MISR and Parallel SRSG . . . 298 5.5.3 BIST Architectures Using Register Reconfiguration . . . . . 298 5.5.3.1 Built-In Logic Block Observer . . . . . . . . . . . . 299 Contents xiii 5.5.3.2 Modified Built-In Logic Block Observer . . . . . . 300 5.5.3.3 Concurrent Built-In Logic Block Observer . . . . . 300 5.5.3.4 Circular Self-Test Path (CSTP) . . . . . . . . . . . 302 5.5.4 BIST Architectures Using Concurrent Checking Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 5.5.4.1 Concurrent Self-Verification . . . . . . . . . . . . . 303 5.5.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 5.6 Fault Coverage Enhancement . . . . . . . . . . . . . . . . . . . . . . . 304 5.6.1 Test Point Insertion . . . . . . . . . . . . . . . . . . . . . . . . 305 5.6.1.1 Test Point Placement . . . . . . . . . . . . . . . . . 306 5.6.1.2 Control Point Activation . . . . . . . . . . . . . . . 307 5.6.2 Mixed-Mode BIST . . . . . . . . . . . . . . . . . . . . . . . . . 308 5.6.2.1 ROM Compression . . . . . . . . . . . . . . . . . . 308 5.6.2.2 LFSR Reseeding . . . . . . . . . . . . . . . . . . . . 308 5.6.2.3 Embedding Deterministic Patterns . . . . . . . . . 309 5.6.3 Hybrid BIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 5.7 BIST Timing Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 5.7.1 Single-Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 5.7.1.1 One-Hot Single-Capture . . . . . . . . . . . . . . . 310 5.7.1.2 Staggered Single-Capture . . . . . . . . . . . . . . 311 5.7.2 Skewed-Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 5.7.2.1 One-Hot Skewed-Load . . . . . . . . . . . . . . . . 312 5.7.2.2 Aligned Skewed-Load . . . . . . . . . . . . . . . . . 312 5.7.2.3 Staggered Skewed-Load . . . . . . . . . . . . . . . 314 5.7.3 Double-Capture . . . . . . . . . . . . . . . . . . . . . . . . . . 315 5.7.3.1 One-Hot Double-Capture . . . . . . . . . . . . . . . 315 5.7.3.2 Aligned Double-Capture . . . . . . . . . . . . . . . 316 5.7.3.3 Staggered Double-Capture . . . . . . . . . . . . . . 317 5.7.4 Fault Detection . . . . . . . . . . . . . . . . . . . . . . . . . . 317 5.8 A Design Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 5.8.1 BIST Rule Checking and Violation Repair . . . . . . . . . . . 320 5.8.2 Logic BIST System Design . . . . . . . . . . . . . . . . . . . . 320 5.8.2.1 Logic BIST Architecture . . . . . . . . . . . . . . . 320 5.8.2.2 TPG and ORA . . . . . . . . . . . . . . . . . . . . . 321 5.8.2.3 Test Controller . . . . . . . . . . . . . . . . . . . . . 322 5.8.2.4 Clock Gating Block . . . . . . . . . . . . . . . . . . 323 5.8.2.5 Re-Timing Logic . . . . . . . . . . . . . . . . . . . . 325 5.8.2.6 Fault Coverage Enhancing Logic and Diagnostic Logic . . . . . . . . . . . . . . . . . . . . . . . . . . 325 5.8.3 RTL BIST Synthesis . . . . . . . . . . . . . . . . . . . . . . . . 326 5.8.4 Design Verification and Fault Coverage Enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 5.9 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 5.10 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 xiv Contents 6 Test Compression 341 Xiaowei Li, Kuen-Jong Lee, and Nur A. Touba 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342 6.2 Test Stimulus Compression . . . . . . . . . . . . . . . . . . . . . . . . 344 6.2.1 Code-Based Schemes . . . . . . . . . . . . . . . . . . . . . . . 345 6.2.1.1 Dictionary Code (Fixed-to-Fixed) . . . . . . . . . . 345 6.2.1.2 Huffman Code (Fixed-to-Variable) . . . . . . . . . 346 6.2.1.3 Run-Length Code (Variable-to-Fixed) . . . . . . . 349 6.2.1.4 Golomb Code (Variable-to-Variable) . . . . . . . . 350 6.2.2 Linear-Decompression-Based Schemes . . . . . . . . . . . . 351 6.2.2.1 Combinational Linear Decompressors . . . . . . . 355 6.2.2.2 Fixed-Length Sequential Linear Decompressors . . . . . . . . . . . . . . . . 355 6.2.2.3 Variable-Length Sequential Linear Decompressors . . . . . . . . . . . . . . . . 356 6.2.2.4 Combined Linear and Nonlinear Decompressors . . . . . . . . . . . . . . 357 6.2.3 Broadcast-Scan-Based Schemes . . . . . . . . . . . . . . . . . 359 6.2.3.1 Broadcast Scan . . . . . . . . . . . . . . . . . . . . 359 6.2.3.2 Illinois Scan . . . . . . . . . . . . . . . . . . . . . . 360 6.2.3.3 Multiple-Input Broadcast Scan . . . . . . . . . . . 362 6.2.3.4 Reconfigurable Broadcast Scan . . . . . . . . . . . 362 6.2.3.5 Virtual Scan . . . . . . . . . . . . . . . . . . . . . . 363 6.3 Test Response Compaction . . . . . . . . . . . . . . . . . . . . . . . . 364 6.3.1 Space Compaction . . . . . . . . . . . . . . . . . . . . . . . . . 367 6.3.1.1 Zero-Aliasing Linear Compaction . . . . . . . . . . 367 6.3.1.2 X-Compact . . . . . . . . . . . . . . . . . . . . . . . 369 6.3.1.3 X-Blocking . . . . . . . . . . . . . . . . . . . . . . . 371 6.3.1.4 X-Masking . . . . . . . . . . . . . . . . . . . . . . . 372 6.3.1.5 X-Impact . . . . . . . . . . . . . . . . . . . . . . . . 373 6.3.2 Time Compaction . . . . . . . . . . . . . . . . . . . . . . . . . 374 6.3.3 Mixed Time and Space Compaction . . . . . . . . . . . . . . 375 6.4 Industry Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376 6.4.1 OPMISR+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377 6.4.2 Embedded Deterministic Test . . . . . . . . . . . . . . . . . . 379 6.4.3 VirtualScan and UltraScan . . . . . . . . . . . . . . . . . . . . 382 6.4.4 Adaptive Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 6.4.5 ETCompression . . . . . . . . . . . . . . . . . . . . . . . . . . 386 6.4.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 6.5 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 6.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391 Contents xv 7 Logic Diagnosis 397 Shi-Yu Huang 7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 7.2 Combinational Logic Diagnosis . . . . . . . . . . . . . . . . . . . . . . 401 7.2.1 Cause–Effect Analysis . . . . . . . . . . . . . . . . . . . . . . . 401 7.2.1.1 Compaction and Compression of Fault Dictionary 403 7.2.2 Effect–Cause Analysis . . . . . . . . . . . . . . . . . . . . . . . 405 7.2.2.1 Structural Pruning . . . . . . . . . . . . . . . . . . 407 7.2.2.2 Backtrace Algorithm . . . . . . . . . . . . . . . . . 408 7.2.2.3 Inject-and-Evaluate Paradigm . . . . . . . . . . . . 409 7.2.3 Chip-Level Strategy . . . . . . . . . . . . . . . . . . . . . . . . 418 7.2.3.1 Direct Partitioning . . . . . . . . . . . . . . . . . . 418 7.2.3.2 Two-Phase Strategy . . . . . . . . . . . . . . . . . . 420 7.2.3.3 Overall Chip-Level Diagnostic Flow . . . . . . . . . 424 7.2.4 Diagnostic Test Pattern Generation . . . . . . . . . . . . . . . 425 7.2.5 Summary of Combinational Logic Diagnosis . . . . . . . . . 426 7.3 Scan Chain Diagnosis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 7.3.1 Preliminaries for Scan Chain Diagnosis . . . . . . . . . . . . 427 7.3.2 Hardware-Assisted Method . . . . . . . . . . . . . . . . . . . 430 7.3.3 Modified Inject-and-Evaluate Paradigm . . . . . . . . . . . . 432 7.3.4 Signal-Profiling-Based Method . . . . . . . . . . . . . . . . . 434 7.3.4.1 Diagnostic Test Sequence Selection . . . . . . . . 434 7.3.4.2 Run-and-Scan Test Application . . . . . . . . . . . 434 7.3.4.3 Why Functional Sequence? . . . . . . . . . . . . . 435 7.3.4.4 Profiling-Based Analysis . . . . . . . . . . . . . . . 437 7.3.5 Summary of Scan Chain Diagnosis . . . . . . . . . . . . . . . 441 7.4 Logic BIST Diagnosis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 7.4.1 Overview of Logic BIST Diagnosis . . . . . . . . . . . . . . . 442 7.4.2 Interval-Based Methods . . . . . . . . . . . . . . . . . . . . . 443 7.4.3 Masking-Based Methods . . . . . . . . . . . . . . . . . . . . . 446 7.5 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 7.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 8 Memory Testing and Built-In Self-Test 461 Cheng-Wen Wu 8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 8.2 RAM Functional Fault Models and Test Algorithms . . . . . . . . . . 463 8.2.1 RAM Functional Fault Models . . . . . . . . . . . . . . . . . . 463 8.2.2 RAM Dynamic Faults . . . . . . . . . . . . . . . . . . . . . . . 465 8.2.3 Functional Test Patterns and Algorithms . . . . . . . . . . . 466 8.2.4 March Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469 xvi Contents 8.2.5 Comparison of RAM Test Patterns . . . . . . . . . . . . . . . 471 8.2.6 Word-Oriented Memory . . . . . . . . . . . . . . . . . . . . . 473 8.2.7 Multi-Port Memory . . . . . . . . . . . . . . . . . . . . . . . . 473 8.3 RAM Fault Simulation and Test Algorithm Generation . . . . . . . . 475 8.3.1 Fault Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . 476 8.3.2 RAMSES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 8.3.3 Test Algorithm Generation by Simulation . . . . . . . . . . . 480 8.4 Memory Built-In Self-Test . . . . . . . . . . . . . . . . . . . . . . . . . 488 8.4.1 RAM Specification and BIST Design Strategy . . . . . . . . . 489 8.4.2 BIST Architectures and Functions . . . . . . . . . . . . . . . 493 8.4.3 BIST Implementation . . . . . . . . . . . . . . . . . . . . . . . 495 8.4.4 BRAINS: A RAM BIST Compiler . . . . . . . . . . . . . . . . 500 8.5 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 8.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 9 Memory Diagnosis and Built-In Self-Repair 517 Cheng-Wen Wu 9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518 9.1.1 Why Memory Diagnosis? . . . . . . . . . . . . . . . . . . . . . 518 9.1.2 Why Memory Repair? . . . . . . . . . . . . . . . . . . . . . . . 518 9.2 Refined Fault Models and Diagnostic Test Algorithms . . . . . . . . 518 9.3 BIST with Diagnostic Support . . . . . . . . . . . . . . . . . . . . . . . 521 9.3.1 Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521 9.3.2 Test Pattern Generator . . . . . . . . . . . . . . . . . . . . . . 523 9.3.3 Fault Site Indicator (FSI) . . . . . . . . . . . . . . . . . . . . . 524 9.4 RAM Defect Diagnosis and Failure Analysis . . . . . . . . . . . . . . . 526 9.5 RAM Redundancy Analysis Algorithms . . . . . . . . . . . . . . . . . 529 9.5.1 Conventional Redundancy Analysis Algorithms . . . . . . . . 529 9.5.2 The Essential Spare Pivoting Algorithm . . . . . . . . . . . . 531 9.5.3 Repair Rate and Overhead . . . . . . . . . . . . . . . . . . . . 535 9.6 Built-In Self-Repair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 9.6.1 Redundancy Organization . . . . . . . . . . . . . . . . . . . . 537 9.6.2 BISR Architecture and Procedure . . . . . . . . . . . . . . . . 538 9.6.3 BIST Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 9.6.4 BIRA Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542 9.6.5 An Industrial Case . . . . . . . . . . . . . . . . . . . . . . . . . 545 9.6.6 Repair Rate and Yield . . . . . . . . . . . . . . . . . . . . . . 548 9.7 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 9.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553 Contents xvii 10 Boundary Scan and Core-Based Testing 557 Kuen-Jong Lee 10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558 10.1.1 IEEE 1149 Standard Family . . . . . . . . . . . . . . . . . . 558 10.1.2 Core-Based Design and Test Considerations . . . . . . . . . 559 10.2 Digital Boundary Scan (IEEE Std. 1149.1) . . . . . . . . . . . . . . 561 10.2.1 Basic Concept . . . . . . . . . . . . . . . . . . . . . . . . . . 561 10.2.2 Overall 1149.1 Test Architecture and Operations . . . . . . 562 10.2.3 Test Access Port and Bus Protocols . . . . . . . . . . . . . . 564 10.2.4 Data Registers and Boundary-Scan Cells . . . . . . . . . . 565 10.2.5 TAP Controller . . . . . . . . . . . . . . . . . . . . . . . . . . 567 10.2.6 Instruction Register and Instruction Set . . . . . . . . . . . 569 10.2.7 Boundary-Scan Description Language . . . . . . . . . . . . 574 10.2.8 On-Chip Test Support with Boundary Scan . . . . . . . . . 574 10.2.9 Board and System-Level Boundary-Scan Control Architectures . . . . . . . . . . . . . . . . . . . . . . . . . . . 576 10.3 Boundary Scan for Advanced Networks (IEEE 1149.6) . . . . . . . 579 10.3.1 Rationale for 1149.6 . . . . . . . . . . . . . . . . . . . . . . . 579 10.3.2 1149.6 Analog Test Receiver . . . . . . . . . . . . . . . . . . 581 10.3.3 1149.6 Digital Driver Logic . . . . . . . . . . . . . . . . . . . 581 10.3.4 1149.6 Digital Receiver Logic . . . . . . . . . . . . . . . . . 582 10.3.5 1149.6 Test Access Port (TAP) . . . . . . . . . . . . . . . . . 584 10.3.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585 10.4 Embedded Core Test Standard (IEEE Std. 1500) . . . . . . . . . . 585 10.4.1 SOC (System-on-Chip) Test Problems . . . . . . . . . . . . 585 10.4.2 Overall Architecture . . . . . . . . . . . . . . . . . . . . . . . 587 10.4.3 Wrapper Components and Functions . . . . . . . . . . . . . 589 10.4.4 Instruction Set . . . . . . . . . . . . . . . . . . . . . . . . . . 597 10.4.5 Core Test Language (CTL) . . . . . . . . . . . . . . . . . . . 601 10.4.6 Core Test Supporting and System Test Configurations . . 603 10.4.7 Hierarchical Test Control and Plug-and-Play . . . . . . . . 606 10.5 Comparisons between the 1500 and 1149.1 Standards . . . . . . . 610 10.6 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 10.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614 11 Analog and Mixed-Signal Testing 619 Chauchin Su 11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 11.1.1 Analog Circuit Properties . . . . . . . . . . . . . . . . . . . . 620 11.1.1.1 Continuous Signals . . . . . . . . . . . . . . . . . 621 xviii Contents 11.1.1.2 Large Range of Circuits . . . . . . . . . . . . . . 621 11.1.1.3 Nonlinear Characteristics . . . . . . . . . . . . . 621 11.1.1.4 Feedback Ambiguity . . . . . . . . . . . . . . . . 622 11.1.1.5 Complicated Cause–Effect Relationship . . . . . 622 11.1.1.6 Absence of Suitable Fault Model . . . . . . . . . 622 11.1.1.7 Requirement for Accurate Instruments for Measuring Analog Signals . . . . . . . . . . . . . 623 11.1.2 Analog Defect Mechanisms and Fault Models . . . . . . . . 623 11.1.2.1 Hard Faults . . . . . . . . . . . . . . . . . . . . . . 625 11.1.2.2 Soft Faults . . . . . . . . . . . . . . . . . . . . . . 625 11.2 Analog Circuit Testing . . . . . . . . . . . . . . . . . . . . . . . . . . 627 11.2.1 Analog Test Approaches . . . . . . . . . . . . . . . . . . . . 627 11.2.2 Analog Test Waveforms . . . . . . . . . . . . . . . . . . . . . 629 11.2.3 DC Parametric Testing . . . . . . . . . . . . . . . . . . . . . 631 11.2.3.1 Open-Loop Gain Measurement . . . . . . . . . . 632 11.2.3.2 Unit Gain Bandwidth Measurement . . . . . . . 633 11.2.3.3 Common Mode Rejection Ratio Measurement . 634 11.2.3.4 Power Supply Rejection Ratio Measurement . . 635 11.2.4 AC Parametric Testing . . . . . . . . . . . . . . . . . . . . . 635 11.2.4.1 Maximal Output Amplitude Measurement . . . . 636 11.2.4.2 Frequency Response Measurement . . . . . . . . 637 11.2.4.3 SNR and Distortion Measurement . . . . . . . . 639 11.2.4.4 Intermodulation Distortion Measurement . . . . 641 11.3 Mixed-Signal Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . 641 11.3.1 Introduction to Analog–Digital Conversion . . . . . . . . . 642 11.3.2 ADC and DAC Circuit Structure . . . . . . . . . . . . . . . . 644 11.3.2.1 DAC Circuit Structure . . . . . . . . . . . . . . . 646 11.3.2.2 ADC Circuit Structure . . . . . . . . . . . . . . . 646 11.3.3 ADC/DAC Specification and Fault Models . . . . . . . . . . 647 11.3.4 IEEE 1057 Standard . . . . . . . . . . . . . . . . . . . . . . 652 11.3.5 Time-Domain ADC Testing . . . . . . . . . . . . . . . . . . . 654 11.3.5.1 Code Bins . . . . . . . . . . . . . . . . . . . . . . . 654 11.3.5.2 Code Transition Level Test (Static) . . . . . . . . 655 11.3.5.3 Code Transition Level Test (Dynamic) . . . . . . 655 11.3.5.4 Gain and Offset Test . . . . . . . . . . . . . . . . 656 11.3.5.5 Linearity Error and Maximal Static Error . . . . 657 11.3.5.6 Sine Wave Curve-Fit Test . . . . . . . . . . . . . . 658 11.3.6 Frequency-Domain ADC Testing . . . . . . . . . . . . . . . 658 11.4 IEEE 1149.4 Standard for a Mixed-Signal Test Bus . . . . . . . . . 658 11.4.1 IEEE 1149.4 Overview . . . . . . . . . . . . . . . . . . . . . 659 11.4.1.1 Scope of the Standard . . . . . . . . . . . . . . . 660 11.4.2 IEEE 1149.4 Circuit Structures . . . . . . . . . . . . . . . . 661 11.4.3 IEEE 1149.4 Instructions . . . . . . . . . . . . . . . . . . . 665 11.4.3.1 Mandatory Instructions . . . . . . . . . . . . . . 665 11.4.3.2 Optional Instructions . . . . . . . . . . . . . . . . 665 Contents xix 11.4.4 IEEE 1149.4 Test Modes . . . . . . . . . . . . . . . . . . . . 666 11.4.4.1 Open/Short Interconnect Testing . . . . . . . . . 666 11.4.4.2 Extended Interconnect Measurement . . . . . . 667 11.4.4.3 Complex Network Measurement . . . . . . . . . 671 11.4.4.4 High-Performance Configuration . . . . . . . . . 672 11.5 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . 673 11.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677 12 Test Technology Trends in the Nanometer Age 679 Kwang-Ting (Tim) Cheng, Wen-Ben Jone, and Laung-Terng (L.-T.) Wang 12.1 Test Technology Roadmap . . . . . . . . . . . . . . . . . . . . . . . . 680 12.2 Delay Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685 12.2.1 Test Application Schemes for Testing Delay Defects . . . . 686 12.2.2 Delay Fault Models . . . . . . . . . . . . . . . . . . . . . . . 687 12.2.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690 12.3 Coping with Physical Failures, Soft Errors, and Reliability Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . 692 12.3.1 Signal Integrity and Power Supply Noise . . . . . . . . . . 692 12.3.1.1 Integrity Loss Fault Model . . . . . . . . . . . . . 693 12.3.1.2 Location . . . . . . . . . . . . . . . . . . . . . . . 694 12.3.1.3 Pattern Generation . . . . . . . . . . . . . . . . . 694 12.3.1.4 Sensing and Readout . . . . . . . . . . . . . . . . 695 12.3.2 Parametric Defects, Process Variations, and Yield . . . . . 696 12.3.2.1 Defect-Based Test . . . . . . . . . . . . . . . . . . 697 12.3.3 Soft Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698 12.3.4 Fault Tolerance . . . . . . . . . . . . . . . . . . . . . . . . . 701 12.3.5 Defect and Error Tolerance . . . . . . . . . . . . . . . . . . 705 12.4 FPGA Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706 12.4.1 Impact of Programmability . . . . . . . . . . . . . . . . . . 706 12.4.2 Testing Approaches . . . . . . . . . . . . . . . . . . . . . . . 708 12.4.3 Built-In Self-Test of Logic Resources . . . . . . . . . . . . . 708 12.4.4 Built-In Self-Test of Routing Resources . . . . . . . . . . . 709 12.4.5 Recent Trends . . . . . . . . . . . . . . . . . . . . . . . . . . 710 12.5 MEMS Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711 12.5.1 Basic Concepts for Capacitive MEMS Devices . . . . . . . 711 12.5.2 MEMS Built-In Self-Test . . . . . . . . . . . . . . . . . . . . 713 12.5.2.1 Sensitivity BIST Scheme . . . . . . . . . . . . . . 713 12.5.2.2 Symmetry BIST Scheme . . . . . . . . . . . . . . 713 12.5.2.3 A Dual-Mode BIST Technique . . . . . . . . . . . 714 12.5.3 A BIST Example for MEMS Comb Accelerometers . . . . 716 12.5.4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . 719 xx Contents 12.6 High-speed I/O Testing . . . . . . . . . . . . . . . . . . . . . . . . . . 719 12.6.1 I/O Interface Technology and Trend . . . . . . . . . . . . . 720 12.6.2 I/O Testing and Challenges . . . . . . . . . . . . . . . . . . . 724 12.6.3 High-Performance I/O Test Solutions . . . . . . . . . . . . 725 12.6.4 Future Challenges . . . . . . . . . . . . . . . . . . . . . . . . 726 12.7 RF Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728 12.7.1 Core RF Building Blocks . . . . . . . . . . . . . . . . . . . . 729 12.7.2 RF Test Specifications and Measurement Procedures . . . 730 12.7.2.1 Gain . . . . . . . . . . . . . . . . . . . . . . . . . . 730 12.7.2.2 Conversion Gain . . . . . . . . . . . . . . . . . . . 731 12.7.2.3 Third-Order Intercept . . . . . . . . . . . . . . . . 731 12.7.2.4 Noise Figure . . . . . . . . . . . . . . . . . . . . . 733 12.7.3 Tests for System-Level Specifications . . . . . . . . . . . . 733 12.7.3.1 Adjacent Channel Power Ratio . . . . . . . . . . 733 12.7.3.2 Error Vector Magnitude, Magnitude Error, and Phase Error . . . . . . . . . . . . . . . . . . . . . 734 12.7.4 Current and Future Trends . . . . . . . . . . . . . . . . . . 735 12.7.4.1 Future Trends . . . . . . . . . . . . . . . . . . . . 736 12.8 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . 737 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738 Index 751 PREFACE Beginning with the introduction of commercial manufacturing of integrated circuits (ICs) in the early 1960s, modern electronics testing has a history of more than 40 years. The integrated circuit was developed in 1958, concurrently at Texas Instruments (TI) and Fairchild Semiconductor. Today, semiconductors lie at the heart of ongoing advances across the electronics industry. The industry enjoyed a banner year in 2005, with almost $230 billion in sales worldwide. The introduction of new technologies, especially nanometer technologies with 90 nm or smaller geometry, has allowed the semiconductor industry to keep pace with increased performance-capacity demands from consumers. This has brightened the prospects for future industry growth; however, new technologies come with new challenges. Semiconductor test costs have been growing steadily. Test costs can now amount to 40% of overall product cost. In addition, product quality and yield could drop significantly if these chips are not designed for testability and thoroughly tested. New problems encountered in semiconductor testing are being recognized quickly today. Because very-large-scale integration (VLSI) technologies drive test technologies, more effective test technologies are key to success in today’s competitive marketplace. It is recognized that, in order to tackle the problems associated with testing semiconductor devices, it is necessary to attack them at earlier design stages. The field of design for testability (DFT) is a mature one today. Test cost can be significantly reduced by inserting DFT in earlier design stages; thus, it is important to expose students and practitioners to the most recent, yet fundamental, VLSI test principles and DFT architectures in an effort to help them design better quality products now and in the future that can be reliably manufactured in quantity. In this context, it is important to make sure that undergraduates and practitioners, in addition to graduate students and researchers, are introduced to the variety of problems encountered in semiconductor testing and that they are made aware of the new methods being developed to solve these problems at earlier stages of design. A very important factor in doing so is to ensure that introductory textbooks for semiconductor testing are kept up to date with the latest process, design, and test technology advances. This textbook is being made available with this goal in mind. It is a fundamental yet comprehensive guide to new DFT methods that will show readers how to design a testable and quality product, drive down test cost, improve product quality and yield, and speed up time-to-market and time-to-volume. Intended users of the book include undergraduates, engineers and engineering managers who have the need xxii Preface to know; it is not simply for graduate students and researchers. It focuses more on basic VLSI test concepts, principles, and DFT architectures and includes the latest advances that are in practice today, including at-speed scan testing, test compression, at-speed built-in self-test (BIST), memory built-in self-repair (BISR), and test technology trends. These advanced subjects are key to system-on-chip (SOC) designs in the nanometer age. The semiconductor testing field is quite broad today, so the scope of this textbook is also broad, with topics ranging from digital to memory to AMS (analog and mixedsignal) testing. This book will allow the readers to understand fundamental VLSI test principles and DFT architectures and prepare them for tackling test problems caused by advances in semiconductor manufacturing technology and complex SOC designs in the nanometer era. Each chapter of this book follows a specific template format. The subject matter of the chapter is first introduced, with a historical perspective provided, if needed. Then, related methods and algorithms are explained in sufficient detail while keeping the level of intended users in mind. Examples are taken from the current DFT tools, products, etc. Comprehensive reference sources are then provided. Each chapter (except Chapter 12) ends with a variety of exercises for students to solve to help them master the topic at hand. Chapter 1 provides a comprehensive introduction to semiconductor testing. It begins with a discussion of the importance of testing as a requisite for achieving manufacturing quality of semiconductor devices and then identifies difficulties in VLSI testing. After the author explains how testing can be viewed as a design moving through different abstraction levels, a historical view of the development of VLSI testing is presented. Chapter 2 is devoted to introducing the basic concepts of design for testability (DFT). Testability analysis to assess the testability of a logic circuit is discussed. Ad hoc and structured approaches to ease testing are then presented, which leads to scan design, a widely used DFT method in industry today. The remainder of the chapter is then devoted to scan cell designs, scan architectures, scan design rules, and scan synthesis and verification. Following a discussion of scan cost issues, special-purpose scan designs suitable for delay testing, system debug, and soft error protection, RTL DFT techniques are briefly introduced. Chapter 3 and Chapter 4 are devoted to the familiar areas of logic/fault simulation and automatic test pattern generation (ATPG), respectively. Care is taken to describe methods and algorithms used in these two areas in an easy-to-grasp language while maintaining the overall perspective of VLSI testing. Chapter 5 is completely devoted to logic built-in self-test (BIST). After a brief introduction, specific BIST design rules are presented. On-chip test pattern generation and output response analysis are then explained. The chapter puts great emphasis on documenting important on-chip test pattern generation techniques and logic BIST architectures, as these subjects are not yet well researched. At-speed BIST techniques, a key feature in this chapter, are then explained in detail. A design practice example provided at the end of the chapter invites readers to design a logic BIST system. Preface xxiii Chapter 6 then jumps into the most important test cost aspect of testability insertion into a scan design. How cost reduction can be achieved using test compression is discussed in greater detail. Representative, commercially available compression tools are introduced so readers (practitioners) can appreciate what is best suited to their needs. Chapter 7 delves into the topic of logic diagnosis. Techniques for combinational logic diagnosis based on cause–effect analysis, effect–cause analysis, and chip-level strategy are first described. Then, innovative techniques for scan chain diagnosis and logic BIST diagnosis are explained in detail. Chapter 8 and Chapter 9 cover the full spectrum of memory test and diagnosis methods. In both chapters, after a description of basic memory test and diagnosis concepts, memory BIST and memory BISR architectures are then explained in detail. Memory fault simulation, a unique topic, is also discussed in Chapter 8. Chapter 10 covers boundary scan and core-based testing for board-level and system-level testing. The IEEE 1149 standard addresses boundary-scan-based testing; after a brief history, the boundary-scan standards (IEEE 1149.1 and 1149.6) are discussed. The newly endorsed IEEE 1500 core-based testing standard is then described. Chapter 11 is devoted to analog and mixed-signal testing. Important analog circuit properties and their defect mechanisms and fault models are described first. Methods for analog circuit testing are then explained. Mixed-signal circuit testing is introduced by a discussion of ADC/DAC testing. The IEEE 1057 standard for digitizing waveform recorders is then explained. A related standard, IEEE 1149.4, and instructions for mixed-signal test buses are covered in detail. Special topics related to ADC/DAC testing, including time-domain ADC testing and frequency-domain ADC testing, are also touched on in this chapter. Chapter 12 is devoted to test technology trends in the nanometer age. It presents an international test technology roadmap to put these new trends in perspective and predicts test technology needs in the coming 10 to 15 years, such as better methods for delay testing, as well as coping with physical failures, soft errors, and reliability issues. The emerging field of FPGA and MEMS testing is briefly touched upon before the chapter jumps into other modern topics such as high-speed I/O testing and RF testing. IN THE CLASSROOM This book is designed to be used as a text for undergraduate and graduate students in computer engineering, computer science, or electrical engineering. It is also intended for use as a reference book for researchers and practitioners. The book is self-contained, with most topics covered extensively from fundamental concepts to current techniques used in research and industry. We assume that the students have had basic courses in logic design, computer science, and probability theory. Attempts are made to present algorithms, where possible, in an easily understood format. In order to encourage self-learning, readers are advised to check the Elsevier companion Web site (www.books.elsevier.com/companions) to access up-to-date software and presentation slides, including errata, if any. Professors will have additional privileges to assess the solutions directory for all exercises given in each chapter by visiting www.textbooks.elsevier.com and registering a username and password. Laung-Terng (L.-T.) Wang Cheng-Wen Wu Xiaoqing Wen ACKNOWLEDGMENTS The editors would like to acknowledge many of their colleagues who helped create this book. First and foremost are the 27 chapter/section contributors listed in the following section. Without their strong commitments to contributing the chapters and sections of their specialties to the book in a timely manner, it would not have been possible to publish this fundamental DFT textbook, which covers the most recent advances in VLSI testing and DFT architectures. We also would like to give additional thanks to the reviewers of the book, particularly Prof. Fa Foster Dai (Auburn University), Prof. Andre Ivanov (University of British Columbia, Canada), Prof. Chong-Min Kyung (Korea Advanced Institute of Science and Technology, Korea), Prof. Adam Osseiran (Edith Cowan University, Australia), Prof. Sudhakar M. Reddy (University of Iowa), Prof. Michel Renovell (LIRMM, France), Prof. Kewal K. Saluja (University of Wisconsin–Madison), Prof. Masaru Sanada (Kochi University of Technology, Japan), Prof. Hans-Joachim Wunderlich (University of Stuttgart, Germany), Prof. Dong Xiang (Tsinghua University, China), Prof. Xiaoyang Zeng (Fudan University, China), Dwayne Burek (Magma Design Automation, Santa Clara, CA), Sachin Dhingra and Sudheer Vemula (Auburn University), Grady L. Giles (Advanced Micro Devices, Austin, TX), Dr. Yinhe Han and Dr. Huawei Li (Chinese Academy of Sciences, China), Dr. Augusli Kifli (Faraday Technology, Taiwan), Dr. Yunsik Lee (Korea Electronics Technology Institute, Korea), Dr. Samy Makar (Azul Systems, Mountain View, CA), Erik Jan Marinissen (Philips Research Laboratories, The Netherlands), Dr. Kenneth P. Parker (Agilent Technologies, Loveland, CO), Takeshi Onodera (Sony Corp. Semiconductor Solutions Network Co., Japan), Jing Wang and Lei Wu (Texas A&M University, College Station, TX), and Thomas Wilderotter (Synopsys, Bedminster, NJ), as well as all chapter/section contributors for cross-reviewing the manuscript. Special thanks also go to many colleagues at SynTest Technologies, Inc., including Dr. Ravi Apte, Jack Sheu, Dr. Zhigang Jiang, Zhigang Wang, Jongjoo Park, Jinwoo Cho, Jerry Lin, Paul Hsu, Karl Chang, Tom Chao, Feng Liu, Johnson Guo, Xiangfeng Li, Fangfang Li, Yiqun Ding, Lizhen Yu, Angelia Yu, Huiqin Hu, Jiayong Song, Jane Xu, Jim Ma, Sammer Liu, Renay Chang, and Teresa Chang and her lovely daughter, Alice Yu, all of whom helped review the manuscript, solve exercises, develop lecture slides, and draw/redraw figures and tables. Finally, the editors would like to acknowledge the generosity of SynTest Technologies (Sunnyvale, CA) for allowing Elsevier to put an exclusive version of the company’s most recent VLSI Testing and DFT software on the Elsevier companion Web site (www.books.elsevier.com/companions) for readers to use in conjunction with the book to become acquainted with DFT practices. This Page is Intentionally Left Blank CONTRIBUTORS Khader S. Abdel-Hafez, Director of Engineering (Chapter 2) SynTest Technologies, Inc., Sunnyvale, California Soumendu Bhattacharya, Post-Doctoral Fellow (Chapter 12) School of Electrical and Computer Engineering, Georgia Institute of Technology, Atlanta, Georgia Abhijit Chatterjee, Professor (Chapter 12) School of Electrical and Computer Engineering, Georgia Institute of Technology, Atlanta, Georgia Xinghao Chen, Associate Professor (Chapter 2) Department of Electrical Engineering, The Grove School of Engineering, City College and Graduate Center of The City University of New York, New York Kwang-Ting (Tim) Cheng, Chair and Professor, IEEE Fellow (Chapter 12) Department of Electrical and Computer Engineering, University of California, Santa Barbara, California William Eklow, Distinguished Manufacturing Engineer (Chapter 10) Cisco Systems, Inc., San Jose, California; Chair, IEEE 1149.6 Standard Committee Michael S. Hsiao, Associate Professor and Dean’s Faculty Fellow (Chapter 4) Bradley Department of Electrical and Computer Engineering, Virginia Tech, Blacksburg, Virginia Jiun-Lang Huang, Assistant Professor (Chapter 3) Graduate Institute of Electronics Engineering, National Taiwan University, Taipei, Taiwan Shi-Yu Huang, Associate Professor (Chapter 7) Department of Electrical Engineering, National Tsing Hua University, Hsinchu, Taiwan Wen-Ben Jone, Associate Professor (Chapter 12) Department of Electrical & Computer Engineering and Computer Science, University of Cincinnati, Cincinnati, Ohio Rohit Kapur, Scientist, IEEE Fellow (Chapter 6) Synopsys, Inc., Mountain View, California xxviii Contributors Brion Keller, Senior Architect (Chapter 6) Cadence Design Systems, Inc., Endicott, New York Kuen-Jong Lee, Professor (Chapters 6 and 10) Department of Electrical Engineering, National Cheng Kung University, Tainan, Taiwan James C.-M. Li, Assistant Professor (Chapter 3) Graduate Institute of Electronics Engineering, National Taiwan University, Taipei, Taiwan Mike Peng Li, Chief Technology Officer (Chapter 12) Wavecrest Corp., San Jose, California Xiaowei Li, Professor (Chapter 6) Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China T.M. Mak, Senior Researcher (Chapter 12) Intel Corp., Santa Clara, California Yinghua Min, Professor Emeritus, IEEE Fellow (Chapter 1) Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China Benoit Nadeau-Dostie, Chief Scientist (Chapter 6) LogicVision, Inc., Ottawa, Ontario, Canada Mehrdad Nourani, Associate Professor (Chapter 12) Department of Electrical Engineering, University of Texas at Dallas, Richardson, Texas Janusz Rajski, Director of Engineering (Chapter 6) Mentor Graphics Corp., Wilsonville, Oregon Charles Stroud, Professor, IEEE Fellow (Chapters 1 and 12) Department of Electrical and Computer Engineering, Auburn University, Auburn, Alabama Chauchin Su, Professor (Chapter 11) Department of Electrical and Control Engineering, National Chiao Tung University, Hsinchu, Taiwan Nur A. Touba, Associate Professor (Chapters 5, 6, and 7) Department of Electrical and Computer Engineering, University of Texas, Austin, Texas Erik H. Volkerink, Manager, Agilent Semiconductor Test Labs. (Chapter 6) Agilent Technologies, Inc., Palo Alto, California Duncan M. (Hank) Walker, Professor (Chapters 3 and 12) Department of Computer Science, Texas A&M University, College Station, Texas Shianling Wu, Vice President of Engineering (Chapter 2) SynTest Technologies, Inc., Princeton Junction, New Jersey ABOUT THE EDITORS Laung-Terng (L.-T.) Wang, Ph.D., founder and chief executive officer (CEO) of SynTest Technologies (Sunnyvale, CA), received his BSEE and MSEE degrees from National Taiwan University in 1975 and 1977, respectively, and his MSEE and EE Ph.D. degrees under the Honors Cooperative Program (HCP) from Stanford University in 1982 and 1987, respectively. He worked at Intel (Santa Clara, CA) and Daisy Systems (Mountain View, CA) from 1980 to 1986 and was with the Department of Electrical Engineering of Stanford University as Research Associate and Lecturer from 1987 to 1991. Encouraged by his advisor, Professor Edward J. McCluskey, a member of the National Academy of Engineering, he founded SynTest Technologies in 1990. Under his leadership, the company has grown to more than 50 employees and 250 customers worldwide. The design for testability (DFT) technologies Dr. Wang has developed have been successfully implemented in thousands of ASIC designs worldwide. He has filed more than 25 U.S. and European patent applications in the areas of scan synthesis, test generation, at-speed scan testing, test compression, logic built-in self-test (BIST), and design for debug and diagnosis, of which seven have been granted. Dr. Wang’s work in at-speed scan testing, test compression, and logic BIST has proved crucial to ensuring the quality and testability of nanometer designs, and his inventions are gaining industry acceptance for use in designs manufactured at the 90-nanometer scale and below. He spearheaded efforts to raise endowed funds in memory of his NTU chair professor, Dr. Irving T. Ho, cofounder of the Hsinchu Science Park and vice chair of the National Science Council, Taiwan. Since 2003, he has helped establish a number of chair professorships, graduate fellowships, and undergraduate scholarships at Stanford University and National Taiwan University, as well as Xiamen University, Tsinghua University, and Shanghai Jiaotong University in China. Cheng-Wen Wu, Ph.D., Dean and Professor of the College of Electrical Engineering and Computer Science (EECS), National Tsing Hua University, Taiwan, received his BSEE degree from National Taiwan University in 1981 and his MSEE and EE Ph.D. degrees from the University of California, Santa Barbara, in 1985 and 1987, respectively. He joined the faculty of the Department of Electrical Engineering, National Tsing Hua University, immediately after graduation. His research interests are in the areas of memory BIST and diagnosis, memory built-in self-repair (BISR), and security processor design with related system-on-chip test issues. He has published more than 200 journal and conference papers. Among the many honors and xxx About the Editors awards Dr. Wu has received is the Guo-Guang Sports Medal from the Ministry of Education, Taiwan, the nation’s highest honor bestowed upon athletes; he was honored for being a pitcher and shortstop for the national Little League Baseball Team, which won the 1971 Little League World Series. Additional honors include the Distinguished Teaching Award from National Tsing Hua University in 1996, the Outstanding Academic Research Award from Taiwan’s Ministry of Education in 2005, the Outstanding Contribution Award from the IEEE Computer Society in 2005, and Best Paper awards from the International Workshop on Design and Diagnostics of Electronic Circuits and Systems (DDECS) in 2002 and the Asia and South Pacific Design Automation Conference (ASP–DAC) in 2003. Dr. Wu has served on numerous program committees for IEEE-sponsored conferences, symposia, and workshops and currently chairs a test subcommittee of the IEEE Computer Society. He was elected an IEEE Fellow in 2003 and an IEEE Computer Society Golden Core Member in 2006. Xiaoqing Wen, Ph.D., Associate Professor at the Graduate School of Computer Science and Systems Engineering, Kyushu Institute of Technology, Japan, received his B.E. degree in Computer Science and Engineering from Tsinghua University, China, in 1986; his M.E. degree in Information Engineering from Hiroshima University, Japan, in 1990; and his Ph.D. degree in Applied Physics from Osaka University, Japan, in 1993. He was an Assistant Professor at Akita University, Japan, from 1993 to 1997 and a Visiting Researcher at the University of Wisconsin–Madison from 1995 to 1996. From 1998 to 2003, he served as the chief technology officer (CTO) at SynTest Technologies (Sunnyvale, CA), where he conducted research and development. In 2004, Dr. Wen joined the Kyushu Institute of Technology. His research interests include design for testability (DFT), test compression, logic BIST, fault diagnosis, and low-power testing. He has published more than 50 journal and conference papers and has been a co-inventor with Dr. Laung-Terng Wang of more than 15 U.S. and European patent applications, of which seven have been granted. He is a member of the IEEE, the IEICE, and the REAJ. CHAPTER 1 INTRODUCTION Yinghua Min Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China Charles Stroud Electrical and Computer Engineering, Auburn University, Auburn, Alabama ABOUT THIS CHAPTER The introduction of integrated circuits (ICs), commonly referred to as microchips or simply chips, was accompanied by the need to test these devices. Small-scale integration (SSI) devices, with tens of transistors in the early 1960s, and mediumscale integration (MSI) devices, with hundreds of transistors in the late 1960s, were relatively simple to test. However, in the 1970s, large-scale integration (LSI) devices, with thousands and tens of thousands of transistors, created a number of challenges when testing these devices. In the early 1980s, very-large-scale integration (VLSI) devices with hundreds of thousands of transistors were introduced. Steady advances in VLSI technology have resulted in devices with hundreds of millions of transistors and many new testing challenges. This chapter provides an overview of various aspects of VLSI testing and introduces fundamental concepts necessary for studying and comprehending this book. 1.1 IMPORTANCE OF TESTING Following the so-called Moore’s law [Moore 1965], the scale of ICs has doubled every 18 months. A simple example of this trend is the progression from SSI to VLSI devices. In the 1980s, the term “VLSI” was used for chips having more than 100,000 transistors and has continued to be used over time to refer to chips with millions and now hundreds of millions of transistors. In 1986, the first megabit randomaccess memory (RAM) contained more than 1 million transistors. Microprocessors produced in 1994 contained more than 3 million transistors [Arthistory 2005]. VLSI devices with many millions of transistors are commonly used in today’s computers and electronic appliances. This is a direct result of the steadily decreasing dimensions, referred to as feature size, of the transistors and interconnecting wires from tens of microns to tens of nanometers, with current submicron technologies based 2 VLSI Test Principles and Architectures on a feature size of less than 100 nanometers (100 nm). The reduction in feature size has also resulted in increased operating frequencies and clock speeds; for example, in 1971, the first microprocessor ran at a clock frequency of 108 KHz, while current commercially available microprocessors commonly run at several gigahertz. The reduction in feature size increases the probability that a manufacturing defect in the IC will result in a faulty chip. A very small defect can easily result in a faulty transistor or interconnecting wire when the feature size is less than 100 nm. Furthermore, it takes only one faulty transistor or wire to make the entire chip fail to function properly or at the required operating frequency. Yet, defects created during the manufacturing process are unavoidable, and, as a result, some number of ICs is expected to be faulty; therefore, testing is required to guarantee faultfree products, regardless of whether the product is a VLSI device or an electronic system composed of many VLSI devices. It is also necessary to test components at various stages during the manufacturing process. For example, in order to produce an electronic system, we must produce ICs, use these ICs to assemble printed circuit boards (PCBs), and then use the PCBs to assemble the system. There is general agreement with the rule of ten, which says that the cost of detecting a faulty IC increases by an order of magnitude as we move through each stage of manufacturing, from device level to board level to system level and finally to system operation in the field. Electronic testing includes IC testing, PCB testing, and system testing at the various manufacturing stages and, in some cases, during system operation. Testing is used not only to find the fault-free devices, PCBs, and systems but also to improve production yield at the various stages of manufacturing by analyzing the cause of defects when faults are encountered. In some systems, periodic testing is performed to ensure fault-free system operation and to initiate repair procedures when faults are detected. Hence, VLSI testing is important to designers, product engineers, test engineers, managers, manufacturers, and end-users [Jha 2003]. 1.2 TESTING DURING THE VLSI LIFECYCLE Testing typically consists of applying a set of test stimuli to the inputs of the circuit under test (CUT) while analyzing the output responses, as illustrated in Figure 1.1 Circuits that produce the correct output responses for all input stimuli pass the test and are considered to be fault-free. Those circuits that fail to produce a correct response at any point during the test sequence are assumed to be faulty. Testing is Input Test Stimuli Input1 Inputn FIGURE 1.1 Basic testing approach. Circuit Under Test (CUT) Output1 Outputm Output Pass/Fail Response Analysis Introduction 3 performed at various stages in the lifecycle of a VLSI device, including during the VLSI development process, the electronic system manufacturing process, and, in some cases, system-level operation. In this section, we examine these various types of testing, beginning with the VLSI development process. 1.2.1 VLSI Development Process The VLSI development process is illustrated in Figure 1.2, where it can be seen that some form of testing is involved at each stage of the process. Based on a customer or project need, a VLSI device requirement is determined and formulated as a design specification. Designers are then responsible for synthesizing a circuit that satisfies the design specification and for verifying the design. Design verification is a predictive analysis that ensures that the synthesized design will perform the required functions when manufactured. When a design error is found, modifications to the design are necessary and design verification must be repeated. As a result, design verification can be considered as a form of testing. Once verified, the VLSI design then goes to fabrication. At the same time, test engineers develop a test procedure based on the design specification and fault models associated with the implementation technology. A defect is a flaw or physical imperfection that may lead to a fault. Due to unavoidable statistical flaws in the materials and masks used to fabricate ICs, it is impossible for 100% of any particular kind of IC to be defect-free. Thus, the first testing performed during the manufacturing process is to test the ICs fabricated on the wafer in order to determine which devices are defective. The chips that pass the wafer-level test are extracted and packaged. The packaged devices are retested to eliminate those devices that may have been damaged during the packaging process or put into defective packages. Additional testing is used to assure the final quality before going to market. This final testing includes measurement of such parameters as input/output timing Design Specification Design Fabrication Packaging Quality Assurance FIGURE 1.2 VLSI development process. Design Verification Wafer Test Package Test Final Testing 4 VLSI Test Principles and Architectures specifications, voltage, and current. In addition, burn-in or stress testing is often performed where chips are subjected to high temperatures and supply voltage. The purpose of burn-in testing is to accelerate the effect of defects that could lead to failures in the early stages of operation of the IC. Failure mode analysis (FMA) is typically used at all stages of IC manufacturing testing to identify improvements to processes that will result in an increase in the number of defect-free devices produced. Design verification and yield are not only important aspects of the VLSI development process but are also important in VLSI testing. The following two subsections provide more detail on verification and yield, while their relationship to and impact on testing are discussed throughout this chapter. 1.2.1.1 Design Verification A VLSI design can be described at different levels of abstraction, as illustrated in Figure 1.3. The design process is essentially a process of transforming a higher level description of a design to a lower level description. Starting from a design specification, a behavioral (architecture) level description is developed in very high speed integrated circuit hardware description language (VHDL) or Verilog or as a C program and simulated to determine if it is functionally equivalent to the specification. The design is then described at the register-transfer level (RTL), which contains more structural information in terms of the sequential and combinational logic functions to be performed in the data paths and control circuits. The RTL description must be verified with respect to the functionality of the behavioral description before proceeding with synthesis to the logical level. A logical-level implementation is automatically synthesized from the RTL description to produce the gate-level design of the circuit. The logical-level implementation should be verified in as much detail as possible to guarantee the correct functionality of the final design. In the final step, the logical-level description must be transformed to a physical-level description in order to obtain the physical placement and interconnection of the transistors in the VLSI device prior to fabrication. FIGURE 1.3 Design hierarchy. Design Specification Behavioral (Architecture) Level Register-Transfer Level Logical (Gate) Level Physical (Transistor) Level Introduction 5 This physical-level description is used to verify that the final design will meet timing and operating frequency specifications. There are many tools available to assist in the design verification process including computer-aided design (CAD) synthesis and simulation tools, hardware emulation, and formal verification methods; however, design verification takes time, and insufficient verification fails to detect design errors. As a result, design verification is economically significant as it has a definite impact on time-to-market. It is interesting to note that many design verification techniques are borrowed from test technology because verifying a design is similar to testing a physical product. Furthermore, the test stimuli developed for design verification of the RTL, logical, and physical levels of abstraction are often used, in conjunction with the associated output responses obtained from simulation, to test the VLSI device during the manufacturing process. 1.2.1.2 Yield and Reject Rate Some percentage of the manufactured ICs is expected to be faulty due to manufacturing defects. The yield of a manufacturing process is defined as the percentage of acceptable parts among all parts that are fabricated: Yield = Number of acceptable parts Total number of parts fabricated There are two types of yield loss: catastrophic and parametric. Catastrophic yield loss is due to random defects, and parametric yield loss is due to process variations. Automation of and improvements in a VLSI fabrication process line drastically reduce the particle density that creates random defects over time; consequently, parametric variations due to process fluctuations become the dominant reason for yield loss. When ICs are tested, the following two undesirable situations may occur: 1. A faulty device appears to be a good part passing the test. 2. A good device fails the test and appears as faulty. These two outcomes are often due to a poorly designed test or the lack of design for testability (DFT). As a result of the first case, even if all products pass acceptance test, some faulty devices will still be found in the manufactured electronic system. When these faulty devices are returned to the IC manufacturer, they undergo FMA for possible improvements to the VLSI development and manufacturing processes. The ratio of field-rejected parts to all parts passing quality assurance testing is referred to as the reject rate, also called the defect level: Reject rate = Number of faulty parts passing final test Total number of parts passing final test The reject rate provides an indication of the overall quality of the VLSI testing process [Bushnell 2000]. Generally speaking, a reject rate of 500 parts per million 6 VLSI Test Principles and Architectures (PPM) chips may be considered to be acceptable, while 100 PPM or lower represents high quality. The goal of six sigma manufacturing, also referred to as zero defects, is 3.4 PPM or less. 1.2.2 Electronic System Manufacturing Process An electronic system generally consists of one or more units comprised of PCBs on which one or more VLSI devices are mounted. The steps required to manufacture an electronic system, illustrated in Figure 1.4, are also susceptible to defects. As a result, testing is required at these various stages to verify that the final product is fault-free. The PCB fabrication process is a photolithographic process similar in some ways to the VLSI fabrication process. The bare PCBs are tested in order to discard defective boards prior to assembly with expensive VLSI components. After assembly, including placement of components and wave soldering, the PCB is tested again; however, this time the PCB test includes testing of the various components, including VLSI devices, mounted on the PCB to verify that the components are properly mounted and have not been damaged during the PCB assembly process. Tested PCBs are assembled in units and systems that are tested before shipment for field operation, but unit- and system-level testing typically may not utilize the same tests as those used for the PCBs and VLSI devices. 1.2.3 System-Level Operation When a manufactured electronic system is shipped to the field, it may undergo testing as part of the installation process to ensure that the system is fault-free before placing the system into operation. During system operation, a number of events can result in a system failure; these events include single-bit upsets, electromigration, and material aging. Suppose the state of system operation is represented as S, where S = 0 means the system operates normally and S = 1 represents a system failure. Then S is a function of time t, as shown in Figure 1.5. PCB Fabrication PCB Assembly Unit Assembly System Assembly FIGURE 1.4 Manufacturing process. Bare Board Test Board Test Unit Test System Test Introduction 7 S 1 0 t0 FIGURE 1.5 System operation and repair. t1 t2 t3 t4 t Suppose the system is in normal operation at t = 0, it fails at t1, and the normal system operation is recovered at t2 by some software modification, reset, or hardware replacement. Similar failure and repair events happen at t3 and t4. The duration of normal system operation (Tn), for intervals such as t1 − t0 and t3 − t2, is generally assumed to be a random number that is exponentially distributed. This is known as the exponential failure law. Hence, the probability that a system will operate normally until time t, referred to as reliability, is given by: P Tn > t = e− t where is the failure rate. Because a system is composed of a number of components, the overall failure rate for the system is the sum of the individual failure rates ( i) for each of the k components: k = i i=0 The mean time between failures (MTBF) is given by: MTBF = e− tdt = 1 0 Similarly, the repair time (R) is also assumed to obey an exponential distribution and is given by: P R > t = e− t where is the repair rate. Hence, the mean time to repair (MTTR) is given by: MTTR = 1 The fraction of time that a system is operating normally (failure-free) is the system availability and is given by: System availability = MTBF MTBF + MTTR 8 VLSI Test Principles and Architectures This formula is widely used in reliability engineering; for example, telephone systems are required to have system availability of 0.9999 (simply called four nines), while high-reliability systems may require seven nines or more. Testing is required to ensure system availability. This testing may be in the form of online testing or offline testing, or a combination of both. Online testing is performed concurrently with normal system operation in order to detect failures as quickly as possible. Offline testing requires that the system, or a portion of the system, be taken out of service in order to perform the test. As a result, offline testing is performed periodically, usually during low-demand periods of system operation. In many cases, when online testing detects a failure, offline test techniques are then used for diagnosis (location and identification) of the failing replaceable component to improve the subsequent repair time. When the system has been repaired, the system, or portion thereof, is retested using offline techniques to verify that the repair was successful prior to placing the system back in service for normal operation. The faulty components (PCBs, in most cases) replaced during the system repair procedure are sometimes sent to the manufacturing facility or a repair facility for further testing. This typically consists of board-level tests, similar to the board-level test used to test the manufactured PCBs. The goal in this case is to determine the location of the faulty VLSI devices on the PCB for replacement and repair. The PCB is then retested to verify successful repair prior to shipment back to the field for use as a replacement component for future system repairs. It should be noted that this PCB test, diagnosis, and repair scenario is viable only when it is cost effective, as might be the case with expensive PCBs. The important point to note is that testing goes on long after the VLSI development process and is performed throughout the life cycle of many VLSI devices. 1.3 CHALLENGES IN VLSI TESTING The physical implementation of a VLSI device is very complicated. Figure 1.6 illustrates the microscopic world of the physical structure of an IC with six levels of interconnections and effective transistor channel length of 0 12 m [Geppert 1998]. Any small piece of dust or abnormality of geometrical shape can result in a defect. Defects are caused by process variations or random localized manufacturing imperfections. Process variations affecting transistor channel length, transistor threshold voltage, metal interconnect width and thickness, and intermetal layer dielectric thickness will impact logical and timing performance. Random localized imperfections can result in resistive bridging between metal lines, resistive opens in metal lines, improper via formation, etc. Recent advances in physics, chemistry, and materials science have allowed production of nanometer-scale structures using sophisticated fabrication techniques. It is widely recognized that nanometer-scale devices will have much higher manufacturing defect rates compared to conventional complementary metal oxide semiconductor (CMOS) devices. They will have much lower current drive capabilities and will be much more sensitive to noise-induced errors such as crosstalk. They will Introduction 9 FIGURE 1.6 IBM CMOS integrated circuit with six levels of interconnections and effective transistor channel length of 0 12 m [Geppert 1998]. be more susceptible to failures of transistors and wires due to soft (cosmic) errors, process variations, electromigration, and material aging. As the integration scale increases, more transistors can be fabricated on a single chip, thus reducing the cost per transistor; however, the difficulty of testing each transistor increases due to the increased complexity of the VLSI device and increased potential for defects, as well as the difficulty of detecting the faults produced by those defects. This trend is further accentuated by the competitive price pressures of the high-volume consumer market, as well as by the emergence of system-on-chip (SOC) implementations; mixed-signal circuits and systems, including radiofrequency (RF); and microelectromechanical systems (MEMSs). 1.3.1 Test Generation A fault is a representation of a defect reflecting a physical condition that causes a circuit to fail to perform in a required manner. A failure is a deviation in the performance of a circuit or system from its specified behavior and represents an irreversible state of a component such that it must be repaired in order for it to provide its intended design function. A circuit error is a wrong output signal 10 VLSI Test Principles and Architectures produced by a defective circuit. A circuit defect may lead to a fault, a fault can cause a circuit error, and a circuit error can result in a system failure. To test a circuit with n inputs and m outputs, a set of input patterns is applied to the circuit under test (CUT), and its responses are compared to the known good responses of a fault-free circuit. Each input pattern is called a test vector. In order to completely test a circuit, many test patterns are required; however, it is difficult to know how many test vectors are needed to guarantee a satisfactory reject rate. If the CUT is an n-input combinational logic circuit, we can apply all 2n possible input patterns for testing stuck-at faults; this approach is called exhaustive testing. If a circuit passes exhaustive testing, we might assume that the circuit does not contain functional faults, regardless of its internal structure. Unfortunately, exhaustive testing is not practical when n is large. Furthermore, applying all 2n possible input patterns to an n-input sequential logic circuit will not guarantee that all possible states have been visited. However, this example of applying all possible input test patterns to an n-input combinational logic circuit also illustrates the basic idea of functional testing, where every entry in the truth table for the combinational logic circuit is tested to determine whether it produces the correct response. In practice, functional testing is considered by many designers and test engineers to be testing the CUT as thoroughly as possible in a system-like mode of operation. In either case, one problem is the lack of a quantitative measure of the defects that will be detected by the set of functional test vectors. A more practical approach is to select specific test patterns based on circuit structural information and a set of fault models. This approach is called structural testing. Structural testing saves time and improves test efficiency, as the total number of test patterns is decreased because the test vectors target specific faults that would result from defects in the manufactured circuit. Structural testing cannot guarantee detection of all possible manufacturing defects, as the test vectors are generated based on specific fault models; however, the use of fault models does provide a quantitative measure of the fault-detection capabilities of a given set of test vectors for a targeted fault model. This measure is called fault coverage and is defined as: Fault coverage = Number of detected faults Total number of faults It may be impossible to obtain a fault coverage of 100% because of the existence of undetectable faults. An undetectable fault means there is no test to distinguish the fault-free circuit from a faulty circuit containing that fault. As a result, the fault coverage can be modified and expressed as the fault detection efficiency, also referred to as the effective fault coverage, which is defined as: Fault detection effeciency = Number of detected faults Total number of faults − number of undetectable faults In order to calculate fault detection efficiency, let alone reach 100% fault coverage, all of the undetectable faults in the circuit must be correctly identified, which is Introduction 11 usually a difficult task. Fault coverage is linked to the yield and the defect level by the following expression [Williams 1981]: Defect level = 1− yield 1−fault coverage From this equation, we can show that a PCB with 40 chips, each having 90% fault coverage and 90% yield, could result in a reject rate of 41.9%, or 419,000 PPM. As a result, improving fault coverage can be easier and less expensive than improving manufacturing yield because making yield enhancements can be costly; therefore, generating test stimuli with high fault coverage is very important. Any input pattern, or sequence of input patterns, that produces a different output response in a faulty circuit from that of the fault-free circuit is a test vector, or sequence of test vectors, that will detect the faults. The goal of test generation is to find an efficient set of test vectors that detects all faults considered for that circuit. Because a given set of test vectors is usually capable of detecting many faults in a circuit, fault simulation is typically used to evaluate the fault coverage obtained by that set of test vectors. As a result, fault models are needed for fault simulation as well as for test generation. 1.3.2 Fault Models Because of the diversity of VLSI defects, it is difficult to generate tests for real defects. Fault models are necessary for generating and evaluating a set of test vectors. Generally, a good fault model should satisfy two criteria: (1) It should accurately reflect the behavior of defects, and (2) it should be computationally efficient in terms of fault simulation and test pattern generation. Many fault models have been proposed [Abramovici 1994], but, unfortunately, no single fault model accurately reflects the behavior of all possible defects that can occur. As a result, a combination of different fault models is often used in the generation and evaluation of test vectors and testing approaches developed for VLSI devices. For a given fault model there will be k different types of faults that can occur at each potential fault site (k = 2 for most fault models). A given circuit contains n possible fault sites, depending on the fault model. Assuming that there can be only one fault in the circuit, then the total number of possible single faults, referred to as the single-fault model or single-fault assumption, is given by: Number of single faults = k × n In reality of course, multiple faults may occur in the circuit. The total number of possible combinations of multiple faults, referred to as the multiple-fault model, is given by: Number of multiple faults = k + 1 n − 1 In the multiple-fault model, each fault site can have one of k possible faults or be fault-free, hence the (k + 1) term. Note that the latter term in the expression (the “−1”) represents the fault-free circuit, where all n fault sites are fault-free. While the 12 VLSI Test Principles and Architectures multiple-fault model is more accurate than the single-fault assumption, the number of possible faults becomes impractically large other than for a small number of fault types and fault sites. Fortunately, it has been shown that high fault coverage obtained under the single-fault assumption will result in high fault coverage for the multiple-fault model [Bushnell 2000]; therefore, the single-fault assumption is typically used for test generation and evaluation. Under the single-fault assumption, two or more faults may result in identical faulty behavior for all possible input patterns. These faults are called equivalent faults and can be represented by any single fault from the set of equivalent faults. As a result, the number of single faults to be considered for test generation for a given circuit is usually much less than k × n. This reduction of the entire set of single faults by removing equivalent faults is referred to as fault collapsing. Fault collapsing helps to reduce both test generation and fault simulation times. In the following subsections, we review some well-known and commonly used fault models. 1.3.2.1 Stuck-At Faults The stuck-at fault is a logical fault model that has been used successfully for decades. A stuck-at fault affects the state of logic signals on lines in a logic circuit, including primary inputs (PIs), primary outputs (POs), internal gate inputs and outputs, fanout stems (sources), and fanout branches. A stuck-at fault transforms the correct value on the faulty signal line to appear to be stuck at a constant logic value, either a logic 0 or a logic 1, referred to as stuck-at-0 (SA0) or stuck-at-1 (SA1), respectively. Consider the example circuit shown in Figure 1.7, where the nine signal lines representing potential fault sites are labeled alphabetically. There are 18 (2 × 9) possible faulty circuits under the single-fault assumption. Table 1.1 gives the truth tables for the fault-free circuit and the faulty circuits for all possible single stuck-at faults. It should be noted that, rather than a direct short to a logic 0 or logic 1 value, the stuck-at fault is emulated by disconnection of the source for the signal and connection to a constant logic 0 or 1 value. This can be seen in Table 1.1, where SA0 on fanout branch line d behaves differently from SA0 on fanout branch line e, while the single SA0 fault on the fanout source line b behaves as if both fanout branches line d and line e are SA0. x1 a x2 b d e f x3 c FIGURE 1.7 Example circuit. g iy h Introduction 13 TABLE 1.1 Truth Tables for Fault-Free and Faulty Circuits of Figure 1.7 x1x2x3 000 001 010 011 100 101 110 111 y 0 1 0 0 0 1 1 1 a SA0 0 1 0 0 0 1 0 0 a SA1 0 1 1 1 0 1 1 1 b SA0 0 1 0 1 0 1 0 1 b SA1 0 0 0 0 1 1 1 1 c SA0 0 0 0 0 0 0 1 1 c SA1 1 1 0 0 1 1 1 1 d SA0 0 1 0 0 0 1 0 0 d SA1 0 1 0 0 1 1 1 1 e SA0 0 1 0 1 0 1 1 1 e SA1 0 0 0 0 0 0 1 1 f SA0 0 0 0 0 0 0 1 1 f SA1 0 1 0 1 0 1 1 1 g SA0 0 1 0 0 0 1 0 0 g SA1 1 1 1 1 1 1 1 1 h SA0 0 0 0 0 0 0 1 1 h SA1 1 1 1 1 1 1 1 1 i SA0 0 0 0 0 0 0 0 0 i SA1 1 1 1 1 1 1 1 1 The truth table entries where the faulty circuit produces an output response different from that of the fault-free circuit are highlighted in gray. As a result, the input values for the highlighted truth table entries represent valid test vectors to detect the associated stuck-at faults. With the exception of line d SA1, line e SA0, and line f SA1, all other faults can be detected with two or more test vectors; therefore, test vectors 011 and 100 must be included in any set of test vectors that will obtain 100% fault coverage for this circuit. These two test vectors detect a total of ten faults, and the remaining eight faults can be detected with test vectors 001 and 110; therefore, this set of four test vectors obtains 100% single stuck-at fault coverage for this circuit. Four sets of equivalent faults can be observed in Table 1.1. One fault from each set can be used to represent all of the equivalent faults in that set. Because there is a total of ten unique faulty responses to the complete set of input test patterns, then ten faults constitute the set of collapsed faults for the circuit. Stuck-at fault 14 VLSI Test Principles and Architectures collapsing typically reduces the total number of faults by 50 to 60% [Bushnell 2000]. Fault collapsing for stuck-at faults is based on the fact that a SA0 at the input to an AND (NAND) gate is equivalent to the SA0 (SA1) at the output of the gate. Similarly, a SA1 at the input to an OR (NOR) gate is equivalent to the SA1 (SA0) at the output of the gate. For an inverter, a SA0 (SA1) at the input is equivalent to the SA1 (SA0) at the output of the inverter. Furthermore, a stuck-at fault at the source (output of the driving gate) of a fanout-free net is equivalent to the same stuck-at fault at the destination (gate input being driven). Therefore, the number of collapsed stuck-at faults in any combinational circuit constructed from elementary logic gates (AND, OR, NAND, NOR, and inverter) is given by: Number of collapsed faults = 2 × number of POs + number of fanout stems + total number of gate including inverter inputs − total number of inverters The example circuit in Figure 1.7 has one primary output and one fanout stem. The total number of gate inputs is 7, including the input to the one inverter; therefore, the number of collapsed faults = 2 × 1 + 1 + 7 − 1 = 10. Note that single-input gates, including buffers, are treated the same as an inverter in the calculation of the number of collapsed faults because all faults at the input of the gate are equivalent to faults at the output. A number of interesting properties are associated with detecting stuck-at faults in combinational logic circuits; for example, two such properties are described by the following theorems [Abramovici 1994]: Theorem 1.1 A set of test vectors that detects all single stuck-at faults on all primary inputs of a fanout-free combinational logic circuit will detect all single stuck-at faults in that circuit. Theorem 1.2 A set of test vectors that detect all single stuck-at faults on all primary inputs and all fanout branches of a combinational logic circuit will detect all single stuck-at faults in that circuit. The stuck-at fault model can also be applied to sequential circuits; however, high fault coverage test generation for sequential circuits is much more difficult than for combinational circuits because, for most faults in a sequential logic circuit, it is necessary to generate sequences of test vectors. Therefore, DFT techniques are frequently used to ease sequential circuit test generation. Although it is physically possible for a line to be SA0 or SA1, many other defects within a circuit can also be detected with test vectors developed to detect stuck-at faults. The idea of N-detect single stuck-at fault test vectors was proposed to detect more defects not covered by the stuck-at fault model [Ma 1995]. In an N-detect set of test vectors, each single stuck-at fault is detected by at least N different Introduction 15 test vectors; however, test vectors generated using the stuck-at fault model do not necessarily guarantee the detection of all possible defects, so other fault models are needed. 1.3.2.2 Transistor Faults At the switch level, a transistor can be stuck-open or stuck-short, also referred to as stuck-off or stuck-on, respectively. The stuck-at fault model cannot accurately reflect the behavior of stuck-open and stuck-short faults in CMOS logic circuits because of the multiple transistors used to construct CMOS logic gates. To illustrate this point, consider the two-input CMOS NOR gate shown in Figure 1.8. Suppose transistor N2 is stuck-open. When the input vector AB = 01 is applied, output Z should be a logic 0, but the stuck-open fault causes Z to be isolated from ground (VSS). Because transistors P2 and N1 are not conducting at this time, Z keeps its previous state, either a logic 0 or 1. In order to detect this fault, an ordered sequence of two test vectors AB = 00 → 01 is required. For the fault-free circuit, the input 00 produces Z = 1 and 01 produces Z = 0 such that a falling transition at Z appears. But, for the faulty circuit, while the test vector 00 produces Z = 1, the subsequent test vector 01 will retain Z = 1 without a falling transition such that the faulty circuit behaves like a level-sensitive latch. Thus, a stuck-open fault in a CMOS combinational circuit requires a sequence of two vectors for detection rather than a single test vector for a stuck-at fault. Stuck-short faults, on the other hand, will produce a conducting path between VDD and VSS. For example, if transistor N2 is stuck-short, there will be a conducting path between VDD and VSS for the test vector 00. This creates a voltage divider at the output node Z where the logic level voltage will be a function of the resistances of the conducting transistors. This voltage may or may not be interpreted as an incorrect logic level by the gate inputs driven by the gate with the transistor fault; however, stuck-short transistor faults may be detected by monitoring the power supply current during steady state, referred to as IDDQ. This technique of monitoring the steady-state power supply current to detect transistor stuck-short faults is referred to as IDDQ testing. VDD A P1 B P2 Z N1 N2 VSS FIGURE 1.8 Two-input CMOS NOR gate. 16 VLSI Test Principles and Architectures The circuit in Figure 1.8 has a total of eight (2×4) possible single transistor faults; however, there are equivalent faults at the transistor level, as stuck-open faults in a group of series transistors (such as P1 and P2) are indistinguishable. The same holds true for stuck-short faults in a group of parallel transistors (such as N1 and N2); therefore, fault collapsing can be applied to transistor-level circuits [Stroud 2002]. The number of collapsed transistor faults in a circuit is given by: Number of collapsed faults = 2 × T − TS + GS − TP + GP where T is the total number of transistors, TS is the total number of transistors in series, GS is the total number of groups of transistors in series, TP is the total number of transistors in parallel, and GP is the total number of groups of transistors in parallel. For the two-input NOR gate of Figure 1.8, there are four transistors (T = 4), two transistors (P1 and P2) in the only group of series transistors (TS = 2 and GS = 1), and two transistors (N1 and N2) in the only group of parallel transistors (TP = 2 and GP = 1); hence, the number of collapsed faults is 6. The fault equivalence associated with the transistors can also be seen in Table 1.2, which gives the behavior of the fault-free circuit and each of the 8 possible faulty circuits under the singlefault assumption. Note that table entries labeled “last Z” indicate that the output node will retain its previous value and would require a two-test vector sequence for detection. Similarly, entries labeled “IDDQ” indicate that the output node logic value will be a function of the voltage divider of the conducting transistors and can be detected by IDDQ testing. Because both N1 and N2 stuck-short faults as well as P1 and P2 stuck-open faults can be tested by the same test set, the collapsed fault count is 6, as proven above. 1.3.2.3 Open and Short Faults Defects in VLSI devices can include opens and shorts in the wires that interconnect the transistors forming the circuit. Opens in wires tend to behave like transistor TABLE 1.2 Truth Tables for Fault-Free and Faulty Circuits of Figure 1.8 AB 00 01 10 11 Z 1 0 0 0 N1 stuck-open 1 0 Last Z 0 N1 stuck-short IDDQ 0 0 0 N2 stuck-open 1 Last Z 0 0 N2 stuck-short IDDQ 0 0 0 P1 stuck-open Last Z 0 0 0 P1 stuck-short 1 0 IDDQ 0 P2 stuck-open Last Z 0 0 0 P 2 stuck-short 1 IDDQ 0 0 Introduction 17 stuck-open faults when the faulty wire segment is interconnecting transistors to form gates. On the other hand, opens tend to behave like stuck-at faults when the faulty wire segment is interconnecting gates. Therefore, a set of test vectors that provide high stuck-at fault coverage and high transistor fault coverage will also detect open faults; however, a resistive open does not behave the same as a transistor or stuck-at fault but instead affects the propagation delay of the signal path, as will be discussed in the next subsection. A short between two elements is commonly referred to as a bridging fault. These elements can be transistor terminals or connections between transistors and gates. The case of an element being shorted to power (VDD) or ground (VSS) is equivalent to the stuck-at fault model; however, when two signal wires are shorted together, bridging fault models are required. In the first bridging fault model proposed, the logic value of the shorted nets was modeled as a logical AND or OR of the logic values on the shorted wires. This model is referred to as the wired-AND/wired-OR bridging fault model. The wired-AND bridging fault means the signal net formed by the two shorted lines will take on a logic 0 if either shorted line is sourcing a logic 0, while the wired-OR bridging fault means the signal net will take on a logic 1 if either of the two lines is sourcing a logic 1. Therefore, this type of bridging fault can be modeled with an additional AND or OR gate, as illustrated in Figure 1.9a, where AS and BS denote the sources for the two shorted signal nets and AD and BD AS AD source destination BS BD bridging fault AS AD AS AD AS AD AS AD BS BD BS BD Wired-AND Wired-OR (a) AS AD AS AD BS BD A dominates B BS BD B dominates A (b) AS AD AS AD BS BD A dominant-AND B FIGURE 1.9 Bridging fault models. BS BD A dominant-OR B BS BD B dominant-AND A (c) BS BD B dominant-OR A 18 VLSI Test Principles and Architectures TABLE 1.3 Truth Tables for Bridging Fault Models of Figure 1.9 ASBS ADBD Wired-AND 00011011 00011011 0 0 00 0 0 1 1 Wired-OR 0 01 1 11 1 1 A dominates B 0 0 00 11 1 1 B dominates A 001 10 0 11 A dominant-AND B 0 0 0 0 1 0 1 1 B dominant-AND A 0 0 0 1 0 0 1 1 A dominant-OR B 0 0 0 1 1 1 1 1 B dominant-OR A 001 1 1011 denote the destinations for the two nets. The truth tables for fault-free and faulty behavior are given in Table 1.3. The wired-AND/wired-OR bridging fault model was originally developed for bipolar VLSI and does not accurately reflect the behavior of bridging faults typically found in CMOS devices; therefore, the dominant bridging fault model was proposed for CMOS VLSI where one driver is assumed to dominate the logic value on the two shorted nets. Two fault types are normally evaluated per fault site, where each driver is allowed to dominate the logic value on the shorted signal net (see Figure 1.9b). The dominant bridging fault model is more difficult to detect because the faulty behavior can only be observed on the dominated net, as opposed to both nets in the case of the wired-AND/wired-OR bridging fault model. However, it has been shown, and can be seen from the faulty behavior in Table 1.3, that a set of test vectors that detects all dominant bridging faults is also guaranteed to detect all wired-AND and wired-OR bridging faults. The dominant bridging fault model does not accurately reflect the behavior of a resistive short in some cases. A recent bridging fault model has been proposed based on the behavior of resistive shorts observed in some CMOS VLSI devices [Stroud 2000]. In this fault model, referred to as the dominant-AND/dominant-OR bridging fault, one driver dominates the logic value of the shorted nets but only for a given logic value (see Figure 1.9c). While there are four fault types to evaluate for this fault model, as opposed to only two for the dominant and wired-AND/wiredOR models, a set of test vectors that detect all four dominant-AND/dominant-OR bridging faults will also detect all dominant and wired-AND/wired-OR bridging faults at that fault site. Bridging faults commonly occur in practice and can be detected by IDDQ testing. It has also been shown that many bridging faults are detected by a set of test vectors that obtains high stuck-at fault coverage, particularly with N-detect single stuck-at fault test vectors. In the presence of a bridging fault, a combinational logic circuit can have a feedback path and behave like a sequential logic circuit, making the testing problem more complicated. Another complication in test generation for bridging faults is the number of possible fault sites versus the number of realistic Introduction 19 fault sites. While there are many signal nets in a VLSI circuit, it is impractical to evaluate detection of bridging faults between any possible pair of nets; for example, a circuit with N signal nets would have N-choose-2 = N × N − 1 /2 possible fault sites, but a bridging fault between two nets on opposite sides of the device may not be possible. One solution to this problem is to extract likely bridging fault sites from the physical design after physical layout. 1.3.2.4 Delay Faults and Crosstalk Fault-free operation of a logic circuit requires not only performing the logic function correctly but also propagating the correct logic signals along paths within a specified time limit. A delay fault causes excessive delay along a path such that the total propagation delay falls outside the specified limit. Delay faults have become more prevalent with decreasing feature sizes. There are different delay fault models. In the gate-delay fault and the transition fault models, a delay fault occurs when the time interval taken for a transition from the gate input to its output exceeds its specified range. It should be noted that simultaneous transitions at inputs of a gate may change the gate delay significantly due to activation of multiple charge/discharge paths. The differences between the gate-delay and transition fault models will be discussed in more detail in Chapter 12. The other model is path-delay fault, which considers the cumulative propagation delay along a signal path through the CUT—in other words, the sum of all gate delays along the path; therefore, the path-delay fault model is more practical for testing than the gate-delay fault (or the transition fault) model. A critical problem encountered when dealing with path-delay faults is the large number of possible paths in practical circuits. This number, in the worst case, is exponential for the number of lines in the circuit, and in most practical cases the number of paths in a circuit makes it impossible to enumerate all path-delay faults for the purpose of test generation or fault simulation. As with transistor stuck-open faults, delay faults require an ordered pair of test vectors to sensitize a path through the logic circuit and to create a transition along that path in order to measure the path delay. For example, consider the circuit in Figure 1.10, where the fault-free delay associated with each gate is denoted by the integer value label on that gate. The two test vectors, v1 and v2, shown in the figure 0 0 x1 0 1 x2 t=0 v2 v1 1 1 x3 FIGURE 1.10 Path-delay fault test. 3 t=2 3 2 t=7y t=5 20 VLSI Test Principles and Architectures are used to test the path delay from input x2, through the inverter and lower AND gate, to the output y. Assuming the transition between the two test vectors occurs at time t = 0, the resulting transition propagates through the circuit with the fault-free delays shown at each node in the circuit such that we expect to see the transition at the output y at time t = 7. A delay fault along this path would create a transition at some later time, t > 7. Of course, this measurement could require a high-speed, high-precision test machine. With decreasing feature sizes and increasing signal speeds, the problem of modeling gate delays becomes more difficult. As technologies approach the deep submicron region, the portion of delay contributed by gates reduces while the delay due to interconnect becomes dominant. This is because the interconnect lengths do not scale in proportion to the shrinking area of transistors that make up the gates. In addition, if the operating frequencies also increase with scaling, then the on-chip inductances can play a role in determining the interconnect delay for long wide wires, such as those in clock trees and buses. However, wire delays can be taken into account in the path-delay fault model based on the physical layout, as interconnections are included in paths. As a result, it is no longer true that a path delay is equal to the sum of all delays of gates along the path. The use of nanometer technologies increases cross-coupling capacitance and inductance between interconnects, leading to severe crosstalk effects that may result in improper functioning of a chip. Crosstalk effects can be separated to two categories: crosstalk glitches and crosstalk delays. A crosstalk glitch is a pulse that is provoked by coupling effects among interconnect lines. The magnitude of the glitch depends on the ratio of the coupling capacitance to the line-to-ground capacitance. When a transition signal is applied on a line that has a strong driver while stable signals are applied at other lines that have weaker drivers, the stable signals may experience coupling noise due to the transition of the stronger signal. Crosstalk delay is a signal delay that is provoked by the same coupling effects among interconnect lines, but it may be produced even if line drivers are balanced but have large loads. Because crosstalk causes a delay in addition to normal gate and interconnect delay, it is difficult to estimate the true circuit delay, which may lead to severe signal delay problems. Conventional delay fault analysis may be invalid if these effects are not taken into consideration based on the physical layout. Several design techniques, including physical design and analysis tools, are being developed to help design for margin and minimization of crosstalk problems; however, it may be impossible to anticipate in advance the full range of process variations and manufacturing defects that may significantly aggravate the cross-coupling effects. Hence, there is a critical need to develop testing techniques for manufacturing defects that produce crosstalk effects. 1.3.2.5 Pattern Sensitivity and Coupling Faults Manufacturing defects can be of a wide variety and manifest themselves as faults that are not covered by the specific fault models for digital circuits discussed thus far. This is particularly true in the case of densely packed memories. In highdensity RAMs, the contents of a cell or the ability of a memory cell to change Introduction 21 can be influenced by the contents of its neighboring cells, referred to as a pattern sensitivity fault. A coupling fault results when a transition in one cell causes the content of another cell to change. Therefore, it is necessary when testing memories to add tests for pattern sensitivity and coupling faults in addition to stuck-at faults. Extensive work has been done on memory testing and many memory test algorithms have been proposed [van de Goor 1991] [Bushnell 2000]. One of the most efficient RAM test algorithms, in terms of test time and fault detection capability, currently in use is the March LR algorithm illustrated in Table 1.4. This algorithm has a test time on the order of 16N, where N is the number of address locations, and is capable of detecting pattern sensitivity faults, intra-word coupling faults, and bridging faults in the RAM. For word-oriented memories, a background data sequence (BDS) must be added to detect faults within each word of the memory. The March LR with BDS shown in Table 1.4 is for a RAM with 2-bit words. In general, the number of BDSs = log2 K + 1, where K is the number of bits per word. 1.3.2.6 Analog Fault Models Analog circuits are constructed with passive and active components. Typical analog fault models include shorts, opens, and parameter variations in both active and passive components. Shorts and opens usually result in catastrophic faults that are relatively easy to detect. Parameter variations that cause components to be out of their tolerance ranges result in parametric faults. An active component can suffer from both direct current (DC) faults and alternate current (AC) faults. Op amps typically occupy a much larger silicon area in monolithic ICs than passive components and, hence, are more prone to manufacturing defects. As is the case with a catastrophic fault, a single parametric fault can result in a malfunctioning analog circuit; however, it is difficult to identify critical parameters and to supply a model of process fluctuations. Furthermore, because of the complex nature of analog circuits, a direct application of digital fault models, other than shorts and opens, is inadequate in capturing faulty behavior in analog circuits. It is also difficult to model all practical faults. TABLE 1.4 March LR RAM Test Algorithm Test Algorithm March Test Sequence March LR w/o BDS (w0); ↓(r0, w1); ↑(r1, w0, r0, r0, w1); ↑(r1, w0); ↑(r0, w1, r1, r1, w0); ↑(r0) March LR with BDS (w00); ↓(r00, w11); ↑(r11, w00, r00, r00, w11); ↑(r11, w00); ↑(r00, w11, r11, r11, w00); ↑(r00, w01, w10, r10); ↑(r10, w01, r01); ↑(r01) Notation: w0 = write 0 (or all 0’s); r1 = read 1 (or all 1’s); ↑ = address up; ↓ = address down; = address either way. 22 VLSI Test Principles and Architectures 1.4 LEVELS OF ABSTRACTION IN VLSI TESTING In the design hierarchy, a higher level description has fewer implementation details but more explicit functional information than a lower level description. As described in Section 1.2.1.1, the various levels of abstraction include behavioral (architecture), register-transfer, logical (gate), and physical (transistor) levels. The hierarchical design process lends itself to hierarchical test development, but the fault models described in the previous section are more appropriate for particular levels of abstraction. In this section, we discuss test generation and the use of fault models at these various levels of abstraction. 1.4.1 Register-Transfer Level and Behavioral Level The demand for CAD tools for the design of digital circuits at high levels of abstraction has led to the development of synthesis and simulation technologies. The methodology in common practice today is to design, simulate, and synthesize application-specific integrated circuits (ASICs) of millions of gates at the RTL. So-called “black boxes” or intellectual property (IP) cores are often incorporated in VLSI design, especially in SOC design, for which there may be very little, if any, structural information. Traditional automatic test pattern generation (ATPG) tools cannot effectively handle designs employing blocks for which the implementation detail is either unknown or subject to change; however, several approaches to test pattern generation at the RTL have been proposed. Most of these approaches are able to generate test patterns of good quality, sometimes comparable to gate-level ATPG tools. It is the lack of general applicability that prevents these approaches from being widely accepted. Although some experimental results have shown that RTL fault coverage can be quite close to fault coverage achieved at the gate level when designs are completed and mapped to a technology library, it is unrealistic to expect that stuck-at fault coverage at the RTL will be as high as at the gate level [Min 2002]. To illustrate the importance of knowledge of the gate-level implementation on test generation, consider the two example circuits of Figure 1.11 which implement the following logic function, where x represents a “don’t care” product term: f = abc + abc + xabc Because both circuits are valid implementations of the functional description, the gate-level implementation is not unique for a given RTL description. As a result, it may be difficult to generate tests at the RTL and achieve stuck-at fault coverage as high as at the gate level, as the stuck-at fault model is defined at the gate level. For example, if the “don’t care” product term is assigned a logic 0, we obtain the logic equation along with resultant implementation and associated set of test vectors to detect all stuck-at faults shown in Figure 1.11a. If the “don’t care” term is assigned a logic 1, on the other hand, we obtain the logic equation, gatelevel implementation, and set of test vectors shown in Figure 1.11b. Note that the Introduction 23 ab c 00011110 0 1× ab c 00011110 0 1× 1 1 1 1 f = abc + abc f = ab + bc 111 010 011 110 101 000 110 011 Test Vectors 11x x10 01x x00 10x x01 {111,110,101,011,010,000} {111,101,010,000} a SA1 b a c SA1 b f f SA1 SA1 c (a) (b) FIGURE 1.11 Example of different implementations and their test vectors. set of test vectors for Figure 1.11b is a subset of those required for Figure 1.11a and, as a result, would not detect the four SA1 faults shown in the gate-level implementation of Figure 1.11a. This example can also be illustrated by considering Theorems 1.1 and 1.2. If ATPG assumes that a combinational logic circuit will be fanout free based on the functional description, it could produce test vectors to detect stuck-at faults for all primary inputs based on Theorem 1.1. Yet, if the synthesized circuit contains fanout stems, the set of test vectors produced by the APTG may not detect stuck-at faults on all fanout branches and, as a result of Theorem 1.2, may not detect all stuck-at faults in the circuit. Note that the four SA1 faults in Figure 1.11a not detected by the test vectors in Figure 1.11b are located on the additional fanout branches in Figure 1.11a. Therefore, if the ATPG is based on the functional description, test vectors can be generated based on assumptions that may not necessarily hold once the gate-level implementation is synthesized. Regardless, it is desirable to move ATPG operations toward higher levels of abstraction while targeting new types of faults in deep submicron devices. Because the main advantages of high-level approaches are compact test sets and reduced computation time, it is expected that this trend will continue. 1.4.2 Gate Level For decades, traditional IC test generation has been at the gate level based on the gate-level netlist. The stuck-at fault model can easily be applied for which many ATPG and fault simulation tools are commercially available. Very often the stuckat fault model is also employed to evaluate the effectiveness of the input stimuli 24 VLSI Test Principles and Architectures used for simulation-based design verification. As a result, the design verification stimuli are often also used for fault detection during manufacturing testing. In addition to the stuck-at fault model, delay fault models and delay testing have been traditionally based on the gate-level description. While bridging faults can be modeled at the gate level, practical selection of potential bridging fault sites requires physical design information. The gate-level description has advantages of functionality and tractability because it lies between the RTL and physical levels; however, it is now widely believed that test development at the gate level is not sufficient for deep submicron designs. 1.4.3 Switch Level For standard cell-based VLSI implementations, transistor fault models (stuck-open and stuck-short) can be applied and evaluated based on the gate-level netlist. When the switch-level model for each gate in the netlist is substituted, we obtain an accurate abstraction of the netlist used for physical layout. In addition, transmission gate and tristate buffer faults can also be tested at the switch level. For example, it may be necessary to place buffers in parallel for improved drive capabilities. In most gate-level models, these buffers will appear as a single buffer, but it is possible to model a fault on any of the multiple buffers at the switch level. Furthermore, a defect-based test methodology can be more effective with a switch-level model of the circuit as it contains more detailed structural information than a gate-level abstraction and will yield a more accurate defect coverage analysis. Of course, the switch-level description is more complicated than the gate-level description for both ATPG and fault simulation. 1.4.4 Physical Level The physical level of abstraction is the most important for VLSI testing because it provides the actual layout and routing information for the fabricated device and, hence, the most accurate information for delay faults, crosstalk effects, and bridging faults. For deep submicron IC chips, in order to characterize electrical properties of interconnections, a distributed resistance–inductance–capacitance (RLC) model is based on the physical layout. This is then used to analyze and test for potential crosstalk problems. Furthermore, interconnect delays can be incorporated for more accurate delay fault analysis. One solution to the problem of determining likely bridging fault sites is to extract the capacitance between the wires from the physical design after layout and routing [Maxwell 1994]. This provides an accurate determination of those wires that are adjacent and, therefore, likely to sustain bridging faults. In addition, the value of the capacitance between two adjacent wires is proportional to the distance between the wires and/or the length of adjacency. As a result, fault sites with the highest capacitance value can be targeted for test generation and evaluation as these sites have a higher probability of incurring bridging faults. Introduction 25 1.5 HISTORICAL REVIEW OF VLSI TEST TECHNOLOGY VLSI testing includes two processes: test generation and test application. The goal of test generation is to produce test patterns for efficient testing. Test application is the process of applying those test patterns to the CUT and analyzing the output responses. Test application is performed by either automatic test equipment (ATE) or test facilities in the chip itself. This section gives a brief historical review of VLSI test technology development. 1.5.1 Automatic Test Equipment Automatic test equipment (ATE) is computer-controlled equipment used in the production testing of ICs (both at the wafer level and in packaged devices) and PCBs. Test patterns are applied to the CUT and the output responses are compared to stored responses for the fault-free circuit. In the 1960s, when ICs were first introduced, it was foreseen that testing would become a bottleneck to high-volume production of ICs unless the tasks normally performed by technicians and laboratory instruments could be automated. An IC tester controlled by a minicomputer was developed in the mid-1960s, and the ATE industry was established. Since then, with advances in VLSI and computer technology, the ATE industry has developed electronic subassemblies (PCBs and backplanes), test systems, digital IC testers, analog testers, and SOC testers. A custom tester is often developed for testing a particular product, but a general-purpose ATE is often more flexible and enhances the productivity of high-volume manufacturing. Generally, ATE consists of the following parts: 1. Computer—A powerful computer is the heart of any ATE for central control and for making the test and measurement flexible for different products and different test purposes. 2. Pin electronics and fixtures—ATE architectures can be divided into two major subcomponents, the data generator and the pin electronics. The data generator supplies the input test vectors for the CUT, while the pin electronics are responsible for formatting these vectors to produce waveforms of the desired shape and timing. The pin electronics are also responsible for sampling the CUT output responses at the desired time. In order to actually touch the pads of an IC on a wafer or the pins of a packaged chip during testing, it is necessary to have a fixture with probes for each pin of the IC under test. Current VLSI devices may have over 1000 pins and require a tester with as many as 1024 pin channels. As a result, the pin electronics and fixtures constitute the most expensive part of the ATE. 3. Test program—In conjunction with the pin electronics, ATE contains waveform generators that are designed to change logic values at the setup and hold times associated with a given input pin. A test pattern containing logic 1’s and 0’s must be translated to these various timing formats. Also, ATE captures primary output responses, which are then translated to output vectors 26 VLSI Test Principles and Architectures for comparison with the fault-free responses. These translations and some environment settings are controlled by the central computer; therefore, a test program, usually written in a high-level language, becomes an important ingredient for controlling these translations and environment settings. Algorithmically generated test patterns may consist of subroutines, pattern and test routine calls, or sequenced events. The test program also specifies the timing format in terms of the tester edge set. An edge set is a data format with timing information for applying new data to a chip input pin and includes the input setup time, hold time, and the waveform type. 4. Digital signal processor (DSP)—Powerful 32-bit DSP techniques have been widely applied to analog testing for capturing analog characteristics at high frequencies. Digital signals are converted to analog signals and applied to the analog circuit inputs, while the analog output signals are converted to digital signals for response analysis by the DSP. 5. Accurate DC and AC measurement circuitry—ATE precision is a performance metric specifying the smallest measurement that the tester can resolve in a very low noise environment, especially for analog and mixed-signal testing. For example, a clock jitter (phase noise) of no more than 10 ps is required to properly test ICs that realize more than 100 Mb/s data rates. This requirement is even higher for today’s high-performance ICs. The application of vectors to a circuit with the intent of verifying the timing compliance depends on the operational frequency of the ATE (e g , 200 MHz, 500 MHz, or 1 GHz). Ideally, the ATE operational frequency should be much higher than that of the ICs under test. Unfortunately, this is a difficult problem because the ATE itself is also constructed from ICs and limited by their maximum operating frequency. Automatic test equipment can be very expensive. To satisfy the needs of advanced VLSI testing, the following features form the basis for keeping ATE costs under control: 1. Modularization—Modular systems give users the flexibility to purchase and use only those options that are suitable for the products under test. 2. Configurability—Test system configurability is essential for many test platforms. As testing needs change, users can reconfigure the test resources for particular products and continue to use the same basic framework. 3. Parallel test capabilities—Testing multiple devices in parallel improves the throughput and productivity of the ATE. Higher throughput means lower overall test cost. 4. Third-party components—The use of third-party hardware and software permits adopting the best available equipment and approaches, thus giving rise to competition that lowers test cost over time. Introduction 27 From a test economics point of view, there has been a systematic decrease in the capital cost of manufacturing a transistor over the past several decades as we continue to deliver more complex devices; however, testing capital costs per transistor have remained relatively constant. As a result, test costs are becoming an increasing portion of the overall industry capital requirement per transistor, to the extent that currently it costs almost as much to test as to manufacture a transistor. From a test technology point of view on the other hand, ATE in the early 1980s had resolution capabilities well in excess of the component requirements. In 1985, for example, when testing a then fast 8-MHz 286 microprocessor, a 1-ns accuracy in the control of input signal transitions, referred to as edge placement, was available in ATE with very low yield loss due to tester tolerances. Later, for testing 700-MHz Pentium III microprocessors, only a 100-ps edge placement accuracy was available in ATE; thus, the hundredfold increase in CUT speed was accompanied by only a tenfold increase in the tester accuracy [Gelsinger 2000]. 1.5.2 Automatic Test Pattern Generation In the early 1960s, structural testing was introduced and the stuck-at fault model was employed. A complete ATPG algorithm, called the D-algorithm, was first published [Roth 1966]. The D-algorithm uses a logical value to represent both the “good” and the “faulty” circuit values simultaneously and can generate a test for any stuck-at fault, as long as a test for that fault exists. Although the computational complexity of the D-algorithm is high, its theoretical significance is widely recognized. The next landmark effort in ATPG was the PODEM algorithm [Goel 1981], which searches the circuit primary input space based on simulation to enhance computation efficiency. Since then, ATPG algorithms have become an important topic for research and development, many improvements have been proposed, and many commercial ATPG tools have appeared. For example, FAN [Fujiwara 1983] and SOCRATES [Schulz 1988] were remarkable contributions to accelerating the ATPG process. Underlying many current ATPG tools, a common approach is to start from a random set of test patterns. Fault simulation then determines how many of the potential faults are detected. With the fault simulation results used as guidance, additional vectors are generated for hard-to-detect faults to obtain the desired or reasonable fault coverage. The International Symposium on Circuits and Systems (ISCAS) announced combinational logic benchmark circuits in 1985 [Brglez 1985] and sequential logic benchmark circuits in 1989 [Brglez 1989] to assist in ATPG research and development in the international test community. A major problem in large combinational logic circuits with thousands of gates was the identification of undetectable faults. In the 1990s, very fast ATPG systems were developed using advanced high-performance computers which provided a speed-up of five orders of magnitude from the D-algorithm with 100% fault detection efficiency. As a result, ATPG for combinational logic is no longer a problem; however, ATPG for sequential logic is still difficult because, in order to propagate the effect of a fault to a primary output so it can be observed and detected, a state sequence must be traversed with the fault undertaken. For large sequential circuits, it is difficult to reach 100% fault 28 VLSI Test Principles and Architectures coverage in reasonable computational time and cost unless DFT techniques are adopted [Breuer 1987]. 1.5.3 Fault Simulation A fault simulator emulates the target faults in a circuit in order to determine which faults are detected by a given set of test vectors. Because there are many faults to emulate for fault detection analysis, fault simulation time is much greater than that required for design verification. To accelerate the fault simulation process, improved approaches have been developed in the following order. Parallel fault simulation uses bit-parallelism of logical operations in a digital computer. Thus, for a 32-bit machine, 31 faults are simulated simultaneously. Deductive fault simulation deduces all signal values in each faulty circuit from the fault-free circuit values and the circuit structure in a single pass of true-value simulation augmented with the deductive procedure. Concurrent fault simulation is essentially an eventdriven simulation to emulate faults in a circuit in the most efficient way. Hardware fault simulation accelerators based on parallel processing are also available to provide a substantial speed-up over purely software-based fault simulators. For analog and mixed-signal circuits, fault simulation is traditionally performed at the transistor level using circuit simulators such as HSPICE. Unfortunately, analog fault simulation is a very time-consuming task and, even for rather simple circuits, a comprehensive fault simulation is normally not feasible. This problem is further complicated by the fact that acceptable component variations must be simulated along with the faults to be emulated, which requires many Monte Carlo simulations to determine whether the fault will be detected. Macro models of circuit components are used to decrease the long computation time. Fault simulation approaches using high-level simulators can simulate analog circuit characteristics based on differential equations but are usually avoided due to lack of adequate fault models. 1.5.4 Digital Circuit Testing The development of digital circuit testing began with the introduction of the stuckat fault model which was followed by the first bridging fault model, the transistor fault model, and finally by delay fault models. Digital testing now typically uses a combination of tests developed for different fault models because tests for any given fault model cannot assure the detection of all defects. For example, current testing practices by some manufacturers include stuck-at fault tests with 99% fault coverage in conjunction with path-delay fault tests with greater than 90% fault coverage. Digital testing is also improved by monitoring the quiescent power supply current (IDDQ). Normally, the leakage current of CMOS circuits under a quiescent state is very small and negligible. When a fault occurs, such as a transistor stuckshort or a bridging fault, and causes a conducting path from power to ground, it may draw an excessive supply current. IDDQ testing became an accepted test method for the IC industry in the 1980s; however, normal fault-free IDDQ has become quite Introduction 29 large for current, complex VLSI devices due to the collective leakage currents of millions of transistors on a chip. This makes the detection of the additional IDDQ current due to a single faulty transistor or bridging fault difficult; hence, IDDQ testing is becoming ineffective. A similar approach is transient power supply current (IDDT) testing. When a CMOS circuit switches states, a momentary path is established between the sup- ply lines VDD and VSS that results in a dynamic current IDDT. The IDDT waveform exhibits a spike every time the circuit switches with the magnitude and frequency components of the waveform dependent on the switching activity; therefore, it is possible to differentiate between fault-free and faulty circuits by observing either the magnitude or the frequency spectrum of IDDT waveforms. Monitoring the IDDT of a CMOS circuit may also provide additional diagnostic information about pos- sible defects unmatched by IDDQ and other test techniques [Min 1998]; however, IDDT testing suffers many of the same problems as IDDQ testing as the number of transistors in VLSI devices continues to grow. 1.5.5 Analog and Mixed-Signal Circuit Testing Analog circuits are used in various applications, such as telecommunications, multimedia, and man–machine interfaces. Mixed-signal circuits include analog circuitry (e g , amplifiers, filters) and digital circuitry (e g , data paths, control logic), as well as digital-to-analog converters (DACs) and analog-to-digital converters (ADCs). Due to the different types of circuitry involved, several different schemes to test a mixed-signal chip are usually required. Test methods for analog circuitry and converters have not achieved maturity comparable to that for digital circuitry. Traditionally, the analog circuitry is tested by explicit functional testing to directly measure performance parameters, such as linearity, frequency response (phase and gain), or signal-to-noise ratio. The measured parameters are compared against the design specification tolerance ranges to determine if the device is faulty or operational within the specified limits. Long test application times and complicated test equipment are often required, making functional testing very expensive. Recently, defect-oriented test approaches based on fault models, similar to those used in digital testing (such as shorts and opens), have been investigated for reducing the cost for functional testing of the analog components and converters [Stroud 2002]. 1.5.6 Design for Testability Test engineers usually have to construct test vectors after the design is completed. This invariably requires a substantial amount of time and effort that could be avoided if testing is considered early in the design flow to make the design more testable. As a result, integration of design and test, referred to as design for testability (DFT), was proposed in the 1970s. To structurally test circuits, we need to control and observe logic values of internal lines. Unfortunately, some nodes in sequential circuits can be very difficult to control and observe; for example, activity on the most significant bit of an nbit counter can only be observed after 2n−1 clock cycles. Testability measures of 30 VLSI Test Principles and Architectures controllability and observability were first defined in the 1970s [Goldstein 1979] to help find those parts of a digital circuit that will be most difficult to test and to assist in test pattern generation for fault detection. Many DFT techniques have been proposed since that time [McCluskey 1986]. DFT techniques generally fall into one of the following three categories: (1) ad hoc DFT techniques, (2) level-sensitive scan design (LSSD) or scan design, or (3) built-in self-test (BIST). Ad hoc methods were the first DFT techniques introduced in the 1970s. The goal was to target only those portions of the circuit that would be difficult to test and to add circuitry to improve the controllability or observability. Ad hoc techniques typically use test point insertion to access internal nodes directly. An example of a test point is a multiplexer inserted to control or observe an internal node, as illustrated in Figure 1.12. Level-sensitive scan design, also referred to as scan design, was the next, and most important, DFT technique proposed [Eichelberger 1977]. LSSD is latch based. In a flip-flop-based scan design, testability is improved by adding extra logic to each flip-flop in the circuit to form a shift register, or scan chain, as illustrated in Figure 1.13. During the scan mode, the scan chain is used to shift in (or scan in) a Normal system data 0 Test data input 1 Test mode select Internal node to be controlled (a) controllability test point FIGURE 1.12 Ad hoc DFT test points using multiplexers. Normal system data 0 Internal node to be observed 1 Test mode select Primary output (b) observability test point Primary Inputs Primary Combinational Outputs Logic FFs Di Qi FF Clk FIGURE 1.13 Transforming a sequential circuit for scan design. Primary Inputs Combinational Logic Primary Outputs Scan FFs Scan Data In Data Out Di 0 Qi 1 FF Qi –1 Scan Clk Mode Introduction 31 test vector to be applied to the combinational logic. During one clock cycle in the system mode of operation, the test vector is applied to the combinational logic and the output responses are clocked into the flip-flops. The scan chain is then used in the scan mode to shift out (or scan out) the combinational logic output response to the test vector while shifting in the next test vector to be applied. As a result, LSSD reduces the problem of testing sequential logic to that of testing combinational logic and thereby facilitates the use of ATPG developed for combinational logic. Built-in self-test was proposed around 1980 [Bardell 1982] [Stroud 2002] to integrate a test-pattern generator (TPG) and an output response analyzer (ORA) in the VLSI device to perform testing internal to the IC, as illustrated in Figure 1.14. Because the test circuitry resides with the CUT, BIST can be used at all levels of testing, from wafer through system-level testing. 1.5.7 Board Testing Like the VLSI fabrication process, PCB manufacturing is a capital-intensive process with minimum human intervention. Once a high-volume batch has been started, the process is totally unmanned. Potential problems that could cause a line stoppage or poor yield are monitored throughout the process. In the 1970s and 1980s, PCBs were tested by probing the backs of the boards with probes (also called nails) in a bed-of-nails tester. The probes are positioned to contact various solder points on the PCB in order to force signal values at the component pins and monitor the output responses. Generally, a PCB tester is capable of performing both analog and digital functional tests and is usually designed to be modular and flexible enough to integrate different external instruments. Two steps were traditionally taken before testing an assembled PCB. First, the bare board was tested for all interconnections using a PCB tester, primarily targeting shorts and opens. Next, the components to be assembled on the PCB were tested. After assembly, the PCB was tested by using a PCB tester. In the modern automated PCB production process, solder paste inspection, automated optical and x-ray inspections, and in-circuit (bed-of-nails) testing are used for quality control. With the advent of surface-mount devices on PCBs in the mid-1980s, problems arose for PCB in-circuit testing, as the pins of the package did not go through the board to guarantee contact sites on the bottom of the PCB. These problems were overcome with the introduction of boundary scan. Primary Inputs 0 TPG 1 BIST Mode FIGURE 1.14 Basic BIST architecture. Circuit Under Test Primary Outputs Pass ORA Fail 32 VLSI Test Principles and Architectures 1.5.8 Boundary Scan Testing In the mid-1980s, the Joint Test Action Group (JTAG) proposed a boundary scan standard, approved in 1990 as IEEE Standard 1149.1 [IEEE 1149.1-2001]. Boundary scan, based on the basic idea of scan design, inserted logic to provide a scan path through all I/O buffers of ICs to assist in testing the assembled PCB. A typical boundary scan cell is illustrated in Figure 1.15 with regard to its application to a bidirectional I/O buffer. The scan chain provides the ability to shift in test vectors to be applied through the pad to the pins and interconnections on the PCB. The output responses are captured at the input buffers on other devices on the PCB and subsequently shifted out for fault detection. Thus, boundary scan provides access to the various signal nodes on a PCB without the need for physical probes. The test access port (TAP) provides access to the boundary scan chain through a four-wire serial bus interface (summarized in Table 1.5) in conjunction with instructions transmitted over the interface. In addition to testing the interconnections on the PCB, the boundary scan interface also provides access to DFT features, such as LSSD or BIST, designed and implemented in the VLSI devices for board and system-level testing. The boundary scan description language (BSDL) provides a mechanism with which IC manufacturers can describe testability features in Scan Out Control BS Cell Input Output BS Cell 0 Output 0 capture update 1 Scan In 1 FF FF Pad Shift Capture Update Input data Input to IC BS Cell FIGURE 1.15 Basic boundary scan cell applied to a bidirectional buffer. TABLE 1.5 Boundary Scan Four-Wire Interface BS pin I/O Function TCK Input Test clock TMS Input Test mode select TDI Input Test data in TDO Output Test data out Introduction 33 a chip [Parker 2001]. In 1999, another boundary scan standard, IEEE 1149.4, was adopted for mixed-signal systems; it defines boundary scan cells as well as a TAP for the analog portion of the device [IEEE 1149.4-1999] [Mourad 2000]. In 2003, an extended boundary scan standard for the I/O protocol of high-speed networks, namely 1149.6, was approved [IEEE 1149.6-2003]. System-on-chip implementations face test challenges in addition to those of normal VLSI devices. SOCs incorporate embedded cores that may be difficult to access during testing. The IEEE P1500 working group was approved in 1997 to develop a scalable wrapper architecture and access mechanism similar to boundary scan for enabling test access to embedded cores and the associated interconnect between embedded cores. This proposed P1500 test method, approved as an IEEE 1500 standard in 2005 [IEEE 1500-2005], is independent of the underlying functionality of the SOC or its individual embedded cores and creates the necessary testability requirements for detection and diagnosis of faults for debug and yield enhancement. 1.6 CONCLUDING REMARKS This chapter provides an overview of VLSI testing as an area of both theoretical and great practical significance. The importance and challenges of VLSI testing at different abstraction levels were discussed along with a brief historical review of test technology development. New and continuing testing challenges, along with the critical mind of the test community, drive creative advances in test technology and motivate further developments for nanometer technology. Why do we need VLSI testing? How difficult is VLSI testing? What are the fundamental concepts and techniques for VLSI testing? Although many of these issues were briefly reviewed in this chapter, a more detailed discussion of these questions can be found in the following chapters of this book. 1.7 EXERCISES 1.1 (Stuck-At Fault Models) Consider the combinational logic circuit in Figure 1.16. How many possible single stuck-at faults does this circuit have? How many possible multiple stuck-at faults does this circuit have? How many collapsed single stuck-at faults does this circuit have? a b c z FIGURE 1.16 Circuit for Problem 1.1. 34 VLSI Test Principles and Architectures FIGURE 1.17 Circuit for Problem 1.4. x2 x3 x1 xn parity 1.2 (Bridging Fault Models) Show an example where a combinational logic circuit will become a sequential circuit in the presence of a bridging fault. 1.3 (Automatic Test-Pattern Generation) Generate a minimum set of test vectors to completely test an n-input NAND gate under the single stuck-at fault model. How many test vectors are needed? 1.4 (Automatic Test-Pattern Generation) Generate a minimum set of test vectors to detect all single stuck-at faults for a cascade of (n − 1) exclusiveOR gates for an n-bit parity checker, as shown in Figure 1.17, where each exclusive-OR gate is implemented by elementary logic gates (AND, OR, NAND, NOR, NOT). How many test vectors are needed? 1.5 (Mean Time between Failures) The number of failures in 109 hours is a unit (abbreviated FITS) that is often used in reliability calculations. Calculate the MTBF for a system with 500 components where each component has a failure rate of 1000 FITS. 1.6 (Mean Time to Repair) On average, how long would it take to repair a system each year if the availability of the system is 99.999%? 1.7 (Defect Level) What percentage of all parts shipped will be defective if the yield is 50% and the fault coverage is 90% for the set of test vectors used to test the parts? Acknowledgments The authors wish to acknowledge the following people for their assistance during the preparation of this chapter: Dr. Huawei Li of the Institute of Computing Technology at the Chinese Academy of Sciences, Sachin Dhingra and Sudheer Vemula of the Department of Electrical and Computer Engineering at Auburn University, and Prof. Wen-Ben Jone of the Department of Electrical & Computer Engineering and Computer Science at the University of Cincinnati. References R1.0—Books [Abramovici 1994] M. Abramovici, M. A. Breuer, and A. D. Friedman, Digital Systems Testing and Testable Design, IEEE Press, Piscataway, NJ, 1994 (revised printing). Introduction 35 [Breuer 1987] M. A. Breuer and A. D. Friedman, Diagnosis and Reliable Design of Digital Systems, Computer Science Press, 1987 (revised printing). [Bushnell 2000] M. L. Bushnell and V. D. Agrawal, Essentials of Electronic Testing for Digital, Memory and Mixed-Signal VLSI Circuits, Springer Science, New York, 2000. [Jha 2003] N. K. Jha and S. K. Gupta, Testing of Digital Systems, Cambridge University Press, Cambridge, U.K., 2003. [McCluskey 1986] E. J. McCluskey, Logic Design Principles with Emphasis on Testable Semicustom Circuits, Prentice Hall, Englewood Cliffs, NJ, 1986. [Min 1986] Y. Min, Logical Circuit Testing (in Chinese), China Railway Publishing House, Beijing, China, 1986. [Mourad 2000] S. Mourad and Y. Zorian, Principles of Testing Electronic Systems, John Wiley & Sons, Somerset, NJ, 2000. [Parker 2001] K. P. Parker, The Boundary-Scan Handbook, Kluwer Academic, Norwell, MA, 2001. [Stroud 2002] C. E. Stroud, A Designer’s Guide to Built-In Self-Test, Kluwer Academic, Norwell, MA, 2002. [van de Goor 1991] A. J. van de Goor, Testing Semiconductor Memories: Theory and Practice, John Wiley & Sons, Chichester, U.K. 1991. R1.1—Importance of Testing [Arthistory 2005] Art History Club (http://www.arthistoryclub.com/art_history/Integrated_circuit #VLSI). [Moore 1965] G. Moore, Cramming more components onto integrated circuits, Electronics, 38(8), 114–117, 1965. R1.3—Challenges in VLSI Testing [Geppert 1998] L. Geppert, Technology 1998 analysis and forecast: Solid state, IEEE Spectr., 35(1), 23–28, 1998. [Ma 1995] S. C. Ma, P. Franco, and E. J. McCluskey, An experimental chip to evaluate test techniques: Experimental results, in Proc. Int. Test Conf., October 1995, pp. 663–672. [Stroud 2000] C. Stroud, J. Emmert, and J. Bailey, A new bridging fault model for more accurate fault behavior, in Pro. Automat. Test Conf. (AUTOTESTCON), September 2000, pp. 481–485. [Williams 1981] T. Williams and N. Brown, Defect level as a function of fault coverage, IEEE Trans. Comput., C-30(12), 987–988, 1981. R1.4—Levels of Abstraction in VLSI Testing [Maxwell 1994] P. Maxwell, R. Aitken, and L. Huismann, The effect on quality of non-uniform fault coverage and fault probability, in Proc. Int. Test Conf., October 1994, pp. 739–746. [Min 2002] Y. Min, Why RTL ATPG?, J. Comput. Sci. Technol., 17(2), 113–117, 2002. R1.5—Historical Review of VLSI Test Technology [Bardell 1982] P. H. Bardell and W. H. McAnney, Self-testing of multiple logic modules, in Proc. Int. Test Conf., October 1982, pp. 200–204. 36 VLSI Test Principles and Architectures [Brglez 1985] F. Brglez and H. Fujiwara, A neutral netlist of 10 combinational benchmark designs and a special translator in Fortran, in Proc. Int. Symp. on Circuits and Systems, June 1985, pp. 663–698. [Brglez 1989] F. Brglez, D. Bryan, and K. Kozminski, Combinational profiles of sequential benchmark circuits, in Proc. Int. Symp. on Circuits and Systems, May 1989, pp. 1929–1934. [Eichelberger 1977] E. B. Eichelberger and T. W. Williams, A logic design structure for LSI testability, in Proc. Des. Automat. Conf., June 1977, pp. 462–468. [Fujiwara 1983] H. Fujiwara and T. Shimono, On the acceleration of test generation algorithms, IEEE Trans. Comput., C-32(12), 1137–1144, 1983. [Gelsinger 2000] P. Gelsinger, Discontinuities driven by a billion connected machines, IEEE Design Test Comput., 17(1), 7–15, 2000. [Goel 1981] P. Goel, An implicit enumeration algorithm to generate tests for combinational logic circuits, IEEE Trans. Comput., C-30(3), 215–222, 1981. [Goldstein 1979] L. H. Goldstein, Controllability/observability analysis of digital circuits, IEEE Trans. Circuits Syst., CAS-26(9), 685–693, 1979. [IEEE 1149.4-1999] IEEE Std. 1149.4-1999, IEEE Standard for a Mixed Signal Test Bus, Institute of Electrical and Electronics Engineers, New York, 1999. [IEEE 1149.1-2001] IEEE Std. 1149.1-2001, IEEE Standard Test Access Port and Boundary Scan Architecture, Institute of Electrical and Electronics Engineers, New York, 2001. [IEEE 1149.6-2003] IEEE Std. 1149.6-2003, IEEE Standard for Boundary-Scan Testing of Advance Digital Networks, Institute of Electrical and Electronics Engineers, New York, 2003. [IEEE 1500-2005] IEEE Std. 1500-2005, IEEE Standard Testability Method for Embedded Core-Based Integrated Circuits, Institute of Electrical and Electronics Engineers, New York, 2005. [Min 1998] Y. Min and Z. Li, IDDT testing versus IDDQ testing, J. Electron. Testing: Theory Appl., 13(1), 15–55, 1998. [Roth 1966] J. Roth, Diagnosis of automata failures: A calculus and a method, IBM J. Res. Develop., 10(4), 278–291, 1966. [Schulz 1988] M. H. Schulz, E. Trischler, and T. M. Serfert, SOCRATES: A highly efficient automatic test pattern generation system, IEEE Trans. Computer-Aided Design, CAD-7(1), 126–137, 1988. CHAPTER 2 DESIGN FOR TESTABILITY Laung-Terng (L.-T.) Wang SynTest Technologies, Inc., Sunnyvale, California Xiaoqing Wen Kyushu Institute of Technology, Fukuoka, Japan Khader S. Abdel-Hafez SynTest Technologies, Inc., Sunnyvale, California ABOUT THIS CHAPTER This chapter discusses design for testability (DFT) techniques for testing modern digital circuits. These DFT techniques are required in order to improve the quality and reduce the test cost of the digital circuit, while at the same time simplifying the test, debug and diagnose tasks. The purpose of this chapter is to provide readers with the knowledge to judge whether a design is implemented in a test-friendly manner and to recommend changes in order to improve the testability of the design for achieving the above-mentioned goals. More specifically, this chapter will allow readers to be able to identify and fix scan design rule violations and understand the basics for successfully converting a design into a scan design. In this chapter, we first cover the basic DFT concepts and methods for performing testability analysis. Next, following a brief yet comprehensive summary of ad hoc DFT techniques, scan design, the most widely used structured DFT methodology, is discussed, including popular scan cell designs, scan architectures, scan design rules, scan design flow, and special-purpose scan designs. Finally, advanced DFT techniques for use at the register-transfer level (RTL) are presented in order to further reduce DFT design iterations and test development time. 2.1 INTRODUCTION During the early stages of integrated circuit (IC) production history, design and test were regarded as separate functions, performed by separate and unrelated groups of engineers. During these early years, a design engineer’s job was to implement the required functionality based on design specifications, without giving any thought 38 VLSI Test Principles and Architectures to how the manufactured device was to be tested. Once the functionality was implemented, the design information was transferred to test engineers. A test engineer’s job was to determine how to efficiently test each manufactured device within a reasonable amount of time, in order to screen out the parts that may contain manufacturing defects and ship all defect-free devices to customers. The final quality of the test was determined by keeping track of the number of defective parts shipped to the customers, based on customer returns. This product quality, measured in terms of defective parts per million (PPM) shipped, was a final test score for quantifying the effectiveness of the developed test. While this approach worked well for small-scale integrated circuits that mainly consisted of combinational logic or simple finite-state machines, it was unable to keep up with the circuit complexity as designs moved from small-scale integration (SSI) to very-large-scale integration (VLSI). A common approach to test these VLSI devices during the 1980s relied heavily on fault simulation to measure the fault coverage of the supplied functional patterns. Functional patterns were developed to navigate through the long sequential depths of a design, with the goal of exercising all internal states and detecting all possible manufacturing defects. A fault simulation or fault grading tool was used to quantify the effectiveness of the functional patterns. If the supplied functional patterns did not reach the target fault coverage goal, additional functional patterns were further added. Unfortunately, this approach typically failed to improve the circuit’s fault coverage beyond 80%, and the quality of the shipped products suffered. Gradually, it became clear that designing devices without paying much attention to test resulted in increased test cost and decreased test quality. Some designs that were otherwise best in class with regard to functionality and performance failed commercially due to prohibitively high test cost or poor product quality. These problems have since led to the development and deployment of DFT engineering in the industry. The first challenge facing DFT engineers was to find simpler ways of exercising all internal states of a design and reaching the target fault coverage goal. Various testability measures and ad hoc testability enhancement methods were proposed and used in the 1970s and 1980s to serve this purpose. These methods were mainly used to aid in the circuit’s testability or to increase the circuit’s controllability and observability [McCluskey 1986] [Abramovici 1994]. While attempts to use these methods have substantially improved the testability of a design and eased sequential automatic test pattern generation (ATPG), their end results at reaching the target fault coverage goal were far from being satisfactory; it was still quite difficult to reach more than 90% fault coverage for large designs. This was mostly due to the fact that, even with these testability aids, deriving functional patterns by hand or generating test patterns for a sequential circuit is a much more difficult problem than generating test patterns for a combinational circuit [Fujiwara 1982] [Bushnell 2000] [Jha 2002]. For combinational circuits, many innovative ATPG algorithms have been developed for automatically generating test patterns within a reasonable amount of time. Automatically generating test patterns for sequential circuits met with limited success, due to the existence of numerous internal states that are difficult to set Design for Testability 39 and check from external pins. Difficulties in controlling and observing the internal states of sequential circuits led to the adoption of structured DFT approaches in which direct external access is provided for storage elements. These reconfigured storage elements with direct external access are commonly referred to as scan cells. Once the capability of controlling and observing the internal states of a design is added, the problem of testing the sequential circuit is transformed into a problem of testing the combinational logic, for which many solutions already existed. Scan design is currently the most popular structured DFT approach. It is implemented by connecting selected storage elements of a design into multiple shift registers, called scan chains, to provide them with external access. Scan design accomplishes this task by replacing all selected storage elements with scan cells, each having one additional scan input (SI) port and one shared/additional scan output (SO) port. By connecting the SO port of one scan cell to the SI port of the next scan cell, one or more scan chains are created. Since the 1970s, numerous scan cell designs and scan architectures have been proposed [Fujiwara 1985] [McCluskey 1986]. A design where all storage elements are selected for scan insertion is called a full-scan design. A design where almost all (e g , more than 98%) storage elements are selected is called an almost fullscan design. A design where some storage elements are selected and sequential ATPG is applied is called a partial-scan design. A partial-scan design where storage elements are selected in such a way as to break all sequential feedback loops [Cheng 1990] and to which combinational ATPG can be applied is further classified as a pipelined, feed-forward, or balanced partial-scan design. As silicon prices have continued to drop since the mid-1990s with the advent of deep submicron technology, the dominant scan architecture has shifted from partial-scan design to full-scan design. In order for a scan design to achieve the desired PPM goal, specific circuit structures and design practices that can affect fault coverage must be identified and fixed. This requires compiling a set of scan design rules that must be adhered to. Hence, a new role of DFT engineer emerged, with responsibilities including identifying and fixing scan design rule violations in the design, inserting or synthesizing scan chains into the design, generating test patterns for the scan design, and, finally, converting the test patterns to test programs for test engineers to perform manufacturing testing on automatic test equipment (ATE). Since then, most of these DFT tasks have been automated. In addition to being the dominant DFT architecture used for detecting manufacturing defects, scan design has become the basis of more advanced DFT techniques, such as logic built-in self-test (BIST) [Nadeau-Dostie 2000] [Stroud 2002] and test compression. Furthermore, as designs continue to move towards the nanometer scale, scan design is being utilized as a design feature, with uses varying from debug, diagnosis, and failure analysis to special applications, such as reliability enhancement against soft errors [Mitra 2005]. A few of these special-purpose scan designs are included in this chapter for completeness. Recently, design for testability has started to migrate from the gate level to the register-transfer level (RTL). The motivation for this migration is to allow additional DFT features, such as logic BIST and test compression, to be integrated 40 VLSI Test Principles and Architectures at the RTL, thereby reducing test development time and creating reusable and testable RTL cores. This further allows the integrated DFT design to go through synthesis-based optimization to reduce performance and area overhead. 2.2 TESTABILITY ANALYSIS Testability is a relative measure of the effort or cost of testing a logic circuit. In general, it is based on the assumption that only primary inputs and primary outputs can be directly controlled and observed, respectively. Testability reflects the effort required to perform the main test operations of controlling internal signals from primary inputs and observing internal signals at primary outputs. Testability analysis refers to the process of assessing the testability of a logic circuit by calculating a set of numerical measures for each signal in the circuit. One important application of testability analysis is to assist in the decisionmaking process during test generation. For example, if during test generation it is determined that the output of a certain AND gate must be set to 0, testability analysis can help decide which AND gate input is the easiest to set to 0. Another application is to identify areas of poor testability to guide testability enhancement, such as test point insertion, for improving the testability of the design. For this purpose, testability analysis is performed at various design stages so testability problems can be identified and fixed as early as possible. Since the 1970s, many testability analysis techniques have been proposed [Rutman 1972] [Stephenson 1976] [Breuer 1978] [Grason 1979]. The Sandia Controllability/Observability Analysis Program (SCOAP) [Goldstein 1979] [Goldstein 1980] was the first topology-based program that popularized testability analysis applications. Enhancements based on SCOAP have also been developed and used to aid in test point selection [Wang 1984] [Wang 1985]. These methods perform testability analysis by calculating the controllability and observability of each signal line, where controllability reflects the difficulty of setting a signal line to a required logic value from primary inputs and observability reflects the difficulty of propagating the logic value of the signal line to primary outputs. Traditionally, gate-level topological information of a circuit is used for testability analysis. Depending on the target application, deterministic or random testability measures are calculated. In general, topology-based testability analysis, such as SCOAP or probability-based testability analysis, is computationally efficient but can produce inaccurate results for circuits containing many reconvergent fanouts. Simulation-based testability analysis, on the other hand, can generate more accurate results by simulating the circuit behavior using deterministic, random, or pseudo-random test patterns but may require a long simulation time. In this section, we first describe the method for performing SCOAP testability analysis. Next, probability-based testability analysis and simulation-based testability analysis are discussed. Finally, because the capability to perform testability analysis at the RTL is becoming increasingly important, we discuss how RTL testability analysis is performed. Design for Testability 41 2.2.1 SCOAP Testability Analysis The SCOAP testability analysis program [Goldstein 1979] [Goldstein 1980] calculates six numerical values for each signal s in a logic circuit: CC0(s)—combinational 0-controllability of s CC1(s)—combinational 1-controllability of s CO(s)—combinational observability of s SC0(s)—sequential 0-controllability of s SC1(s)—sequential 1-controllability of s SO(s)—sequential observability of s Roughly speaking, the three combinational testability measures (CC0, CC1, and CO) are related to the number of signals that must be manipulated in order to control or observe s from primary inputs or at primary outputs, whereas the three sequential testability measures (SC0, SC1, and SO) are related to the number of clock cycles required to control or observe s from primary inputs or at primary outputs [Bushnell 2000]. The values of controllability measures range between 1 and infinite, while the values of observability measures range between 0 and infinite. As a boundary condition, the CC0 and CC1 values of a primary input are set to 1, the SC0 and SC1 values of a primary input are set to 0, and the CO and SO values of a primary output are set to 0. 2.2.1.1 Combinational Controllability and Observability Calculation The first step in SCOAP is to calculate the combinational controllability measures of all signals. This calculation is performed from primary inputs toward primary outputs in a breadth-first manner. More specifically, the circuit is levelized from primary inputs to primary outputs in order to assign a level order for each gate. The output controllability of each gate is then calculated in level order after the controllability measures of all of its inputs have been calculated. The rules for combinational controllability calculation are summarized in Table 2.1, where a 1 is added to each rule to indicate that a signal passes through one more level of logic gate. From this table, we can see that CC0(s) ≥1 and CC1(s) ≥1 for any signal s. A larger CC0(s) or CC1(s) value implies that it is more difficult to control s to 0 or 1 from primary inputs. Once the combinational controllability measures of all signals are calculated, the combinational observability of each signal can be calculated. This calculation is also performed in a breadth-first manner while moving from primary outputs toward primary inputs. The rules for combinational observability calculation are summarized in Table 2.2, where a 1 is added to each rule to indicate that a signal passes through one more level of logic gate. From this table, we can see that CO s ≥ 0 for any signal s. A larger CO s value implies that it is more difficult to observe s at any primary output. 42 VLSI Test Principles and Architectures TABLE 2.1 SCOAP Combinational Controllability Calculation Rules 0-Controllability (Primary Input, Output, Branch) 1-Controllability (Primary Input, Output, Branch) Primary Input 1 1 AND OR min {input 0-controllabilities} + 1 (input 0-controllabilities) + 1 (input 1-controllabilities} + 1 min {input 1-controllabilities} + 1 NOT Input 1-controllability + 1 Input 0-controllability + 1 NAND (input 1-controllabilities) + 1 min {input 0-controllabilities} + 1 NOR BUFFER min {input 1-controllabilities} + 1 Input 0-controllability + 1 (input 0-controllabilities) + 1 Input 1-controllability + 1 XOR XNOR min {CC1(a) + CC1(b), CC0(a) + CC0(b)} + 1 min CC1 a + CC0 b CC0 a + CC1 b + 1 min {CC1(a) + CC0(b), CC0(a) + CC1(b)} + 1 min CC1 a + CC1 b CC0 a + CC0 b + 1 Branch Stem 0-controllability Stem 1-controllability Note: a and b are inputs of an XOR or XNOR gate. TABLE 2.2 SCOAP Combinational Observability Calculation Rules Observability (Primary Output, Input, Stem) Primary Output 0 AND/NAND (output observability, 1-controllabilities of other inputs) + 1 OR/NOR (output observability, 0-controllabilities of other inputs) + 1 NOT/BUFFER Output observability + 1 XOR/XNOR a output observability min CC0 b CC1 b + 1 b output observability min CC0 a CC1 a + 1 Stem min {branch observabilities} Note: a and b are inputs of an XOR or XNOR gate. Figure 2.1 shows the combinational controllability and observability measures of a full-adder. The three-value tuple v1/v2/v3 on each signal line represents the signal’s 0-controllability (v1), 1-controllability (v2), and observability (v3). The boundary condition is set by initializing the CC0 and CC1 values of the primary inputs A, B, and Cin to 1 and the CO values of the primary outputs Sum and Cout to 0. By applying the rules given in Tables 2.1 and 2.2 and starting with the given boundary condition, one can first calculate all combinational controllability measures forward and then calculate all combinational observability measures backward in level order. Design for Testability 43 A 1/1/4 •1/1/4 B • 1/1/4 1/1/4 Cin 1/1/4 1/1/5 1/1/5 FIGURE 2.1 SCOAP full-adder example. 3/3/2 •3/3/2 1/1/4 3/3/5 • 1/1/7 2/3/3 2 /5/3 5/5/0 Sum 5/4/0 Cout 2.2.1.2 Sequential Controllability and Observability Calculation Sequential controllability and observability measures are calculated in a similar manner as combinational measures, except that a 1 is not added as we move from one level of logic gate to another; rather, a 1 is added when a signal passes through a storage element. The difference is illustrated using the sequential circuit example shown in Figure 2.2, which consists of an AND gate and a positive-edge-triggered D flip-flop. The D flip-flop includes an active-high asynchronous reset pin r. SCOAP measures of a D flip-flop with a synchronous, as opposed to asynchronous, reset are shown in [Bushnell 2000]. First, we calculate the combinational and sequential controllability measures of all signals. In order to control signal d to 0, either input a or b must be set to 0. In order to control d to 1, both inputs a and b must be set to 1. Hence, the combinational and sequential controllability measures of signal d are: CC0 d = min CC0 a CC0 b + 1 SC0 d = min SC0 a SC0 b CC1 d = CC1 a + CC1 b + 1 SC1 d = SC1 a + SC1 b a b FIGURE 2.2 SCOAP sequential circuit example. r Reset dD Q q CK 44 VLSI Test Principles and Architectures In order to control the data output q of the D flip-flop to 0, the data input d and the reset signal r can be set to 0 while applying a rising clock edge (a 0-to-1 transition) to the clock CK. Alternatively, this can be accomplished by setting r to 1 while holding CK at 0. Because a clock pulse is not applied to CK, a 1 is not added to the sequential controllability calculation in the second case; therefore, the combinational and sequential 0-controllability measures of q are: CC0 q = min CC0 d + CC0 CK + CC1 CK + CC0 r CC1 r + CC0 CK SC0 q = min SC0 d + SC0 CK + SC1 CK + SC0 r + 1 SC1 r + SC0 CK Here, CC0(q) measures how many signals in the circuit must be set to control q to 0, whereas SC0(q) measures how many flip-flops in the circuit must be clocked to set q to 0. The only way to control the data output q of the D flip-flop to 1 is to set the data input d to 1 and the reset signal r to 0 while applying a rising clock edge to the clock CK. Hence, CC1 q = CC1 d + CC0 CK + CC1 CK + CC0 r SC1 q = SC1 d + SC0 CK + SC1 CK + SC0 r + 1 Next, we calculate the combinational and sequential observability measures of all signals. The data input d can be observed at q by holding the reset signal r at 0 and applying a rising clock edge to CK. Hence, CO d = CO q + CC0 CK + CC1 CK + CC0 r SO d = SO q + SC0 CK + SC1 CK + SC0 r + 1 The asynchronous reset signal r can be observed by first setting q to 1 and then holding CK at the inactive state 0. Again, a 1 is not added to the sequential controllability calculation because a clock pulse is not applied to CK: CO r = CO q + CC1 q + CC0 CK SO r = SO q + SC1 q + SC0 CK There are two ways to indirectly observe the clock signal CK at q: (1) set q to 1, r to 0, and d to 0 and apply a rising clock edge at CK; or (2) set both q and r to 0, set d to 1, and apply a rising clock edge at CK. Hence, CO CK = CO q + CC0 CK + CC1 CK + CC0 r + min CC0 d + CC1 q CC1 d + CC0 q SO CK = SO q + SC0 CK + SC1 CK + SC0 r + min SC0 d + SC1 q SC1 d + SC0 q + 1 Design for Testability 45 To observe an input of the AND gate at d requires setting the other input to 1; therefore, the combinational and sequential observability measures for both inputs a and b are: CO a = CO d + CC1 b + 1 SO a = SO d + SC1 b CO b = CO d + CC1 a + 1 SO b = SO d + SC1 a It is important to note that controllability and observability measures calculated using SCOAP are heuristics and only approximate the actual testability of a logic circuit. When scan design is used, testability analysis can assume that all scan cells are directly controllable and observable. It was also shown in [Agrawal 1982] that SCOAP may overestimate testability measures for circuits containing many reconvergent fanouts; however, by being able to perform testability analysis in O(n) computational complexity for n signals in a circuit, SCOAP provides a quick estimate of the circuit’s testability that can be used to guide testability enhancement and test generation. 2.2.2 Probability-Based Testability Analysis Topology-based testability analysis techniques, such as SCOAP, have been found to be extremely helpful in test generation, which is the main topic of Chapter 4. These testability measures are able to analyze the deterministic testability of the logic circuit in advance. On the other hand, in logic built-in self-test (BIST), which is the main topic of Chapter 5, random or pseudo-random test patterns are generated without specifically performing deterministic test pattern generation on any signal line. In this case, topology-based testability measures using signal probability to analyze the random testability of the circuit can be used [Parker 1975] [Savir 1984] [Seth 1985] [Jain 1985]. These measures are often referred to as probabilitybased testability measures or probability-based testability analysis techniques. For example, given a random input pattern, one can calculate three measures for each signal s in a combinational circuit as follows: C0(s)—probability-based 0-controllability of s C1(s)—probability-based 1-controllability of s O(s)—probability-based observability of s Here, C0(s) and C1(s) are the probability of controlling signal s to 0 and 1 from primary inputs, respectively. O(s) is the probability of observing signal s at primary outputs. These three probabilities range between 0 and 1. As a boundary condition, the C0 and C1 probabilities of a primary input are typically set to 0.5, and the O probability of a primary output is set to 1. For each signal s in the circuit, C0 s + C1 s = 1. 46 VLSI Test Principles and Architectures Many methods have been developed to calculate the probability-based testability measures. A simple method is given below, whose basic procedure is similar to the one used for calculating combinational testability measures in SCOAP except that different calculation rules are used. The rules for probability-based controllability and observability calculation are summarized in Tables 2.3 and 2.4, respectively. In Table 2.3, p0 is the initial 0-controllability chosen for a primary input, where 0 < p0 < 1. Compared to SCOAP testability measures, where non-negative integers are used, probability-based testability measures range between 0 and 1. The smaller a probability-based testability measure of a signal, the more difficult it is to control or observe the signal. Figure 2.3 illustrates the difference between SCOAP testability TABLE 2.3 Probability-Based Controllability Calculation Rules 0-Controllability (Primary Input, 1-Controllability (Primary Input, Output, Branch) Output, Branch) Primary Input p0 AND 1 – (output 1-controllability) p1= 1 – p0 (input 1-controllabilities) OR (input 0-controllabilities) 1 – (output 0-controllability) NOT Input 1-controllability Input 0-controllability NAND (input 1-controllabilities) 1 – (output 0-controllability) NOR 1 – (output 1-controllability) (input 0-controllabilities) BUFFER Input 0-controllability Input 1-controllability XOR 1 – 1-controllability C1 a × C0 b C0 a × C1 b XNOR 1 – 1-controllability C0 a × C0 b C1 a × C1 b Branch Stem 0-controllability Stem 1-controllability Note: a and b are inputs of an XOR or XNOR gate. TABLE 2.4 Probability-Based Observability Calculation Rules Observability (Primary Output, Input, Stem) Primary Output 1 AND/NAND (output observability, 1-controllabilities of other inputs) OR/NOR (output observability, 0-controllabilities of other inputs) NOT/BUFFER Output observability XOR/XNOR a: (output observability, max {0-controllability of b, 1-controllability of b}) b: (output observability, max {0-controllability of a, 1-controllability of a}) Stem max {branch observabilities} Note: a and b are inputs of an XOR or XNOR gate. Design for Testability 47 1/1/3 1/1/3 1/1/3 2 /4/0 0.5/0.5/0.25 0.5/0.5/0.25 0.5/0.5/0.25 0.875/0.125/1 (a) (b) FIGURE 2.3 Comparison of SCOAP and probability-based testability measures: (a) SCOAP combinational measures, and (b) probability-based measures. measures and probability-based testability measures of a three-input AND gate. The three-value tuple v1/v2/v3 of each signal line represents the signal’s 0-controllability (v1), 1-controllability (v2), and observability (v3). Signals with poor probability-based testability measures tend to be difficult to test with random or pseudo-random test patterns. The faults on these signal lines are often referred to as random-pattern resistant (RP-resistant) [Savir 1984]. That is, either the probability of these signals randomly receiving a 0 or 1 from primary inputs or the probability of observing these signals at primary outputs is low, assuming that all primary inputs have the equal probability of being set to 0 or 1 and are independent from each other. The existence of such RP-resistant faults is the main reason why fault coverage using random or pseudo-random test patterns is low compared to using deterministic test patterns. In applications such as logic BIST, in order to solve this low fault coverage problem, test points are often inserted in the circuit to enhance the circuit’s random testability. A few commonly used test point insertion techniques are discussed in Section 2.3. Interested readers can find more information in Chapter 5. 2.2.3 Simulation-Based Testability Analysis In the calculation of SCOAP and probability-based testability measures as described above, only the topological information of a logic circuit is explicitly explored. These topology-based methods are static, in the sense that they do not use input test patterns for testability analysis. Their controllability and observability measures can be calculated in linear time, thus making them very attractive for applications that require fast testability analysis, such as test generation and logic BIST. However, the efficiency of these methods is achieved at the cost of reduced accuracy, especially for circuits that contain many reconvergent fanouts [Agrawal 1982]. As an alternative or supplement to static or topology-based testability analysis, dynamic or simulation-based methods that use input test patterns for testability analysis or testability enhancement can be performed through statistical sampling. Logic simulation and fault simulation techniques can be employed. Logic simulation and fault simulation are both covered in Chapter 3. In statistical sampling, a sample set of input test patterns are selected that are either generated randomly or derived from a given pattern set, and logic simulation is conducted to collect the responses of all or part of signal lines of interest. The commonly collected responses are the number of occurrences of 0’s, 1’s, 0-to-1 48 VLSI Test Principles and Architectures transitions, and 1-to-0 transitions, which are then used to statistically profile the testability of a logic circuit. These data are then analyzed to find locations of poor testability. If a signal line exhibits only a few transitions or no transitions for the sample input patterns, it might be an indication that the signal likely has poor controllability. In addition to logic simulation, fault simulation has also been used to enhance the testability of a logic circuit using random or pseudo-random test patterns. For example, a random resistant fault analysis (RRFA) method has been successfully applied to a high-performance microprocessor to improve the circuit’s random testability in logic BIST [Rizzolo 2001]. This method is based on statistical data collected during fault simulation for a small number of random test patterns. Controllability and observability measures of each signal in the circuit are calculated using the probability models developed in the statistical fault analysis (STAFAN) algorithm [Jain 1985], which is described in Section 3.4.8 (STAFAN is the first method able to give reasonably accurate estimates of fault coverage in combinational circuits purely using input test patterns and without running fault simulation). With these data, RRFA identifies signals that are difficult to control or observe, as well as signals that are statistically correlated. Based on the analysis results, RRFA then recommends test points to be added to the circuit to improve the circuit’s random testability. Because it can take a long simulation time to run through all input test patterns, these simulation-based methods are in general used to guide testability enhancement in test generation or logic BIST when it is necessary to meet a very high fault coverage goal. This approach is crucial for life-critical and mission-critical applications, such as in the healthcare and defense/aerospace industries. 2.2.4 RTL Testability Analysis The testability analysis methods discussed earlier are mostly used for logic circuits described at the gate level. Although they can be used to ease test generation and guide testability enhancement, testability enhancement at the gate level can be costly in terms of area overhead and possible performance degradation. In addition, it may require many DFT iterations and increase test development time. In order to address these problems, many RTL testability analysis methods have been proposed [Stephenson 1976] [Lee 1992] [Boubezari 1999]. The RTL testability analysis method described in [Lee 1992] can be used to improve data path testability. This method begins by building a structure graph to represent the data transfer within an RTL circuit, where each vertex represents a register, and each directed edge from vertex vi to vertex vj represents a functional block from register vi to register vj. The maximum level in a structure graph, referred to as the sequential depth, can be used to reflect the difficulty of testing the RTL circuit. This approach ignores all the details of the functional block. The RTL testability analysis method discussed in [Boubezari 1999] can be used to improve the random-pattern testability of a scan-based logic BIST circuit, in which the outputs and inputs of all storage elements are treated as primary inputs and outputs, respectively. A directed acyclic graph (DAG) is constructed for each Design for Testability 49 functional block in order to represent the flow of information and data dependencies. Each internal node of a DAG corresponds to a high-level operation (such as an arithmetic, relational, data transfer, and logical operation) of multiple bits, and each edge represents a signal, which can be composed of multiple bits. This modeling method keeps useful high-level information about a functional block while ignoring the details of the gate-level implementation. This information is then used to compute the 0-controllability, 1-controllability, and observability of each bit in a signal line. As an example, consider the n-bit ripple-carry adder shown in Figure 2.4, which consists of n 1-bit full-adders. By considering the minterms leading to a 1 on the respective output, the probability-based 1-controllability measures of si and ci+1, denoted by C1(si) and C1(ci+1), respectively, are calculated as follows [Boubezari 1999]: where C1 si = + C1 ci − 2 × × C1 ci C1 ci+1 = × C1 ci + C1 ai × C1 bi = C1 ai + C1 bi − 2 × C1 ai × C1 bi Here, is the probability that ai ⊕bi = 1 and, consequently, C1(si) is the probability that ai ⊕ bi ⊕ ci = 1. By applying the above formulas from the leftmost full-adder toward the rightmost full-adder in the n-bit ripple-carry adder, the 1-controllability of each output is obtained. This calculation can be completed in linear time in terms of the number of inputs. The probability-based 0-controllability of each output l, denoted by C0(l), in the n-bit ripple-carry adder is 1 − C1 l . Next, we consider the probability-based observability of an input l on an output si, denoted by O(l, si), in the n-bit ripple-carry adder. O(l, si) is defined as the probability that a signal change on l will result in a signal change on si. According to the Boolean function of a 1-bit adder, the change on any input ai, bi, or ci is always observable at si. Hence, we have: O ai si = O bi si = O ci si = O si a0 b0 ai bi an – 1 bn – 1 c0 c1 ci ••• s0 FIGURE 2.4 Ripple-carry adder composed of n full-adders. ci + 1 cn – 1 cout ••• sn si sn – 1 50 VLSI Test Principles and Architectures where i = 0, 1, , n − 1. On the other hand, the probability-based observability of an input l at stage i on an output sk—O(l, sk), where k > i—depends on the propagation of the carry output from stage i to the output sk. This calculation is left as a problem at the end of this chapter. In general, RTL testability analysis can sometimes lead to more accurate results than gate-level testability analysis. The reason is that the number of reconvergent fanouts in an RTL model is usually much less than that in a gate-level model. RTL testability analysis is also more time efficient than gate-level testability analysis because an RTL model is much simpler than an equivalent gate-level model; however, the practical application of RTL testability analysis for testability enhancement in complex RTL designs remains a challenging research topic. 2.3 DESIGN FOR TESTABILITY BASICS As discussed in the previous section, the testability of combinational logic decreases as the level of the combinational logic increases. A more serious issue is that good testability for sequential circuits is difficult to achieve. Because many internal states exist, setting a sequential circuit to a required internal state can require a very large number of input events. Furthermore, identifying the exact internal state of a sequential circuit from the primary outputs might require a very long checking experiment. Hence, a more structured approach for testing designs that contain a large amount of sequential logic is required as part of a methodical design for testability (DFT) approach [Williams 1983]. Initially, many ad hoc techniques were proposed for improving testability. These techniques relied on making local modifications to a circuit in a manner that was considered to result in testability improvement. While ad hoc DFT techniques do result in some tangible testability improvement, their effects are local and not systematic. Furthermore, these techniques are not methodical, in the sense that they have to be repeated differently on new designs, often with unpredictable results. Due to the ad hoc nature, it is also difficult to predict how long it would take to implement the required DFT features. The structured approach for testability improvement was introduced to allow DFT engineers to follow a methodical process for improving the testability of a design. A structured DFT technique can be easily incorporated and budgeted for as part of the design flow and can yield the desired results. Furthermore, structured DFT techniques are much easier to automate. To date, electronic design automation (EDA) vendors have been able to provide sophisticated DFT tools to simplify and speed up DFT tasks. Scan design, which is the main topic in this chapter, has been found to be one of the most effective structured DFT methodologies for testability improvement. Not only can scan design achieve the targeted fault coverage goal, but it also makes DFT implementation in scan design manageable. In the following two subsections, we briefly introduce a few typical ad hoc DFT techniques, followed by a detailed description of the structured DFT approach, focusing specifically on scan design. Design for Testability 51 2.3.1 Ad Hoc Approach The ad hoc approach involves using a set of design practice and modification guidelines for testability improvement. Ad hoc DFT techniques typically involve applying good design practices learned through experience or replacing a bad design practice with a good one. Table 2.5 lists some typical ad hoc techniques. In this subsection, we describe test point insertion, which is one of the most widely used ad hoc techniques. A few other techniques are further described in Section 2.6. Additional ad hoc techniques can be found in [Abramovici 1994]. TABLE 2.5 Typical Ad hoc DFT Techniques A1 Insert test points A2 Avoid asynchronous set/reset for storage elements A3 Avoid combinational feedback loops A4 Avoid redundant logic A5 Avoid asynchronous logic A6 Partition a large circuit into small blocks 2.3.1.1 Test Point Insertion Test point insertion (TPI) is a commonly used ad hoc DFT technique for improving the controllability and observability of internal nodes. Testability analysis is typically used to identify the internal nodes where test points should be inserted, in the form of control or observation points. Figure 2.5 shows an example of observation point insertion for a logic circuit with three low-observability nodes. OP2 shows the structure of an observation point that is composed of a multiplexer (MUX) and a D flip-flop. A low-observability node is connected to the 0 port of the MUX in an observation point, and all observation points are serially connected into an observation shift register using the 1 port of the MUX. An SE signal is used for MUX port selection. When SE is set to 0 and the clock CK is applied, the logic values of the low-observability nodes are captured into the D flip-flops. When SE is set to 1, the D flip-flops within OP1, OP2, and OP3 operate as a shift register, allowing us to observe the captured logic values through OP_output during sequential clock cycles. As a result, the observability of the circuit nodes is greatly improved. Figure 2.6 shows an example of control point insertion for a logic circuit with three low-controllability nodes. CP2 shows the structure of a control point (CP) that is composed of a MUX and a D flip-flop. The original connection at a lowcontrollability node is cut, and a MUX is inserted between the source and destination ends. During normal operation, the test mode (TM) is set to 0 so that the value from the source end drives the destination end through the 0 port of the MUX. 52 VLSI Test Principles and Architectures Logic circuit Low-observability node B Low-observability node A Low-observability node C OP1 DI 1 SI SO SE OP2 DI SI 0 1 D Q SO SE OP3 DI SI SO SE SE CK Observation shift register FIGURE 2.5 Observation point insertion. OP_output Logic circuit Source Low-controllability node A Low-controllability node B Original connection Destination Low-controllability node C CP_input TM CK FIGURE 2.6 Control point insertion. CP1 DI DO SI SO TM CP2 DI 0 DO 1 SI D Q SO TM Control shift register CP3 DI DO SI SO TM During test, TM is set to 1 so that the value from the D flip-flop drives the destination end through the 1 port of the MUX. The D flip-flops in OP1, OP2, and OP3 are designed to form a shift register so the required values can be shifted into the flipflops using CP_input and used to control the destination ends of low-controllability nodes. As a result, the controllability of the circuit nodes is dramatically improved. This, however, results in additional delay to the logic path. Hence, care must be taken not to insert control points on a critical path. Furthermore, it is preferable Design for Testability 53 to add a scan point, which is a combination of a control point and an observation point, instead of a control point, as this allows us to observe the source end as well. Some other test point designs are described in [Abramovici 1994] and [NadeauDostie 2000]. In addition, test points can be shared among multiple internal nodes; for example, a network of XOR gates can be used to merge a few low-observability nodes together to share one observation point. This can potentially reduce the area overhead, although in some cases it might increase routing difficulty. 2.3.2 Structured Approach The structured DFT approach attempts to improve the overall testability of a circuit with a test-oriented design methodology [Williams 1983] [McCluskey 1986]. This approach is methodical and systematic with much more predictable results. Scan design, the most widely used structured DFT methodology, attempts to improve testability of a circuit by improving the controllability and observability of storage elements in a sequential design. Typically, this is accomplished by converting the sequential design into a scan design with three modes of operation: normal mode, shift mode, and capture mode. Circuit operations with associated clock cycles conducted in these three modes are referred to as normal operation, shift operation, and capture operation, respectively. In normal mode, all test signals are turned off, and the scan design operates in the functional configuration. In both shift and capture modes, a test mode signal TM is often used to turn on all test-related fixes that are necessary to simplify the test, debug, and diagnosis tasks, improve fault coverage, and guarantee the safe operation of the circuit under test. These circuit modes and operations are distinguished using additional test signals or test clocks. The details are described in the following sections. In order to illustrate how scan design works, consider the sequential circuit shown in Figure 2.7. This circuit contains combinational logic and three D flip-flops. Assume that a stuck-at fault f in the combinational logic requires the primary input X3, flip-flop FF2, and flip-flop FF3 to be set to 0, 1, and 0, respectively, to capture the fault effect into FF1. Because the values stored in FF2 and FF3 are not directly controllable from the primary inputs, a long sequence of operations may have to be applied in order to set FF2 and FF3 to the required values. Furthermore, in order to observe the fault effect on the captured value in flip-flop FF1, a long checking experiment may be required to propagate the value of FF1 to a primary output. From this example, it can be seen that the main difficulty in testing a sequential circuit stems from the fact that it is difficult to control and observe the internal state of the circuit. Scan design, whose concept is illustrated in Figure 2.8, attempts to ease this difficulty by providing external access to selected storage elements in a design. This is accomplished by first converting selected storage elements in the design into scan cells and then stitching them together to form one or more shift registers, called scan chains. In the scan design illustrated in Figure 2.8, the n storage elements are now configured as a shift register in shift mode. Any test stimulus and test response can now be shifted into and out of the n scan cells in n clock cycles, respectively, 54 VLSI Test Principles and Architectures X1 X2 0 X3 Combinational logic Y1 Y2 f 0 1 CK FIGURE 2.7 Difficulty in testing a sequential circuit. FF3 QD FF2 QD FF1 QD 1 Test stimulus Test stimulus application n Shift register composed of n scan cells 1 Test response n Test response upload FIGURE 2.8 Scan design concept. without having to resort to applying an exponential number of clock cycles to force all storage elements to a desired internal state. Hence, the task of detecting fault f in Figure 2.7 becomes a simple matter of: (1) switching to shift mode and shifting in the desired test stimulus, 1 and 0, to FF2 and FF3, respectively; (2) driving a 0 onto primary input X3; (3) switching to capture mode and applying one clock pulse to capture the fault effect into FF1; and, finally, (4) switching back to shift mode and shifting out the test response stored in FF1, FF2, and FF3 for comparison with the expected response. Because scan design provides access to internal storage elements, test generation complexity is reduced. In the following two sections, a number of popular scan cell designs and scan architectures for supporting scan design are described in more detail. Design for Testability 55 2.4 SCAN CELL DESIGNS As mentioned in the previous section, in general, a scan cell has two different input sources that can be selected. The first input, data input, is driven by the combinational logic of a circuit, while the second input, scan input, is driven by the output of another scan cell in order to form one or more shift registers called scan chains. These scan chains are made externally accessible by connecting the scan input of the first scan cell in a scan chain to a primary input and the output of the last scan cell in a scan chain to a primary output. Because there are two input sources in a scan cell, a selection mechanism must be provided to allow a scan cell to operate in two different modes: normal/capture mode and shift mode. In normal/capture mode, data input is selected to update the output. In shift mode, scan input is selected to update the output. This makes it possible to shift in an arbitrary test pattern to all scan cells from one or more primary inputs while shifting out the contents of all scan cells through one or more primary outputs. In this section, we describe three widely used scan cell designs: muxed-D scan, clocked-scan, and level-sensitive scan design (LSSD). 2.4.1 Muxed-D Scan Cell The D storage element is one of the most widely used storage elements in logic design. Its basic function is to pass a logic value from its input to its output when a clock is applied. A D flip-flop is an edge-triggered D storage element, and a D latch is a level-sensitive D storage element. The most widely used scan cell replacement for the D storage element is the muxed-D scan cell. Figure 2.9a shows an edgetriggered muxed-D scan cell design. This scan cell is composed of a D flip-flop and a multiplexer. The multiplexer uses a scan enable (SE) input to select between the data input (DI) and the scan input (SI). In normal/capture mode, SE is set to 0. The value present at the data input DI is captured into the internal D flip-flop when a rising clock edge is applied. In shift mode, SE is set to 1. The SI is now used to shift in new data to the D flip-flop while the content of the D flip-flop is being shifted out. Sample operation waveforms are shown in Figure 2.9b. Figure 2.10 shows a level-sensitive/edge-triggered muxed-D scan cell design, which can be used to replace a D latch in a scan design. This scan cell is composed of a multiplexer, a D latch, and a D flip-flop. Again, the multiplexer uses a scan enable input SE to select between the data input DI and the scan input SI; however, in this case, shift operation is conducted in an edge-triggered manner, while normal operation and capture operation are conducted in a level-sensitive manner. Major advantages of using muxed-D scan cells are their compatibility to modern designs using single-clock D flip-flops, and the comprehensive support provided by existing design automation tools. The disadvantage is that each muxed-D scan cell adds a multiplexer delay to the functional path. 56 VLSI Test Principles and Architectures DI 0 SI 1 D Q Q/SO SE CK (a) CK SE DI D1 SI T1 Q/SO D2 D3 T2 T3 D1 D4 T4 T3 (b) FIGURE 2.9 Edge-triggered muxed-D scan cell design and operation: (a) edge-triggered muxed-D scan cell, and (b) sample waveforms. DI 0 SI 1 SE DQ CK Q D Q SO CK FIGURE 2.10 Level-sensitive/edge-triggered muxed-D scan cell design. 2.4.2 Clocked-Scan Cell An edge-triggered clocked-scan cell can also be used to replace a D flip-flop in a scan design [McCluskey 1986]. Similar to a muxed-D scan cell, a clocked-scan cell also has a data input DI and a scan input SI; however, in the clocked-scan cell, input selection is conducted using two independent clocks, data clock DCK and shift clock SCK, as shown in Figure 2.11a. In normal/capture mode, the data clock DCK is used to capture the value present at the data input DI into the clocked-scan cell. In shift mode, the shift clock SCK is used to shift in new data from the scan input SI into the clocked-scan cell, while Design for Testability 57 DI Q/SO SI DCK SCK (a) SCK DCK DI D1 D2 D3 D4 SI T1 T2 T3 T4 Q/SO D1 T3 (b) FIGURE 2.11 Clocked-scan cell design and operation: (a) clocked-scan cell, and (b) sample waveforms. the current content of the clocked-scan cell is being shifted out. Sample operation waveforms are shown in Figure 2.11b. As in the case of muxed-D scan cell design, a clocked-scan cell can also be made to support scan replacement of a D latch. The major advantage of using a clockedscan cell is that it results in no performance degradation on the data input. The major disadvantage, however, is that it requires additional shift clock routing. 2.4.3 LSSD Scan Cell While muxed-D scan cells and clocked-scan cells are generally used for edgetriggered, flip-flop-based designs, an LSSD scan cell is used for level-sensitive, latch-based designs [Eichelberger 1977] [Eichelberger 1978] [DasGupta 1982]. Figure 2.12a shows a polarity-hold shift register latch (SRL) design described in [Eichelberger 1977] that can be used as an LSSD scan cell. This scan cell contains two latches, a master two-port D latch L1 and a slave D latch L2. Clocks C, A, and B are used to select between the data input D and the scan input I to drive +L1 and +L2. In an LSSD design, either +L1 or +L2 can be used to drive the combinational logic of the design. In order to guarantee race-free operation, clocks A, B, and C are applied in a nonoverlapping manner. In designs where +L1 is used to drive the combinational 58 VLSI Test Principles and Architectures SRL D L1 +L1 C I L2 +L2 A B (a) C A B D D1 D2 D3 D4 I T1 T2 T3 T4 +L1 D1 T3 +L2 T3 (b) FIGURE 2.12 Polarity-hold SRL design and operation: (a) polarity-hold SRL, and (b) sample waveforms. logic, the master latch L1 uses the system clock C to latch system data from the data input D and to output this data onto +L1. In designs where +L2 is used to drive the combinational logic, clock B is used after clock A to latch the system data from latch L1 and to output this data onto +L2. In both cases, capture mode uses both clocks C and B to output system data onto +L2. Finally, in shift mode, clocks A and B are used to latch scan data from the scan input I and to output this data onto +L1 and then latch the scan data from latch L1 and to output this data onto +L2, which is then used to drive the scan input of the next scan cell. Sample operation waveforms are shown in Figure 2.12b. The major advantage of using an LSSD scan cell is that it allows us to insert scan into a latch-based design. In addition, designs using LSSD are guaranteed to Design for Testability 59 be race-free, which is not the case for muxed-D scan and clocked-scan designs. The major disadvantage, however, is that the technique requires routing for the additional clocks, which increases routing complexity. 2.5 SCAN ARCHITECTURES In this section, we describe three popular scan architectures. These scan architectures include: (1) full-scan design, where all storage elements are converted into scan cells and combinational ATPG is used for test generation; (2) partial-scan design, where a subset of storage elements is converted into scan cells and sequential ATPG is typically used for test generation; and (3) random-access scan design, where a random addressing mechanism, instead of serial scan chains, is used to provide direct access to read or write any scan cell. 2.5.1 Full-Scan Design In full-scan design, all storage elements are replaced with scan cells, which are then configured as one or more shift registers (also called scan chains) during the shift operation. As a result, all inputs to the combinational logic, including those driven by scan cells, can be controlled and all outputs from the combinational logic, including those driving scan cells, can be observed. The main advantage of full-scan design is that it converts the difficult problem of sequential ATPG into the simpler problem of combinational ATPG. A variation of full-scan design, where a small percentage of storage elements (sometimes only a few) are not replaced with scan cells, is referred to as almost full-scan design. These storage elements are often left out of scan design for performance reasons, such as storage elements that are on critical paths, or for functional reasons, such as storage elements driven by a small clock domain that are deemed too insignificant to be worth the additional scan insertion effort. In this case, these storage elements may result in fault coverage loss. 2.5.1.1 Muxed-D Full-Scan Design Figure 2.13 shows a sequential circuit example with three D flip-flops. The corresponding muxed-D full-scan circuit is shown in Figure 2.14a. The three D flip-flops, FF1, FF2, and FF3, are replaced with three muxed-D scan cells, SFF1, SFF2, and SFF3, respectively. In Figure 2.14a, the data input DI of each scan cell is connected to the output of the combinational logic as in the original circuit. To form a scan chain, the scan inputs SI of SFF2 and SFF3 are connected to the outputs Q of the previous scan cells, SFF1 and SFF2, respectively. In addition, the scan input SI of the first scan cell SFF1 is connected to the primary input SI, and the output Q of the last scan cell SFF3 is connected to the primary output SO. Hence, in shift mode, SE is set to 1, and the scan cells operate as a single scan chain, which allows us to shift in any combination of logic values into the scan cells. In capture mode, SE is set to 0, and the 60 VLSI Test Principles and Architectures X1 X2 X3 CK FIGURE 2.13 Sequential circuit example. X1 PI X2 X3 PPI Combinational logic FF1 DQ FF2 DQ FF3 DQ Combinational logic Y1 Y2 Y1 PO Y2 PPO SFF1 SFF2 SFF3 DI DI DI SI SI Q SI Q SI Q SO SE SE SE SE CK (a) PI SE CK SFF1.Q SFF2.Q SFF3.Q V1:PI V2:PI S H CH S HC 01 11L L1011L X 0 1 1HHL 100 L XX 00L LHL11H V1:PPI PO observation V2:PPI PPO observation S: shift operation / C: capture operation / H: hold cycle (b) FIGURE 2.14 Muxed-D full-scan circuit and test operations: (a) muxed-D full-scan circuit, and (b) test operations. Design for Testability 61 scan cells are used to capture the test response from the combinational logic when a clock is applied. In general, combinational logic in a full-scan circuit has two types of inputs: primary inputs (PIs) and pseudo primary inputs (PPIs). Primary inputs refer to the external inputs to the circuit, while pseudo primary inputs refer to the scan cell outputs. Both PIs and PPIs can be set to any required logic values. The only difference is that PIs are set directly in parallel from the external inputs, and PPIs are set serially through scan chain inputs. Similarly, the combinational logic in a full-scan circuit has two types of outputs: primary outputs (POs) and pseudo primary outputs (PPOs). Primary outputs refer to the external outputs of the circuit, while pseudo primary outputs refer to the scan cell inputs. Both POs and PPOs can be observed. The only difference is that POs are observed directly in parallel from the external outputs, while PPOs are observed serially through scan chain outputs. Figure 2.14b shows a timing diagram to illustrate how the full-scan design is utilized to test the circuit shown in Figure 2.14a for stuck-at faults. During test, the test mode signal TM (not shown) is set to 1, in order to turn on all test-related fixes (see Table 2.6). Two test vectors, V1 and V2, are applied to the circuit. In order to apply V1, SE is first set to 1 to operate the circuit in shift mode (marked by S in Figure 2.14b), and three clock pulses are applied to the clock CK. As a result, the PPI portion of V1, denoted by V1:PPI, is now applied to the combinational logic. A hold cycle is introduced between the shift and capture operations. During the hold cycle, SE is switched to 0 such that the muxed-D scan cells are operated in capture mode, and the PI portion of V1, denoted by V1:PI, is applied. The purpose of the hold cycle is to apply the PI portion of V1 and to give enough time for the globally routed SE signal to settle from 1 to 0. At the end of the hold cycle, the complete test vector is now applied to the combinational logic, and the logic values at the primary outputs PO are compared with their expected values. Next, the capture operation is conducted (marked by C in Figure 2.14b) by applying one clock pulse to the clock CK in order to capture the test response of the combinational logic to V1 into the scan cells. A second hold cycle is added in order to switch SE back to 1 and to observe the PPO value of the last scan cell at the SO output. Next, a new shift operation is conducted to shift out the test response captured in the scan cells serially through SO, while shifting in V2:PPI, which is the PPI portion of the next test pattern V2. TABLE 2.6 Circuit Operation Type and Scan Cell Mode Circuit Operation Type Scan Cell Mode TM SE Normal Normal 0 0 Shift operation Shift 1 1 Capture operation Capture 1 0 62 VLSI Test Principles and Architectures 2.5.1.2 Clocked Full-Scan Design Figure 2.15 shows a clocked full-scan circuit implementation of the circuit given in Figure 2.13. Clocked-scan cells are shown in Figure 2.11a. This clocked full-scan circuit is tested using shift and capture operations, similar to a muxed-D full-scan circuit. The main difference is how these two operations are distinguished. In a muxed-D full-scan circuit, a scan enable signal SE is used, as shown in Figure 2.14a. In the clocked full-scan circuit shown in Figure 2.15, these two operations are distinguished by properly applying the two independent clocks SCK and DCK during shift mode and capture mode, respectively. 2.5.1.3 LSSD Full-Scan Design It is possible to implement LSSD full-scan designs, based on the polarity-hold SRL design shown in Figure 2.12a, using either a single-latch design or a doublelatch design. In single-latch design [Eichelberger 1977], the output port +L1 of the master latch L1 is used to drive the combinational logic of the design. In this case, the slave latch L2 is used only for scan testing. Because LSSD designs use latches instead of flip-flops, at least two system clocks C1 and C2 are required to prevent combinational feedback loops from occurring. In this case, combinational logic driven by the master latches of the first system clock C1 are used to drive the master latches of the second system clock C2, and vice versa. In order for this to work, the system clocks C1 and C2 should be applied in a nonoverlapping fashion. Figure 2.16a shows an LSSD single-latch design. Figure 2.16b shows an example of LSSD double-latch design [DasGupta 1982]. In normal mode, the C1 and C2 clocks are used in a nonoverlapping manner, where the C2 clock is the same as the B clock. The testing of an LSSD full-scan X1 PI X2 X3 PPI Combinational logic Y1 PO Y2 PPO SFF1 SFF2 SFF3 DI DI DI SI SI Q SI Q SI Q SO DCK SCK DCK SCK DCK SCK DCK SCK FIGURE 2.15 Clocked full-scan circuit. Design for Testability 63 X1 X3 X2 Combinational logic 1 Combinational logic 2 Y1 Y2 SRL1 SRL2 SRL3 D D D SI I +L2 I +L2 I +L2 SO C C C A +L1 A +L1 A +L1 B B B C1 A B C2 (a) X1 Y1 X2 Combinational logic X3 Y2 SRL1 SRL2 SRL3 D D D SI I +L2 • I +L2 • I +L2 • SO C C C A +L1 B A +L1 B A +L1 B C1 • • A • • C2 or B • • (b) FIGURE 2.16 LSSD designs: (a) LSSD single-latch design, and (b) LSSD double-latch design. circuit is conducted using shift and capture operations, similar to a muxed-D full-scan circuit. The main difference is how these two operations are distin- guished. In a muxed-D full-scan circuit, a scan enable signal SE is used, as shown in Figure 2.14a. In an LSSD full-scan circuit, these two operations are distinguished by properly applying nonoverlapping clock pulses to clocks C1, C2, A, and B. During the shift operation, clocks A and B are applied in a nonoverlapping manner, and the scan cells SRL1 ∼ SRL3 form a single scan chain from SI to SO. During the capture operation, clocks C1 and C2 are applied in a nonoverlapping manner to load the test response from the combinational logic into the scan cells. 64 VLSI Test Principles and Architectures As mentioned in Section 2.4.3, the operation of a polarity-hold SRL is race-free if clocks C and B as well as A and B are nonoverlapping. This characteristic is used to implement LSSD circuits that are guaranteed to have race-free operation in normal mode as well as in test mode. The required design rules [Eichelberger 1977] [Eichelberger 1978] are briefly summarized below: All storage elements must be polarity-hold latches. The latches are controlled by two or more nonoverlapping clocks such that any two latches where one feeds the other cannot have the same clock. A set of clock primary inputs must exist from which the clock ports of all SRLs are controlled either through a single clock tree or through logic that is gated by SRLs and/or non-clock primary inputs. In addition, the following three conditions should be satisfied: (1) all clock inputs to SRLs must be inactive when clock PIs are inactive, (2) the clock input to any SRL must be controlled from one or more clock primary inputs, and (3) no clock can be ANDed with another clock or its complement. Clock primary inputs must not feed the data inputs to SRLs either directly or through combinational logic. Each system latch must be part of an SRL, and each SRL must be part of a scan chain. A scan state exists under the following conditions: (1) each SRL or scan output SO is a function of only the preceding SRL or scan input SI in its scan chain during the scan operation, and (2) all clocks except the shift clocks are disabled at the SRL clock inputs. 2.5.2 Partial-Scan Design Unlike full-scan design where all storage elements in a circuit are replaced with scan cells, partial-scan design only requires that a subset of storage elements be replaced with scan cells and connected into scan chains [Trischler 1980] [Abadir 1985] [Agrawal 1987] [Ma 1988] [Cheng 1989] [Saund 1997]. Partial-scan design was used in the industry long before full-scan design became the dominant scan architecture. It can also be implemented using muxed-D scan cells, clocked-scan cells, or LSSD scan cells. Depending on the structure of a partial-scan design, either combinational ATPG or sequential ATPG, both of which are described in Chapter 4, should be used. An example of muxed-D partial-scan design is shown in Figure 2.17. In this example, a scan chain is constructed with two scan cells SFF1 and SFF3, while flipflop FF2 is left out. Because only one clock is used, typically sequential ATPG has to be used to control and observe the value of the non-scan flip-flop FF2 through SFF1 and SFF3 in order to detect faults related to FF2. This increases test generation complexity for partial-scan designs [Cheng 1995]. It is possible to reduce the test generation complexity by splitting the single clock into two separate clocks, one for controlling all scan cells, the other for controlling all non-scan storage elements; X1 PI X2 X3 PPI Design for Testability 65 Combinational logic Y1 PO Y2 PPO SFF1 FF2 SFF3 DI DI SI SI Q DI Q SI Q SO SE SE SE CK FIGURE 2.17 Partial-scan design. however, this may result in the additional complexity of routing two separate clock trees during physical implementation. In order to reduce the test generation complexity, many approaches have been proposed for determining the subset of storage elements for scan cell replacement. Scan cell selection can be conducted by using a functional partitioning approach, a pipelined or feed-forward partial-scan design approach, or a balanced partial-scan design approach. In the functional partitioning approach, a circuit is viewed as being composed of a data path portion and a control portion. Typically, because storage elements on the data path portion cannot afford too much delay increase, especially when replaced with muxed-D scan cells, they are left out of the scan cell replacement process. On the other hand, storage elements in the control portion can be replaced with scan cells. This approach makes it possible to improve fault coverage while limiting the performance degradation due to scan design. In the pipelined or feed-forward partial-scan design approach [Cheng 1990], a subset of storage elements to be replaced with scan cells is selected to make the sequential circuit feedback-free. This is accomplished by selecting the storage elements to break all sequential feedback loops so that test generation complexity is reduced and the silicon area overhead is kept low. In order to select these storage elements, a structure graph is first constructed for the sequential circuit, where each vertex represents a storage element and each directed edge from vertex vi to vertex vj represents a combinational logic path from vi to vj. For a feedback-free sequential circuit, the structure graph is a directed acyclic graph, where the maximum level in the structure graph is referred to as sequential depth. On the other hand, the structure graph of a sequential circuit containing feedback loops is a directed cyclic graph (DCG). Figure 2.18a shows a block diagram of a feedback-free sequential circuit; its corresponding structure graph is shown in Figure 2.18b with a sequential depth of 3. 66 VLSI Test Principles and Architectures FF1 C1 FF3 C3 FF5 FF2 C2 FF4 1 3 5 2 4 (a) (b) FIGURE 2.18 Sequential circuit and its structure graph: (a) sequential circuit, and (b) structure graph. The sequential depth of a circuit is equal to the maximum number of clock cycles that must be applied in order to control and observe values to and from all nonscan storage elements. In a full-scan design, because all scan cells can be controlled and observed directly in shift mode, the sequential depth of a full-scan circuit is 0. Similarly, the sequential depth of a combinational logic block is also 0. In a partial-scan design, replacing a storage element with a scan cell is equivalent to removing its corresponding vertex from the structure graph. In general, the difficulty of sequential ATPG is largely due to the existence of sequential feedback loops. By breaking all feedback loops, test generation for feedback-free sequential circuits becomes computationally efficient; hence, the scan cell selection problem can be expressed as finding the smallest set of vertices to break all feedback loops in a structure graph. The selected vertices are the storage elements that must be replaced with scan cells in order to produce a pipelined or feed-forward partial-scan design; however, a design can contain many self-loops or small loops. Breaking all feedback loops may result in large area overhead. The authors of [Cheng 1990] and [Agrawal 1995] have demonstrated that breaking only large loops, while keeping self-loops or small loops, can produce equally good results. As reported in [Cheng 1990], fault coverage as high as over 95% can be achieved by replacing roughly 25 to 50% of all storage elements with scan cells for a small design. In the balanced partial-scan design approach, a target sequential depth (e g , 3 to 5) is used to further simplify the test generation process for the pipelined or feed-forward partial-scan design. In this approach, additional vertices are removed from the structure graph by replacing their corresponding storage elements with scan cells so the target sequential depth is met. By keeping the sequential depth under a small limit, one can apply combinational ATPG using multiple time frames to further increase the fault coverage of the design [Gupta 1990]. To summarize, the main advantage of partial-scan design is that it reduces silicon area overhead and performance degradation. The main disadvantage is that it can result in lower fault coverage and longer test generation time than a full-scan design. In practice, functional test vectors often have to be added in order to meet Design for Testability 67 the target fault coverage goal. In addition, partial-scan design offers less support for debug, diagnosis, and failure analysis. 2.5.3 Random-Access Scan Design Full-scan design and partial-scan design can be classified as serial scan design, as test pattern application and test response acquisition are both conducted serially through scan chains. The major advantage of serial scan design is its low routing overhead, as scan data is shifted through adjacent scan cells. Its major disadvantage, however, is that individual scan cells cannot be controlled or observed without affecting the values of other scan cells within the same scan chain. High switching activities at scan cells can cause excessive test power dissipation, resulting in circuit damage, low reliability, or even test-induced yield loss. Random-access scan (RAS) attempts to alleviate these problems by making each scan cell randomly and uniquely addressable, similar to storage cells in a random-access memory (RAM). Traditional RAS design [Ando 1980] is illustrated in Figure 2.19. All scan cells are organized into a two-dimensional array, where they can be accessed individually for observing (reading) or updating (writing) in any order. This full-random access capability is achieved by decoding a full address with a row (X) decoder and a column (Y ) decoder. A log2n -bit address shift register, where n is the total number of scan cells, is used to specify which scan cell to access. The RAS design significantly reduces test power dissipation and simplifies the process of performing delay tests because two independent test vectors can be applied consecutively. Its major disadvantage, however, is high overhead in scan cell design and routing required to set up the addressing mechanism. In addition, PI Combinational logic PO Row (X) decoder ••• ••• ••• SC SC • • • SC SC SC • • • SC SC SC • • • SC Column (Y) decoder Address shift register FIGURE 2.19 Traditional random-access scan architecture. CK SI SCK SO AI 68 VLSI Test Principles and Architectures there is no guarantee that the test application time can be reduced if a large number of scan cells have to be updated for each test vector or the addresses of scan cells to be consecutively accessed have little overlap. Recently, the progressive random-access scan (PRAS) design [Baik 2005] was proposed in an attempt to alleviate the problems associated with the traditional RAS design. The PRAS scan cell, as shown in Figure 2.20a, has a structure similar to that of a static random access memory (SRAM) cell or a grid-addressable latch [Susheel 2002], which has significantly smaller area and routing overhead than the traditional scan cell design [Ando 1980]. In normal mode, all horizontal row enable RE signals are set to 0, forcing each scan cell to act as a normal D flip-flop. In test mode, to capture the test response from D, the RE signal is set to 0 and a pulse is applied on clock , which causes the value on D to be loaded into the scan cell. To read out the stored value of the scan cell, clock is held at 1, the RE signal for the selected scan cell is set to 1, and the content of the scan cell is read out through the bidirectional scan data signals SD and SD. To write or update a scan value into the scan cell, clock is held at 1, the RE signal for the selected scan cell is set to 1, and the scan value and its complement are applied on SD and SD, respectively. The PRAS architecture is shown in Figure 2.20b, where rows are enabled in a fixed order, one at a time, by rotating a 1 in the row enable shift register. That is, it is only necessary to supply a column address to specify which scan cell in an enabled row to access. The length of the column address, which is log2m for a circuit with m columns, is considerably shorter than a full (row and column) address; therefore, the column address is provided in parallel in one clock cycle instead of providing a full address in multiple clock cycles. This reduces test application time. In order to minimize the need to shift out test responses, the scan cell outputs are compressed with a multiple-input signature register (MISR). More details on MISRs can be found in Section 5.4.3 of Chapter 5. The test procedure of the PRAS design is shown in Figure 2.20c. For each test vector, the test stimulus application and test response compression are conducted in an interleaving manner when the test mode signal TM is enabled. That is, all scan cells in a row are first read into the MISR for compression simultaneously, and then each scan cell in the row is checked and updated if necessary. Repeating this operation for all rows compresses the test response to the previous test vector into the MISR and sets the next test vector to all scan cells. Next, TM is disabled and the normal clock is applied to conduct test response acquisition. It can be seen that the smaller the number of scan cells to be updated for each row, the shorter the test application time. This can be achieved by reducing the Hamming distance between the next test vector and the test response to the previous test vector. Possible solutions include test vector reordering and test vector modification [Baik 2004] [Baik 2005]. It was reported in [Baik 2005] that on average, PRAS design achieved a 37.1%, 64.9%, 85.9%, and 99.5% reduction in test data volume, test application time, peak switching activity, and average switching activity, respectively, when compared with full scan design for several benchmark circuits. The costs were a 25.6% increase in routing overhead and an 11.0% increase in area overhead. Similar results with a different RAS architecture were reported in [Mudlapur 2005]. These results indicate SD RE D Design for Testability 69 SD Q (a) Sense-amplifiers & MISR PO SC SC SC SC SC SC Row enable shift register Combinational logic SC SC SC TM Test Column line drivers PI SI/SO control CK logic Column address decoder CA (b) for each test vector vi (i = 1, 2, ···, N ) { /* Test stimulus application */ /* Test response compression */ enable TM; for each row rj ( j = 1, 2, ···, m ) { read all scan cells in r j / update MISR; for each scan cell SC in rj /* v (SC): current value of SC */ /* vi (SC): value of SC in vi */ if v (SC) ≠ vi (SC) update SC; } /* Test response acquisition */ disable TM; apply the normal clock; } scan-out MISR as the final response; (c) FIGURE 2.20 Progressive random-access scan design: (a) PRAS scan cell design, (b) PRAS architecture, and (c) PRAS test procedure. 70 VLSI Test Principles and Architectures that RAS design achieves significant reduction in test power dissipation, as well as a good reduction in test data volume and test application time. As test power and delay fault testing are becoming crucial issues in nanometer designs, the RAS approach represents a promising alternative to serial scan design and thus deserves further research. 2.6 SCAN DESIGN RULES In order to implement scan into a design, the design must comply with a set of scan design rules [Cheung 1996]. In addition, a set of design styles must be avoided, as they may limit the fault coverage that can be achieved. A number of scan design rules that are required to successfully utilize scan and achieve the target fault coverage goal are listed in Table 2.7. In this table, a possible solution is recommended for each scan design rule violation. Scan design rules that are labeled “avoid” must be fixed throughout the shift and capture operations. Scan design rules that are labeled “avoid during shift” must be fixed only during the shift operation. Detailed descriptions are provided for some critical scan design rules. TABLE 2.7 Typical Scan Design Rules Design Style Scan Design Rule Tristate buses Avoid during shift Bidirectional I/O ports Avoid during shift Gated clocks (muxed-D full-scan) Avoid during shift Derived clocks (muxed-D full-scan) Avoid Combinational feedback loops Avoid Asynchronous set/reset signals Avoid Clocks driving data Avoid Floating buses Avoid Floating inputs Not recommended Cross-coupled NAND/NOR gates Not recommended Non-scan storage elements Not recommended for full-scan design Recommended Solution Fix bus contention during shift Force to input or output mode during shift Enable clocks during shift Bypass clocks Break the loops Use external pins Block clocks to the data portion Add bus keepers Tie to VDD or ground Use standard cells Initialize to known states, bypass, or make transparent Design for Testability 71 2.6.1 Tristate Buses Bus contention occurs when two bus drivers force opposite logic values onto a tristate bus, which can damage the chip. Bus contention is designed not to happen during the normal operation and is typically avoided during the capture operation, as advanced ATPG programs can generate test patterns that guarantee only one bus driver controls a bus. However, during the shift operation, no such guarantees can be made; therefore, certain modifications must be made to each tristate bus in order to ensure that only one driver controls the bus. For example, for the tristate bus shown in Figure 2.21a, which has three bus drivers (D1, D2, and D3), circuit modification can be made as shown in Figure 2.21b, where EN1 is forced to 1 to enable the D1 bus driver, while EN2 and EN3 are set to 0 to disable both D2 and D3 bus drivers, when SE = 1. In addition to bus contention, a bus without a pull-up, pull-down, or bus keeper may result in fault coverage loss. The reason is that the value of a floating bus is unpredictable, which makes it difficult to test for a stuck-at-1 fault at the enable signal of a bus driver. To solve this problem, a pull-up, pull-down, or bus keeper can be added. The bus keeper added in Figure 2.21b is an example of fixing this problem by forcing the bus to preserve the logic value driven onto it prior to when the bus becomes floating. 2.6.2 Bidirectional I/O Ports Bidirectional I/O ports are used in many designs to increase the data transfer bandwidth. During the capture operation, a bidirectional I/O port is usually specified as being either input or output; however, conflicts may occur at a bidirectional I/O port during the shift operation. An example is shown in Figure 2.22a, where a bidirectional I/O port is used as an input and the direction control is provided by the scan cell. Because the output value of the scan cell can vary during the shift operation, the output tristate buffer may become active, resulting in a conflict if BO and the I/O port driven by the tester have opposite logic values. Figure 2.22b shows an example of how to fix this problem by forcing the tristate buffer to be inactive when SE = 1, and the tester is used to drive the I/O port during the shift operation. During the capture operation, the applied test vector determines whether a bidirectional I/O port is used as input or output and controls the tester appropriately. 2.6.3 Gated Clocks Clock gating is a widely used design technique for reducing power by eliminating unnecessary storage element switching activity. An example is shown in Figure 2.23a. The clock enable signal (EN) is generated at the rising edge of CK and is loaded into the latch LAT at the failing edge of CK to become CEN. CEN is then used to enable or disable clocking for the flip-flop DFF. Although clock gating is a good approach for reducing power consumption, it prevents the clock ports of some flip-flops from being directly controlled by primary inputs. As a result, modifications are necessary to allow the scan shift operation to be conducted on these storage elements. 72 VLSI Test Principles and Architectures Functional enable logic SI SE CK SFF1 DI SI Q SE EN1 D1 SFF2 DI SI Q EN2 SE Bus D2 SFF3 DI SI Q SE EN 3 D3 (a) Functional enable logic SI SE CK SFF1 DI SI Q SE SFF2 DI SI Q SE SFF3 DI SI Q SE EN1 D1 EN2 D2 EN3 D3 (b) FIGURE 2.21 Fixing bus contention: (a) original circuit, and (b) modified circuit. Bus keeper Bus Design for Testability 73 DI SI Q SE CK BO BI SE DI SI Q SE I/O BO I/O CK BI (a) (b) FIGURE 2.22 Fixing bidirectional I/O ports: (a) original circuit, and (b) modified circuit. DQ Clock EN gating logic LAT D Q CEN G A DFF DQ GCK DQ CK (a) TM or SE DQ Clock EN gating logic DQ CK LAT D Q CEN G (b) FIGURE 2.23 Fixing gated clocks: (a) original circuit, and (b) modified circuit. B DFF DQ GCK The clock gating function should be disabled at least during the shift operation. Figure 2.23b shows how the clock gating can be disabled. In this example, an OR gate is used to force CEN to 1 using either the test mode signal TM or the scan enable signal SE. If TM is used, CEN will be held at 1 during the entire scan test operation (including the capture operation). This will make it impossible to detect 74 VLSI Test Principles and Architectures faults in the clock gating logic, causing fault coverage loss. If SE is used, CEN will be held at 1 only during the shift operation but will be released during the capture operation; hence, higher fault coverage can be achieved but at the expense of increased test generation complexity. 2.6.4 Derived Clocks A derived clock is a clock signal generated internally from a storage element or a clock generator, such as phase-locked loop (PLL), frequency divider, or pulse generator. Because derived clocks are not directly controllable from primary inputs, in order to test the logic driven by these derived clocks, these clock signals must be bypassed during the entire test operation. An example is illustrated in Figure 2.24a, where the derived clock ICK drives the flip-flops DFF1 and DFF2. In Figure 2.24b, a multiplexer selects CK, which is a clock directly controllable from a primary input, to drive DFF1 and DFF2 during the entire test operation when TM = 1. 2.6.5 Combinational Feedback Loops Depending on whether the number of inversions on a combinational feedback loop is even or odd, it can introduce either sequential behavior or oscillation into a design. Because the value stored in the loop cannot be controlled or determined during test, this can lead to an increase in test generation complexity or fault coverage loss. Because combinational feedback loops are not a recommended design practice, the best way to fix this problem is to rewrite the RTL code generating the loop. In cases where this is not possible, a combinational feedback loop, as shown in Figure 2.25a, can be fixed by using a test mode signal TM. This signal permanently disables the loop throughout the entire shift and capture operations by inserting a scan point (i e , a combination of control and observation points) to break the loop, as shown in Figure 2.25b. ICK DQ CK DFF1 DQ DFF2 DQ ICK DQ 0 CK 1 TM (a) (b) FIGURE 2.24 Fixing derived clocks: (a) original circuit, and (b) modified circuit. DFF1 DQ DFF2 DQ Design for Testability 75 CCoombinatioonnaall llooggicic CCoombinatioonnaall llooggicic D S D 0 1 Q DDII SSII TM SE (a) (b) FIGURE 2.25 Fixing combinational feedback loops: (a) original circuit, and (b) modified circuit. S SI SE CK 2.6.6 Asynchronous Set/Reset Signals Asynchronous set/reset signals of scan cells that are not directly controlled from primary inputs can prevent scan chains from shifting data properly. In order to avoid this problem, it is required that these asynchronous set/reset signals be forced to an inactive state during the shift operation. These asynchronous set/reset signals are typically referred to as being sequentially controlled. An example of a sequentially controlled reset signal RL is shown in Figure 2.26a. A method for fixing this asynchronous reset problem using an OR gate with an input tied to the test mode signal TM is shown in Figure 2.26b. When TM = 1, the asynchronous reset signal RL of scan cell SFF2 is permanently disabled during the entire test operation. The disadvantage of using the test mode signal TM to disable asynchronous set/reset signals is that faults within the asynchronous set/reset logic cannot be tested. Using the scan enable signal SE instead of TM makes it possible to detect faults within the asynchronous set/reset logic, because during the capture operation DI SI Q SE SFF1 RL R SFF2 DI SI Q SE TM DI SFF1 SI Q SE RL R DI SI Q SE SFF2 CK (a) CK (b) FIGURE 2.26 Fixing asynchronous set/reset signals: (a) original circuit, and (b) modified circuit. 76 VLSI Test Principles and Architectures SE = 0 these asynchronous set/reset signals are not forced to the inactive state. However, this might result in mismatches due to race conditions between the clock and asynchronous set/reset ports of the scan cells. A better solution is to use an independent reset enable signal RE to replace TM and to conduct test generation in two phases. In the first phase, RE is set to 1 during both shift and capture operations to test data faults through the DI port of the scan cells while all asynchronous set/reset signals are held inactive. In the second phase, RE is set to 1 during the shift operation and 0 during the capture operation without applying any clocks to test faults within the asynchronous set/reset logic. 2.7 SCAN DESIGN FLOW Although conceptually scan design is not difficult to understand, the practice of inserting scan into a design in order to turn it into a scan design requires careful planning. This often requires many circuit modifications where care must be taken in order not to disrupt the normal functionality of the circuit. In addition, many physical implementation details must be taken into consideration in order to guarantee that scan testing can be performed successfully. Finally, a good understanding of scan design, with respect to which scan cell design and scan architecture to use, is required in order to better plan in advance which scan design rules must be complied with and which debug and diagnose features must be included to facilitate simulation, debug, and fault diagnosis [Crouch 1999]. The shift operation and the capture operation are the two key scan operations where care needs to be taken in order to guarantee that the scan design can operate properly. The shift operation, which is common to all scan designs, must be designed to perform successfully, regardless of the clock skew that exists within the same clock domain and between different clock domains. The capture operation is also common to all scan designs, albeit with more stringent scan design rules in some scan designs as compared to others. It must be designed such that the ATPG tool is able to correctly and deterministically predict the expected responses of the generated test patterns. This requires a basic understanding of the logic simulation and fault models used during ATPG, as well as the clocking scheme used during the capture operation. A typical design flow for implementing scan in a sequential circuit is shown in Figure 2.27. In this figure, scan design rule checking and repair are first performed on a presynthesis RTL design or on a postsynthesis gate-level design, typically referred to as a netlist. The resulting design after scan repair is referred to as a testable design. Once all scan design rule violations are identified and repaired, scan synthesis is performed to convert the testable design into a scan design. The scan design now includes one or more scan chains for scan testing. A scan extraction step is used to further verify the integrity of the scan chains and to extract the final scan architecture of the scan chains for ATPG. Finally, scan verification is performed on both shift and capture operations in order to verify that the expected responses predicted by the zero-delay simulator used in test generation or fault simulation match with the full-timing behavior of the circuit Design for Testability 77 Original design Scan design rule checking and repair Constraint & control information FIGURE 2.27 Typical scan design flow. Testable design Scan synthesis Scan configuration Scan replacement Scan reordering Scan stitching Layout information Scan design Scan extraction Scan verification Test generation under test. The steps shown in the scan design flow are described in the following subsections in more detail. 2.7.1 Scan Design Rule Checking and Repair The first step in implementing a scan design is to identify and repair all scan design rule violations in order to convert the original design into a testable design. Repairing these violations allows the testable design to meet target fault coverage requirements and guarantees that the scan design will operate correctly. These scan design rules were described in the previous section. In addition to these scan design rules, certain clock control structures may have to be added for at-speed delay testing. Typically, scan design rule checking is also performed on the scan design after scan synthesis to confirm that no new violations exist. Upon successful completion of this step, the testable design must guarantee the correct shift and capture operations. During the shift operation, all clocks controlling scan cells of the design are directly controllable from external pins. The clock skew between adjacent scan cells must be properly managed in order not to cause any shift failure. During the capture operation, fixing all scan design rule violations 78 VLSI Test Principles and Architectures should guarantee correctness for data paths that originate and terminate within the same clock domain. For data paths that originate and terminate in different clock domains, additional care must be taken in terms of the way the clocks are applied in order to guarantee the success of the capture operation. This is mainly due to the fact that the clock skew between different clock domains is typically large. A data path originating in one clock domain and terminating in another might result in a mismatch when both clocks are applied simultaneously, and the clock skew between the two clocks is larger than the data path delay from the originating clock domain to the terminating clock domain. In order to avoid the mismatch, the timing governing the relationship of such a data path shown in the following equation must be observed: clock skew < data path delay + clock-to-Q delay originating clock If this is not the case, a mismatch may occur during the capture operation. In order to prevent this from happening, clocks belonging to different clock domains can be applied sequentially (using the staggered clocking scheme), as opposed to simultaneously, such that any clock skew that exists between the clock domains can be tolerated during the test generation process. It is also possible to apply only one clock during each capture operation using the one-hot clocking scheme. On the other hand, a design typically contains a number of noninteracting clock domains. In this case, these clocks can be applied simultaneously, which can reduce the complexity and final pattern count of the pattern generation and fault simulation process. Clock grouping is a process used to identify all independent or noninteracting clocks that can be grouped and applied simultaneously. An example of the clock grouping process is shown in Figure 2.28. This example shows the results of performing a circuit analysis operation on a testable design in order to identify all clock interactions, marked with an arrow, where a data transfer from one clock domain to a different clock domain occurs. As seen in Figure 2.28, the circuit in this example has seven clock domains (CD1 ∼ CD7) and five crossing-clock-domain data paths (CCD1 ∼ CCD5). From this example, it can be seen that CD2 and CD3 are independent from each other; hence, their related clocks can be applied simultaneously during test as CK2. Similarly, clock domains CD4 through CD7 can also be applied simultaneously during test as CK3. Therefore in this example, three grouped clocks instead of seven individual clocks can be used to test the circuit during the capture operation. 2.7.2 Scan Synthesis When all the repairs have been made to the circuit, the scan synthesis flow is commenced. The scan synthesis flow converts a testable design into a scan design without affecting the functionality of the original design. Static analysis tools and equivalency checkers, which can compare the logic circuitry of two circuits under certain constraints, are typically used to verify that this is indeed the case. Depending on the type of scan cells used and the type of scan architecture implemented, minor modifications to the scan synthesis flow shown in Figure 2.27 may be necessary. Design for Testability 79 CCD1 CD2 CCDD1 1 CK1 CCD2 CK2 CD3 CCD5 CCD3 CD4 CD5 CCD4 CD6 CK3 CD7 FIGURE 2.28 Clock grouping example. During the 1990s, this scan synthesis operation was typically performed using a separate set of scan synthesis tools, which were applied after the logic synthesis tool had synthesized a gate-level netlist out of an RTL description of the design. More recently, these scan synthesis features are being integrated into the logic synthesis tools, and scan designs are synthesized automatically from the RTL. The process of performing scan synthesis during logic synthesis is often referred to as one-pass synthesis or single-pass synthesis. The scan synthesis flow shown in Figure 2.27 includes four separate steps: (1) scan configuration, (2) scan replacement, (3) scan reordering, and (4) scan stitching. Each of these steps is described below in more detail. 2.7.2.1 Scan Configuration Scan configuration describes the initial step in scan chain planning, where the general structure of the scan design is determined. The main decisions that are made at this stage include: (1) the number of scan chains used; (2) the types of scan cells used to implement these scan chains; (3) storage elements to be excluded from the scan synthesis process; and (4) the way the scan cells are arranged within the scan chains. The number of scan chains used is typically determined by analyzing the input and output pins of the circuit to determine how many pins can be allocated for the scan use. In order not to increase the number of pins of the circuit, which is typically limited by the size of the die, scan inputs and outputs are shared with existing pins during scan testing. In general, the larger the number of scan chains used, the shorter the time to perform test on the circuit. This is due to the fact that the maximum length of the scan chains dictates the overall test application time required to run each test pattern. One limitation that can preclude many scan chains from being used is the presence of high-speed I/O pads. The addition of any 80 VLSI Test Principles and Architectures wire load to the high-speed I/O pad may adversely affect the timing of the design. An additional limitation is the number of tester channels available for scan testing. The second issue regarding the types of scan cells to use typically depends on the process library. In general, for each type of storage element used, most process libraries have a corresponding scan cell type that closely resembles the functionality and timing of the storage element during normal operation. The third issue relates to which storage elements to exclude from scan synthesis. This is typically determined by investigating parts of the design where replacing storage elements with functionally equivalent scan cells can adversely affect timing. Therefore, storage elements lying on the critical paths of a design where the timing margin is very tight are often excluded from the scan replacement step, in order to guarantee that the manufactured device will meet the restricted timing. In addition, certain parts of a design may be excluded from scan for many different reasons, including security reasons (e g , parts of a circuit that deal with encryption). In these cases, individual storage element types, individual storage element instances, or a complete section of the design can be specified as “don’t scan.” The remaining issue is to determine how the storage elements are arranged within the scan chains. This typically depends on how the number of clock domains relates to the number of scan chains in the design. In general, a scan chain is formed out of scan cells belonging to a single clock domain. For clock domains that contain a large number of scan cells, several scan chains are constructed, and a scan-chain balancing operation is performed on the clock domain to reduce the maximum scan-chain length. Oftentimes, a clock domain will include both negative-edge and positive-edge scan cells. If the number of negative-edge scan cells in a clock domain is large enough to construct a separate scan chain, then these scan cells can be allocated as such. In cases where a scan chain has to include both negative-edge and positive-edge scan cells, all negative-edge scan cells are arranged in the scan chains such that they precede all positive-edge scan cells in order to guarantee that the shift operation can be performed correctly. Figure 2.29a shows an example of a circuit structure comprising a negative-edge scan cell followed by a positive-edge scan cell. The associated timing diagram, shown in Figure 2.29b, illustrates the correct shift timing of the circuit structure. During each shift clock cycle, Y will first take on the state X at the rising CK edge before X is loaded with the SI value at the falling CK edge. If we accidentally place the positive-edge scan cell before the negative-edge scan cell, both scan cells will always incorrectly contain the same value at the end of each shift clock cycle. In cases where scan chains must include scan cells from several different clock domains, a lock-up latch is inserted between adjacent cross-clock-domain scan cells to guarantee that any clock skew between the clocks can be tolerated. Clock skew between different clock domains is expected, as clock skew is controlled within a clock domain to remain below a certain threshold, but not controlled across different clock domains. As a result, a race caused by hold time violation could occur between these two scan cells if a lock-up latch is not inserted. Figure 2.30a shows an example of a circuit structure having a scan cell SCp belonging to clock domain CK1 driving a scan cell SCq belonging to clock Design for Testability 81 SC1 SC2 DI DI SI SI Q X SI Q Y SE SE CK (a) CK X D1 D2 D3 Y D1 D2 D3 (b) FIGURE 2.29 Mixing negative-edge and positive-edge scan cells in a scan chain: (a) circuit structure, and (b) timing diagram. Clock domain 1 Clock domain 2 SCp Lock-up latch SCq SI DI SI Q X DQ Y DI SI Q Z SE SE CK1 CK2 (a) CK1 CK2 X D1 D2 D3 Y D1 D2 D3 Z D1 D2 D3 (b) FIGURE 2.30 Adding a lock-up latch between cross-clock-domain scan cells: (a) circuit structure, and (b) timing diagram. 82 VLSI Test Principles and Architectures domain CK2 through a lock-up latch. The associated timing diagram is shown in Figure 2.30b, where CK2 arrives after CK1, to demonstrate the effect of clock skew on cross-clock-domain scan cells. During each shift clock cycle, X will first take on the SI value at the rising CK1 edge, then Z will take on the Y value at the rising CK2 edge. Finally, the new X value is transferred to Y at the falling CK1 edge to store the SCp contents. If CK2 arrives earlier than CK1, Z will first take on the Y value at the rising CK2 edge. Then, X will take on the SI value at the rising CK1 edge. Finally, the new X value is transferred to Y at the falling CK1 edge to store the SCp contents. In both cases, the lock-up latch design in Figure 2.30a allows correct shift operation regardless of whether CK2 arrives earlier or later than CK1. It is important to note that this scheme works only when the clock skew between CK1 and CK2 is less than the width (duty cycle) of the clock pulse. If this is not the case, then slowing down the shift clock frequency or enlarging the duty cycle of the shift clock can guarantee that this approach will work for any amount of clock skew. Other lock-up latch and lock-up flip-flop designs can also be used. Once the clock structure of the scan chains is determined, it is still necessary to determine which scan cells should be stitched together into one scan chain and the order in which these scan cells should be placed. In some scan synthesis flows, a preliminary layout placement is used to allocate scan cells to different scan chains belonging to the same clock domain. Then, the best order in which to stitch these scan cells within the scan chains is determined in order to minimize the scan routing required to connect the output of each scan cell to the scan input of the next scan cell. In cases where a preliminary placement is not available, scan cells can be assigned to different scan chains based on an initial floor plan of the testable design, by grouping scan cells in proximate regions of the design together. Once the final placement is determined, the scan chains can then be reordered and stitched, and the scan design is modified based on the new scan chain order. 2.7.2.2 Scan Replacement After scan configuration is complete, scan replacement replaces all original storage elements in the testable design with their functionally equivalent scan cells. The testable design after scan replacement is often referred to as a scan-ready design. Functionally equivalent scan cells are the scan cells that most closely match power, speed, and area requirements of the original storage elements. The scan inputs of these scan cells are often tied to the scan outputs of the same scan cell to prevent floating inputs from being present in the circuit. These connections are later removed during the scan stitching step. In cases where one-pass or single-pass synthesis is used, scan replacement is transparent to tool users. Recently, some RTL scan synthesis tools have implemented scan replacement at the RTL, even before going to the logic/scan synthesis tool, in order to reflect the scan design changes in the original RTL design. 2.7.2.3 Scan Reordering Scan reordering refers to the process of reordering scan cells in scan chains, based on the physical scan cell locations, in order to minimize the amount of interconnect Design for Testability 83 wires used to implement the scan chains. During design implementation, if the physical location of each scan cell instance is not available, a “random” scan order based purely on the module-level and bus-level connectivity of the testable design can be used. However, if a preliminary placement is available, scan cells can be assigned to different scan chains based on the initial floor plan of the design. Only after the final placement process of the physical implementation is performed on this testable design is the physical location of each scan cell instance taken into consideration. During the routing process of the physical implementation, scan reordering can be performed using intra-scan-chain reordering, inter-scan-chain reordering, or a combination of both. Intra-scan-chain reordering, in which scan cells are reordered only within their respective scan chains, does not reorder any scan cells across clock or clock-polarity boundaries. Inter-scan-chain reordering, in which scan cells are reordered among different scan chains, must make sure that the clock structure of the scan chains is preserved. In both intra-scan-chain reordering and inter-scan-chain reordering, care must be also taken to limit the minimum distance between scan cells to avoid timing violations that can destroy the integrity of the shift operation. Advanced techniques have also been proposed to further reduce routing congestion while avoiding timing violations during the shift operation [Duggirala 2002] [Duggirala 2004]. For deep submicron circuits, the capacitance of the scan chain interconnect must also be taken into account to guarantee correct shift operation [Barbagallo 1996]. 2.7.2.4 Scan Stitching Finally, the scan stitching step is performed to stitch all scan cells together to form scan chains. Scan stitching refers to the process of connecting the output of each scan cell to the scan input of the next scan cell, based on the scan order specified above. An additional step is also performed by connecting the scan input of the first scan cell of each scan chain to the appropriate scan chain input port and the scan output of the last scan cell of each scan chain to the appropriate scan chain output port to make the scan chains externally accessible. In cases where a shared I/O port is used to connect to the scan chain input or the scan chain output, additional signals must be connected to the shared I/O port to guarantee that it always behaves as either input or output, respectively, throughout the shift operation. As mentioned earlier, it is important to avoid using high-speed I/O ports as scan chain inputs or outputs, as the additional loading could result in a degradation of the maximum speed at which the device can be operated. In addition to stitching the existing scan cells, lock-up latches or lock-up flip-flops are often inserted during the scan stitching step for adjacent scan cells where clock skew may occur. These lock-up latches or lock-up flip-flops are then stitched between adjacent scan cells. 2.7.3 Scan Extraction When the scan stitching step is complete, the scan synthesis process is complete. The original design has now been converted into a scan design; however, an additional 84 VLSI Test Principles and Architectures step is often performed to verify the integrity of the scan chains, especially if any design changes are made to the scan design. Scan extraction is the process used for extracting all scan cell instances from all scan chains specified in the scan design. This procedure is performed by tracing the design for each scan chain to verify that all the connections are intact when the design is placed in shift mode. Scan extraction can also be used to prepare for the test generation process to identify the scan architecture of the design in cases where this information is not otherwise available. 2.7.4 Scan Verification When the physical implementation of the scan design is completed, including placement and routing of all the cells of the design, a timing file in standard delay format (SDF) is generated. This timing file resembles the timing behavior of the manufactured device. This is then used to verify that scan testing can be successfully performed on the manufactured scan design. Other than the trivial problems of scan chains being incorrectly stitched, verification errors during the shift operation are typically due to hold time violations between adjacent scan cells, where the data path delay from the output of a driving scan cell to the scan input of the following scan cell is smaller than the clock skew that exists between the clocks driving the two scan cells. In cases where the two scan cells are driven by the same clock, this may indicate a failure of the clock tree synthesis (CTS) process in guaranteeing that the clock skew between scan cells belonging to the same clock domain be kept at a minimum. In cases where the two scan cells are driven by different clocks, this may indicate a failure of inserting a required lock-up latch between the scan cells of the two different clock domains. Apart from clock skew problems, other scan shift problems can occur. Often, they stem from (1) an incorrect scan initialization sequence that fails to put the design into test mode; (2) incomplete scan design rule checking and repair, where the asynchronous set/reset signals of some scan cells are not disabled during shift operation or the gated/generated clocks for some scan cells are not properly enabled or disabled; or (3) incorrect scan synthesis, where positive-edge scan cells are placed before negative-edge scan cells. Scan capture problems typically occur due to mismatches between the zero-delay model used in the test generation and fault simulation tool, and the full-timing behavior of the real device. In these cases, care must be taken during the scan design and test application process to: (1) provide enough clock delay between the supplied clocks such that the clock capture order becomes deterministic, and (2) prevent simultaneous clock and data switching events from occurring. Failing to take clock events into proper consideration can easily result in a breakdown of the zero-delay (cycle-based) simulator used in the test generation and fault simulation process. More detailed information regarding scan verification of the shift and capture operations is described below. Design for Testability 85 2.7.4.1 Verifying the Scan Shift Operation Verifying the scan shift operation involves performing flush tests using a fulltiming logic simulator during the shift operation. A flush test is a shift test where a selected flush pattern is shifted all the way through the scan chains in order to verify that the same flush pattern arrives at the end of the scan chains at the correct clock cycle. For example, a scan chain containing 1000 scan cells requires 1000 shift cycles to be applied to the scan chain for the selected flush pattern to begin arriving at the scan output. If the data arrive early by a number of shift cycles, this may indicate that a similar number of hold time problems exist in the circuit. To detect clock skew problems between adjacent scan cells, the selected flush pattern is typically a pattern that is capable of providing both 0-to-1 and 1-to-0 transitions to each scan cell. In order to ensure that a 0-to-0 or 1-to-1 transition of a scan cell does not corrupt the data, the selected flush pattern is further extended to provide these transitions. A typical flush pattern that is used for testing the shift operation is “01100,” which includes all four possible transitions. Different flush patterns can also be used for debugging different problems, such as the all-zero and all-one flush patterns used for debugging stuck-at faults in the scan chain. Because observing the arrival of the data on the scan chain output cannot pinpoint the exact location of any shift error in a faulty scan chain, flush testbenches are typically created to observe the values at all internal scan cells to identify the locations at which the shift errors exist. By using this technique, the faulty scan chain can be easily and quickly diagnosed and fixed during the scan shift verification process; for example: Scan hold time problems that exist between scan cells belonging to different clock domains indicate that a lock-up latch may be missing. Lock-up latches should be inserted between these adjacent scan cells. Scan hold time and setup time problems that exist between scan cells belonging to the same clock domain indicate that the CTS process was not performed correctly. In this case, either CTS has to be redone or additional buffers need to be inserted between the failing scan cells to slow down the path. Scan hold time problems due to positive-edge scan cells followed by negativeedge scan cells indicate that the scan chain order was not performed correctly. Lock-up flip-flops rather than lock-up latches can be inserted between these adjacent scan cells or the scan chains may have to be reordered by placing all negative-edge scan cells before all positive-edge scan cells. An additional approach to scan shift verification that has become more popular in recent years involves performing static timing analysis (STA) on the shift path in shift mode. In this case, the STA tool can immediately identify the locations of all adjacent scan cells that fail to meet timing. The same solutions mentioned earlier are then used to fix problems identified by the STA tool. 86 VLSI Test Principles and Architectures 2.7.4.2 Verifying the Scan Capture Operation Verifying the scan capture operation involves simulating the scan design using a full-timing logic simulator during the capture operation. This is used to identify the location of any failing scan cells where the captured response does not match the expected response predicted by the zero-delay logic simulator used in test generation or fault simulation. To reduce simulation time, a broadside-load testbench is often used, where a test pattern is loaded directly into all scan cells in the scan chains and only the capture cycle is simulated. Because the broadside-load test does not involve any shift cycle in the test pattern, broadside-load testbenches often include at least one shift cycle in the capture verification testbench to ensure that each test pattern can at least shift once. This requires loading the test pattern into the outputs of the previous scan cells, rather than directly into the outputs of the current scan cells. In addition, verifying the scan capture operation often includes a serial simulation, in which a limited number of test patterns, typically three to five or as many as can be simulated within a reasonable time, are simulated. In this serial simulation, a test pattern is simulated exactly how it would be applied on the tester by shifting in each pattern serially through the scan chains inputs. Next, a capture cycle is applied. The captured response is then shifted out serially to verify that the complete scan chain operation can be performed successfully. As mentioned before, mismatches in the capture cycle indicate that the zero-delay simulation model used by the test generator and fault simulator failed to capture all the details of the actual timing occurring in the device. Debugging these types of failures is tedious and may involve observing all signals of the mismatching scan cells as well as signal lines (also called nets) driving these scan cells. One brute-force method commonly used by designers for removing these mismatches is to mask off the locations by changing the expected response of the mismatching location into an unknown (X) value. A new approach that has become more popular is to use the static timing analysis tool for both scan shift and scan capture verification. 2.7.5 Scan Design Costs The price of converting a design into a scan design involves numerous costs, including area overhead cost, I/O pin cost, performance degradation cost, and design effort cost. However, these costs are far outweighed by the benefits of scan, in terms of the increased testability, lower test development cost, higher product quality with a smaller number of defective parts shipped, and reduced fault diagnosis and failure analysis time. As a result, implementing scan on a design has become almost mandatory. The costs of implementing scan are summarized below: Area overhead cost—This cost comes primarily in two forms. The first is the scan cell overhead cost due to the replacement of a storage element with a scan cell. The second is the routing cost, which is caused by additional routing of the scan chains, the scan enable signal, and additional shift clocks. Layout-based scan reordering techniques typically do a good job of reducing the overhead due to scan chain routing. Design for Testability 87 I/O pin cost—Scan design typically requires a dedicated test mode pin to indicate when scan testing is performed. Some designers have been able to get around this need by developing an initialization sequence that is capable of putting the design into test mode. Additional I/O cost is due to the possible performance degradation of pins where scan inputs and scan outputs are shared. Performance degradation cost—The additional scan input of a scan cell may require placing an additional delay on the functional path. The effects of this delay can be alleviated by embedding the scan replacement step in logic/scan synthesis such that the logic optimization process can be aggressively performed to reduce the effect of the added delay. Design effort cost—Implementing scan requires additional steps to be added to the typical design flow to perform scan design rule checking and repair, scan synthesis, scan extraction, and scan verification. Additional effort may also be required by the layout engineers in order to perform global routing of the scan enable signal or additional shift clocks, which must be designed to reach all scan cells in the design while having the ability to switch value within a reasonable time. As mentioned before, this cost is far outweighed by the savings in test development efforts that would otherwise have to be performed. 2.8 SPECIAL-PURPOSE SCAN DESIGNS As discussed above, scan design allows us to use a small external interface to control and observe the states of scan cells in a design which dramatically simplifies the task of test generation. In addition, scan design can be used to reduce debug and diagnosis time and facilitate failure analysis by giving access to the internal states of the circuit. A few other scan methodologies have been proposed for special-purpose testing. In this section, we describe three special-purpose scan designs—namely, enhanced scan, snapshot scan, and error-resilient scan—used for delay testing, system debug, and soft error protection, respectively. 2.8.1 Enhanced Scan Testing for a delay fault requires applying a pair of test vectors in an at-speed fashion. This is used to generate a logic value transition at a signal line or at the source of a path, and the circuit response to this transition is captured at the circuit’s operating frequency. Applying an arbitrary pair of vectors as opposed to a functionally dependent pair of vectors, generated through the combinational logic of the circuit under test, allows us to maximize the delay fault detection capability. This can be achieved using enhanced scan [Malaiya 1983] [Glover 1988] [Dervisoglu 1991]. Enhanced scan increases the capacity of a typical scan cell by allowing it to store two bits of data that can be applied consecutively to the combinational logic driven 88 VLSI Test Principles and Architectures X1 X2 Xn UPDATE LA1 D Q C Combinational logic LA2 D Q C Y1 Y2 Ym LAs D Q C SFF1 DI SDI SI Q SE SE CK FIGURE 2.31 Enhanced-scan architecture. SFF2 DI SI Q SE SFFs DI SI Q SE by the scan cells. For a muxed-D scan cell or a clocked-scan cell, this is achieved through the addition of a D latch. Figure 2.31 shows a general enhanced-scan architecture using muxed-D scan cells. In this figure, in order to apply a pair of test vectors to the design, the first test vector V1 is first shifted into the scan cells (SFF1 ∼ SFFs) and then stored into the additional latches (LA1 ∼ LAs) when the UPDATE signal is set to 1. Next, the second test vector V2 is shifted into the scan cells while the UPDATE signal is set to 0, in order to preserve the V1 values in the latches (LA1 ∼ LAs). Once the second vector V2 is shifted in, the UPDATE signal is applied to change V1 to V2 while capturing the output response at-speed into the scan cells by applying CK after exactly one clock cycle. The main advantage of enhanced scan is that it allows us to achieve high delay fault coverage, by applying any arbitrary pair of test vectors, that otherwise would have been impossible. The disadvantages, however, are that each enhanced-scan cell requires an additional scan-hold D latch and that maintaining the timing relationship between UPDATE and CK for at-speed testing may be difficult. An additional disadvantage is that many false paths, instead of functional data paths, may be activated during test, causing an over-test problem. In order to reduce over-test, the conventional launch-on-shift (also called skewed-load in [Savir 1993]) and launchon-capture (also called broad-side in [Savir 1994] or double-capture in Chapter 5) delay test techniques using normal scan chains can be used. These conventional delay test techniques are described in more detail in Chapters 4 and 5. 2.8.2 Snapshot Scan Snapshot scan is used to capture a snapshot of the internal states of the storage elements in a design at any time without having to disrupt the functional operation Design for Testability 89 X1 X2 Xn L1 1D Q C1 C2 2D CK UCK SDI DCK TCK SFF1 1D 2D Q C1 C2 FIGURE 2.32 Scan-set architecture. Combinational logic L2 1D Q C1 C2 2D SFF2 1D 2D Q C1 C2 Y1 Y2 Ym Ls 1D Q C1 C2 2D SFFs 1D 2D Q C1 C2 SDO of the circuit. This is done by adding a scan cell to each storage element of interest in the circuit. These scan cells are connected as one or more scan chains that can be used to shift in and shift out any required test data or internal state snapshot of the design. A snapshot scan design technique, called scan set, was proposed in [Stewart 1978]. An example of scan-set architecture implemented by adding clocked-scan cells to the system latches (two-port D latches) for snapshot scan is shown in Figure 2.32. In this figure, four different operations are possible: (1) Test data can be shifted into and out of the scan cells (SFF1 ∼ SFFs) from the SDI and SDO pins, respectively, using TCK. (2) The test data can be transferred to the system latches (L1 ∼ Ls) in parallel through their 2D inputs using UCK. (3) The system latch contents can be loaded into the scan flip-flops through their 1D inputs using DCK. (4) The circuit can be operated in normal mode using CK to capture the values from the combinational logic into the system latches (L1 ∼ Ls). During normal (system) operation, the contents of the system latches can be captured into the scan flip-flops any time DCK is applied. The captured response stored in the scan cells (SFF1 ∼ SFFs) can then be shifted out for analysis. This provides a powerful means of getting a snapshot of the system status that is very helpful in system debug. It is also possible to shift in test data to the system latches to ease fault diagnosis and failure analysis when UCK is applied to the system latches. In addition, by adding observation scan cells that are connected to specific circuit nodes, the scan-set technique makes it possible to capture the logic value at any circuit node of interest and to shift it out for observation. As a result, the 90 VLSI Test Principles and Architectures observability at nonstorage circuit nodes can be dramatically improved. Hence, the scan-set technique can significantly improve the circuit’s diagnostic resolution and silicon debug capability. These advantages have made the approach attractive to high-performance and high-complexity designs [Kuppuswamy 2004], despite the increased area overhead. The technique has also been extended to the LSSD architecture [DasGupta 1981]. 2.8.3 Error-Resilient Scan Soft errors are transient single-event upsets (SEUs) caused by various types of radiation. Cosmic radiation has long been regarded as the major source of soft errors, especially in memories [May 1979], and chips used in space applications typically use parity or error-correcting code (ECC) for soft error protection. As circuit features begin to shrink into the nanometer ranges, error-causing activation energies are reduced. As a result, terrestrial radiation, such as alpha particles from the packaging materials of a chip, is also beginning to cause soft errors with increasing frequency. This has created reliability concerns, especially for microprocessors, network processors, high-end routers, and network storage components. Error-resilient scan, proposed in [Mitra 2005], can also be used to allow scan design to protect a device from soft errors during normal system operation. Error-resilient scan is based on the observation that soft errors either: (1) occur in memories and storage elements and manifest themselves by flipping their stored states, or (2) result in a transient fault in a combinational gate, as caused by an ion striking a transistor within the combinational gate, and can be captured by a memory or storage element [Nicolaidis 1999]. Data from [Mitra 2005] show that combinational gates and storage elements contribute to a total of 60% of the soft error rate (SER) of a design manufactured using current state-of-the-art technology versus 40% for memories. Hence, it is no longer enough to consider soft error protection only for memories without considering any soft error protection for storage elements, as well. Figure 2.33 shows an error-resilient scan cell design [Mitra 2005] that reduces the impact of soft errors affecting storage elements by more than 20 times. This scan cell consists of a system flip-flop and a scan portion, each comprised of a one-port D latch and a two-port D latch, a C-element, and a bus keeper. This scan cell supports two operation modes: system mode and test mode. In test mode, TEST is set to 1, and the C-element acts as an inverter. During the shift operation, a test vector is shifted into latches LA and LB by alternately applying clocks SCA and SCB while keeping CAPTURE and CLK at 0. Then, the UPDATE clock is applied to move the content of LB to PH1. As a result, a test vector is written into the system flip-flop. During the capture operation, CAPTURE is first set to 1, and then the functional clock CLK is applied which captures the circuit response to the test vector into the system flip-flop and the scan portion simultaneously. The circuit response is then shifted out by alternately applying clocks SCA and SCB again. In system mode, TEST is set to 0, and the C-element acts as a hold-state comparator. The function of the C-element is shown in Table 2.8. When inputs O1 Design for Testability 91 SCB SI SCA CAPTURE Scan portion LA 1D C1 Q 2D C2 LB C1 O2 Q 1D C-element UPDATE D CLK TEST FIGURE 2.33 Error-resilient scan cell. PH2 C1 Q 1D PH1 1D C1 O1 2D Q C2 System flip-flop TABLE 2.8 C-Element Truth Table O1 O2 Q 00 1 11 01 0 Previous value retained 1 0 Previous value retained SO Keeper Q and O2 are unequal, the output of the C-element keeps its previous value. During this mode, a 0 is applied to the SCA, SCB, and UPDATE signals, and a 1 is applied to the CAPTURE signal. This converts the scan portion into a master-slave flip-flop that operates as a shadow of the system flip-flop. That is, whenever the functional clock CLK is applied, the same logic value is captured into both the system flip-flop and the scan portion. When CLK is 0, the outputs of latches PH1 and LB hold their previous logic values. If a soft error occurs either at PH1 or at LB, O1 and O2 will have different logic values. When CLK is 1, the outputs of latches PH2 and LA hold their previous logic values, and the logic values drive O1 and O2, respectively. If a soft error occurs either at PH2 or at LA, O1 and O2 will have different logic values. In both cases, unless such a soft error occurs after the correct logic value passes through the C-element and reaches the keeper, the soft error will not propagate to the output Q and the keeper will retain the correct logic value at Q. Error-resilient scan is one of the first online test techniques developed for soft error protection. While the error-resilient scan cell requires more test signals, clocks, and area overhead than conventional scan cells, the technique paves the way 92 VLSI Test Principles and Architectures to develop more advanced error-resilient and error-tolerant scan and logic BIST architectures to cope with the physical failures of the nanometer age. 2.9 RTL DESIGN FOR TESTABILITY During the 1990s, the testability of a circuit was primarily assessed and improved at the gate level. The reason was because the circuits were not too large that the logic/scan synthesis process took an unreasonable amount of time. As device size grows toward tens to hundreds of millions of transistors, tight timing, potential yield loss, and low power issues begin to pose serious challenges. When combined with increased core reusability and time-to-market pressure, it is becoming imperative that most, if not all, testability issues be fixed at the RTL. This allows the logic/scan synthesis tool and the physical synthesis tool, which takes physical layout information into consideration, to optimize area, power, and timing after DFT repairs are made. Fixing DFT problems at the RTL also allows designers to create testable RTL cores that can be reused without having to repeat the DFT checking and repair process for a number of times. Figure 2.34 shows a design flow for performing testability repair at the gate level. It is clear that performing testability repair at the gate level introduces a loop in the design flow that requires repeating the time-consuming logic synthesis process every time testability repair is made. This makes it attractive to attempt to perform testability checking and repair at the RTL instead so testability violations can be detected and fixed at the RTL, as shown in Figure 2.35, without having to repeat the logic synthesis process. An additional benefit of performing testability repair at the RTL is that it allows scan to be more easily integrated with other advanced DFT features implemented at the RTL, such as memory BIST, logic BIST, test compression, boundary scan, and analog and mixed-signal (AMS) BIST. This allows us to perform all testability integration at the RTL, as opposed to the current practices of integrating the RTL design Logic synthesis Gate-level design Testability repair Testable design Scan synthesis Scan design FIGURE 2.34 Gate-level testability repair design flow. Design for Testability 93 FIGURE 2.35 RTL testability repair design flow. RTL design Testability repair Testable RTL design Logic/scan synthesis Scan design advanced DFT features at the RTL, and later integrating them with scan at the gate level. In the following, we describe the RTL DFT problems by focusing mainly on scan design. Some modern synthesis tools now incorporate testability repair and scan synthesis as part of the logic synthesis process, such that a testable design free of scan rule violations is generated automatically. In this case, if the DFT fixes made are acceptable and do not have to be incorporated into the RTL, the flow can proceed directly to test generation and scan verification. 2.9.1 RTL Scan Design Rule Checking and Repair In order to perform scan design rule checking and repair at the RTL, a fast synthesis step of the RTL is usually performed first. In fast synthesis, combinational RTL code is mapped onto combinational primitives and high-level models, such as adders and multipliers. This allows us to identify all possible scan design rule violations and infer all storage elements in the RTL design. Static solutions for identifying testability problems at the RTL without having to perform any test vector simulation or dynamic solutions that simulate the structure of the design through the RTL have been developed. These solutions allow us to identify almost all testability problems at the RTL. While a few testability problems remain that can be identified only at the gate level, this approach does reduce the number of iterations involving logic synthesis, as shown in Figure 2.35. In addition, it has become common to add scan design rules as part of RTL “lint” tools that check for good coding and reusability styles, as well as user-defined coding style rules [Keating 1999]. To further optimize testability results, clock grouping can also be performed at the RTL as part of scan design rule checking [Wang 2005a]. Automatic methods for repairing RTL testability problems have also been developed [Wang 2005a]. An example of this is shown in Figure 2.36. The RTL code shown in Figure 2.36a, which is written in the Verilog hardware description language (HDL) [IEEE 1463-2001], represents a generated clock. In this example, a flip-flop clk_15 can be inferred, whose value is driven to 1 when a counter value q is equal to “1111.” The output of this flip-flop is then used to trigger the second “always” statement, where an additional flip-flop can be inferred. Figure 2.36b 94 VLSI Test Principles and Architectures always @(posedge clk) if (q ==4'b1111) clk_15 <= 1; else begin clk_15 <= 0; q < = q + 1; end always @(posedge clk_15) d < = start; (a) Q clk_15 start D Q d clk (b) always@(posedge clk) if(q == 4'b1111) clk_15 <= 1; else clk_15 Q start D Qd begin clk_15 <= 0; q <= q + 1; end clk 0 clk_test 1 assign clk_test = (TM)? clk : clk_15; always @(posedge clk_test) TM d <= start; (c) (d) FIGURE 2.36 Automatic repair of a generated clock violation at the RTL: (a) generated clock (RTL code), (b) generated clock (schematic), (c) generated clock repair (RTL code), and (d) generated clock repair (schematic). shows a schematic of the flip-flop generating the clk_15 signal, as well as the flipflop driven by the generated clock, which is likely to be the structure synthesized out of the RTL using a logic synthesis tool. This scan design rule violation can be fixed using the test mode signal TM by modifying the RTL code as shown in Figure 2.36c. The schematic for the modified RTL code is shown in Figure 2.36d. 2.9.2 RTL Scan Synthesis When storage elements have been identified during RTL scan design rule checking, either RTL scan synthesis or pseudo RTL scan synthesis can be performed. In RTL scan synthesis, the scan synthesis step as described in Section 2.7.2 is performed. The only difference is that the scan equivalent of each storage element does not refer to a library cell but to an RTL structure that is equivalent to the original storage element in normal mode. In this case, the scan chains are inserted into the RTL design. In pseudo RTL scan synthesis, the scan synthesis step is not performed; only pseudo primary inputs and pseudo primary outputs are specified and stitched to primary inputs and primary outputs, respectively. This approach is becoming more appealing to designers nowadays, because it can cope with many advanced DFT structures, such as logic BIST and test compression, where scan chains are driven internally by additional test structures synthesized at the RTL. Once all advanced DFT structures are inserted at the RTL, a one-pass Design for Testability 95 or single-pass synthesis step is performed using the RTL design flow, as shown in Figure 2.35. Several additional steps are actually performed in order to identify the storage elements in the RTL design. First, all clocks are identified, either explicitly by tracing from specified clock signal names, or implicitly by analyzing the sensitivity list of all “always” blocks. When the clocks have been identified, all registers, each consisting of one or more storage elements in the RTL design, are inferred by analyzing all “assign” statements to determine which assignments can be mapped onto a register while keeping track of the clock domain to which each register belongs. In addition, the clock polarity of each register is determined. When all registers have been identified and each converted into its scan equivalent at the RTL, the next step is to stitch these individual scan cells into one or more scan chains. One approach is to allocate scan cells to different scan chains based on the driving clocks and to stitch all scan cells within a scan chain in a random fashion [Aktouf 2000]. Although this approach is simple and straightforward, it can introduce wiring congestion as well as high interconnect area overhead. In order to solve these issues, it is better to take full advantage of the rich functional information available at the RTL [Roy 2000] [Huang 2001]. Because storage elements are identified as registers as opposed to a large number of unrelated individual storage elements, it is beneficial to connect the scan cells (which are scan equivalence of these storage elements) belonging to the same register sequentially in a scan chain. This has been found to dramatically reduce wiring congestion and interconnect area overhead. 2.9.3 RTL Scan Extraction and Scan Verification In order to verify the scan-inserted RTL design (also called RTL scan design), both scan extraction and scan verification must be performed. Scan extraction relies on performing fast synthesis on the RTL scan design. This generates a software model where scan extraction can be performed by tracing the scan connections of each scan chain in a similar manner as scan extraction from a gate-level scan design. Scan verification relies on a flush testbench that is used to simulate flush tests on the RTL scan design. Because the inputs and outputs of the RTL scan design should match the inputs and outputs of its gate-level scan design, the same flush testbench can be used to verify the scan operation for both RTL and gate-level designs. It is also possible to apply broadside-load tests for verifying the scan capture operation at the RTL. In this case, either random test patterns or deterministic test patterns generated at the RTL can be used [Ghosh 2001] [Ravi 2001] [Zhang 2003]. 2.10 CONCLUDING REMARKS Design for testability (DFT) has become vital for ensuring product quality. Over the past decades, we have seen DFT engineering evolve in order to bridge the gap between design engineering and test engineering. An early task of DFT engineering 96 VLSI Test Principles and Architectures was to quantify testability. This led to the development of testability analysis, used to identify design areas of poor controllability and observability. These techniques have since proven effective in test generation, logic built-in self-test (BIST), and fault coverage estimation. When it was recognized that generating test patterns for a sequential circuit was a much more difficult problem than generating test patterns for a combinational circuit, ad hoc DFT techniques were proposed but were met with limited success. Scan design, which has proven to be the most powerful DFT technique ever invented, allowed the transformation of sequential circuit testing into combinational circuit testing and has since become an industry standard. In this chapter, we have presented a comprehensive discussion of scan design. This included scan cell designs, scan architectures, scan design rules, and a typical scan design flow. The RTL DFT techniques that include RTL testability analysis and RTL design for testability were briefly touched upon; these techniques are used to guide testability enhancement and enable DFT integration at the RTL. Finally, we examined promising random-access scan architecture along with a number of special-purpose scan designs, hoping to shed some light on future DFT research. As we continue to move towards even smaller geometries, new design and test challenges have started to evolve. Novel and advanced DFT architectures will be required to further reduce test power, test data volume, and test application time. We anticipate that advanced at-speed scan and logic BIST architectures [Wang 2005b], low-power scan and logic BIST architectures [Girard 2002] [Wen 2005], and novel error-resilient and error-tolerant architectures [Breuer 2004] will be of growing importance in the coming decades to help us cope with the physical failures of the nanometer design era. 2.11 EXERCISES 2.1 (Testability Analysis) Calculate the SCOAP controllability and observability measures for a three-input XOR gate and for its NAND–NOR implementation. 2.2 (Testability Analysis) Use the rules given in Tables 2.3 and 2.4 to calculate the probability-based testability measures for a three-input XNOR gate and for its NAND–NOR implementation. Assume that the probability-based controllability values at all primary inputs and the probability-based observability value at the primary output are 0.5 and 1, respectively. 2.3 (Testability Analysis) Solve Problem 2.2 again for the full-adder circuit shown in Figure 2.1. 2.4 (Testability Analysis) Calculate the combinational observability of input ai at output sk, denoted by O(ai, sk), where k > i, for the n-bit ripple-carry adder shown in Figure 2.4. 2.5 (Ad Hoc Technique) Use an example to show why a combinational feedback loop in a combinational circuit can cause low testability. Design for Testability 97 2.6 (Test Point Insertion) Show an implementation where a single observation point is used to observe the three low-observability nodes A, B, and C in Figure 2.5 using XOR gates. 2.7 (Clocked-Scan Cell) Show a possible gate-level implementation of the clocked-scan cell shown in Figure 2.11a. 2.8 (LSSD Scan Cell) Show a possible CMOS implementation of the LSSD scan cell shown in Figure 2.12a. 2.9 (Full-Scan Design) Calculate the number of clock cycles required for testing a full-scan design with n test vectors. Assume that the full-scan design has m scan chains, each having the same length L, and that scan testing is conducted in the way shown in Figure 2.14b. 2.10 (Full-Scan Design) Explain the main differences between an LSSD singlelatch design and an LSSD double-latch design. 2.11 (Random-Access Scan) Assume that a sequential circuit with n storage elements has been reconfigured as a full-scan design as shown in Figure 2.14a and a random-access scan design as shown in Figure 2.19. In addition, assume that the full-scan circuit has m balanced scan chains and that a test vector vi is currently in the scan cells of both scan designs. Now consider the application of the next test vector vi+1. Assume that vi and vi+1 are different in d bits. Calculate the number of clock cycles required for applying vi+1 to the full-scan design and the random-access scan design, respectively. 2.12 (Combinational Feedback Loop) Show an algorithm that checks whether a sequential circuit contains combinational feedback loops. 2.13 (Lock-Up Latch) Suppose that a scan chain is configured as SI → SFF1 → SFF2 → SFF3 → SFF4 → SFF5 → SO, where SFF1 through SFF5 are muxed-D scan cells, and SI and SO are the scan input pin and scan output pin, respectively. Suppose that this scan chain fails scan shift verification in which the flush test sequence < t1t2t3t4t5 > = < 01010 > is applied but the response sequence is < r1r2r3r4r5 > =< 01100 >. Identify the scan flip-flops that may have caused this failure, and show how to fix this problem by using a lock-up latch. 2.14 (Lock-Up Latch) A scan chain may contain both positive-edge-triggered and negative-edge-triggered muxed-D scan cells. If, by accident, all positive-edgetriggered scan flip-flops are placed before all negative-edge-triggered muxed-D scan cells, show how to stitch them into one single scan chain. (Hint: Positiveedge-triggered muxed-D scan cells and negative-edge-triggered muxed-D scan cells should be placed in two separate sections.) 2.15 (Lock-Up Latch) Refer to Figure 2.30. The scheme works only when the clock skew between CK1 and CK2 is less than the width (duty cycle) of the clock pulse. If CK2 is delayed more than the duty cycle of CK1 (i e , CK1 and CK2 become nonoverlapping), show whether or not it is possible to stitch the 98 VLSI Test Principles and Architectures two cross-clock-domain scan cells into one single scan chain using a lock-up latch. If not, can it be done using a lock-up flip-flop instead? 2.16 (Scan Stitching) Use examples to show why a scan chain may not be able to perform the shift operation properly if two neighboring scan cells in the scan chain are too close to or too far from each other. Also describe how to solve these problems. 2.17 (Test Signal) Describe the difference between the test mode signal TM and the scan enable signal SE used in scan testing. 2.18 (Clock Grouping) Show an algorithm to find the smallest number of clock groups in clocking grouping. 2.19 (RTL Testability Enhancement) Read the following Verilog HDL code and draw its schematic. Then determine if there is any scan design rule violation. If there is any violation, modify the RTL code to fix the problem, then draw the schematic of the modified RTL code. reg [3:0] tri_en; always @(posedge clk) begin case (bus_sel) 0: tri_en[0] = 1’bl; 1: tri_en[1] = 1’bl; 2: tri_en[2] = 1’bl; 3: tri_en[3] = 1’bl; endcase end assign dbus = (tri_en[0])? d1 : 8’bz; assign dbus = (tri_en[1])? d2 : 8’bz; assign dbus = (tri_en[2])? d3 : 8’bz; assign dbus = (tri_en[3])? d4 : 8’bz; 2.20 (A Design Practice) Use the scan design rule checking programs and user’s manuals contained on the companion Web site to show if you can detect any asynchronous set/reset signal violations and bus contention. Try to redesign a Verilog circuit to include such violations. Then, fix the violations by hand, and see whether the problems disappear. 2.21 (A Design Practice) Use the scan synthesis programs and user’s manuals contained on the companion Web site to convert the two ISCAS-1989 benchmark circuits s27 and s38417 [Brglez 1989] into scan designs. Perform scan extraction and then run Verilog flush tests and broadside-load tests on the scan designs to verify whether the generated testbenches pass Verilog simulation. Design for Testability 99 Acknowledgments The authors wish to thank Prof. Xinghao Chen of The City College and Graduate Center of The City University of New York for contributing the Testability Analysis section, and Shianling Wu of SynTest Technologies for contributing a portion of the RTL Design for Testability section, as well as Dwayne Burek of Magma Design Automation, Dr. Augusli Kifli of Faraday Technology, Thomas Wilderotter of Synopsys, and Xiangfeng Li and Fangfang Li of SynTest Technologies for reviewing the text and providing valuable comments. References R2.0—Books [Abramovici 1994] M. Abramovici, M. A. Breuer, and A. D. Friedman, Digital Systems Testing and Testable Design, IEEE Press, Piscataway, NJ, 1994. [Bushnell 2000] M. L. Bushnell and V. D. Agrawal, Essentials of Electronic Testing for Digital, Memory and Mixed-Signal VLSI Circuits, Springer Science, New York, 2000. [Crouch 1999] A. Crouch, Design for Test for Digital IC’s and Embedded Core Systems, Prentice Hall, Upper Saddle River, NJ, 1999. [Fujiwara 1985] H. Fujiwara, Logic Testing and Design for Testability, The MIT Press, Cambridge, MA, 1985. [IEEE 1463-2001] IEEE Standard Description Language Based on the Verilog Hardware Description Language, IEEE Std. 1463-2001, Institute of Electrical and Electronics Engineers, New York, 2001. [Jha 2002] N. K. Jha and S. K. Gupta, Testing of Digital Systems, Cambridge University Press, London, 2002. [Keating 1999] M. Keating and P. Bricaud, Reuse Methodology Manual for System-on-a-Chip Designs, Kluwer Academic, Boston, MA, 1999. [McCluskey 1986] E. J. McCluskey, Logic Design Principles: With Emphasis on Testable Semiconductor Circuits, Prentice Hall, Englewood Cliffs, NJ, 1986. [Nadeau-Dostie 2000] B. Nadeau-Dostie, Design for At-Speed Test, Diagnosis and Measurement, Kluwer Academic, Boston, MA, 2000. [Stroud 2002] C. E. Stroud, A Designer’s Guide to Built-In Self-Test, Kluwer Academic, Boston, MA, 2002. R2.1—Introduction [Cheng 1990] K.-T. Cheng and V. D. Agrawal, A partial scan method for sequential circuits with feedback, IEEE Trans. Comput., 39(4), 544–548, 1990. [Fujiwara 1982] H. Fujiwara and S. Toida, The complexity of fault detection problems for combinational circuits, IEEE Trans. Comput., C-31(6), 555–560, 1982. [Mitra 2005] S. Mitra, N. Seifert, M. Zhang and K. Kim, Robust system design with built-in soft-error resilience, IEEE Compt., 38(2), 43–52, 2005. 100 VLSI Test Principles and Architectures R2.2—Testability Analysis [Agrawal 1982] V. D. Agrawal and M. R. Mercer, Testability measures: What do they tell us?, in Proc. Int. Test Conf., November 1982, pp. 391–396. [Boubezari 1999] S. Boubezari, E. Cerny, B. Kaminska, and B. Nadeau-Dostie, Testability analysis and test-point insertion in RTL VHDL specifications for scan-based BIST, IEEE Trans. Comput.-Aided Des., 18(9), 1327–1340, 1999. [Breuer 1978] M. A. Breuer, New concepts in automated testing of digital circuits, in Proc. EEC Symp. on CAD of Digital Electronic Circuits and Systems, 1978, pp. 69–92. [Grason 1979] J. Grason, TMEAS: A testability measurement program, in Proc. Des. Automat. Conf., June 1979, pp. 156–161. [Goldstein 1979] L. H. Goldstein, Controllability/observability analysis of digital circuits, IEEE Trans. Circuits Syst., CAS-26(9), 685–693, 1979. [Goldstein 1980] L. H. Goldstein and E. L. Thigpen, SCOAP: Sadia Controllability/Observability Analysis Program, in Proc. Des. Automat. Conf., June 1980, pp. 190–196. [Jain 1985] S. K. Jain and V. D. Agrawal, Statistical fault analysis, IEEE Des. Test Comput., 2(2), 38–44, 1985. [Lee 1992] T.-C. Lee, W. H. Wolf, N. K. Jha, and J. M. Acken, Behavioral synthesis for easy testability in data path allocation, in Proc. Int. Test Conf., October 1992, pp. 29–32. [Rizzolo 2001] R. F. Rizzolo, B. F. Robbins, and D. G. Scott, A hierarchical approach to improving random pattern testability on IBM eServer z900 chips, in Digest of Papers: North Atlantic Test Workshop, May 2001, pp. 84–89. [Rutman 1972] R. A. Rutman, Fault detection test generation for sequential logic heuristic tree search, IEEE Computer Group Repository, Paper No. R-72-187, 1972. [Parker 1975] K. P. Parker and E. J. McCluskey, Probability treatment of general combinational networks, IEEE Trans. Comput., 24(6), 668–670, 1975. [Savir 1984] J. Savir, G. S. Ditlow, and P. H. Bardell, Random pattern testability, IEEE Trans. Comput., C-33(1), 79–90, 1984. [Seth 1985] S. C. Seth, L. Pan, and V. D. Agrawal, PREDICT: Probabilistic estimation of digital circuit testability, in Proc. Int. Symp. on Fault-Tolerant Computing, June 1985, pp. 220–225. [Stephenson 1976] J. E. Stephenson and J. Garson, A testability measure for register transfer level digital circuits, in Proc. Int. Symp. on Fault-Tolerant Computing, June 1976, pp. 101–107. [Wang 1984] L.-T. Wang and E. Law, Daisy Testability Analyzer (DTA), in Proc. Int. Conf. on Computer-Aided Design, November 1984, pp. 143–145. [Wang 1985] L.-T. Wang and E. Law, An enhanced Daisy Testability Analyzer (DTA), in Proc. Automat. Test. Conf., October 1985, pp. 223–229. R2.3—Design for Testability Basics [Williams 1983] T. W. Williams and K. P. Parker, Design for testability: A survey, Proc. IEEE, 71(1), 98–112, 1983. Design for Testability 101 R2.4—Scan Cell Designs [DasGupta 1982] S. DasGupta, P. Goel, R. G. Walter, and T. W. Williams, A variation of LSSD and its implications on design and test pattern generation in VLSI, in Proc. Int. Test Conf., November 1982, pp. 63–66. [Eichelberger 1977] E. B. Eichelberger and T. W. Williams, A logic design structure for LSI testability, in Proc. Des. Automat. Conf., June 1977, pp. 462–468. [Eichelberger 1978] E. B. Eichelberger and T. W. Williams, A logic design structure for LSI testability, J. Des. Automat. Fault-Tolerant Comput., 2(2), 165–178, 1978. R2.5—Scan Architectures [Abadir 1985] M. S. Abadir and M. A. Breuer, A knowledge-based system for designing testable VLSI chips, IEEE Design Test Comput., 2(4), 56–68, 1985. [Agrawal 1987] V. D. Agrawal, K.-T. Cheng, D. D. Johnson, and T. Lin, A complete solution to the partial scan problem, in Proc. Int. Test Conf., September 1987, pp. 44–51. [Agrawal 1995] V. D. Agrawal, Special issue on partial scan methods, Vol. 7, No. 1/2, Journal of Electronic Testing: Theory and Applications (JETTA), Aug.–Oct., 7(1/2), 1995. [Ando 1980] H. Ando, Testing VLSI with random access scan, in Proc. COMPCON, February 1980, pp. 50–52. [Arslan 2004] B. Arslan and A. Orailoglu, Test cost reduction through a reconfigurable scan architecture, in Proc. Int. Test Conf., November 2004, pp. 945–952. [Baik 2004] D. Baik, S. Kajihara, and K. K. Saluja, Random access scan: A solution to test power, test data volume and test time, in Proc. Int. Conf. on VLSI Design, January 2004, pp. 883–888. [Baik 2005] D. Baik and K. K. Saluja, Progressive random access scan: A simultaneous solution to test power, test data volume and test time, in Proc. Int. Test Conf., November 2005, Paper 15.2 (10 pp.). [Cheng 1989] K.-T. Cheng and V. D. Agrawal, An economical scan design for sequential logic test generation, in Proc. Int. Symp. on Fault-Tolerant Computing, June 1989, pp. 28–35. [Cheng 1990] K.-T. Cheng and V. D. Agrawal, A partial scan method for sequential circuits with feedback, IEEE Trans. Comput., 39(4), 544–548, 1990. [Cheng 1995] K.-T. Cheng, Single-clock partial scan, IEEE Des. Test Comput., 12(2), 24–31, 1995. [Gupta 1990] R. Gupta, R. Gupta, and M. A. Breuer, The ballast methodology for structured partial scan design, IEEE Trans. Comput., 39(4), 538–544, 1990. [Ma 1988] H.-K. Ma, S. Devadas, A. R. Newton, and A. Sangiovanni-Vincentelli, An incomplete scan design approach to test generation for sequential machines, in Proc. Int. Test Conf., September 1988, pp. 730–734. [Mudlapur 2005] A. S. Mudlapur, V. D. Agrawal, and A. D. Singh, A random access scan architecture to reduce hardware overhead, in Proc. Int. Test Conf., November 2005, Paper 15.1 (9 pp.). [Saund 1997] G. S. Saund, M. S. Hsiao, and J. H. Patel, Partial scan beyond cycle cutting, in Proc. Int. Symp. on Fault-Tolerant Computing, 1997, pp. 320–328. [Susheel 2002] T. G. Susheel, J. Chandra, T. Ferry, and K. Pierce, ATPG based on a novel grid-addressable latch element, in Proc. Des. Automat. Conf., June 2002, pp. 282–286. 102 VLSI Test Principles and Architectures [Trischler 1980] E. Trischler, Incomplete scan path with an automatic test generation methodology, in Proc. Int. Test Conf., November 1980, pp. 153–162. [Williams 1983] T. W. Williams and K. P. Parker, Design for testability: A survey, Proc. IEEE, 71(1), 98–112, 1983. R2.6—Scan Design Rules [Cheung 1996] B. Cheung and L.-T. Wang, The seven deadly sins of scan-based designs, Integrated Syst. Des., August 1996 (www.eetimes.com/editorial/1997/test9708.html). R2.7—Scan Design Flow [Barbagallo 1996] S. Barbagallo, M. Bodoni, D. Medina, F. Corno, P. Prinetto, and M. Sonza Reorda, Scan insertion criteria for low design impact, in Proc. VLSI Test Symp., April 1996, pp. 26–31. [Duggirala 2002] S. Duggirala, R. Kapur, and T. W. Williams, System and Method for HighLevel Test Planning for Layout, U.S. Patent No. 6,434,733, August 13, 2002. [Duggirala 2004] S. Duggirala, R. Kapur, and T. W. Williams, System and Method for HighLevel Test Planning for Layout, U.S. Patent No. 6,766,501, July 20, 2004. R2.8—Special-Purpose Scan Designs [Cheng 1991] K. Cheng, S. Devadas, and K. Keutzer, A partial enhanced-scan approach to robust delay fault test generation for sequential circuits, in Proc. Int. Test Conf., October 1991, pp. 403–410. [DasGupta 1981] S. DasGupta, R. G. Walther, T. W. Williams, and E. B. Eichelberger, An enhancement to LSSD and some applications of LSSD in reliability, availability and serviceability, in Proc. Int. Symp. on Fault-Tolerant Computing, June 1981, pp. 32–34. [Dervisoglu 1991] B. I. Dervisoglu and G. E. Strong, Design for testability, using scan path techniques for path-delay test and measurement, in Proc. Int. Test Conf., October 1991, pp. 365–374. [Glover 1988] C. T. Glover and M. R. Mercer, A method of delay fault test generation, in Proc. Des. Automat. Conf., June 1988, pp. 90–95. [Kuppuswamy 2004] R. Kuppuswamy, P. DesRosier, D. Feltham, R. Sheikh, and P. Thadikaran, Full hold-scan systems in microprocessors: Cost/benefit analysis, Intel Technol. J., 8(1), February 18, 2004. [Malaiya 1983] Y. K. Malaiya and R. Narayanaswamy, Testing for timing faults in synchronous sequential integrated circuits, in Proc. Int. Test Conf., October 1983, pp. 560–571. [May 1979] T. C. May and M. H. Woods, Alpha-particle-induced soft errors in dynamic memories, IEEE Trans. Electron Devices, ED-26(1), 2–9, 1979. [Mitra 2005] S. Mitra, N. Seifert, M. Zhang, and K. Kim, Robust system design with built-in soft-error resilience, IEEE Comput., 38(2), 43–52, 2005. [Nicolaidis 1999] M. Nicolaidis, Time redundancy based soft-error tolerance to rescue nanometer technologies, in Proc. VLSI Test Symp., April 1999, pp. 86–94. [Savir 1993] J. Savir and S. Patil, Scan-based transition test, IEEE Trans. Comput.-Aided Des., 12(8), 1232–1241, 1993. Design for Testability 103 [Savir 1994] J. Savir and S. Patil, Broad-side delay test, IEEE Trans. Comput.-Aided Design, 13(8), 1057–1064, 1994. [Stewart 1978] J. H. Stewart, Application of scan/set for error detection and diagnostics, in Proc. Semiconductor Test Conf., October 1978, pp. 152–158. R2.9—RTL Design for Testability [Aktouf 2000] C. Aktouf, H. Fleury, and C. Robach, Inserting scan at the behavioral level, IEEE Des. Test Comput., 17(3), 34–42, 2000. [Ghosh 2001] I. Ghosh and M. Fujita, Automatic test pattern generation for functional register-transfer level circuits using assignment decision diagrams, IEEE Trans. Comput.Aided Des., 20(3), 402–415, 2001. [Huang 2001] Y. Huang, C. C. Tsai, N. Mukherjee, O. Samoan, W.-T. Cheng, and S. M. Reddy, On RTL scan design, in Proc. Int. Test Conf., November 2001, pp. 728–737. [Ravi 2001] S. Ravi and N. Jha, Fast test generation for circuits with RTL and gate-level views, in Proc. Int. Test Conf., November 2001, pp. 1068–1077. [Roy 2000] S. Roy, G. Guner, and K.-T. Cheng, Efficient test mode selection and insertion for RTL-BIST, in Proc. Int. Test Conf., October 2000, pp. 263–272. [Wang 2005a] L.-T. Wang, A. Kifli, F.-S. Hsu, S.-C. Kao, X. Wen, S.-H. Lin, and H.-P. Wang, Computer-Aided Design System to Automate Scan Synthesis at Register-Transfer Level Test, U.S. Patent No. 6,957,403, October 18, 2005. [Zhang 2003] L. Zhang, I. Ghosh, and M. S. Hsiao, Efficient sequential ATPG for functional RTL circuits, in Proc. Int. Test Conf., 2003, pp. 290–298. R2.10—Concluding Remarks [Breuer 2004] M. Breuer, S. Gupta, and T. M. Mak, Defect and error tolerance in the presence of massive numbers of defects, IEEE Des. Test Comput., May/June, 216–227, 2004. [Girard 2002] P. Girard, Survey of low-power testing of VLSI circuits, IEEE Des. Test Comput., 19(3), 82–92, 2002. [Wang 2005b] L.-T. Wang, X. Wen, P.-C. Hsu, S. Wu, and J. Guo, At-speed logic BIST architecture for multi-clock designs, in Proc. Int. Conf. on Computer Design, October 2005, pp. 475–478. [Wen 2005] X. Wen, H. Yamashita, S. Kajihara, L.-T. Wang, K. Saluja, and K. Kinoshita, On low-capture-power test generation for scan testing, in Proc. VLSI Test Symp., May 2005, pp. 265–270. This Page is Intentionally Left Blank CHAPTER 3 LOGIC AND FAULT SIMULATION Jiun-Lang Huang National Taiwan University, Taipei, Taiwan James C.-M. Li National Taiwan University, Taipei, Taiwan Duncan M. (Hank) Walker Texas A&M University, College Station, Texas ABOUT THIS CHAPTER Simulation is a powerful set of techniques that are used heavily in digital circuit verification, test development, design debug, and diagnosis. During the design stage, logic simulation is performed to help verify whether the design meets its specifications and contains any design errors. It also helps locate these design errors that escape to fabrication during design debug. In test development, faulty circuit behavior is simulated with a set of test patterns to assess the pattern quality and guide further pattern development. Simulation of faulty circuits is referred to as fault simulation and is also used during fault diagnosis, where test results are used to locate manufacturing defects within the hardware. This chapter begins with a discussion of logic simulation. After an introduction to the logic circuit models, the popular compiled-code and event-driven logic simulation techniques are described. This is followed by a description of hazards, the undesirable transient pulses (glitches) that can occur in circuits, what causes them, and how they can be detected during logic simulation. The second half of the chapter discusses fault simulation. Although fault simulation is rooted in logic simulation, many techniques have been developed to quickly simulate all possible faulty behaviors. A discussion of the serial, parallel, deductive, concurrent, and differential fault simulation techniques is followed by qualitative comparisons between their advantages and drawbacks. The chapter concludes with alternative techniques to fault simulation. These techniques trade accuracy for reduced execution time which is crucial for managing the complexity of large designs. By working through this chapter, the reader will learn about the major logic and fault simulation techniques. This background will be valuable in selecting the simulation methodology that best meets the design needs. 106 VLSI Test Principles and Architectures 3.1 INTRODUCTION Simulation is the process of predicting the behavior of a circuit design before it is physically built. For digital circuits, simulation serves dual purposes. First, during the design stage, logic simulation helps the designer verify that the design conforms to the functional specifications. Second, during test development, fault simulation is used to simulate faulty circuits. (For this reason, logic simulation is generally referred to as fault-free simulation.) Given a set of test patterns, fault simulation determines its efficiency in detecting the modeled faults of interest. Furthermore, fault simulation is also an important component of automatic test pattern generator (ATPG) programs. 3.1.1 Logic Simulation for Design Verification The main application of logic simulation is design verification, the process of verifying the correctness of a digital design prior to its physical realization in the form of silicon, a printed circuit board (PCB), or even a system. To manage growing design complexity, logic simulation or design verification is generally performed at each design stage, ranging from the behavioral down to the switch level. During each design stage, the design is described in a suitable description language that captures the required functional specification for fulfilling the design goal of that stage. In general, design verification begins at the behavioral level or electronic system level (ESL). At this level, the behavioral model of the target design is described in ESL languages such as C/C++, SystemC [SystemC 2006], and SystemVerilog [SystemVerilog 2006]. Once the behavioral model has been verified to an acceptable confidence level, the verification process moves to the register-transfer level (RTL) design stage. The circuit at this stage is described in hardware description languages (HDLs) (e.g., Verilog [IEEE 1463-2001] [Thomas 2002] and VHDL [IEEE 1076-2002]), in terms of blocks such as registers, counters, data processing units, and controllers, as well as the data/control flow between these blocks. Because ESL/RTL verification usually does not involve detailed timing analysis, design verification of the ESL or RTL is also referred to as functional verification [Wile 2005]. Logic/scan synthesis comes into play after the RTL design stage. The gatelevel netlist of the RTL design that includes scan cells is synthesized from logic elements provided in a cell library. For high-performance designs, the switch-level model may be employed for the timing-critical portions. A switch-level network is described as the interconnection of MOS switches. Finally, at the transistor level, the circuit is described as interconnections of devices such as transistors, resistors, and capacitors. The transistor-level description provides the most accurate model for the design under development, but transistor-level simulation is much slower than gate-level simulation. Thus, transistor-level simulation is usually only used for characterizing cell libraries, including SRAMs and DRAMs. For digital system designs, in general, logic simulation at the gate level suffices. Logic and Fault Simulation 107 Specification Manual design or Via synthesis Testbench development Circuit description Input stimuli Expected responses yes Bug? no Next design stage Logic simulation FIGURE 3.1 Logic simulation for design verification. Simulated responses Response analysis The flow of using logic simulation for digital circuit design verification is shown in Figure 3.1. The functional specification documents the required functionality and performance for the target design. During each design stage, a corresponding circuit description that contains ESL code for the behavioral design, HDL code for the RTL design, a netlist for the gate-level design, or SPICE models for the switchand transistor-level design is generated in conformance with the given specification. To ensure conformance, verification testbenches consisting of a set of input stimuli and expected output responses are created. The logic simulator then takes the circuit description and the input stimuli as inputs and produces the simulated responses. Any discrepancy between the simulated and expected responses (detected by the response analysis process) indicates the existence of a design bug. The circuit is then redesigned or modified until no more design errors exist. The design process then advances to the next design stage. 3.1.2 Fault Simulation for Test and Diagnosis The major difference between logic simulation and fault simulation lies in the nature of the nonidealities they deal with. Logic simulation is intended for identifying design errors using the given specifications or a known good design as the reference. Design errors may be introduced by human designers or EDA tools 108 VLSI Test Principles and Architectures and should be caught prior to physical implementation. Fault simulation, on the other hand, is concerned with the behavior of fabricated circuits as a consequence of inevitable fabrication process imperfections. Manufacturing defects (e.g., wire shorts and opens), if present, may cause the circuits to behave differently from the expected behavior. Fault simulation generally assumes that the design is functionally correct. The capability of fault simulation to predict the faulty circuit behavior is of great importance for test and diagnosis. First, fault simulation rates the effectiveness of a set of test patterns in detecting manufacturing defects. The quality of a test set is expressed in terms of fault coverage, the percentage of modeled faults that causes the design to exhibit observable erroneous responses if the test set is applied. In practice, the designer employs the fault simulator to evaluate the fault coverage of a set of input stimuli (test vectors or test patterns) with respect to the modeled faults of interest. Because fault simulation concerns the fault coverage of a test set rather than the detection of design bugs, it is also termed fault grading. Low fault coverage test patterns will jeopardize the manufacturing test quality and eventually lead to unacceptable field returns from customers. Second, fault simulation helps identify undetected faults which is especially important when the achieved fault coverage is unacceptable. In this case, either the designer or the ATPG has to generate additional test vectors to improve the fault coverage (i e , to detect the undetected faults). Third, fault simulation allows one to compress the test set without sacrificing fault coverage. As part of the test compaction process, fault simulation identifies redundant test patterns, which are discarded with no negative impact on the fault coverage. With the above capabilities and applications, fault simulation is one of the crucial components of ATPG. In fact, implementation of an ATPG program usually starts with the fault simulator. Finally, fault simulation assists fault diagnosis, which determines the type and location of faults that best explain the faulty circuit behavior of the device under diagnosis. The fault simulation results are compared against the observed circuit responses to identify the most likely faults. The fault type and location information can then be used as a starting point for locating the defects that cause the circuit malfunction. Although fault simulation can also be used to fault-grade analog and mixed-signal circuits, this chapter will only focus on the most popular fault simulation techniques for digital circuits. Readers interested in analog and mixed-signal testing should refer to Chapter 11. 3.2 SIMULATION MODELS In this section, we discuss the gate-level circuit simulation models for combinational and sequential networks, which have widespread acceptance in the integrated circuit testing community. Gate-level circuit descriptions contain sufficient circuit structure information necessary to capture the effects of many realistic manufacturing defects. On the other hand, the abstraction level of gate-level models is high enough to permit development of efficient simulation techniques. Logic and Fault Simulation 109 A H G2 L G4 K B G1 G3 C E F J FIGURE 3.2 The gate-level model of the combinational circuit N. 3.2.1 Gate-Level Network A gate-level network is described as the interconnections of logic gates, which are circuit elements that realize Boolean operations or expressions. The available gates to realize a Boolean expression range from the standard gates (AND, OR, NOT, NAND, and NOR) to complex gates such as XOR and XNOR. For example, the combinational circuit N1 in Figure 3.2 is composed of an OR gate (G1), an AND gate (G2), an inverter (G3), and a NOR gate (G4). The Boolean expression associated with the network can be obtained after a few Boolean algebraic manipulations2: K = A·E+E = A+E =A · B+C 3.2.1.1 Sequential Circuits Most logic designs are sequential circuits, which differ from combinational circuits in that their outputs depend on both the current and past input values; that is, they have memories. Sequential circuits are divided into two categories: synchronous and asynchronous. Here, we limit our discussion to synchronous circuits due to their widespread acceptance. Figure 3.3 illustrates the Huffman model of a synchronous sequential circuit. The sequential circuit is comprised of two parts: the combinational logic and the flip-flops synchronized by a common clock signal. The inputs to the combinational logic consist of the primary inputs (PIs) x1, x2, , xn and the flip-flop outputs y1, y2, , yl, also called the pseudo primary inputs (PPIs) to the combinational logic. The outputs are comprised of the primary outputs (POs) z1, z2, , zm and the flip-flop inputs Y1, Y2, , Yl, also called the pseudo primary outputs (PPOs) to the combinational logic. Assuming that the flip-flops are edge triggered, upon 1 Circuit N will be the example network throughout this chapter, unless specifically mentioned. 2 The three basic Boolean operations (i e , AND, OR, and NOT) are represented by the multiplication (·), addition (+), and prime ( ) operators, respectively. 110 VLSI Test Principles and Architectures x1 z1 x2 z2 xn Combinational zm logic y1 Y1 y2 Y2 yl Yl Flip-flops Clock FIGURE 3.3 The Huffman model of a sequential circuit. the active clock transition the states of all the flip-flops are updated according to the PPO values at that time and the flip-flop characteristic functions (e.g., yi = Yi for a D flip-flop). In the gate-level description, a flip-flop may be modeled as a functional block or as the interconnections of logic gates. Figure 3.4 shows the NAND implementation of the positive-edge-triggered D flip-flop and its functional symbol. Besides data (D) and clock (Clock) inputs, the D flip-flop also has active low asynchronous preset (PresetB) and clear (ClearB) inputs. Its outputs are the uncomplemented Q and complemented (QB) data. 3.2.2 Logic Symbols The basic mathematics for most digital systems is the two-valued Boolean algebra (referred to as Boolean algebra hereafter for convenience). In Boolean algebra, a variable can assume only one of the two values, true or false, which are represented by the two symbols “1” and “0,” respectively. Note that “1” and “0” here do not represent numerical quantities. Physical representations of the two symbols depend on the logic family of choice. Consider the most popular CMOS logic as an example; the two symbols “1” and “0” represent two distinct voltage levels, Vdd and ground,3 respectively. Whether a signal’s value is 1 or 0 depends on which voltage source it is connected to.4 3 Assume that positive logic is used. 4 In the following discussion, it is assumed that the CMOS logic family is chosen. PresetB Logic and Fault Simulation 111 Clock D ClearB FIGURE 3.4 Positive-edge-triggered D flip-flop. PresetB Q D Clock QB Q DFF QB ClearB In addition to 1 and 0, logic simulators often include two more symbols: u (unknown) and Z (high-impedance); the former represents the uncertain circuit behavior, and the latter helps resolve the behavior of tristate logic. For cases when 0, 1, u, and Z are insufficient to meet the required simulation accuracy, intermediate logic states that incorporate both value and strength may be utilized. 3.2.2.1 Unknown State u Almost all practical digital circuits contain memory elements (e g., flip-flops and memories) to store the circuit state; however, when these circuits are powered up, the initial states of their memory elements are usually unknown. To handle such situations, the logic symbol u is introduced to indicate an unknown logic value. By associating u with a signal, we mean that the signal is 1 or 0, but we are not sure which one is the actual value. Basic Boolean operations for ternary logic (0, 1, and u) are straightforward. First, the three symbols are viewed as three sets of symbols: 0 as {0}, 1 as {1}, and u as {0, 1}. Then, the outcome of a ternary logic operation is the union of the results obtained by applying the same operation to the elements of the sets; for example, the result of 0 · u is derived as follows: 0·u= 0 · 0 1 = 0·0 0·1 = 00 =0 =0 112 VLSI Test Principles and Architectures TABLE 3.1 Basic Boolean Operations for Ternary Logic AND 0 1 u OR 0 1 u NOT 0 1 u 0 000 1 01u u 0uu 0 01u 1 111 u u1u 10u The input/output relationships of the three basic Boolean operations using ternary logic are summarized in Table 3.1. From Table 3.1, one can observe that for an AND operation, the output is determined if one of the inputs is 0. Thus, we say that 0 is the controlling value of the AND operation. Similarly, 1 is the controlling value of an OR operation. Simulation based on ternary logic is pessimistic; it may report that a signal is unknown when in fact its value can be uniquely determined as 0 or 1 [Breuer 1972]. To illustrate the information loss caused by ternary logic, the example circuit N is redrawn in Figure 3.5. Let the input vector be ABC = 1u0. Ternary logic simulation (Figure 3.5a) will report that the output K is unknown; however, recall that ABC = 1u0 represents two possibilities: ABC = 100 and 110. Figure 3.5b shows the simulation results for both cases using binary logic; K equals 0 regardless of the value of B, be it 0 or 1. Apparently, ternary logic simulation causes information loss in this example. A1 Bu C0 u G1 G2 u G3 u u G4 K (a) Ternary logic simulation: K = u A1 0 or 1 B C G1 0 or 1 0 0 or 1 G2 G3 1 or 0 0 G4 K (b) Enumerate all possible cases (B = 0 and 1): K = 0 FIGURE 3.5 Information loss caused by ternary logic. Logic and Fault Simulation 113 To resolve the problem of information loss, one would have to assign to each flip-flop a unique unknown symbol ui and associate with ui the following rules: NOT ui = ui NOT ui = ui ui · ui = 0 ui + ui = 1 Let us revisit the example in Figure 3.5. Based on the above rules, the output of G3 will be u instead of u, and finally one has K = 0, the correct answer. The problem with this approach is that signals that are affected by multiple unknown symbols have to be expressed as Boolean expressions of ui’s. As the number of unknown symbols grows, the required symbolic simulation becomes cumbersome. 3.2.2.2 High-Impedance State Z Until now, the logic signal states that we have discussed are 1 and 0, indicating that the signal is connected to either Vdd or ground. (The unknown symbol indicates uncertainty; however, the signal of interest is still 1 or 0.) In addition to 1 or 0, tristate gates have a third, high-impedance state, denoted by logic symbol Z. Tristate gates permit several gates to time-share a common wire, called a bus. A signal is in the Z state if it is connected to neither Vdd nor ground. Figure 3.6 depicts a typical bus application. In this example, three bus drivers (G1, G2, and G3) drive the bus wire y. Each driver Gi is controlled by an enable signal ei, and its output oi is determined as follows: oi = xi Z if ei = 1 if ei = 0 e3 e2 e1 x1 x2 x3 FIGURE 3.6 Tristate circuits. G1 o1 G2 o2 G3 o3 pull-up or down y Resolution Function DFF 114 VLSI Test Principles and Architectures That oi = Z indicates that Gi has no effect on the bus wire y, leaving the control to other drivers. For the bus to function correctly, there should not be more than one active tristate control at a time. If multiple drivers are enabled and they intend to drive the bus to the same value, the bus wire is assigned the active drivers’ output value; however, if at least two drivers drive the bus wire to opposite binary values, a bus conflict occurs. Such situations may cause the circuit to be permanently damaged. Finally, if no driver is activated, the bus is in a floating state because it is not connected to Vdd or ground. A pull-up or down network that connects the bus wire to Vdd or ground via a resistor may be added to provide a default 1 or 0 logic value (Figure 3.6); otherwise, the bus wire will retain its previous value as a result of trapped charge in the parasitic wire capacitance. In addition to design errors, abnormal bus states could occur during testing when the circuit is not in its normal operating environment and may receive illegal input sequences; for example, e1, e2, and e3 may come from the outputs of flip-flops fed by mutual exclusion logic. However, during test, the flip-flops may have random values scanned into them, producing a bus conflict. To facilitate logic simulation of tristate buses, one may insert a resolution function into the circuit description for each bus wire (Figure 3.6). When the simulator encounters a bus signal, the resolution function will check the outputs (and other necessary information) of all the drivers to determine the bus signal. Depending on the simulation requirement, the accuracy of the resolution functions varies. In the simplest form, it may report the occurrence of a bus conflict. To achieve higher simulation accuracy, more sophisticated resolution functions utilize multiple-valued logic systems to represent intermediate logic states. 3.2.2.3 Intermediate Logic States To model the intermediate logic states that may occur in tristate buses, switchlevel networks, and defective circuits, logic simulators employ multiple-valued logic systems that include symbols carrying information of not only signal values but also strengths. Consider the 21-valued logic system in [Miczo 2003]. Six symbols are used to represent six distinct logic levels: strong, weak, and floating 1’s and 0’s. The strong 1 and 0 are the same as the 1 and 0 that we have been using. The weak signals, on the other hand, drive circuit nodes with less strength and are overridden by strong signals. Floating signals denote trapped charge and are the weakest. Besides the six logic levels, 15 symbols are introduced to model uncertain circuit behavior. Each of the symbols corresponds to a subrange bounded by a pair of the 6 logic levels. For example, the subrange bounded by strong 1 and 0 denotes the most uncertainty. 3.2.3 Logic Element Evaluation Logic element evaluation (or gate evaluation) is the process of computing the output of a logic element based on its current input and state values. The choice of evaluation technique depends on the considered logic symbols and the types and models of the logic elements. Logic and Fault Simulation 115 3.2.3.1 Truth Tables Using the truth table is the most straightforward way to evaluate logic elements. Assuming only binary values, an n-input combinational logic element requires a 2n-entry truth table to store the output value with respect to all possible input combinations. (For a sequential element, n corresponds to the number of its input and state variables.) In practice, the truth table is stored in an array of size 2n. To access the array, the values of the n input variables are packed in a word that serves as the index to access the array. For example, consider the array TNAND3 to store the truth table of a three-input NAND gate. Then, the output value with respect to input pattern 010 is obtained by: TNAND3 0102 = TNAND3 2 where the subscript 2 indicates the binary number system. For a multivalued logic system with k symbols, the required array size for an n-input element is calculated as follows. Let m be the number of bits needed to code the k logic symbols; that is, m is the smallest integer such that 2m ≥ k. The n input values will be packed into an m · n-bit word; therefore, the array size is 2mn, although only kn entries are needed. For example, a nine-valued logic system requires four bits to code the nine symbols (i.e., m = 4). For a five-input element, an array of size 24×5 = 220 is needed to store the 95 = 19,683 truth table entries. Truth-table-based logic element evaluation techniques are fast; however, their usage is limited because the required memory grows exponentially with respect to the number of gate inputs. 3.2.3.2 Input Scanning Recall that the outputs of AND and OR gates (and similarly NAND and NOR gates) can be determined if any of their inputs has a controlling value. The idea of input scanning is to scan through the inputs and determine the corresponding output based on the presence of the controlling and unknown values in the gate input list. In addition to the controlling value, denoted by c, we need the inversion value, denoted by i, to characterize the AND, OR, NAND, and NOR gates. The c and i parameters of these gates are summarized in Table 3.2. The input scanning algorithm determines the gate output value according to the following rules: 1. If any of the inputs is the controlling value, the gate output is c ⊕ i. 2. Otherwise, if any of the inputs is u, the gate output is u. 3. Otherwise, the gate output is c ⊕ i. TABLE 3.2 AND OR NAND NOR The c and i Values of Basic Gates c i 0 0 1 0 0 1 1 1 116 VLSI Test Principles and Architectures Start u_in ← false next no input? yes u_in ← true v ← next input yes no ν == u ? no yes v == c ? FIGURE 3.7 The input scanning algorithm. u_in is no true? yes return c' ⊕ i return u return c ⊕ i The input scanning algorithm flow is depicted in Figure 3.7. The scanning process (the shaded region) detects the existence of controlling and unknown inputs. If an unknown input is encountered, the u_in variable is set to true. On the other hand, once a controlling input is detected, the algorithm will exit the loop and return c ⊕ i. If there is no controlling input, the output value depends on whether there is any unknown input. 3.2.3.3 Input Counting Examining the input scanning algorithm, one can observe that knowing the number of controlling and unknown inputs is sufficient to evaluate the output of AND, OR, NAND, and NOR gates. Based on this observation, the input counting algorithm maintains, for each gate, the number of controlling and unknown inputs, denoted by c_count and u_count, respectively. During logic simulation, the two counts are updated if the value of any gate input changes. Consider the NAND gate as an example. If one of its inputs switches from 0 to u, then c_count will be decremented and u_count incremented. Finally, the same rules as those for the input scanning algorithm are applied to determine the output value. 3.2.3.4 Parallel Gate Evaluation One way to speed up logic simulation is to implement simulation concurrency on the host computer. Because modern computers process data in the unit of a word, usually 32- or 64-bits wide, one can store in a single word multiple copies of a signal (with respect to different input vectors) and process them at the same time. This is referred to as parallel simulation or bitwise parallel simulation. Logic and Fault Simulation 117 1001 A 1000 G2 H 1110 B G1 C 0010 E G3 1110 G4 J 0001 FIGURE 3.8 Parallel gate evaluation. K 0110 Figure 3.8 depicts how parallel simulation is realized to simulate circuit N with binary logic on a computer with a 4-bit word. Because one bit is sufficient to code binary logic symbols, four vectors can be stored in a word and processed in parallel. In this example, the four input vectors to be simulated are ABC = 110 , 010 , 011 , 100 , and next to each signal is the 4-bit data word that stores the values corresponding to the four input vectors. Bitwise logic operations are performed to evaluate the gate outputs. Parallel simulation is more complicated for multi-valued logic. Consider the ternary logic for which two bits are needed to code the three symbols. One possible coding scheme is: v0 = 00 v1 = 11 vu = 01 Assume that the word width of the host computer is w. For each signal, two words, denoted by X1 and X2 for signal X, are allocated to store w signal values, with X1 storing the first bit of each symbol and X2 storing the second bit. Under this symbol coding and packing scheme, the AND and OR operations can be realized by directly applying the same bitwise operation. For example, evaluation of an AND gate with inputs A and B and output C is performed as follows: C1 = AND A1 B1 C2 = AND A2 B2 If A = 00 and B = 11, then C = 00. If A = 01 and B = 11, then C = 01. The complement operation (say, C = A ), on the other hand, is realized by: C1 = NOT A2 C2 = NOT A1 Interchanging A1 and A2 ensures that the inversion of an unknown is still unknown. 118 VLSI Test Principles and Architectures 3.2.4 Timing Models Delay is a fact of life for all electrical components, including logic gates and interconnection wires. In this section, we discuss the commonly used gate and wire delay models. 3.2.4.1 Transport Delay The transport delay refers to the time duration it takes for the effect of gate input changes to appear at gate outputs. Several transport delay models characterize this phenomenon from different aspects. The nominal delay model specifies the same delay value for the output rising and falling transitions and thus is also referred to as the transition-independent delay model. Consider the AND gate G in Figure 3.9 as an example. Here B is fixed at 1; thus, the output of G is only affected by A. Assuming that G has a nominal delay of dN = 2 ns and A is pulsed to 1 for 1 ns, the corresponding simulation result is shown in Figure 3.9a. Using the nominal delay model, the output waveform at F is simply a version of A delayed by 2 ns. For cases where the rising and falling times are different (e.g., the pull-up and pull-down transistors of the gate have different driving strengths), one may opt for the rise/fall delay model. In Figure 3.9b, the setup is the same as that in Figure 3.9a, except that the rise/fall delay model is employed instead; the rise and fall delays are dr = 2 ns and df = 1 5 ns, respectively. Due to the difference between the two delays, the duration of the output pulse shrinks from 1 to 0.5 ns. If the gate transport delay cannot be uniquely determined (e.g., due to process variations), one may employ the min–max delay model. In the min–max delay A G B=1 (a) Nominal delay A dN = 2 ns F (b) Rise/fall delay A dr = 2 ns df = 1.5 ns F (c) Min–Max delay A dmin = 1 ns dmax = 2 ns F FIGURE 3.9 Transport delay models. F 1 2 2 1 1.5 2 2 1.5 1 1 2 Logic and Fault Simulation 119 model, the minimum and maximum gate delays (dmin and dmax) are specified to represent the ambiguous time interval in which the output change may occur. In Figure 3.9c, the minimum and maximum delays are 1 and 2 ns, respectively, and a 1.5-ns pulse is applied at A. In response to the delay uncertainty, two ambiguous intervals (the shaded regions), corresponding to the rising and falling transitions, are observed at output F. Within the two ambiguous intervals, the exact output value is unknown. Note that one may combine the min–max and rise/fall delay models to represent more complicated delay behaviors. 3.2.4.2 Inertial Delay The inertial delay is defined as the minimum input pulse duration necessary for the output to switch states. Pulses shorter than the inertial delay cannot pass through the circuit element. The inertial delay models the limited bandwidth of logic gates. Figure 3.10 illustrates this filtering effect. Assume that the AND gate has an inertial delay of 1.5 ns and a nominal delay of 3 ns. Let us fix B at 1 and apply a pulse on A. In Figure 3.10a, the 1-ns pulse is filtered and the output remains at a constant 0. In Figure 3.10b, the pulse is long enough (2 ns) and an output pulse is observed 3 ns later. 3.2.4.3 Wire Delay In the past, when gate delays dominated circuit delay, the interconnection wires were regarded as ideal conductors with no signal propagation delay. In reality, wires are three-dimensional structures that are inherently resistive and capacitive. Furthermore, they may interact with neighboring conductors to form mutual capacitance. Figure 3.11a illustrates the distributed RLC model of a metal wire. In the FIGURE 3.10 Inertial delay. A G F B=1 dI = 1.5 ns dN = 3 ns (a) Pulse duration less than dI A 1 F (b) Pulse duration longer than dI A 2 F 3 3 2 120 VLSI Test Principles and Architectures p q (a) Distributed wire delay model da–b b a c da–c da–d d FIGURE 3.11 Wire delay model. (b) Fanout delay modeling presence of the passive components, it takes finite time, called the propagation delay, for a signal to travel from point p to point q. In general, wire delays are specified for each connected gate output and gate input pair because the physical distances and thus the propagation delays between the driver and receiver gates vary. In Figure 3.11b, the inverter output a branches out to drive three gates. To model the wire delays associated with the three signal paths, one may insert delay elements da−b, da−c, and da−d into the fanout branches. For convenience, wire delays may also be viewed as the receiver gate input delays and become part of the receiver gate delay model. Thanks to the advance of integrated-circuit fabrication technology, continuous device scaling has significantly reduced gate delays; however, wire delays do not benefit as much from device scaling. As a result, wire delays have replaced gate delays as the dominant performance-limiting factor. The challenge of wire delay modeling is that accurate delay values are not available until the physical design stage when the functional blocks are placed and signal nets are routed. Very often, the designers have to go back to earlier design stages to fix the timing violations, a time-consuming process. 3.2.4.4 Functional Element Delay Model Functional elements, such as flip-flops, have more complicated behaviors than simple logic gates and require more sophisticated timing models. In Table 3.3, the I/O delay model of the positive-edge-triggered D flip-flop (Figure 3.4) is depicted. Logic and Fault Simulation 121 TABLE 3.3 The D Flip-Flop I/O Delay Model Input Condition Present State D Clock PresetB ClearB q XX ↓ 1 0 XX 1 ↓ 1 1↑ 1 1 0 0↑ 1 1 1 Note: X indicates “don’t care.’’ Outputs Q QB ↑↓ ↓↑ ↑↓ ↓↑ Delays (ns) to Q to QB 1.6 1.8 1.8 1.6 2 3 3 2 Comments Asynchronous preset Asynchronous clear Q 0→1 Q 1→0 Take the asynchronous preset operations (second row) as an example. Regardless of the Clock and D values, if the current flip-flop state (q) is 0 and ClearB remains 1, changing PresetB from 1 to 0 (denoted by the down arrow) will cause output transitions at Q and QB after 1.6 and 1.8 ns, respectively. Besides the input-to-output transport delay, the flip-flop timing model usually contains timing constraints, such as setup/hold times and inertial delays for each input. 3.3 LOGIC SIMULATION In this section, we will discuss two commonly used gate-level logic simulation methodologies: compiled-code and event-driven. The reader should note that, although not included in this chapter, hardware emulation and acceleration approaches are often employed to speed up the logic simulation process, especially for large designs. 3.3.1 Compiled-Code Simulation The idea of compiled-code simulation is to translate the logic network into a series of machine instructions that model the functions of the individual gates and interconnections between them. The compiled-code simulation flow is illustrated in Figure 3.12a. In each clock cycle, the compiled code program together with the input pattern is executed in the host machine. The simulation results are displayed or stored for later analysis. The code generation flow is depicted in Figure 3.12b. Note that logic optimization and levelization are performed prior to the actual code generation process. 3.3.1.1 Logic Optimization The purpose of logic optimization is to enhance the simulation efficiency. A typical optimization process consists of the following transformation [Wang 1987]: 1. Remove gate inputs that are tied to noncontrolling values (Figure 3.13a). 2. Convert a one-input gate into an inverter or buffer (Figure 3.13b). 3. Remove a gate with one or more inputs tied to its controlling value, and replace the gate’s output with 1 or 0 (Figure 3.13c). 122 VLSI Test Principles and Architectures start gate level description next no vector? end yes read in next input vector v run compiled code with input v in host machine output simulation results (a) Simulation flow FIGURE 3.12 Compiled code simulation. before optimization 1 (a) A B (b) A A (c) 1 (d) A logic optimization logic levelization code generation compiled code (b) Code generation flow after optimization A B A 0 A (e) A A FIGURE 3.13 Logic optimization. 4. Replace three consecutive inverters with a single one (Figure 3.13d); this case is common in clock trees. 5. Replace a buffer with a single wire (Figure 3.13e). 6. Remove logic gates that drive unobservable or floating outputs. Logic and Fault Simulation 123 Because each gate corresponds to one or more statements in the compiled code, logic optimization reduces the program size and execution time. 3.3.1.2 Logic Levelization To avoid unnecessary computations, logic gates must be evaluated in an order such that a gate will not be evaluated until all its driving gates have been evaluated. For circuit N, the evaluation order: G1 → G2 → G3 → G4 satisfies this requirement. For most networks, there exists more than one evaluation order that meets the requirement; for example, for N: G1 → G3 → G2 → G4 The logic levelization algorithm shown in Figure 3.14 can be utilized to produce the desired gate evaluation order. At the beginning of the algorithm, all the PIs are assigned level 0, and all the PI fanout gates are appended to the first-in/first-out queue Q that stores the gates to be processed. While Q is non-empty, the first gate g in Q is popped out. If all the driving gates of g are levelized and the maximum level is l, g is assigned level l + 1 and all of the fanout gates of g are appended to Q; otherwise, g is put back in Q to be processed later. The levelization process repeats until Q is empty. Note that for gates assigned the same level, their order start assign level 0 to all PI′s put all PI fanout gates in Q Q empty? yes end no pop next gate g append g ′s fanout from Q gates to Q no append g to Q ready to levelize g ? 1. l = maximum of yes g ′s driving gate levels 2. assign l + 1 to g FIGURE 3.14 The logic levelization algorithm. 124 VLSI Test Principles and Architectures TABLE 3.4 The Levilization Process of Circuit N Step A B C G1 G2 G3 G4 Q 0 000 < G2, G1> 1 000 < G1, G2> 2 000 1 < G2, G3> 3 000 1 2 < G3, G4> 4 000 1 2 2 < G4> 5 000 1 2 2 3 <> of evaluation does not matter. This levelization process is also referred to as rank ordering. The levelization process for circuit N is shown step by step in Table 3.4. At the beginning, PIs are assigned level 0, and their fanout gates G1 and G2 are appended to Q. In step 1, G2 is not ready and put back to Q because G1 is not levelized yet. In step 2, G1 is assigned level 1 because it is driven by level 0 PIs only. At the end of the process, the following orders are produced: G1 → G2 → G3 → G4 G1 → G3 → G2 → G4 3.3.1.3 Code Generation Depending on performance, portability, and maintainability needs, different code generation techniques may be used [Wang 1987]. Three approaches for code generation are described below: Approach 1—High-level programming language source code. The network to be simulated is described in a high-level programming language, such as C. The advantage is that it is easier to debug and can be ported to any target machine that has a C compiler. The compilation time could be a severe limitation for fault simulators that require recompilation for each faulty circuit. Approach 2—Native machine code. This approach generates the target machine code directly without the need of compilation, which makes it a more viable solution to fault simulation. High simulation efficiency can be achieved if code optimization techniques are utilized to maximize the usage of the target machine’s data registers. Approach 3—Interpreted code. In this approach, the target machine is a software emulator. During simulation, the instructions are interpreted and executed one at a time. This approach offers the best portability and maintainability at the cost of reduced performance. Logic and Fault Simulation 125 Shown below is the pseudo code for circuit N. In the actual implementation, each statement is replaced with the corresponding language constructs or machine instructions, depending on the adopted code generation approach: while(true) do read( A, B, C); E←OR(B, C); H←AND( A, E); J←NOT(E); K←NOR(H, J); end Compiled-code simulation is most effective when binary logic simulation suffices. In such cases, machine instructions are readily available for Boolean operations (e.g., AND, OR, and NOT). Its main limitations include its incapability of timing modeling and low simulation efficiency. The compiled-code simulation methodology cannot handle gate and wire delay models. As a result, it fails to detect timing problems such as glitches and race conditions. The low efficiency of compiled-code simulation is because the entire network is evaluated for each input vector, despite the fact that in general only 1 to 10% of input signals change values between consecutive vectors. 3.3.2 Event-Driven Simulation In contrast to compiled-code simulation, event-driven simulation exhibits high simulation efficiency by performing gate evaluations only when necessary. We will use Figure 3.15 to illustrate the event-driven simulation concept. In this example, two consecutive input patterns ABC = 001 and 111 are applied to circuit N and the corresponding signal values are shown. Note that the application of the second vector does not change the input of G3, so G3 is not evaluated for the second vector. In event-driven simulation, the switching of a signal’s value is called an event, and an event-driven simulator monitors the occurrences of events to determine which gates to evaluate. Figure 3.16 depicts the zero-delay event-driven simulation flow. (A zero-delay simulation is one in which gates and interconnect are assumed to have zero delay.) At the beginning of the simulation flow, the initial signal values, which may be given 0→1 A H: 0→1 G2 G4 0→1 B 1 C G1 E: 1 G3 J: 0 FIGURE 3.15 Signal transitions between consecutive inputs. K: 1→0 126 VLSI Test Principles and Architectures start read in initial condition no yes Q empty evaluate next gate g from Q output no change? yes put g ′s fanout gates in Q next no vector? end yes read in new input vector put active PIs′ fanout gates in Q FIGURE 3.16 Zero-delay event-driven simulation. or simply unknown, are read in and assigned. Then, a new input vector is loaded and the primary inputs at which events occur (called active PIs) are identified. To propagate the events toward primary outputs, gates driven by active primary inputs are put in the event queue Q, which stores the gates to be evaluated. As long as Q is not empty, a gate g is popped from Q and evaluated. If the output of g changes (i e , a new event occurs), the fanout gates of g are placed in Q. When Q becomes empty, the simulation for the current input vector is finished, and the simulator proceeds to process the next input vector. Doing only the necessary work, event-driven simulation is more efficient than compiled-code simulation. Besides simulation efficiency, the biggest advantage of event-driven simulation is its capability to simulate any delay model. 3.3.2.1 Nominal-Delay Event-Driven Simulation The scheduler is an important component of an event-drive simulator. It keeps track of event occurrences and schedules the necessary gate evaluations. For zerodelay simulation, the event queue is a good enough scheduler because timing is not considered. For nominal-delay simulation, however, a more sophisticated scheduler is required to determine not only which gates to evaluate but also when to evaluate them. Because events must be evaluated in chronological order, the scheduler is implemented as a priority queue. Figure 3.17 depicts one possible priority queue implementation for a nominal delay event-driven simulator. In the priority queue, the vertical list is an ordered list that stores the time stamps when events occur. Attached to each time stamp ti is a horizontal list of events that occur at time ti. During simulation, a new event that will occur at time ti is appended to the event list of time stamp ti. For Logic and Fault Simulation 127 t0 p, vp+ t1 q, vq+ r, vr+ s, vs+ ti w, vw+ FIGURE 3.17 Priority queue event scheduler. example, in Figure 3.17, the value of signal w will switch to v+w at ti. If ti is not in the time stamp list yet, the scheduler will first place it in the list according to the chronological order. For the priority queue scheduler in Figure 3.17, the time needed to locate a time stamp to insert an event grows with the circuit size. To improve the event scheduler efficiency, one may use, instead of a linked list, an array of evenly spaced time stamps. Although some entries in the array may have empty event lists, the overall search time is reduced because the target time stamp can be indexed by its value. Further enhancement is possible with the concept of timing wheel [Ulrich 1969]. Let the time resolution be one time unit and the array size M. A time stamp that is d time units ahead of current simulation time (with array index i) is stored in the array and indexed by (i + d) mod5 M if d is less than M; otherwise, it is stored in an overflow remote event list similar to that is shown in Figure 3.17. Remote event lists are brought into the timing wheel once their time stamps are within M − 1 time units from current simulation time. A two-pass strategy for nominal delay event-driven simulation is depicted in Figure 3.18. When there are still future time stamps to process, the event list LE of next time stamp t is retrieved. LE is processed in a two-pass manner. In pass one (the left shaded box), the simulator determines the set of gates to be evaluated. The notation (g, v+g ) indicates that the output of gate g is to become v+g . For each event (g, v+g ), if v+g is the same as g’s current value vg, this event is false and is discarded. On the other hand, if v+g = vg (i e , (g, v+g ) is a valid event), then vg is updated to v+g , and the fanout gates of g are appended to the activity list LA. In the second pass (the right shaded box), gates are evaluated and new events are scheduled. While the activity list LA is non-empty, a gate g is retrieved and evaluated. Let the evaluation result be v+g . The scheduler will schedule the new event (g, v+g ) at time stamp t + delay(g), where delay(g) denotes the nominal delay of gate g. The two-pass strategy avoids repeated evaluation of gates with events on multiple inputs. 5 “mod” denotes modulo operation. The array is referred to as the timing wheel due to the modulo-Minduced circular structure. 128 VLSI Test Principles and Architectures start end no next time stamp? yes get next time stamp t yes LE empty? no get next event (g,vg+) from LE retrieve current event list LE yes vg+ == vg? no 1. vg ← vg+ 2. append g′s fanout gates to activity list LA FIGURE 3.18 Two-pass event-driven simulation strategy. yes LA empty? no get next gate g from LA evaluate g and schedule (g,vg+) at t + delay(g ) In the following, we will use circuit N to demonstrate the two-pass event-driven strategy. In this example, the nominal delays for G1, G2, G3, and G4 are 8, 8, 4, and 6 ns, respectively, and there are four input events (see Figure 3.19): (A, 1, 0), (C, 0, 2), (B, 0, 4), and (A, 0, 8), where the notation (w, vw, t) represents the event that signal w switches to vw at time t. The simulation progress is shown in Table 3.5. A B C E H J K 0 2 4 6 8 10 12 14 16 18 20 22 FIGURE 3.19 Flow of events and voided events. Logic and Fault Simulation 129 TABLE 3.5 Two-Pass Event-Driven Simulation Time LE LA Scheduled Events 0 {(A, 1)} {G2} {(H, 1, 8)} 2 {(C, 0)} {G1} {(E, 1, 10)} 4 {(B, 0)} {G1} {(E, 0, 12)} 8 {(A, 0), (H, 1)} {G2, G4} {(H, 0, 16), (K, 0, 14)} 10 {(E, 1)} 12 {(E, 0)} 14 {(K, 0)} {G2, G3} {(H, 0, 20), (J, 1, 16)} 16 {(H, 0), (J, 1)} {G4} 20 {(H, 0)} {(K, 0, 22)} 22 {(K, 0)} At time 0, there is only one primary input event (A, 1). Because A drives G2, G2 is added to activity list LA. Evaluation of G2 returns H = 1; therefore, the event (H, 1) is scheduled at time 8 (i e , 8 ns, the delay of G2 after the current time.) At time stamps 2 and 4, the two input events at C and B are processed in the same way. There are two events at time 8: the input event (A, 0) and the scheduled event (H, 1) from time stamp 0. As both events are valid, the two affected gates, G2 and G4, are put in LA for evaluation. The corresponding events (H, 0) and (K, 0) are scheduled at time 16 and 14, respectively. Note that the event (E, 1) at time 10 is false because it does not cause a signal transition; therefore, no gate evaluation is performed. In Figure 3.19, the detailed signal waveforms are drawn to illustrate the flow of events and the unnecessarily scheduled false events: (E, 1, 10), (H, 0, 20), and (K, 0, 22). One way to avoid false events is to compare the gate evaluation result with the last scheduled value of that gate. A new event is scheduled only if the two values differ. 3.3.3 Compiled-Code versus Event-Driven Simulation Compiled-code and event-driven simulation each have their advantages and disadvantages. Compiled-code simulation is good for cycle-based simulation, where only the circuit behavior at the end of each clock cycle is of interest and zero-delay simulation can be used. Compiled-code simulation is also good for hiding the details of a simulation model, such as a processor core. Compiled-code simulation is also good when the circuit activity is high or when bitwise parallel simulation is used. The overhead of compilation restricts compiled-code simulation to applications where a large number of input vectors will be simulated. Event-driven simulation is the best approach for implementing general delay models, and detecting hazards. It is also the best approach for circuits with low activity, such as low-power circuits that employ clock gating. Event-driven simulation is also the best approach during circuit debug, when frequent edit-simulate-debug cycles occur and simulation startup time is important. 130 VLSI Test Principles and Architectures 3.3.4 Hazards Because of the difference in delays along reconvergent signal paths, input transitions may cause unwanted transient pulses or glitches, called hazards, to appear at internal signals or primary outputs. We will use circuit N to illustrate the cause of hazards. In this example, the inverter has a nominal delay of 3 ns, and the other gates have nominal delays of 2 ns. At first, the input vector to circuit N is ABC = 110 and the output value is K = 0. After circuit N stabilizes, the second input vector ABC = 100 is applied. Without considering the gate delays, the simulator will report that K remains unchanged; however, as shown in Figure 3.20, a delay-aware simulator will reveal the existence of a spurious one pulse at K, called a static 0-hazard. Hazards are divided into two categories: static and dynamic. A static hazard refers to the transient pulse on a signal line whose static value does not change. Depending on what the signal’s static value is, a static hazard may be a static 1-hazard or a static 0-hazard. A dynamic hazard, on the other hand, refers to the transient pulse during a 0-to-1 or 1-to-0 transition. Figure 3.21 illustrates the possible outputs of a network with hazards. In the figures, only one hazard pulse is shown, but in general there can be multiple pulses. The presence of hazards may cause a sequential network to malfunction. Following the above example, if the A B C E H J K 0 1 2 3 4 5 6 7 8 FIGURE 3.20 Static 0-hazard. static 1-hazard FIGURE 3.21 Types of hazards. static 0-hazard dynamic 1-hazard dynamic 0-hazard Logic and Fault Simulation 131 output signal K is connected to the active high clear input of a flip-flop, the flip-flop may be erroneously cleared by the 1 spike. Hazard detection is straightforward if the network timing information is available and supported by the simulator; however, the accuracy of this approach suffers from gate delay deviations caused by process variations. In the following, we discuss multivalued logic-based hazard detection techniques that perform worst-case hazard analysis regardless of the timing model. 3.3.4.1 Static Hazard Detection Recall that hazards are caused by the difference of delays associated with reconvergent paths (e.g., E → H → K and E → J → K in circuit N). (The event flow corresponding to the two paths are shown in Figure 3.20.) One must therefore analyze the transient behavior of the network for hazard detection; however, without the correct delay information, it is impossible to predict the exact moment at which a signal transition occurs. One solution to this difficulty is to model the network’s transient behavior by associating an uncertainty interval to each input signal transition [Yoeli 1964] [Eichelberger 1965]; that is, a 0 → 1 transition becomes 0 → u → 1. (Similarly, a 1 → 0 transition becomes 1 → u → 0.) Because 0u1 may be 001 or 011 (a slower and a faster transition, respectively), the added u signifies the fact that we do not know exactly when the transition occurs. Let V 1 = v11v12 v1n and V2 = v21v22 v2n be two consecutive input vectors. The extra input vector V+ = v+1 v+2 v+n that models the transition uncertainty is obtained in the following way: v+i = v1i u if v1i = v2i if v1i = v2i When V+ is available, the modified input sequence V1V+V2 is simulated. If the 0u0 or 1u1 pattern is observed at any primary output, the static hazard is detected. Note that the above method performs a worst-case analysis independent of the delay model. Now, let us apply this procedure to circuit N with input sequences V1 = 110 and V2 = 100. Following the above procedure, one has V+ = 1u0. Simulating the V1V+V2 sequence (using ternary logic) reports that K = 0u0; thus, a static 0-hazard is detected in this example, which agrees with the simulation results in Figure 3.20. Based on the same idea, a simulator may utilize the six-valued logic to detect static hazards [Hayes 1986]. The symbols and interpretations of the six-valued logic are listed in Table 3.6 The results of Boolean operations on the six symbols can be obtained by applying the same operation bitwise. For example, the outcome of AND(F,1*) is derived as follows: AND F 1∗ = AND 1u0 1u1 = 1u0 =F 132 VLSI Test Principles and Architectures TABLE 3.6 Multivalued Logic for Hazard Detection Symbol Interpretation Six-Valued Logic Eight-Valued Logic 0 Static 0 {000} {0000} 1 Static 1 {111} {1111} R Rise transition 001,011 = 0u1 {0001,0011,0111} F Fall transition 100,110 = 1u0 {1110,1100,1000} 0* Static 0-hazard 000,010 = 0u0 {0000,0100,0010,0110} 1* Static 1-hazard 111,101 = 1u1 {1111,1011,1101,1001} R* Dynamic 1-hazard {0001,0011,0101,0111} F* Dynamic 0-hazard {1000,1010,1100,1110} 3.3.4.2 Dynamic Hazard Detection A dynamic hazard causes an unwanted pulse to appear during a 0-to-1 or 1-to-0 transition. To detect dynamic hazards, four-bit sequences are necessary. The eight- valued logic [Hayes 1986] that covers all the 4-bit sequences necessary for dynamic hazard detection is shown in Table 3.6. Compared to six-valued logic, two symbols R* and F* are added to denote the dynamic 1- and 0-hazard, respectively. The result of a Boolean operation on the eight-valued logic symbols is the union of the results obtained by applying the same operation to all possible sequence pairs of the two operands. For example, the process of deriving OR(0*, F) is shown below: OR 0∗ F ⎛⎧ ⎫ = OR ⎜⎜⎝⎪⎪⎨⎪⎪⎩ 0000 0100 0010 0110 ⎪⎪⎬ ⎪⎪⎭ ⎧ ⎨ ⎩ 1110 1100 1000 ⎫⎞ ⎬⎭⎟⎟⎠ = ⎧ ⎪⎪⎨ ⎪⎪⎩ 1110 1100 1000 1010 ⎫ ⎪⎪⎬ ⎪⎪⎭ = F∗ 3.4 FAULT SIMULATION Fault simulation is a more challenging task than logic simulation due to the added dimension of complexity; that is, the behavior of the circuit containing all the modeled faults must be simulated. When simulating one fault at a time, the amount of computation is approximately proportional to the circuit size, the number of test patterns, and the number of modeled faults. Because the number of modeled faults is roughly proportional to the circuit size, the overall time complexity of fault simulation is O(pn2), for p test patterns and n logic gates, which becomes infeasible for large circuits. To improve fault simulation performance, various fault simulation techniques have been developed. In the following sections, we restrict our discussion to the single stuck-at fault model and illustrate the key fault simulation techniques. Before introducing these techniques, we would like to clarify terminology. Although the Logic and Fault Simulation 133 terms “test vectors” and “test patterns” are interchangeable in most cases, for the subject of logic simulation the term “test vectors” is preferred, because test vectors are mostly written by human designers for design verification. For fault simulation, on the other hand, the term “test patterns” is used, as the fault simulators frequently work with ATPG to grade test patterns. 3.4.1 Serial Fault Simulation Serial fault simulation is the simplest fault simulation technique. It consists of faultfree and faulty circuit simulations. Initially, fault-free logic simulation is performed on the original circuit to obtain the fault-free output responses. The fault-free responses are stored and later employed to determine whether a test pattern can detect a fault or not. After fault-free simulation, a serial fault simulator simulates faults one at a time. For each fault, fault injection is first performed, which modifies the original circuit to mimic the circuit behavior in the presence of the fault. Then, the faulty circuit is simulated to derive the faulty responses of the current fault with respect to the given test patterns. This process repeats until all faults in the fault list have been simulated. The serial fault simulation process is demonstrated using the example circuit N. In this example, the fault list is comprised of two faults, A stuck-at one (denoted by f ) and J stuck-at zero (denoted by g), which are depicted in Figure 3.22. Note that, although both faults are drawn in the figure, only one fault is present at a time under the single stuck-at fault model. The test set consists of three test patterns (denoted by P1, P2, and P3 and shown in the “Input” columns of Table 3.7). The serial fault simulator starts from fault-free simulation. The fault-free responses are Kgood = 1, 1, 0 for input patterns P1, P2, and P3, respectively. After the fault-free responses are available, fault f is processed; fault injection is achieved by forcing A to a constant one and the obtained faulty circuit is simulated. The circuit responses for fault f are Kf = 0, 0, 0 with respect to the three input patterns. Compared with the fault-free responses (the “Output” column in Table 3.7), it is observed that patterns P1 and P2 detect fault f but pattern P3 does not. After fault f has been simulated, circuit N is restored by removing fault f . The next fault, g, is then injected by forcing J to zero. Simulation of the resulting faulty circuit is then A f :A stuck-at 1 H G2 L G4 K B g:J stuck-at 0 C G1 E F G3 J FIGURE 3.22 An example circuit with two faults. 134 VLSI Test Principles and Architectures TABLE 3.7 Serial Fault Simulation Results for Figure 3.22 Input Internal Output Pattern No. A B C E F L J H Kgood Kf Kg P1 010111001 0 1 P2 001111001 0 1 P3 100000100 0 1 performed to obtain the faulty outputs Kg = 1, 1, 1 (also listed in Table 3.7). Fault g is detected by pattern P3 but not P1 and P2. In this example, nine simulation runs are performed: three fault-free and six faulty circuit simulations. These nine simulation runs can be divided into three simulation passes. In each simulation pass, either the fault-free or the faulty circuit is simulated for the whole test pattern set; thus, the first simulation pass consists of fault-free simulations for P1, P2, and P3, and the second and third passes correspond to the faulty circuit simulations of faults f and g, respectively, for P1, P2, and P3. By careful inspection of the simulation results in Table 3.7, one can observe that, if we are only concerned with the set of faults that is detected by the test set {P1, P2, P3}, simulations of the faulty circuit with fault f for patterns P2 and P3 are redundant because f is already detected by P1. (It is assumed that the test patterns are simulated in the order P1, P2, and then P3.) Halting simulation of detected faults is called fault dropping. For the purpose of fault grading, fault dropping dramatically improves fault simulation performance, as most faults are detected after relatively few test patterns have been applied. Fault dropping, however, should be avoided in fault diagnosis applications in which the entire fault simulation results are usually required to facilitate the identification of the fault type and location. The simplified serial fault simulation flow is depicted in Figure 3.23. Prior to fault simulation, fault collapsing is executed to reduce the size of the fault list, denoted by F. Fault-free simulation is then performed for all test patterns to obtain the correct responses Ogood. The algorithm then proceeds to fault simulation. For each fault f in F, if there exists a test pattern whose output response Of differs from that of the corresponding good circuit Ogood, f is removed from F, indicating that it is detected. When all patterns have been simulated, the remaining faults in F are the undetected faults. The major advantage of serial fault simulation is its ease of implementation; a regular logic simulator plus fault injection and output comparison procedures will suffice. In addition, serial fault simulation can handle a wide range of fault models, as long as the fault effects can be properly injected into the circuit. The major disadvantage of serial fault simulation is its low performance. As is discussed in the following sections, practical fault simulation techniques exploit parallelism or similarities among the faulty circuits to speed up the fault simulation process. Logic and Fault Simulation 135 start F ← collapsed fault list fault-free simulation for all patterns no end next fault? yes 1. get next fault f from F 2. reset pattern counter no next pattern? yes 1. get next fault p 2. fault simulation for pattern p no FIGURE 3.23 The serial fault simulation algorithm flow. mismatch? yes delete f from F 3.4.2 Parallel Fault Simulation Similar to parallel logic simulation, fault simulation can take advantage of the bitwise parallelism inherent in the host computer to reduce fault simulation time. For example, in a 32-bit wide CPU, logic operations (AND, OR, or XOR) can be performed on all 32 bits at once. There are two ways to realize bitwise parallelism in fault simulation: parallelism in faults and parallelism in patterns. These two approaches are referred to as parallel fault simulation and parallel pattern fault simulation. 3.4.2.1 Parallel Fault Simulation Parallel fault simulation was proposed as early as the 1960s [Seshu 1965]. Assuming that binary logic is utilized, one bit is sufficient to store the logic value of a signal. 136 VLSI Test Principles and Architectures Thus, in a host computer using w-bit wide data words, each signal is associated with a data word of which w − 1 bits are allocated for w − 1 faulty circuits and the remaining bit is reserved for the fault-free circuit. This way, w − 1 faulty and one fault-free circuit can be processed in parallel using bitwise logic operations which correspond to a speedup factor of approximately w − 1 compared to serial fault simulation. A fault is detected if its bit value differs from that of the fault-free circuit at any of the outputs. We will reuse the example from serial fault simulation to illustrate the parallel fault simulation process. Assuming that the width of a computer word is three bits, the first bit stores the fault-free (FF) circuit response, and the second and third bits store the faulty responses in the presence of faults f and g, respectively. The simulation results are shown in Table 3.8. Because fault f , A stuck-at one, uses the second bit, it is injected by forcing the second bit of the data word of signal A to 1 during fault simulation (shown in the “Af ” column with the forced value underlined; the “A” column corresponds to the fault-free case). Similarly, the “Jg” column depicts how fault g is injected by forcing the third bit to 0. As we have mentioned, parallel fault simulation is performed using bitwise logic operations. For example, the logic value of signal H is obtained by a bitwise AND operation on the data words of signals A and L (A, L, and H are circled in Table 3.8). The faulty response of the first pattern is {1, 0, 1}. This means that fault f is detected (the second bit) but fault g (the third bit) is not. Similarly, the outputs of P2 and P3 are {1, 0, 1} and {0, 0, 1}, respectively. In this example, three simulations (in one simulation pass) are performed. Compared to serial fault simulation, which requires nine simulations, parallel fault simulation saves two-thirds of the simulation time. To perform parallel fault simulation using regular parallel logic simulators, one may inject the faults by adding extra logic gates. Figure 3.24 shows how this is done for faults f and g in N. To inject f , a stuck-at one fault, an OR gate (Gf ) is TABLE 3.8 Parallel Fault Simulation for Figure 3.22 Logic and Fault Simulation 137 A 010 Gf Af H G2 G4 K L B C G1 E F G3 J Jg Gg 110 FIGURE 3.24 Fault injection for parallel fault simulation. inserted. To force the second bit of Af to one without affecting the other two bits, the side input of Gf is set to be 010. Note that the injection of fault f does not affect the fault-free circuit and the faulty circuit with fault g. Similarly, injecting fault g, a stuck-at zero fault, is achieved by adding the AND gate Gg and setting its side input to be 110. Note that the parallel fault simulation technique is applicable to the unit or zero delay models only. More complicated delay models cannot be modeled because several faults are evaluated at the same time. Furthermore, a simulation pass cannot terminate unless all the faults in this pass are detected. For example, we cannot drop fault f alone after simulating pattern P1 because fault g is not detected yet. Parallel fault simulation is best used for simulating the beginning of the test pattern sequence, when a large number of faults are detected by each pattern. 3.4.2.2 Parallel-Pattern Fault Simulation Bitwise parallelism can be used to simulate test patterns in parallel. For a host computer with a w-bit data width, the signal values for a sequence of w test patterns are packed into a data word. For the fault-free or faulty circuit, w test patterns can be simulated in parallel by utilizing bitwise logic operations. This approach was first reported in [Waicukauski 1985], in which it is called parallel-pattern singlefault propagation (PPSFP), as one fault at a time is simulated. This approach is especially useful for combinational circuits or full-scan sequential circuits. In PPSFP, logic simulations on the fault-free circuit are first performed on the first w test patterns, and the circuit outputs are recorded. Then, the faults are simulated one at a time on these w test patterns. For each fault, the simulation results are compared with the correct responses to determine if the fault is detected. Simulation continues until the fault is detected or all the test patterns are simulated. The faulty circuit is restored to its original state and the next fault is processed. The same procedure repeats until all faults in the fault list are simulated. The PPSFP results of the fault simulation example are shown in Table 3.9. The “Fault-free” row lists the fault-free simulation results. Note that the three patterns are packed into one single word and thus are evaluated simultaneously using bitwise logic operations. The “f ” row represents the simulation results with fault f injected. 138 VLSI Test Principles and Architectures TABLE 3.9 PPSFP for Figure 3.22 In PPSFP, faults are injected by activating rising or falling events, depending on the stuck-at value, at the faulty signal. Thus, fault f , A stuck-at one, is injected by activating two rising events on input A. The faulty responses are {0, 0, 0} which indicates that fault f is detected by the first and second patterns but not the third one. After fault f is simulated, fault f is removed by activating two falling events on input A at patterns P1 and P2. Then, fault g is injected by activating one falling event on signal J at pattern P3. Three simulation runs are carried out. Figure 3.25 illustrates the simplified PPSFP flow. Again, fault collapsing is first executed to obtain the collapsed fault list F. Then, the first w patterns are simulated on the fault free circuit in parallel and the good outputs (Ogood) are stored. Then, each fault f in fault list F is simulated one by one using the same w test patterns. A fault is dropped and not simulated against the remaining test patterns if its output response Of is different from Ogood. To fault simulate the next fault, the fault effect of the current fault is removed and the next fault is injected. This process continues until all faults are either detected or simulated against all test patterns. If the number of test patterns is not an even multiple of the machine word width, only part of the machine word is used when simulating this last batch of patterns. Parallel-pattern single-fault propagation is best suited for simulation of test patterns that come later in the test sequence, where the fault drop rate per pattern is lower. Parallel fault simulation does not work well in this situation because it cannot terminate a simulation pass until all w − 1 faults being processed are detected. PPSFP is not suitable for sequential circuits because the circuit state for test pattern i in the w-bit word is dependent on the previous i − 1 patterns in the word, and this state is not available when the patterns are processed in parallel. Logic and Fault Simulation 139 start F ← collapsed fault list no next w end patterns? yes 1. apply next w patterns 2. Ogood ← good circuit outputs FIGURE 3.25 The PPSFP flowchart. no next fault? yes get next fault f from F 1. remove last fault 2. inject fault f Of ← faulty circuit outputs of w patterns yes Of == Ogood? no delete f from F no F empty? yes end 3.4.3 Deductive Fault Simulation Deductive fault simulation [Armstrong 1972], unlike the fault simulation techniques described above, takes a very different approach; it is based on logic reasoning rather than simulation. For a given test pattern, deductive simulation identifies, all at once, the faults that can be detected. Deductive fault simulation can be very fast because only fault-free simulations have to be performed. In deductive fault simulation, a fault list (Lx) is associated with a signal x. Lx is the set of faults that causes x to differ from its fault-free value. Figure 3.26 shows the fault list of each signal with respect to test pattern P1. Fault A/1 appears in LA because its presence causes the value of primary input A to deviate from its correct value of zero. Fault A/0 is not in the fault list because the value of A remains correct when the fault A/0 is present. The fault lists for inputs B and C are derived in the 140 VLSI Test Principles and Architectures LA = {A/1} 0 A LB = {B/0} 1 B G1 C 0 LC = {C/1} {A/1, H/1} H G2 0 1L {B/0, E/0, L/0} 1 1 G3 E F {B/0, E/0} {B/0, E/0, F/0} G4 1 {A/1, H/1, B/0, K E/0, F/0, J/1, K/0} 0 J {B/0, E/0, F/0, J/1} FIGURE 3.26 Deductive fault simulation (P1). same way. Based on logic reasoning, the process of deriving the fault list of a gate output from those of the gate inputs is called fault list propagation; for example, the fault list of gate output E is the union of the fault list of B and the E/0 fault. Clearly, the E/0 fault should be included in LE as the correct value of E is one. On the other hand, because the fault-free value of C is a noncontrolling value of G1, the fault effect of each fault in LB will propagate to E (which causes E to be 1); therefore, all faults in LB are propagated to LE. LC is not propagated to the gate output because the other input B holds the controlling value (one) of gate G1. Similarly, the fault list LE is propagated to signals L and F. The fanout branches do nothing but add faults L/0 and F/0 to LL and LF, respectively. The fault list of gate output H contains A/1 and H/1; the fault list of A is propagated through G2 because L is one, and the fault list of L is discarded because A is zero. Finally, the fault list of primary output K is the union of the fault lists of the two gate inputs; that is, LK = LH ∪ LJ = A/1, H/1, B/0, E/0, F/0, J/1, K/0 because both gate inputs of G4 are zeros; all the fault effects at the gate inputs are propagated to the gate output. By definition, we can conclude that pattern P1 detects the seven faults in LK . From this simple example, we can see the advantage of deductive fault simulation—all faults detected by a test pattern are obtained in one fault list propagation pass. Note that, for ease of explanation, no fault collapsing is performed in this example. In practice, however, the faults are collapsed before deductive fault simulation and only the collapsed faults are considered during fault list propagation. In Figure 3.27, the deductive fault simulation results for test pattern P2 are shown. The notable difference is that those faults previously detected by pattern P1 are dropped and not taken into account. The fault list of K indicates that one more fault, C/0, is detected by P2. The fault simulation results for pattern P3 are depicted in Figure 3.28. Three more faults F/1, J/0, K/1 are detected. Figure 3.29 illustrates the deductive fault simulation flow. For each test pattern, fault-free simulation is first performed to obtain the correct values of each signal. Fault list propagation is then conducted. A fault is detected and removed from the fault list if it appears in any primary output’s fault list. The same process repeats until all test patterns are simulated or all faults are detected. Logic and Fault Simulation 141 0 A LB = {B/1} 0 B C G1 1 LC = {C/0} 1L {C/0} 1 E {C/0} 1 F {C/0} FIGURE 3.27 Deductive fault simulation (P2). G2 H 0 G4 0 G3 J {C/0} 1 K {C/0} LA = {A/0} 1 A LB = {B/1} B0 G1 C 0 LC = {C/1} {B/1, C/1, E/1, L/1} G2 H 0 0L {B/1, C/1, E/1, L/1} G4 0K {F/1, J/0, K/1} 0 0 G3 E F {B/1, C/1, E/1} {B/1, C/1, E/1, F/1} 1 J {B/1, C/1, E/1, F/0, J/0} FIGURE 3.28 Deductive fault simulation (P3). Although in our simple example, the fault list propagation rules are demonstrated only for two-input gates, they can be generalized to multiple input gates. Let I and z be the set of gate inputs and the gate output, respectively. Equation 3.1 shows the fault list propagation rule when all gate inputs hold noncontrolling values: Lz = Lj j∈I ∪ z/ c ⊕ i (3.1) In Equation 3.1, c and i are the controlling and inversion values of the gate. (See Table 3.2 for the c and i values of basic gates.) Because no controlling value appears in the gate inputs, the fault lists at the inputs are propagated to the fault list of the gate output Lz, represented by the term Lj. At the same time, the correct value j∈I of z is c ⊕ i; therefore, the fault z stuck-at c ⊕ i, denoted by z/ c ⊕ i , is added to Lz. (Recall that c ⊕ i = c ⊕ i.) According to the rule, the fault list of the NOR gate G4 in Figure 3.26 is simply LK = LH ∪ LJ ∪ K/0 . For cases where at least one gate input holds the controlling value, the fault list propagation rule is depicted in Equation 3.2, where S and I − S stand for the sets of 142 VLSI Test Principles and Architectures start F ← collapsed fault list no end next pattern? yes apply next pattern 1. fault-free simulation 2. propagate fault list delete detected faults from F no F empty? yes end FIGURE 3.29 Deductive fault simulation flowchart. gate inputs that hold the controlling and noncontrolling values, respectively, and the minus sign represents the set difference operation: Lz = Lj − Lj j∈S j ∈ I−S z/c ⊕ i (3.2) The term Lj − Lj represents the set of faults in the gate input fault j∈S j ∈ I−S lists that will propagate to the gate output. First, a fault cannot be observed unless it appears in every fault list of gate inputs in S, represented by the term Lj; j∈S otherwise, some gate inputs will retain the controlling value and block the fault effect propagation. Second, the fault lists of the noncontrolling gate inputs (i e , I − S) cannot propagate to the gate output, represented by the Lj term and j ∈ I−S the set difference operation, because these faults prevent the gate output from being changed. Applying Equation 3.2 to the NOR gate G4 in Figure 3.28, one has LK = LJ − LH ∪ K/1 ; the faults in LH are taken out of LJ because flipping H does not change the value of output K. Although deductive fault simulation is efficient in that it processes all faults at the same time, it has several limitations. The first problem is that unknown values are not easily handled. For each unknown value, both cases must be considered (i e , when the unknown is a controlling or noncontrolling value). The logic rea- soning becomes even more complicated if more than one unknown appears. See Logic and Fault Simulation 143 [Abramovici 1994] for more detailed discussions of this problem. The second problem is that deductive fault simulation is only suitable for the zero-delay timing model, because no timing information is considered during the deductive fault propagation process. Finally, deductive fault simulation has a potential memory management problem. Because the size of fault lists cannot be predicted in advance, there can be a large variation in memory requirements during algorithm execution. 3.4.4 Concurrent Fault Simulation Because a fault only affects the logic in the fanout cone from the fault site, the good circuit and faulty circuits typically only differ in a small region. Concurrent fault simulation exploits this fact and simulates only the differential parts of the whole circuit [Ulrich 1974]. Concurrent fault simulation is essentially an event-driven simulation with the fault-free circuit and faulty circuits simulated altogether. In concurrent fault simulation, every gate has a concurrent fault list, which consists of a set of bad gates. A bad gate of gate x represents an imaginary copy of gate x in the presence of a fault. Every bad gate contains a fault index and the associated gate I/O values in the presence of the corresponding fault. Initially, the concurrent fault list of gate x contains local faults of gate x. The local faults of gate x are faults on the inputs or outputs of gate x. As the simulation proceeds, the concurrent fault list contains not only local faults but also faults propagated from previous stages. Local faults of gate x remain in the concurrent fault list of gate x until they are detected. Figure 3.30 illustrates the concurrent simulation of the example circuit for test pattern P1. For clear illustration, we demonstrate three faults in this example: A stuck-at one, C stuck-at zero, and J stuck-at zero faults. The concurrent u→0 A u→1 B C u→0 1 A/1 1 A/1: u → 1 1 1 A/1 0 0 G2 u→0 H L G1 u→1 E F G3 u→0 J J/0 10 G4 u → 1 K 1 C/0 1 0 FIGURE 3.30 Concurrent fault simulation (P1). 144 VLSI Test Principles and Architectures fault lists with bad gates in gray are drawn beside the good gates. The fault indices are labeled in the middle of bad gates and their associated bad gate I/O values are labeled beside their I/O pins. The fault list of G1, G2, and G3 initially contains their local faults: C/0, A/1, and J/0. When we apply the first pattern, three events occur in the primary inputs: u → 0 on A, u → 1 on B, and u → 0 on C. They are good events because they happen in the good circuit. The output of good gate G1 changes from unknown to one. In the presence of fault C/0, the output of faulty G1 is the same as that of good G1. A bad gate is invisible if its faulty output is the same as the good output. The bad gates C/0 and J/0 are both invisible so they are not propagated to the subsequent stages. The output of G2 changes from unknown to zero. In the presence of fault A/1, the faulty output changes from unknown to 1. Because the faulty output differs from the good output, bad gate A/1 becomes visible. A bad gate is visible if its faulty output is different from the good output. The visible bad gate A/1 creates a bad event u → 1 on net H (in gray). A bad event does not occur in the good circuit; it only occurs in the faulty circuit of the corresponding fault. A new copy of bad gate A/1 is added to the concurrent fault list of G4 because it has one input different from the good gate. It is said that bad gate A/1 diverges from its good gate. Finally, fault A/1 is detected because the faulty output K is different from the good output. At this time, we could drop detected fault A/1 but we keep it for illustration purposes. Figure 3.31 illustrates the concurrent fault simulation for test pattern P2. Two good events occur in this figure: 0 → 1 on C and 1 → 0 on B. The bad gate C/0, which 0 C/0 0 0 A0 1 A/1 1 1 G2 0 H L B 1→0 1 C 0→1 G1 E F G3 0 J J/0 10 1 A/1 0 0 G4 1 K 0 C/0 0 C/0 0 C/0: 1 → 0 0 1 C/0: 0 → 1 C/0 0 0 1 FIGURE 3.31 Concurrent fault simulation (P2). Logic and Fault Simulation 145 was invisible in pattern P1, now becomes newly visible. The newly visible bad gate creates a bad event—net E falls to zero, which in turn creates two divergences in G2 and G3. The former is invisible but the latter creates a bad event—net J rises to one. Finally, the concurrent fault list of G4 contains two bad gates; both faults A/1 and C/0 are detected. Again, we keep A/1 and C/0 faults for demonstrating the simulation of pattern P3. For the last test pattern P3 (Figure 3.32), two good events occur at primary inputs A and C. The bad gate C/0 now becomes invisible. The bad gate C/0 is deleted from the concurrent fault list of G3. A bad gate converges to its good gate if it is not a local fault and its I/O values are identical to those of the good gate. Similarly, the other bad gates of C/0 also converge to G2 and G4. Note that bad gate C/0 does not converge to G1 because it is a local fault for G1. The bad gate A/1 can be examined in the same way. For gate G3, although the faulty output of bad gate J/0 does not change, the good event 0 → 1 on J makes bad gate J/0 newly visible. The newly visible event (in gray) is propagated to G4 and a new bad gate J/0 diverges from G4. Eventually, the fault J/0 is detected by pattern P3. Figure 3.33 shows a simplified concurrent fault simulation flowchart. The fault simulator applies one pattern at a time. The concurrent fault simulation is an event- driven simulation with both good events and bad events simulated at the same time. The events on the gate inputs are first analyzed. A good event affects both good and bad gates but a bad event only affects bad gates of the corresponding fault. After the analysis, events are then executed. The diverged bad gates and converged bad gates are added to or deleted from the fault list, respectively. Determining whether 1 C/0 0 0 A 0→1 1 A/1 0 0 0 G2 H 0 A/1 0 1 B0 C 1→0 L 1→0 G1 E 0 C/0 0 0 G4 1→0 K F G3 0→1 J J/0 0 00 J/0: 0→ 0 J/0 1 0 C/0 01 0 C/0 0 1 FIGURE 3.32 Concurrent fault simulation (P3). 146 VLSI Test Principles and Architectures start F ← collapsed fault list no end next pattern? yes apply next pattern 1. analyze events at gate inputs 2. execute events 3. compute events at gate outputs yes more events? no delete detected faults from F no F empty? yes end FIGURE 3.33 Concurrent fault simulation flowchart. a bad gate diverges or converges depends on three factors: the visibility, the bad event, and the concurrent fault list (see [Abramovici 1994] for more details). After the event execution, new events are computed at the gate output. If an event reaches the primary outputs, detected faults can be removed from concurrent fault lists of all gates. This process repeats until there are no more test patterns or no undetected faults. 3.4.5 Differential Fault Simulation Concurrent fault simulation constructs the state of the faulty circuit from that of the same faulty circuit of the previous test pattern. Concurrent fault simulation has a potential memory problem because the size of the concurrent fault list changes at run time. In contrast, the single fault propagation technique constructs the state of the faulty circuit from that of the good circuit. For sequential circuits, the single fault propagation technique would require a large overhead to store Logic and Fault Simulation P1 P2 ... Pi Pi+1 . . . Pn Good G1 G2 ... Gi Gi+1 . . . Gn f1 F1,1 F1,2 ... F1,i F1,i+1 . . . F1,n f2 F2,1 F2,2 ... F2,i F2,i+1 . . . F2,n ... ... ... ... ... ... ... ... fk Fk,1 Fk,2 ... Fk,i Fk,i+1 . . . Fk,n fk+1 Fk+1,1 Fk+1,2 . . . Fk+1,i Fk+1,i+1 . . . Fk+1,n ... ... ... ... ... ... ... ... fm Fm,1 Fm,2 . . . Fm,i Fm,i+1 . . . Fm,n FIGURE 3.34 Differential fault simulation. 147 the states of the good circuit. Neither of the above two techniques is good for sequential fault simulation. Differential fault simulation combines the merits of concurrent fault simulation and single fault propagation techniques [Cheng 1989]. The idea is to simulate in turn every faulty circuit by tracking only the difference between a faulty circuit and the last simulated one. An event-driven simulator can easily implement differential fault simulation with the differences injected as events. Figure 3.34 illustrates how differential fault simulation works. First, the first pattern P1 is simulated on the good circuit G1 and the good primary outputs are stored. Then a faulty circuit (F1,1) is simulated with fault f1 injected as an event. The first subscript indicates the fault and the second subscript indicates the pattern. The difference of states between G1 and F1,1 is stored. Note that only the states of memory elements, such as flip-flops, are stored, so the memory required is small compared to concurrent fault simulation. If the primary outputs of F1,1 and G1 are not the same, then fault f1 is detected. Following F1 the second faulty circuit (F2,1) is simulated with f1 removed and f2 injected. Similarly, the difference of states between F1 and F2 is stored. The above process continues until pattern P1 has been simulated for all faults ( f1 to fm). Following the first pattern, the state of the good circuit (G2) is restored and the second pattern P2 is applied. After the fault-free simulation, the primary outputs of G2 are stored. The state of faulty circuit F1,2 is restored by injecting the difference of G1 and F1,1. The fault f1 is again injected as an event. The differential fault simulation for P2 is the same as that of pattern P1. Differential fault simulation goes in the direction of the arrows in Figure 3.34: Gi, F1,i, F2,i, , Fm,i, Gi+1, F1,i+1, . Figure 3.35 shows a simplified flowchart for differential fault simulation. For every test pattern, a fault-free simulation is performed first, then the faulty circuits are simulated one after another. The states of every circuit are restored from the last simulation. If the faulty circuit outputs are different from the good outputs, the fault is detected and dropped. The state difference of every circuit is stored. With fault dropping, the state difference of the dropped fault must be accumulated into 148 VLSI Test Principles and Architectures start F ← collapsed fault list end no next pattern? yes restore good circuit state 1. apply next pattern 2. Ogood ← good circuit outputs no next fault? yes get next fault f 1. restore faulty circuit state 2. remove last fault 3. inject fault f 4. Of ← faulty circuit outputs 5. store state difference yes Of == Ogood? no delete f from F FIGURE 3.35 Differential fault simulation flowchart. no F empty? yes end the state differences of its next undetected fault. This process repeats until there are no test patterns or no undetected faults. The problem with differential fault simulation is that the order of events caused by fault sites is not the same as the order of the timing of their occurrence. If the circuit behavior depends on the gate delay of the circuit, the timing information of every event must be included. This solution, however, can potentially require high memory consumption. 3.4.6 Fault Detection In the previous sections, we defined fault detection as an output value being different from the good value. In the simple example we used to illustrate fault simulation Logic and Fault Simulation 149 techniques, making the fault detection decision is easy because the faults are hard detected; that is, the outputs of the fault-free and faulty circuits are either 1 or 0 and are different. In practical cases, the fault detection decision is more difficult. For example, consider the stuck-at-zero fault that occurs at the enable input of a tristate buffer. With its enable input forced to 0, the tristate buffer’s output is in a floating state. It is unclear whether the fault is detected, because the logic value of a floating signal may be the same as the correct value by accident; however, if the fault is simulated against many test patterns, it is very likely that it will eventually be detected. For this reason, some fault simulators regard this kind of fault as potentially detected. Faults that cause the circuit to oscillate (called oscillation faults) also complicate the fault detection decision because it is impossible to predict the faulty circuit outputs. Finally, some faults may cause the faulty circuit behavior to deviate significantly from the correct behavior—for example, stuck-at faults on clock signals. Called hyperactive faults, this type of fault makes the fault simulation process extremely time and memory consuming, due to the large number of differences between the good and faulty circuit. Hyperactive faults are in general easily detected, so they are regarded as detected without actual fault simulation, to avoid memory explosion in the fault simulator. 3.4.7 Comparison of Fault Simulation Techniques The reader may have realized that the major concerns of fault simulation techniques are the simulation speed and the required memory. In practice, factors such as multivalued logic simulation capability, delay model simulation capability, functional model simulation compatibility, and sequential fault simulation capability should be considered as well. Also, the choice of the most suitable fault simulation technique depends on the system memory space, the simulation time constraint, the presence of unknown or high-impedance states, the delay model, the circuit characteristics (sequential or combinational), and the presence of functional level descriptions in the circuit. In the following, we make a qualitative comparison of the previously discussed fault simulation techniques. In terms of simulation speed, it is apparent that serial fault simulation is the slowest among all the techniques. Deductive fault simulation can be faster than parallel fault simulation as their complexities are O n2 and O n3 , respectively [Goel 1980], where n is the number of logic gates in a circuit. There is no direct comparison between the deductive and concurrent fault simulation techniques. It is suspected, however, that the latter is faster than the former because concurrent fault simulation only deals with the “active” parts of the circuit that are affected by faults. Deductive fault simulation, in contrast, performs deduction on the entire circuit whenever the input patterns change. Differential fault simulation is shown to be up to twelve times faster than concurrent fault simulation and PPSFP [Cheng 1989]. Memory usage is in general not a problem for serial fault simulation because it deals with one fault at a time. Similarly, parallel fault simulation and PPSFP do not require much more memory than the fault-free simulation. The memory requirement of deductive fault simulation, in contrast, can be a problem because the fault lists are dynamically created at run time and their sizes are difficult 150 VLSI Test Principles and Architectures to predict prior to simulation. Concurrent fault simulation has even more severe memory problems than deductive fault simulation because the concurrent fault list is larger than the deductive fault list. Furthermore, the I/O values of every bad gate in concurrent fault simulation must be recorded. Differential fault simulation relieves the memory management problem of concurrent fault simulation because only the difference in flip-flips is stored. When the unknown (X) or high-impedance (Z) values are present in the circuit, multivalued fault simulation becomes necessary. Serial fault simulation has no problem in handling multivalued fault simulation because it can be realized with a regular logic simulator. In contrast, to exploit bitwise word parallelism, it is more difficult for parallel fault simulation or PPSFP to handle X or Z. Deductive fault simulation, as mentioned earlier, becomes awkward in the presence of X and Z. In concurrent fault simulation, dealing with multivalued simulations is straightforward because every bad gate is evaluated in the same way as in the faultfree simulation. Finally, differential fault simulation can simulate X or Z without a problem as it is based on event-driven simulation. From the aspect of delay and functional modeling capability, serial fault simulation does not encounter any difficulty. Parallel fault simulation and PPSFP cannot take delay or functional models into account as they pack the information of multiple faults or test patterns into the same word and rely on bitwise logic operations. Based on logic deduction, a deductive fault simulator can deal with neither delay nor functional models. Being event driven, both concurrent and differential fault simulation techniques are capable of handling functional models; however, only the former is able to process circuit delays. When sequential circuits are of concern, serial as well as parallel fault simulation techniques do not have a problem. The PPSFP technique, however, is not suited for sequential circuit simulation because a large memory space is required to store the states of the fault-free circuit. Deductive fault simulation might get very complicated because sequential circuits usually contain many unknowns. Concurrent and differential fault simulations are able to perform sequential fault simulation without difficulty. Based on the above discussions, PPSFP and concurrent fault simulation techniques are currently the most popular fault simulation techniques for combinational (full-scan) circuits. On the other hand, differential and concurrent fault simulation techniques have been widely adopted for sequential circuits. Algorithm switching has also been employed to improve performance. Parallel fault simulation can be used when the fault drop rate per test pattern is high, and then PPSFP is employed when more patterns are required to drop each fault. Even for fault simulation techniques that are efficient in time and memory, the problems of memory explosion and long simulation time still exist as the complexity of integrated circuits continues to grow. To overcome the memory problem, the multiple-pass fault simulation approach is often adopted. The idea of multiple-pass fault simulation is to partition the faults into small groups, each of which is simulated independently. If the faults are well partitioned, multiple-pass fault simulation prevents the memory explosion problem. To further reduce the fault simulation time, distributed fault simulation approaches may be employed. Logic and Fault Simulation 151 Distributed fault simulation divides the entire fault simulation into smaller tasks, each of which is performed independently on a separate processor. 3.4.8 Alternatives to Fault Simulation Because fault simulation is very time consuming and difficult for large circuits, alternatives to avoid “true” fault simulation have been developed. These alternatives require only one fault-free simulation or very few fault simulations, so the run time is significantly reduced. The alternatives give approximate fault coverage numbers. It should be noted that these alternatives are probably acceptable if the purpose of fault simulation is to estimate the quality of test patterns (i e , fault grading). These alternatives are probably not acceptable when it comes to diagnosis. This is because diagnosis requires exact information about which patterns detect which faults. (Please see Chapter 7 for more detailed information about diagnostic fault simulation.) 3.4.8.1 Toggle Coverage Toggle coverage is a popular technique to evaluate the quality of test patterns because it requires only one single fault-free simulation. There are two definitions for toggling. The relaxed definition says that a net is toggled if its value has been set to 0 and 1 (the order does not matter) during the fault-free simulation. The stringent definition requires that the net have both a 0-to-1 transition and a 1-to-0 transition (the order does not matter) during the fault-free simulation. Both definitions can be used to calculate the toggle coverage. The toggle coverage is the number of toggled nets over the number of total nets in the circuit. Please note that toggling a net does not guarantee its fault propagation so we do not know the relationship between the toggle coverage and the fault coverage. 3.4.8.2 Fault Sampling The fault sampling technique was proposed to simulate only a sampled group of faults [Butler 1974]. The real fault coverage is approximated by the simulation result of the sampled group of faults. Fault sampling is like polling before an election. The error of the polling depends on two factors: (1) the sample size, and (2) whether the sample is biased or not. Let M be the total number of faults in the circuit and K be the number of faults detected by the test set. The true fault coverage is therefore FC = K/M. Suppose that m is the number of sampled faults, and k is the number of sampled faults detected in the simulation. The estimated fault coverage is fc = k/m. Based on probability theory, the random variable k follows the hypergeometric distribution. When M is much greater than m, random variable k can be approximated by a normal random variable, of which the mean is k = mK/M = mFC; therefore, the mean of the simulated fault coverage is fc = k/m = FC. The standard deviation of fc is approximately FC 1 − FC /m. From the normal distribution assumption, we know that the confidence level of the ±3 interval is 99.7%. This means that the probability that the mean of simulated fault coverage fc falls in the ±3 interval of the true fault coverage FC is 99.7%. 152 VLSI Test Principles and Architectures 3.4.8.3 Critical Path Tracing Critical path tracing is another alternative to fault simulation [Abramovici 1984]. Given a test pattern t, net x has a critical value v if and only if the x stuckat v fault is detected by t. A net that has a critical value is a critical net. The critical path is a path that consists of nets with critical values. Tracing the critical path from PO to PI gives a list of critical nets and hence a list of detected faults. Critical path tracing is demonstrated in Figure 3.36. All the critical values are circled. The primary output K is certainly critical, as any change in K is observed. Both gate inputs H and J of gate G4 are critical because flipping either one of them would change the primary output K. It can be seen that E, F, A, and B are all critical. Note that L is not critical, because changing L would not change the primary output. After the critical path tracing, seven critical nets are identified and their associated faults A/1, H/1, B/0, E/0, F/0, J/1, K/0 are detected. Special attention is needed when fanout branches reconverge. Figure 3.37 shows the example circuit for pattern P3. As is the case in pattern P1, nets K, J, and F 0 A L1 H G2 0 1 B C 0 1 1 0 G1 E G3 F J FIGURE 3.36 Critical path tracing P1 . 1 A L0 H G2 0 0 B C 0 0 G1 E 0 F G3 1 J FIGURE 3.37 Critical path tracing P3 . 1 G4 K 0 G4 K Logic and Fault Simulation 153 are critical nets; however, L and E are not critical because changing their values does not affect the circuit output. The critical path tracing is stopped due to the reconvergence of fanout branches L and F. Eventually, faults F/1, J/0, K/1 are detected. One solution to this fanout reconvergence is to partition the circuit into fanout-free subcircuits. The detailed implementation of the critical path tracing can be found in [Abramovici 1984]. A modified critical path tracing technique that is linear time, exact, and complete can be found in [Wu 2005]. 3.4.8.4 Statistical Fault Analysis Instead of performing actual fault simulation, the statistical fault analysis (STAFAN) approach proposes to use probability theory to estimate the expected value of fault coverage [Jain 1985]. The detectability of fault f (df ) is the probability that fault f is detected by a random pattern. STAFAN calculates the detectability of a fault by two numbers: controllability and observability. The 1-controllability of net x, C1 x , is the probability of setting net x to 1 by a random pattern. The 0-controllability of net x, C0 x , is the probability of setting net x to 0 by a random pattern. STAFAN runs one fault-free simulation and keeps track of the number of 1’s and 0’s of every net. After the simulation, C1 x is the number of 1’s divided by the number of patterns, and C0 x is the number of 0’s divided by the number of patterns. The observability of net x, O x , represents the probability that the given patterns propagate the fault effect on net x to the primary outputs. During the fault-free simulation, STAFAN counts the number of times that every gate input is sensitized to its gate output. The sensitization probability, S x , is then obtained by dividing the sensitization count of gate input x by the number of test patterns. The observability of primary outputs is 1, because fault effects on primary outputs will certainly be observed. The observability of a gate input x is S x times the observability of its gate output. The observability of every net can be calculated from primary outputs to primary inputs. The observability calculation becomes complicated in the presence of fanout branches. The lower bound of the observability of a fanout stem is the maximum value of the observability of its fanout branches. The upper bound of a fanout stem is the “union” of the observability of its fanout branches. This upper bound assumes that observing the fault effect via each fanout branch is independent. For example, the observability of a fanout stem with two branches is O x = O x1 + O x2 − O x1 O x2 , where x1 and x2 are the fanout branches of x. Finally, the observability of a fanout stem is a linear combination of its upper bound and its lower bound. In the presence of fanout reconvergence, the independent observation of fanout branches is not a valid assumption. Eventually, the detectability (df ) of the net x stuck-at zero fault is C1 x times O x . The detectability of the net x stuck-at one fault is C0 x times O x . Given a set of n independent patterns, the probability of detecting fault f is dfn = 1 − 1 − df n. The expected fault coverage is the summation of dfn of all faults in the circuit over the number of total faults. Statistical data show that more than 91% of faults that 154 VLSI Test Principles and Architectures have detectability higher than 0.9 are actually detected, while less than 25% of faults that have a detectability lower than 0.1 are actually detected for single stuck-at fault test sets. 3.5 CONCLUDING REMARKS We have presented two fundamental subjects, logic simulation and fault simulation, that are important for readers to design quality digital circuits. Logic simulation checks whether the design will behave as predicted before its physical implementation is built, while fault simulation tells us in advance how effective the given test pattern set is in detecting faults. For logic simulation, event-driven simulation that can take timing (delay) models and sequential circuit behavior into consideration is the technique most widely used in commercially available logic simulators. Examples of logic simulators include Verilog-XL, NC-Verilog (both from Cadence [Cadence 2006]), ModelSim (from Mentor Graphics [Mentor 2006]), and VCS (from Synopsys [Synopsys 2006]). These logic simulators can accept gate-level models as well as RTL and behavioral descriptions of the circuits written in hardware description languages, such as Verilog and VHDL, both IEEE standards. HDLs are beyond the scope of this book but are important for digital designers to learn. More detailed descriptions of both languages can be found in books or Web sites, such as [Palnitkar 1996], http://www.verilog.com, and http://www.verilog.net. For fault simulation, both event-driven simulation and compiled-code simulation techniques can be found in commercially available electronic design automation applications. The fault simulators can be standalone tools or can be used as an integrated feature in the ATPG programs. As a standalone tool, concurrent fault simulation using the event-driven simulation technique is used in Verifault-XL (from Cadence) and TurboFault and TurboScan (both from SynTest [SynTest 2006]). As an integrated feature in ATPG, bitwise parallel simulation using the compiled-code simulation technique is widely used in Encounter Test (from Cadence), FastScan (from Mentor Graphics), and TetraMAX (from Synopsys). As we move to the nanometer age, we have begun to see nanometer designs that contain hundreds of millions of transistors. We anticipate that the semiconductor industry will completely adopt the scan methodology for quality considerations. As a result, it is becoming imperative that advanced techniques for both logic simulation and fault simulation be developed to address the high-performance and high-capacity issues, in particular, for addressing new fault models, such as transition faults [Waicukauski 1986], path-delay faults [Schulz 1989], and bridging faults [Li 2003]. At the same time, more innovations are needed in developing advanced concurrent fault simulation techniques, as designs today that are based on the scan methodology are still not 100% scan testable. Fault simulation using functional patterns remains important in order to meet excellent quality and partsper-million defect level goals. Logic and Fault Simulation 155 3.6 EXERCISES 3.1 (Parallel Gate Evaluation) Consider a logic simulator with four logic symbols (0, 1, u, and Z) that are coded as follows: v0 = 00 v1 = 11 vu = 01 vZ = 10 Assume that the host computer has a word width of w. To simulate w input vectors in parallel, two words (X1 and X2) are allocated for each signal X to store the first and second bits of the logic symbol codes, respectively. (a) Derive the gate evaluation procedures for AND, OR, and NOT operations. (b) Derive the evaluation procedures for complex gates such as a 2-to-1 mul- tiplexer, XOR, and tristate buffer. Note that the simulator is based on ternary logic; therefore, Z-to-u conversions may be necessary to convert Z inputs to u’s prior to gate evaluations. 3.2 (Timing Models) For circuit M shown in Figure 3.38, complete the following timing diagram (Figure 3.39) with respect to each timing model given below: (a) Nominal delay—Two-input gate, 1 ns; three-input gate, 1.2 ns; inverter, 0.6 ns. Inertial delay—All gates, 0.3 ns. (b) Rise delay—Two-input gate, 0.8 ns; three-input gate, 1 ns; inverter, 0.6 ns. Fall delay—Two-input gate, 1 ns; three-input gate, 1.2 ns; inverter, 0.8 ns. A D E H B L F J C FIGURE 3.38 Example circuit M. 156 VLSI Test Principles and Architectures 0.1 0.4 A B C D E F H J L 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 FIGURE 3.39 The timing diagram. (c) Minimum delay—Two-input gate, 0.8 ns; three-input gate, 1 ns; inverter, 0.6 ns. Maximum delay—Two-input gate, 1 ns; three-input gate, 1.2 ns; inverter, 0.8 ns. 3.3 (Compiled-Code Simulation) Apply logic levelization on circuit M given in Figure 3.38. Assign a level number to each gate starting from level 1 at the primary inputs. Assume that a target machine can only support basic logic operations using two-input AND/OR and inversion. What is the pseudo code for circuit M if it is to be simulated in the target machine? 3.4 (Event-Driven Simulation) Redo Problem 3.2a using the nominal-delay event-driven simulation technique. Show all events and activity lists of each time stamp. 3.5 (Hazard Detection) Use eight-valued logic to detect static and dynamic hazards in circuit M in response to an input change of ABC from {101} to {010}. 3.6 (Hazard Detection) For the circuit and test patterns given in Figure 3.40 below, determine whether there is a static or dynamic hazard, assuming there are no faults present in the design. 3.7 (Parallel-Pattern Single-Fault Propagation) For the circuit and two given stuck-at faults shown in Figure 3.40, use the parallel-pattern single-fault propagation fault simulation technique to identify which faults can be detected by the given test patterns. Logic and Fault Simulation 157 101 a c 01 1 b α stuck-at 0 β stuck-at 1 FIGURE 3.40 Example circuit. FIGURE 3.41 Circuit for Problem 3.9. A B G D C 3.8 (Parallel Fault Simulation) Repeat Problem 3.7 using parallel fault simulation. 3.9 (Deductive Fault Simulation) Write the fault list propagation rule for the three-input NOR gate given in Figure 3.41. 3.10 (Deductive Fault Simulation) Repeat Problem 3.7 using deductive fault simulation. 3.11 (Concurrent Fault Simulation) Repeat Problem 3.7 using concurrent fault simulation. 3.12 (Critical Path Tracing) For the circuit in Problem 3.7, circle all the critical values for the three test patterns. What faults are detected? 3.13 (A Design Practice) Repeat Problem 3.7 using the logic simulation program provided on the Web site. What are the correct outputs of the circuit? 3.14 (A Design Practice) Repeat Problem 3.7 using the fault simulation program provided on the Web site. What is the fault coverage of this test set? 3.15 (A Design Practice) For the circuit given in Problem 3.2, use any commercially available logic simulator, such as Verilog-XL, VCS, or ModelSim, to simulate the circuit behavior. Show the correct outputs of the circuit on a waveform display. Do they agree with your answers? 158 VLSI Test Principles and Architectures 3.16 (A Design Practice) For the circuit given in Problem 3.7, use the fault simulation program (TurboFault) provided on the Web site to simulate the faulty output in the presence of fault . Is the fault detected? References R3.0—Books [Abramovici 1994] M. Abramovici, M. A. Breuer, and A. D. Friedman, Digital Systems Testing and Testable Design, IEEE Press, Piscataway, NJ, 1994 (revised printing). [Miczo 2003] A. Miczo, Digital Logic Testing and Simulation, 2nd ed., John Wiley & Sons, Hoboken, NJ, 2003. [Palnitkar 1996] S. Palnitkar, Verilog HDL: A Guide to Digital Design and Synthesis, Sunsoft, Mountain View, CA, 1996. [Thomas 2002] D. E. Thomas and P. R. Moorby, The Verilog Hardware Description Language, Springer Science, New York, 2002. [IEEE 1076-2002] IEEE Standard VHDL Language Reference Manual, IEEE Std. 1076-2002, Institute of Electrical and Electronics Engineers, New York, 2002. [IEEE 1463-2001] IEEE Standard Description Language Based on the Verilog Hardware Description Language, IEEE Std. 1463-2001), Institute of Electrical and Electronics Engineers, New York, 2001. [Wile 2005] B. Wile, J. C. Goss, and W. Roesner, Comprehensive Functional Verification, Morgan Kaufmann, San Francisco, CA, 2005. R3.1—Introduction [SystemC 2006] SystemC (http://www.systemc.org). [SystemVerilog 2006] SystemVerilog (http://systemverilog.org). R3.2—Simulation Models [Breuer 1972] M. A. Breuer, A note on three valued logic simulation, IEEE Trans. Comput., C-21(4), 399–402, 1972. R3.3—Logic Simulation [Eichelberger 1965] E. B. Eichelberger, Hazard detection in combinational and sequential circuits, IBM J. Res. Develop., 9(9), 90–99, 1965. [Hayes 1986] J. P. Hayes, Uncertainty, energy, and multiple-valued logics, IEEE Trans. Comput., C-35(2), 107–114, 1986. [Ulrich 1969] E. G. Ulrich, Exclusive simulation of activity in digital networks, Commun. ACM, 12(2), 102–110, 1969. [Wang 1987] L.-T. Wang, N. E. Hoover, E. H. Porter, and J. J. Zasio, SSIM: A software levelized compiled-code simulator, in Proc. Des. Automat. Conf., June 1987, pp. 2–8. [Yoeli 1964] M. Yoeli and S. Rinon, Applications of ternary algebra to the study of static hazards, J. ACM, 11(1), 84–97, 1964. Logic and Fault Simulation 159 R3.4—Fault Simulation [Abramovici 1984] M. Abramovici, P. R. Menon, and D. T. Miller, Critical path tracing: An alternative to fault simulation, IEEE Des. Test Comput., 1(1), 83–93, 1984. [Armstrong 1972] D. B. Armstrong, A deductive method for simulating faults in logic circuits, IEEE Trans. Comput., C-21(5), 464–471, 1972. [Butler 1974] T. T. Butler, T. G. Hallin, J. J. Kulzer, and K. W. Johnson, LAMP: Application to switching system development, Bell System Tech. J., 53, 1535–1555, 1974. [Cheng 1989] W. T. Cheng and M. L. Yu, Differential fault simulation: A fast method using minimal memory, in Proc. Des. Automat. Conf., June 1989, pp. 424–428. [Goel 1980] P. Goel, Test generation cost analysis and projections, in Proc. Des. Automat. Conf., June 1980, pp. 77–84. [Jain 1985] S. K. Jain and V. D. Agrawal, Statistical fault analysis, IEEE Des. Test Comput., 2(1), 38–44, 1985. [Seshu 1965] S. Sesuh and D. N. Freeman, On improved diagnosis program, IEEE Trans. Electron. Comput., EC-14(1), 76–79, 1965. [Ulrich 1974] E. G. Ulrich and T. Baker, Concurrent simulation of nearly identical digital networks, IEEE Trans. Comput., 7(4), 39–44, 1974. [Waicukauski 1985] J. A. Waicukauski, E. B. Eichelberger, D. O. Forlenza, E. Lindbloom, and T. McCarthy, Fault simulation for structured VLSI, Proc. VLSI Syst. Des., 6(12), 20–32, 1985. [Waicukauski 1986] J. A. Waicukauski, E. Lindbloom, B. K. Rosen, and V. S. Iyengar, Transition fault simulation by parallel pattern single fault propagation, in Proc. IEEE Int. Test Conf., September 1986, pp. 542–549. [Wu 2005] L. Wu and D. M. H. Walker, A fast algorithm for critical path tracing in VLSI digital circuits, in Proc. Int. Symp. on Defect and Fault Tolerance in VLSI Systems, October 2005, pp. 178–186. R3.5—Concluding Remarks [Cadence 2006] Cadence Design Systems (http://www.cadence.com). [Li 2003] Z. Li, X. Lu, W. Qiu, W. Shi, and D. M. H. Walker, A circuit level fault model for resistive bridges, ACM Trans. Des. Automat. Electron. Sys. (TODAES), 8(4), 546–559, 2003. [Mentor 2006] Mentor Graphics (http://www.mentor.com). [Schulz 1989] M. Schulz, F. Fink, and K. Fuchs, Parallel pattern fault simulation of path delay faults, in Proc. Des. Automat. Conf., June 1989, pp. 357–363. [Synopsys 2006] Synopsys (http://www.synopsys.com). [SynTest 2006] SynTest Technologies (http://www.syntest.com). [Waicukauski 1986] J. A. Waicukauski, E. Lindbloom, B. K. Rosen, and V. S. Iyengar, Transition fault simulation by parallel pattern single fault propagation, in Proc. IEEE Int. Test Conf., September 1986, pp. 542–549. This Page is Intentionally Left Blank CHAPTER 4 TEST GENERATION Michael S. Hsiao Virginia Tech, Blacksburg, Virginia ABOUT THIS CHAPTER Test generation is the task of producing an effective set of vectors that will achieve high fault coverage for a specified fault model. While much progress has been made over the years in automatic test pattern generation (ATPG), this problem remains an extremely difficult one. Without powerful ATPGs, chips will increasingly depend on design for testability (DFT) techniques to alleviate the high cost of generating vectors. This chapter deals with the fundamental issues behind the design of an ATPG, as well as the underlying learning mechanisms that can improve the overall performance of ATPG. This chapter is organized as follows. First, an overview of the problem of test generation is given, followed by random test generation. Next, deterministic algorithms for test generation for stuck-at faults are explained, including techniques that enhance the deterministic engines such as static and dynamic learning. Simulationbased test generation is covered next, where genetic algorithms are used to derive intelligent vectors. Test generation for other fault models such as delay faults is explained, including ATPG for path-delay faults and transition faults. A brief discussion on bridging faults is also included. Finally, advanced test generation topics are briefly discussed. 4.1 INTRODUCTION Due to the imperfect manufacturing process, defects may be introduced during fabrication, resulting in chips that could potentially malfunction. The objective of test generation is the task of producing a set of test vectors that will uncover any defect in a chip. Figure 4.1 illustrates a high-level concept of test generation. In this figure, the circuit at the top is defect free, and for any defective chip which is functionally different from the defect-free one there must exist some input that can differentiate the two. Generating effective test patterns efficiently for a digital circuit is thus the goal of any automatic test pattern generation (ATPG) system. 162 VLSI Test Principles and Architectures Inputs Defect-free Generate a vector that can produce a logic 1 Defective Outputs FIGURE 4.1 Conceptual view of test generation. : Defect As this problem is extremely difficult, design for testability (DFT) methods have been frequently used to relieve the burden on the ATPG. In this sense, a powerful ATPG can be regarded as the holy grail in testing, with which all DFT methods could potentially be eliminated. In other words, if the ATPG engine is capable of delivering high-quality test patterns that achieve high fault coverages and small test sets, DFT would no longer be necessary. This chapter thus deals with the algorithms and inner workings of an automatic test pattern generator. Both the underlying theory and the implementation details are covered. As it is difficult and unrealistic to generate vectors targeting all possible defects that could potentially occur during the manufacturing process, automatic test generators operate on an abstract representation of defects referred to as faults. The single stuck-at fault model is one of the most popular fault models and is discussed first in this chapter, followed by discussion of test generation for other fault models. In addition, only a single fault is assumed to be present in the circuit to simplify the test generation problem. Consider the single stuck-at fault model: Any fault simply denotes that a circuit node is tied to logic 1 or logic 0. Figure 4.2 shows a circuit with a single stuck-at fault in which signal d is tied to logic 0 d/0 . A logic 1 must be applied from the primary inputs of the circuit to node d if there is to be a difference between the fault-free (or good) circuit and the circuit with the stuck-at fault present. Next, in order to observe the effect of the fault, a logic 0 must be applied to signal c so if a b c FIGURE 4.2 Example of a single stuck-at fault. stuck-at 1 d e Test Generation 163 the fault d/0 is present it can be detected at the output e. Test generation attempts to generate test vectors for every possible fault in the circuit. In this example, in addition to the d/0 fault, faults such as a/1 b/1 c/0, etc. are also targeted by the test generator. As some of the fault in the circuit can be logically equivalent, no test can be obtained to distinguish between them. Thus, equivalent fault collapsing is often used to identify equivalent faults a priori in order to reduce the number of faults that must be targeted [Abramovici 1994] [Bushnell 2000] [Jha 2003]. Subsequently, the ATPG is only concerned with generating test vectors for each fault in the collapsed fault list. 4.2 RANDOM TEST GENERATION Random test generation (RTG) is one of the simplest methods for generating vectors. Vectors are randomly generated and fault-simulated (or fault-graded) on the circuit under test (CUT). Because no specific fault is targeted, the complexity of RTG is low. However, the disadvantages of RTG are that the test set size may grow to be very large and the fault coverage may not be sufficiently high, due to difficult-to-test faults. In RTG, logic values are randomly generated at the primary inputs, with equal probability of assigning a logic 1 or logic 0 to each primary input. Thus, the random vectors are uniformly distributed in the test set. Note that the random test set is not truly random because a pseudo-random number generator is generally used. In other words, the random test set can be repeated with the same pseudo-random number generator. Nevertheless, the vectors generated hold the necessary statistical properties of a random vector set. The level of confidence one can have on a random test set T can be measured as the probability that T can detect all the stuck-at faults in the circuit. For N random vectors, the test quality tN indicates the probability that all detectable stuck-at faults are detected by these N random vectors. Thus, the test quality of a random test set highly depends on the circuit under test. Consider a circuit with an eight-input AND gate (or equivalently a cone of seven two-input AND gates), illustrated in Figure 4.3. While achieving a logic 0 at the output of the AND gate is easy, getting a logic 1 is difficult. A logic 1 would require all the inputs to be at logic 1. If the RTG assigns each primary input with an equal probability of logic 0 or logic 1, the chance of getting eight logic 1’s simultaneously would only be 0 58 = 0 0039. In other words, the AND gate output stuck-at-0 fault would be difficult to test by the RTG. Such faults are called random-pattern resistant faults. As discussed earlier, the quality of a random test set depends on the underlying circuit. More random-pattern resistant faults will more likely reduce the quality of the random test set. To tackle the problem of targeting random-pattern resistant faults, biasing is required so the input vectors are no longer viewed as uniformly distributed. Consider the same eight-input AND gate example again. If each input of the AND gate has a much higher probability of receiving a logic 1, the probability of getting a logic 1 at the 164 VLSI Test Principles and Architectures FIGURE 4.3 Two equivalent circuits. output of the AND gate significantly increases. For example, if each input has a 75% probability of receiving a logic 1, then getting a logic 1 at the output of the AND gate now becomes 0 758 = 0 1001, rather than the previous 0.0039. Determining the optimal bias values for each primary input is not an easy task. Thus, rather than trying to obtain the optimal set of values, the objective is frequently to increase the probabilities for those difficult-to-control and difficult-toobserve nodes in the circuit. For instance, suppose a circuit has an eight-input AND gate; any fault that requires the AND gate output equal to logic 1 for detection will be considered difficult to test. It would then be beneficial to attempt to increase the probability of obtaining a logic 1 at the output of this AND gate. Another issue regarding random test generation is the number of random vectors needed. Given a circuit with n primary inputs, there are clearly 2n possible input vectors. One can express the probability of detecting fault f by any random vector to be: df = Tf 2n where Tf is the set of vectors that can detect fault f . Consequently, the probability that a random vector will not detect f (i.e., f escapes a random vector) is: ef = 1 − df Therefore, given N random vectors, the probability that none of the N vectors detects fault f is: eNf = 1 − df N In other words, the probability that at least one out of N vectors will detect fault f is: 1 − 1 − df N Test Generation 165 PIs Excitation cone POs Primary output cone for PO #4 f Propagation of fault effect Inputs outside of PO cone are not needed for detection of fault f FIGURE 4.4 Detection of a fault. If the detection probability, df , for the hardest fault is known, N can be readily computed by solving the following inequality: 1 − 1 − df N ≥ p where p is the probability that N vectors should detect fault f . If the detection probability is not known, it can be computed directly from the circuit. The detection probability of a fault is directly related to: (1) the controllability of the line that the fault is on, and (2) the observability of the fault-effect to a primary output. The controllability and observability computations have been introduced previously in the chapter on design for testability. It is worth noting that the minimum detection probability of a detectable fault f can be determined by the output cone in which f resides. In fact, if f is detectable, it must be excited and propagated to at least one primary output, as illustrated in Figure 4.4. It is clear that all the primary inputs necessary to excite f and propagate the fault-effect must reside in the cone of the output to which f is detected. Thus, the detection probability for f is at least 0 5 m, where m is the number of primary inputs in the cone of the corresponding primary output. Taking this concept a step further, the detection probability of the most difficult fault can be obtained with the following lemma [David 1976] [Shedletsky 1977]. Lemma 1 In a combinational circuit with multiple outputs, let nmax be the number of primary inputs that can lead to a primary output. Then, the detection probability for the most difficult detectable fault, dmin, is: dmin ≥ 0 5 nmax Proof The proof follows from the preceding discussion. 166 VLSI Test Principles and Architectures 4.2.1 Exhaustive Testing If the combinational circuit has few primary inputs, exhaustive testing may be a viable option, where every possible input vector is enumerated. This may be superior to random test generation as RTG can produce duplicated vectors and may miss certain ones. In circuits where the number of primary inputs is large, exhaustive testing becomes prohibitive. However, based on the results of Lemma I, it may be possible to partition the circuit and only exhaust the input vectors within each cone for each primary output. This is called pseudo-exhaustive testing. In doing so, the number of input vectors can be drastically reduced. When enumerating the input vectors for a given primary output cone, the values for the primary inputs that are outside the cone are simply assigned random values. Therefore, if a circuit has three primary outputs, each of which has a corresponding primary output cone. Note that these three primary output cones may overlap. Let n1 n2, and n3 be the number of primary inputs corresponding to these three cones. Then the number of pseudo-exhaustive vectors is simply at most 2n1 + 2n2 + 2n3 . 4.3 THEORETICAL BACKGROUND: BOOLEAN DIFFERENCE Consider the circuit shown in Figure 4.5. Let the target fault be the stuck-at-0 fault on primary input y. Recall the high-level concept of test generation illustrated in Figure 4.1, where the objective is to distinguish the fault-free circuit from the faulty circuit. In the example circuit shown in Figure 4.5, the faulty circuit is the circuit with y stuck at 0. Note that the circuit output can be expressed as a Boolean formula: f = xy + yz Let f be the faulty circuit with the fault y/0 present. In other words, f =f y=0 In order to distinguish the faulty circuit f from the fault-free counterpart f , any input vector that can make f ⊕ f = 1 would suffice. Furthermore, as the aim is test x y f z w FIGURE 4.5 Example circuit to illustrate the concept of Boolean difference. Test Generation 167 generation, the target fault must be excited. In this example, the logic value on primary input y must be logic 1 to excite the fault y/0. Putting these two conditions together, the following equation is obtained: y·f y=1 ⊕f y=0 =1 (4.1) Note that f y = 1 ⊕ f y = 0 indicates the exclusive-or operation on the two functions f y = 1 and f y = 0 ; it evaluates to logic 1 if and only if the two functions evaluate to opposing values. In terms of ATPG, this is synonymous to propagating the fault effect at node y to the primary output f . Therefore, any input vector on primary inputs x, y, and z that can satisfy Equation (4.1) is a valid test vector for fault y/0: y·f y=1 ⊕f y=0 =y· x⊕z = y · xz + xz = xyz + xyz In this running example, the two vectors xyz = 110 011 are candidate test vectors for fault y/0. Formally, f y = 1 ⊕ f y = 0 is called the Boolean difference of f with respect to y and is often written as: df = f y = 1 ⊕ f y = 0 dy In general, if f is a function of x1 x2 xn, then: df dxi =f x1 x2 xi xn ⊕ f x1 x2 xi xn In terms of test generation, for any target fault on some fault /v, the set of all vectors that can propagate the fault-effect to the primary output f is then those vectors that can satisfy: df d =1 (Note that this is independent of the polarity of the fault, whether it is stuck-at-0 or stuck-at-1.) Next, the constraint that the fault must be excited, set to value v, must be added. Subsequently, the set of test vectors that can detect the fault becomes all those input values that can satisfy the following equation: =v · df d =1 (4.2) Consider the same circuit shown in Figure 4.5 again. Suppose the target fault is w/0. The same analysis can be performed for this new fault. The set of test vectors that can detect w/0 is simply: w · df = 1 dw ⇒ w· f w=1 ⊕f w=0 =1 168 VLSI Test Principles and Architectures ⇒ w · 1 ⊕ xy = 1 ⇒ w · xy = 1 ⇒ w· x+y =1 ⇒ wx + wy = 1 Now, w can be expanded from the circuit shown in the figure to be w = y·z. Plugging this into the equation above gives us: w·x+w·y = 1 ⇒ y·z·x+y·z·y=1 ⇒ x·y·z+y·z=1 ⇒ y·z=1 Therefore, the set of vectors that can detect w/0 is 001 101 . 4.3.1 Untestable Faults If the target fault is untestable, it would be impossible to satisfy Equation 4.2. Consider the circuit shown in Figure 4.6. Suppose the target fault is z/0. Then the set of vectors that can detect z/0 are those that can satisfy: z · df dz = 1 ⇒ z· f z=1 ⊕f z=0 =1 ⇒ z · xy ⊕ xy = 1 ⇒ z·0=1 ⇒ UNSATISFIABLE In other words, there exists no input vectors that can satisfy z· df dz = 1, indicating that the fault z/0 is untestable. x y f z FIGURE 4.6 Example circuit for an untestable fault. Test Generation 169 4.4 DESIGNING A STUCK-AT ATPG FOR COMBINATIONAL CIRCUITS In deterministic ATPG algorithms, there are two main tasks. The first is to excite the target fault, and the second is to propagate the fault-effect to a primary output. Because the logic values in both the fault-free and faulty circuits are needed, composite logic values are used. For each signal in the circuit, the values v/vf are needed, where v denotes the value for the signal in the fault-free circuit, and vf represents the value in the corresponding faulty circuit. Whenever v = vf , v is sufficient to denote the signal value. To facilitate the manipulation of such composite values, a 5-valued algebra was proposed [Roth 1966], in which the five values are 0, 1, X, D, and D; 0, 1, and X are the conventional values found in logic design for true, false, and “don’t care.” D represents the composite logic value 1/0 and D represents 0/1. Boolean operators such as AND, OR, NOT, XOR, etc., can work on the 5-valued algebra as well. The simplest way to perform Boolean operations is to represent each composite value into the v/vf form and operate on the fault-free value first, followed by the faulty value. For example, 1 AND D is 1/1 AND 1/0. AND-ing the fault-free values yields 1 AND 1 = 1, and AND-ing the faulty values yields 1 AND 0 = 0. So the result of the AND operation is 1/0 = D. As another example, D OR D = 1/0 OR 0/1 = 1/1 =1 Tables 4.1, 4.2, and 4.3 show the AND, OR, and NOT operations for the 5-valued algebra, respectively. Operations on other Boolean conjunctives can be constructed in a similar manner. 4.4.1 A Naive ATPG Algorithm A very simple and naive ATPG algorithm is shown in Algorithm 1, where combinational circuits with fanout structures can be handled. TABLE 4.1 AND Operation AND 0 1 D D X 000 0 0 0 10 1 D DX D0D D 0 X D0D 0 DX X0XXXX 170 VLSI Test Principles and Architectures TABLE 4.2 OR Operation OR 0 1 D D X 001DDX 111111 DD1D1X DD11DX XX1XXX TABLE 4.3 NOT Operation NOT 01 10 DD DD XX Algorithm 1 Naive ATPG C f 1: while a fault-effect of f has not propagated to a PO and all possible vector combinations have not been tried do 2: pick a vector, v, that has not been tried; 3: fault simulate v on the circuit C with fault f; 4: end while Note that in an ATPG, the worst-case computational complexity is exponential, as all possible input patterns may have to be tried before a vector is found or that the fault is determined to be undetectable. One may go about line #2 of the algorithm in an intelligent fashion, so a vector is not simply selected indiscriminately. Whether or not intelligence is incorporated, some mechanism is needed to account for those attempted input vectors so no vector would be repeated. If it is possible to deduce some knowledge during the search for the input vector, the ATPG may be able to mark a set of solutions as tried and thus reduce the remaining search space. For instance, after attempting a number of input vectors, this naive ATPG realizes that any input vector with the first primary input set to logic 0 cannot possibly detect the target fault and it can safely mark all vectors with the first primary input equal to 0 as a tried input vector. Subsequently, only those vectors with the first primary input set to 1 will be selected. Test Generation 171 In certain cases, it may not be possible for the ATPG to deduce that all vectors with some primary input set to a given logic value definitely do not qualify to be solution vectors. However, it may be able to make an intelligent guess that input vectors with primary input #i set to some specific logic value are more likely to lead to a solution. In such a case, the ATPG would make a decision on primary input #i. Because the decision may actually be wrong, the ATPG may eventually have to alter its decision, trying the vectors that have the opposite Boolean value on primary input #i. The process of making decisions and reversing decisions will result in a decision tree. Each node in the decision tree represents a decision variable. If only two choices are possible for each decision variable, then the decision tree is a binary tree. However, there may be cases where multiple choices are possible in a general search tree. Figure 4.7 shows an example decision tree. While this figure only allows decisions to be made at the primary inputs, in general this may not be the case. This is used simply to allow the reader to have a clearer picture of the concept behind decision trees. At each decision, the search space is halved. For example, if the circuit has n primary inputs, then there is a total of 2n possible vectors in the solution space. After a decision is made, the solution spaces under the two branches of a decision node are disjoint. For instance, the space under the decision a = 1 does not contain any vectors with a = 0. Note that the decision tree for a solution vector may not require the ATPG to exhaustively enumerate every possible vector; rather, it implicitly enumerates the vectors. If a solution vector exists, there must be a path along the decision tree that leads to the solution. On the other hand, if the fault is undetectable, every path in the decision tree would lead to no solution. It is important to note that a fault may be detected without having made all decisions. For example, the circuit nodes that do not play a role in exciting or propagating the fault would not have to be included in the decision process. Likewise, a 0 1 c 0 1 d 0 1 solution space with a = 0, c = 0 FIGURE 4.7 An example decision tree. solution space with a = 0, c = 1, d = 0 solution space with a = 0, c = 1, d = 1 solution space with a=1 172 VLSI Test Principles and Architectures it may not require all decision variables before the ATPG can determine that it is on the wrong path. For example, if a certain path already sets a value on the fault site such that the fault is not excited, then no value combination on the remaining decision variables can help to excite and propagate the fault. Using Figure 4.7 as an example again, suppose the path a = 0, c = 1, d = 1 cannot excite the target fault . Then, the rest of the decision variables, b e f , cannot undo the effect rendered by a = 0, c = 1, d = 1. 4.4.1.1 Backtracking Whenever a conflict is encountered (i.e., a path segment leading to no solution), the search must not continue searching along that path, but must go back to some earlier point and re-decide on a previous decision. If only two choices are possible for a decision variable, then some previous decision needs to be reversed, if the other branch has not been explored before. This reversal of decision is called a backtrack. In order to keep track of where the search spaces have been explored and avoid repeating the search in the same spaces, the easiest mechanism is to reverse the most recent decision made. When reversing any decision, the signal values implied by the assignment of the previous decision variable must be undone. Consider the decision tree illustrated in Figure 4.8 as an example. Suppose the current decisions made so far are a = 0, c = 1, d = 0, and this causes a conflict in detecting the target fault. Then, the search must reverse the most recently made decision, which is d = 0. When reversing d = 0 to d = 1, all values resulted from d = 0 must be first undone. Then, the search continues with the path a = 0, c = 1, d = 1. If the reversal of a decision also caused a conflict (in this case, reversing d = 0 also caused a conflict), then it means a = 0, c = 1 actually cannot lead to any solution vector that can detect the target fault. The backtracking mechanism would then take the search to the previous decision and attempt to reverse that decision. In the running example, it would undo the decision on d, assigning d to “don’t care,” followed by reversing of the decision c = 1 and searching the portion of the search space under a = 0, c = 0. Finally, if there is no previous decision that can be reversed, the ATPG concludes that the target fault is undetectable. FIGURE 4.8 Backtrack on a decision. a 0 c 1 d 0 1 Conflict backtrack Test Generation 173 Technically, whenever a decision is reversed, say d = 0 is reversed to d = 1 as shown in Figure 4.8, d = 1 is no longer a decision; rather, it becomes an implied value by a subset of the previous decisions made. The exact subset of decisions that implied d = 1 can be computed by a conflict analysis [Marques-Silva 1999b]. However, the details of conflict analysis are beyond the scope of this chapter and are thus omitted. The reader can refer to [Marques-Silva 1999b] for details of this mechanism. In addition, intelligent conflict analysis can also allow for nonchronological backtracking. 4.4.2 A Basic ATPG Algorithm Given a target fault g/v in a fanout-free combinational circuit C, a simple procedure to generate a vector for the fault is shown in Algorithm 2, where JustifyFanoutFree() and PropagateFanoutFree() are both recursive functions. Algorithm 2 Basic Fanout Free ATPG (C, g/v) 1: initialize circuit by setting all values to X; 2: JustifyFanoutFree C g v ; /* excite the fault by justifying line g to v */ 3: PropagateFanoutFree C g ; /* propagate fault-effect from g to a PO */ The JustifyFanoutFree g v function recursively justifies the predecessor signals of g until all signals that need to be justified are indeed justified from the primary inputs. The simple outline of the JustifyFanoutFree routine is listed in Algorithm 3. In line #10 of the algorithm, controllability measures can be used to select the best input to justify. Selecting a good gate input may help to reach a primary input sooner. Consider the circuit C shown in Figure 4.9. Suppose the objective is to justify g = 1. According to the above algorithm, the following sequence of recursive calls to JustifyFanoutFree() would have been made: a c d b FIGURE 4.9 Example fanout-free circuit. g f z h 174 VLSI Test Principles and Architectures Algorithm 3 JustifyFanoutFree C g v 1: g = v; 2: if gate type of g == primary input then 3: return; 4: else if gate type of g == AND gate then 5: if v == 1 then 6: for all inputs h of g do 7: JustifyFanoutFree C h 1 ; 8: end for 9: else v == 0 10: h = pick one input of g whose value == X; 11: JustifyFanoutFree C h 0 ; 12: end if 13: else if gate type of g == OR gate then 14: 15: end if call #1: JustifyFanoutFree C g 1 call #2: JustifyFanoutFree C a 1 call #3: JustifyFanoutFree C f 1 call #5: JustifyFanoutFree C c 0 After these calls to JustifyFanoutFree(), abcd = 1X0X is an input vector that can justify g = 1. Consider another circuit C shown in Figure 4.10. Note that the circuit is not fanout-free, but the above algorithm will still work for the objective of trying to justify the signal g = 1. According to the algorithm, the following sequence of calls to the JustifyFanoutFree function would have been made: call #1: JustifyFanoutFree C g 1 call #2: JustifyFanoutFree C a 1 call #3: JustifyFanoutFree C f 1 call #4: JustifyFanoutFree C d 0 call #5: JustifyFanoutFree C c 0 a g d f c e z h b FIGURE 4.10 Example circuit with a fanout structure. a FIGURE 4.11 Circuit with a constant circuit node. Test Generation 175 b d c After these five calls to JustifyFanoutFree(), abc = 1X0 is an input vector that can justify g = 1. Note that in a fanout-free circuit, the JustifyFanoutFree() routine will always be able to set g to the desired value v and no conflict will ever be encountered. However, this is not always true for circuits with fanout structures. This is because in circuits with fanout branches, two or more signals that can be traced back to the same fanout stem are correlated, and setting arbitrary values on these correlated signals may not always be possible. For example, in the simple circuit shown in Figure 4.11, justifying d = 1 is impossible, as it requires both b = 1 and c = 1, thereby causing a conflict on a. Consider again the circuit shown in Figure 4.10. Suppose the objective is to set z = 0. Based on the JustifyFanoutFree() algorithm, it would first justify both g = 0 and h = 0. Now, for justifying g = 0, suppose it picks the signal f for justifying the objective g = 0; it would eventually assign c = 1 through the recursive JustifyFanoutFre() function. Next, for justifying h = 0, it no longer can choose e = 0 as a viable option, because choosing e = 0 will eventually cause a conflict on signal c. In other words, a different decision has to be made for justifying h = 0. In this case, b = 0 should be chosen. While this example is very simple, it illustrates the possibility of making poor decisions, causing potential backtracks in the search. In the rest of this chapter, more discussion on avoiding conflicts will be covered. In the above running example, suppose the target fault is g/0, and JustifyFanoutFree(C, g, 1) would have successfully excited the fault. With the fault g/0 excited, the next step is to propagate the fault-effect to a primary output. Similar to the JustifyFanoutFree() function, PropagateFanoutFree() is a recursive function as well, where the fault-effect is propagated one gate at a time until it reaches a primary output. Algorithm 4 illustrates the pseudo-code for one possible implementation of the propagate function. Again, although the PropagateFanoutFree() routine is meant for fanout-free circuits, it is sufficient for the running example. Using the PropagateFanoutFree() function on the fault-effect D at signal g, listed in Algorithm 3, the following calls to the JustifyFanoutFree and PropagateFanoutFree functions would have been made: call #1: PropagateFanoutFree(C, g) call #2: JustifyFanoutFree(C, h, 0) call #3: JustifyFanoutFree(C, b, 0) call #4: PropagateFanoutFree(C, z) 176 VLSI Test Principles and Architectures Algorithm 4 PropagateFanoutFree(C, g) 1: if g has exactly one fanout then 2: h = fanout gate of g; 3: if none of the inputs of h has the value of X then 4: backtrack; 5: end if 6: else g has more than one fanout 7: h = pick one fanout gate of g that is unjustified; 8: end if 9: if gate type of h == AND gate then 10: for all inputs, j, of h, such that j = g do 11: if the value on j == X then 12: JustifyFanoutFree(C, j, 1); 13: end if 14: end for 15: else if gate type of h == OR gate then 16: for all inputs, j, of h, such that j = g do 17: if the value on j == X then 18: JustifyFanoutFree(C, j, 0); 19: end if 20: end for 21: else if gate type of h == gate then 22: 23: end if 24: PropagateFanoutFree(C, h); Because the fault-effect has successfully propagated to the primary output z, the fault g/0 is detected, with the vector abc = 100. The reader may notice that once g/0 has been excited, it is also propagated to z as well, because c = 0 also has made h = 0. In other words, the JustifyFanoutFree(C, h, 0) step is unnecessary. However, this is only possible if logic simulation or implication capability is embedded in the BasicFanoutFreeATPG() algorithm. For this discussion, it is not assumed that logic simulation is included. Using the same circuit shown in Figure 4.10, consider the fault g/1. The BasicFanoutFreeATPG() algorithm will again be used to generate a test vector for this fault. In this case, the ATPG first attempts to justify g = 0, followed by propagating the fault-effect to z. During the justification of g = 0, the ATPG can pick either a or f as the next signal to justify. At this point, the ATPG must make a decision. Testability measures discussed in an earlier chapter can be used as a guide to make more intelligent decisions. In this example, choosing a is considered to be better than f , because choosing a requires no additional decisions to be made. Note that testability measures only serve as a guide to decision selection; they do not guarantee that the guidance will always lead to better decision selection. It is important to note that in circuits with fanout structures, because the simple JustifyFanoutFree() and PropagateFanoutFree() functions described above are Test Generation 177 meant for fanout-free circuits, will not always be applicable as illustrated in some of the examples above due to potential conflicts. In order to generate test vectors for general combinational circuits, there must be mechanisms that will allow the ATPG to avoid conflicts, as well as get out of a conflict when a conflict is encountered. To do so, the corresponding decision tree must be constructed during the search for a solution vector, and backtracks must be enforced for any conflict encountered. The following sections describe a few ATPG algorithms. 4.4.3 D Algorithm The D algorithm was proposed to tackle the generation of vectors in general combinational circuits [Roth 1966] [Roth 1967]. As indicated by the name of the algorithm, the D algorithm tries to propagate a D or D of the target fault to a primary output. Note that because each detectable fault can be excited, a fault-effect can always be created. In the following discussion, propagation of the fault-effect will take precedence over the justification of the signals. This allows for enhanced efficiency of the algorithm as well as for simpler discussion. Before proceeding to discussing the details of the D algorithm, two important terms should be defined: the D-frontier and the J-frontier. The D-frontier consists of all the gates in the circuit whose output value is x and a fault-effect (D or D) is at one or more of its inputs. In order for this to occur, one or more inputs of the gate must have a “don’t care” value. For example, at the start of the D algorithm, for a target fault f there is exactly one D (or D) placed in the circuit corresponding to the stuck-at fault. All other signals currently have a “don’t care” value. Thus, the D-frontier consists of the successor gate(s) from the line with the fault f . Two scenarios of a D-frontier are illustrated in Figure 4.12. Clearly, at any time if the D-frontier is empty, the fault no longer can be detected. For example, consider Figure 4.12a. If the bottom input of gate a is assigned a value of 0, the output of gate a will become 0, and the D-frontier now becomes empty. At this time, the search must backtrack and try a different search path. The J-frontier consists of all the gates in the circuit whose output values are known (can be any of the five values in the 5-valued logic) but is not justified by its inputs. Figure 4.13 illustrates an example of a J-frontier. Thus, in order to detect the target fault, all gates in the J-frontier must be justified; otherwise, some gates in the J-frontier must have caused a conflict, where these gates cannot be justified to the desired values. Having discussed the two fundamental concepts of the D-frontier and the J-frontier, the explanation for the D algorithm can begin. The D algorithm begins by trying to propagate the initial D (or D) at the fault site to a primary output. For example, in Figure 4.14, the propagation routine will set all the side inputs of the path necessary (gates a → b → c) to propagate the fault-effect to the respective noncontrolling values. These side input gates, namely x, y, and z, thus form the J-frontier as they are not currently justified. And as the D is propagated to the primary output, the D-frontier eventually becomes the output gate. 178 VLSI Test Principles and Architectures x x x x D x x a D -frontier (a) D-frontier contains one gate x D x FIGURE 4.12 Illustrations of D-frontier. D -frontier x x D x (b) D -frontier contains two gates J -frontier x 0 x D x x x FIGURE 4.13 Illustration of J-frontier. Whenever there are paths to choose from in advancing the D-frontier, observability values can be used to select the corresponding gates. However, this does not guarantee that the more observable path will definitely lead to a solution. When a D or a D has reached a primary output, all the gates in the J-frontier must now be justified. This is done by advancing the J-frontier backward by placing predecessor gates in the J-frontier such that they justify the previous unjustified gates. Similar to propagation of the fault-effect, whenever a conflict occurs, a backtrack must be invoked. In addition, at each step, the D-frontier must be checked so the D (or D) that has reached a primary output is still there. Otherwise, the search returns Test Generation 179 D propagates to PO D 1 a x z 0 b 1 c y FIGURE 4.14 Propagation of D- and J-frontier. J -frontier to the propagation phase and attempts to propagate the fault-effect to a primary output again. The overall procedure for the D algorithm is shown in Algorithms 5 and 6. Note that the above procedure has not incorporated any intelligence in the decision-making process. In other words, sometimes it may be possible to determine that some value assignments are not justifiable, given the current circuit state. For instance, consider the circuit fragment shown in Figure 4.15. Justifying gate a = 1 and gate b = 0 is not possible because a = 1 requires both of its inputs set to logic 1, while b = 0 requires both of its inputs set to logic 0. Noting such conflicting scenarios early can help to avoid future backtracks. Such knowledge can be incorporated into line #1 of the D-Alg-Recursion() shown in Algorithm 6. In particular, static and dynamic implications can be used to identify such potential conflicts, and they are used extensively to enhance the performance of the D algorithm (as Algorithm 5 D-Algorithm(C, f ) 1: initialize all gates to don’t-cares; 2: set a fault-effect (D or D) on line with fault f and insert it to the D-frontier; 3: J-frontier = ; 4: result = D-Alg-Recursion(C); 5: if result == success then 6: print out values at the primary inputs; 7: else 8: print fault f is untestable; 9: end if 180 VLSI Test Principles and Architectures Algorithm 6 D-Alg-Recursion C 1: if there is a conflict in any assignment or D-frontier is ∅ then 2: return failure; 3: end if 4: /* first propagate the fault-effect to a PO */ 5: if no fault-effect has reached a PO then 6: while not all gates in D-frontier has been tried do 7: g = a gate in D-frontier that has not been tried; 8: set all unassigned inputs of g to non-controlling value and add them to the J-frontier; 9: result = D-Alg-Recursion C ; 10: if result == success then 11: return (success); 12: end if 13: end while 14: return (failure); 15: end if fault-effect has reached at least one PO 16: if J-frontier is ∅ then 17: return (success); 18: end if 19: g = a gate in J-frontier; 20: while g has not been justified do 21: j = an unassigned input of g; 22: set j = 1 and insert j = 1 to J-frontier; 23: result = D-Alg-Recursion C ; 24: if result == success then 25: return (success); 26: else try the other assignment 27: set j = 0; 28: end if 29: end while 30: return(failure); a 1 0 b FIGURE 4.15 Conflict in the justification process. well as other ATPG algorithms). The implications of these procedures are discussed later in this chapter. Consider the multiplexer circuit shown in Figure 4.10. If the target fault is f stuck-at-0, then, after initializing all gate values to x, the D algorithm places a D on Test Generation 181 line f . The algorithm then tries to propagate the fault-effect to z. First it will place a = 1 in the J-frontier, followed by h = 0 in the J-frontier. At this time, the faulteffect has reached the primary output. Now, the ATPG tries to justify all unjustified values in the J-frontier. Because a is a primary input, it is already justified. The other signals in the J-frontier are f = D and h = 0. For f = D d = 0, thereby making c = 0. For h = 0, either e = 0 or b = 0 is sufficient. Whichever one it picks, the search process will terminate, as a solution has been found. Consider the same multiplexer circuit (Figure 4.10) again. Suppose the target fault now is f stuck-at-1. Following the similar discussion as the previous target fault f/0, the algorithm initializes the circuit and places a D on f . Next, to propagate the fault-effect to a primary output, it likewise inserts a = 1 and h = 0 into the J-frontier. Now, the ATPG needs to justify all the gates in the J-frontier, which includes a = 1, f = D, and h = 0. Because a is a primary output, it is already justified. For f = D, d = 1. For h = 0, suppose it selects e = 0. At this time, the J-frontier consists of two gate values: d = 1 and e = 0. No value assignment on c can satisfy both d = 1 and e = 0; therefore, a conflict has occurred, and backtrack on the previous decision is needed. The only decision that has been made is e = 0 for h = 0, as there were two choices possible for justifying h = 0. At this time, the value on e is reversed, and b = 0 is added to the J-frontier. The process continues and all gate values in the J-frontier can be successfully justified, ending the process with the vector abc = 101. Note that, in the above example, if some learning procedure (such as implications) is present, the decision for h = 0 would not result in e = 0, because the ATPG would have detected that e = 0 would conflict with d = 1. This knowledge could potentially improve the performance of the ATPG, which will be discussed later in this chapter. Consider another example circuit shown in Figure 4.16. Suppose the target fault is g/1. After circuit initialization, the D algorithm places a D on g. Now, the J-frontier consists of g = D and the D-frontier consists of h. In order to advance the D-frontier, f is set to logic 1; f = 1 is added to the J-frontier, and the D-frontier is now i. Next, to propagate the fault-effect to the output, c = 1 is added to the J-frontier. At this time, the fault-effect has been propagated to the output, and the task is to justify the signal values in the J-frontier: g = D f = 1 c = 1 . To justify g = D, two choices are possible: a = 0 or b = 0. If a = 0 is selected, it is necessary to justify f = 1 b = 1. Finally, c = 1 remains in the J-frontier which is still unjustified. At this time, a contradiction has occurred (a = 0 and c = 1), and the search reverses its last decision, changing a = 0 to a = 1. The search discovers that this reversal also causes a conflict. Thus, a backtrack occurs where line b is chosen instead c i ad g s-a-1 h be f FIGURE 4.16 Example circuit. 182 VLSI Test Principles and Architectures of a for the previous decision, so a is reset to “don’t care.” By assigning b = 0, a conflict is observed. Reversing b also cannot justify all the J-frontier. At this time, backtracking on b leads to no prior decisions. Thus, target fault g/1 is declared to be untestable. 4.4.4 PODEM In the D algorithm, the decision space encompasses the entire circuit. In other words, every internal gate could be a decision point. However, noting that the end result of any ATPG algorithm is to derive a solution vector at the primary inputs and that the number of primary inputs generally is much fewer than the total number of gates, it may be possible to arrive at a very different ATPG algorithm that makes decisions only at primary inputs rather than at internal nodes of the circuit. PODEM [Goel 1981] is based on this notion and makes decisions only at the primary inputs. Similar to the D algorithm, a D-frontier is kept. However, because decisions are made at the primary inputs, the J-frontier is unnecessary. At each step of the ATPG search process, it checks if the target fault is excited. If the fault is excited, it then checks if there exists an X-path from at least one faulteffect in the D-frontier to a primary output, where an X-path is a path of “don’t care” values from the fault-effect to a primary output. If no X-path exists, it means that all the fault-effects in the D-frontier are blocked, as illustrated in Figure 4.17, where both possible propagation paths of the D have been blocked. Otherwise, PODEM will pick the best X-path to propagate the fault-effect. Note that if the target fault has not been excited, the first steps of PODEM will be to excite the fault. The basic flow of PODEM is illustrated in Algorithms 7 and 8. It is also based on a branch-and-bound search, but the decisions are limited to the primary inputs. All internal signals obtain their logic values via logic simulation (or implications) from the decision points. As a result, no conflict will ever occur at the internal signals of the circuit. The only possible conflicts in PODEM are either (1) the target fault is not excited, or (2) the D-frontier becomes empty. In either of these cases, the search must backtrack. 0 D 1 FIGURE 4.17 No X path. Test Generation 183 Algorithm 7 PODEM C f 1: initialize all gates to don’t-cares; 2: D-frontier = ∅; 3: result = PODEM-Recursion C ; 4: if result == success then 5: print out values at the primary inputs; 6: else 7: print fault f is untestable; 8: end if Algorithm 8 PODEM-Recursion C 1: if fault-effect is observed at a PO then 2: return (success); 3: end if 4: g v = getObjective C ; 5: pi u = backtrace g v ; 6: logicSimulate_and_imply pi u ; 7: result = PODEM-Recursion C ; 8: if result == success then 9: return(success); 10: end if 11: /* backtrack */ 12: logicSimulate_and_imply pi u ; 13: result = PODEM-Recursion C ; 14: if result == success then 15: return(success); 16: end if 17: /* bad decision made at an earlier step, reset pi */ 18: logicSimulate_and_imply pi x ; 19: return(failure); According to the algorithm in PODEM, the search starts by picking an objective, and it backtraces from the objective to a primary input via the best path. Controllability measures can be used here to determine which path is regarded as the best. Gradually more primary inputs will be assigned logic values. At any time the target fault becomes unexcited or the D-frontier becomes empty, a bad decision must have been made, and reversal of some previously decisions is needed. The backtracking mechanism proceeds by reversing the most recent decision. If reversing the most recent decision also causes a conflict, the recursive algorithm will continue to backtrack to earlier decisions, until no more reversals are possible, at which time the fault is determined to be undetectable. Three important functions in PODEM-Recursion() are getObjective(), backtrace(), and logicSimulate_and_imply(). The getObjective() function returns the next objective the ATPG should try to justify. Before the target fault has been excited, 184 VLSI Test Principles and Architectures the objective is simply to set the line on which the target fault resides to the value opposite to the stuck value. Once the fault is excited, the getObjective() function selects the best fault-effect from the D-frontier to propagate. The pseudo-code for getObjective() is shown in Algorithm 9. Algorithm 9 getObjective C 1: if fault is not excited then 2: return g v ; 3: end if 4: d = a gate in D-frontier; 5: g = an input of d whose value is x; 6: v = non-controlling value of d; 7: return g v ; The backtrace() function returns a primary input assignment from which there is a path of unjustified gates to the current objective. Thus, backtrace() will never traverse through a path consisting of one or more justified gates. From the objective’s point of view, the getObjective() function returns an objective, say g = v, which means the current value of g is “don’t care.” If g were set to v, g = v would have never been selected as an objective, as it conflicts with gate g’s current value. Now, if g = x currently, and the objective is to set g = v, there must exist a path of unjustified gates from at least one primary input to g. This backtrace() function can simply be implemented as a loop from the objective to some primary inputs through a path of “don’t cares.” Algorithm 10 shows the pseudo-code for the backtrace() routine. Finally, the logicSimulate_and_imply() function can simply be a regular logic simulation routine. The added imply is used to derive additional implications, if any, that can enhance the getObjective() routine later on. Consider the multiplexer circuit shown in Figure 4.10 again. Consider the target fault f stuck-at-0. First, PODEM initializes all gate values to x. Then, the first Algorithm 10 backtrace C 1: i = g; 2: num_inversion = 0; 3: while i = primary input do 4: i = an input of i whose value is x; 5: if i is an inverted gate type then 6: num_inversion++; 7: end if 8: end while 9: if num_inversion == odd then 10: v = v; 11: end if 12: return i v ; Test Generation 185 TABLE 4.4 PODEM Objectives and Decisions for f Stuck-At-0 getObjective() backtrace() logicSim() f =1 a=1 c=0 a=1 d = 0, f = D, e = 0, h = 0 g = D, z = D D-frontier g f/0 detected objective would be to set f = 1. The backtrace routine selects c = 0 as the decision. After logic simulation, the fault is excited, together with e = h = 0. The D-frontier at this time is g. The next objective is to advance the D-frontier, thus getObjective() returns a = 1. Because a is already a primary input, backtrace() will simply return a = 1. After simulating a = 1, the fault-effect is successfully propagated to the primary output z, and PODEM is finished with this target fault with the computed vector abc = 1X0. Table 4.4 shows the series of objectives and backtraces for this example. Consider the circuit shown in Figure 4.11. Suppose the target fault is b stuckat-0. After circuit initialization, the first objective is b = 1 to excite the fault. The backtrace() returns a = 0. After logic simulation, although the target fault is excited, there is no D-frontier, because c = d = 0. At this time, PODEM reverses its last decision a = 0 to a = 1. After logic simulating a = 1, the target fault is not excited and the D-frontier is still empty. PODEM backtracks but there is no prior decision point. Thus, it concludes that fault b/0 is undetectable. Table 4.5 shows the steps made for this example, and Figure 4.18 shows the corresponding decision tree. Consider again the circuit shown in Figure 4.16 with the target fault g/1. After circuit initialization, the first objective is to excite the fault; in other words, the objective is g = 0. The backtrace() function backtraces from the objective backward to a primary input via a path of “don’t cares.” Suppose the backtrace reaches a = 0. After logic simulation, g = 0, c = d = 0, and i = 0. The D-frontier is h. However, note that there is no path of “don’t cares” from any fault-effect in the D-frontier to a primary output! If the PODEM algorithm is modified to check that any objective has at least a path of “don’t cares” to one or more primary outputs, some needless TABLE 4.5 PODEM Objectives and Decisions for b Stuck-At-0 getObjective() backtrace() logicSim() b=1 a = 1 (reversal) a=0 — b = 1, c = 0, d = 0 b = 0, c = 1, d = 0 D-frontier ∅ ∅ FIGURE 4.18 Decision tree for fault b/0. a 0 Conflict 1 Conflict 186 VLSI Test Principles and Architectures TABLE 4.6 PODEM Objectives and Decisions for g Stuck-At-1 getObjective() g=0 a = 1 (reversal) backtrace() a=0 — logicSim() g = D, c = 0 d = 0, i = 0 c = 1, d = 1 D-frontier h (but no X-path to PO) ∅ searches can be avoided. For instance, in this example, if the next objective was f = 1, even after the decision of b = 1 is made, the target fault still would not have been detected, as there was no path to propagate the fault-effect to a primary output even before the decision b = 1 was made. In other words, the search could immediately backtrack on the first decision a = 0. In this case, a = 1, and the objective is still g = 0. Backtrace() will now return b = 0. After logic simulation, g = 0, c = 1, f = 0, h = 0, i = 0. Again, there is no propagation path possible. As there is no earlier decision to backtrack to, the ATPG concludes that fault g/1 is untestable. Table 4.6 shows the steps for this example. 4.4.5 FAN While PODEM reduces the number of decision points from the number of gates in the circuit to the number of primary inputs, it still can make an excessive number of decisions. Furthermore, because PODEM targets one objective at a time, the decision process may sometimes be too localized and miss the global picture. The FAN (Fanout-Oriented TG) algorithm [Fujiwara 1983] extends the PODEM-based algorithm to remedy these shortcomings. To reduce the number of decision points, FAN first identifies the headlines in the circuit, which are the output signals of fanout-free regions. Due to the fanoutfree nature of each cone, all signals outside the cone that do not conflict with the headline assignment would never require a conflicting value assignment on the primary inputs of the corresponding fanin cone. In other words, any value assignment on the headline can always be justified by its fanin cone. This allows the backtrace() function to backtrace to either headlines or primary inputs. Because each headline has a corresponding fanin cone with several primary inputs, this allows the number of decision points to be reduced. Consider the circuit shown in Figure 4.19. If the current objective is to set z = 1, the corresponding decision tree based on the PODEM algorithm will involve many decisions at the primary inputs, such as a = 1, c = 1, d = 1, e = 1, f = 1. On the other hand, the decision based on the FAN algorithm is significantly smaller, involving only two decisions: x = 1 and y = 1. If z = 1 was not the first objective, there would have been other decisions made earlier. In other words, if there was a poor decision made in an earlier step, PODEM would need to reverse and backtrack many more decisions compared to FAN. The next improvement that FAN makes over PODEM is the simultaneous satisfaction of multiple objectives, as opposed to only one target objective at each step. Consider the circuit fragment shown in Figure 4.20. Without taking into account multiple objectives, the backtrace() routine may choose the easier path in trying a b c d e f g h FIGURE 4.19 Circuit with identified headlines. a b Test Generation 187 headlines x z y k=0 c FIGURE 4.20 Multiple backtrace to avoid potential conflicts. m=1 to justify k = 0. The easier path may be through the fanout stem b. However, this would cause a conflict later on with the other objective m = 1. In FAN, multiple objectives are taken into account, and the backtrace routine scores the nodes visited from each objective in the current set of objectives. The nodes along the path with the best scores are chosen. In this example, a = 0 will be chosen rather than b = 0, even if a = 0 is less controllable. 4.4.6 Static Logic Implications Logic implications capture the effect of assigning logic values on other gate values in a circuit. They can be extremely helpful for the ATPG to make better decisions, reduce the number of backtracks, etc. Over the past few decades, logic implications have been applied and shown their effectiveness in several areas relevant to testing. They include test-pattern-generation [Schulz 1988] [El-Maleh 1998] [Tafertshofer 2000], logic and fault simulation [Kajihara 2004], fault diagnosis [Amyeen 1999], logic verification [Paul 2000] [Marques-Silva 1999a] [Arora 2004], logic optimization [Ichihara 1997] [Kunz 1997], and untestable fault identification [Iyer 1996a] [Iyer 1996b] [Peng 2000] [Hsiao 2002] [Syal 2004]. 188 VLSI Test Principles and Architectures A powerful implication engine can have a significant impact on the performance of ATPG algorithms. Thus, much effort has been invested over the years in the efficient computation of implications. The quality of implications was improved with the computation of indirect implications in SOCRATES [Schulz 1988]. Static learning was extended to dynamic learning in [Schulz 1989] and [Kunz 1993], where some nodes in the circuit already had value assignments during the learning process. A 16-valued logic was introduced by Cox et al. [Rajski 1990], and reduction lists were used to dynamically determine the gate values. Chakradhar et al. proposed a transitive closure procedure based on the implication graph. Recursive learning was later proposed by Kunz et al. [Kunz 1994] in which a complete set of pair-wise implications could be computed. In order to keep the computational costs low, a small recursion depth can be enforced in the recursive learning procedure. Finally, implications to capture time frame information in sequential circuits in a graphical representation were proposed in [Zhao 2001] to compactly store the implications in sequential circuits. All of the aforementioned techniques require the proper understanding of logic implications. As indicated earlier, logic implications identify the effect of asserting logic values on gates in a circuit. Static logic implications, in particular, can be computed as a one-time process before ATPG begins. At the end of the process, relationships among a subset of signals in the circuit would have been learned. Static logic implications have been categorized into direct, indirect, and extended backward implications. Direct implications for a gate g simply denote logic relationships immediately on a circuit gate. On the other hand, indirect and extended backward implications require circuit simulation and the application of transition and contrapositive properties. Because they are more involved, they help to identify the logical effect of asserting a value on g with nodes in the circuit that may not be directly connected to g. The following terminology is used for the discussion on logic implications: 1. N v t : Assign logic value v to gate N in time frame t. In combinational circuits, t is equal to 0 and can thus be dropped from the expression; that is, if t = 0, N v t is rewritten as N v . 2. N v t1 → M w t2 : Assigning logic value v to gate N in time frame t1 would imply a logic value w to gate M in time frame t2. 3. Impl N v t : The set of all implications resulting from the value assignment of logic value v to gate N in time frame t. For t = 0, Impl N v t is simply represented as Impl N v . Consider an AND gate and its implication graph, shown in Figure 4.21. Because the simple AND gate has three corresponding signals, a, b, and c, the associated implication graph has six nodes. An edge in the implication graph indicates the implication relationship. For example, c = 1 has two implications: b = 1 and a = 1. The following example will explain further the concepts of direct, indirect, and extended backward implications. Note that the static logic implications are Test Generation 189 a b FIGURE 4.21 Example of an implication graph. 0 a=0 c b=0 0 c=0 a=1 b=1 0 c=1 0 a d b c e DQ h j g f k i w x z y FIGURE 4.22 Sequential circuit fragment. applicable to both combinational and sequential circuits. Given the sequential circuit fragment shown in Figure 4.22, consider gate f = 1: 1. Direct implications: A logic value of 1 on gate f would directly imply g = k = 1 because they are directly connected to gate f . In addition, f = 1 → d = 1 and e = 1. Thus, the set f 1 0 g 1 0 k 1 0 d 1 0 e 1 0 is the set of direct implications for f = 1. Similarly, direct implications associated with g = 1 can be computed to be g 1 0 j 1 0 f 1 0 . These implications are stored in the form of a graph, where each node represents a gate (with a logic value). A directed edge between two nodes represents an implication, and a weight along an edge represents the relative time frame associated with the implication. Figure 4.23 shows the graphical representation of a portion of direct implications for f = 1 in this example. The complete set of implications resulting from setting f = 1 can be obtained by traversing the graph rooted at node f = 1. Computing the set of all nodes reachable from this root node f = 1 (transitive closure on f = 1) would return the set Impl f = 1 . Thus, the complete set of direct implications using the implication graph shown in the figure for f = 1 is: f 1 0 d 1 0 e 1 0 g 1 0 k 1 0 j 1 0 c 1 −1 190 VLSI Test Principles and Architectures d=1 0 f=1 0 0 g=1 0 0 0 k=1 j=1 e=1 –1 c=1 FIGURE 4.23 Portion of implication graph for f = 1. 2. Indirect implications: Note that neither j = 1 nor k = 1 implies a logic value on gate x individually. However, if they are taken collectively, they imply x = 1. Thus, indirectly, f = 1 would imply x = 1. This is an indirect implication of f = 1, and it can be computed by performing a logic simulation on the current set of implications of the root node on the circuit. In this example, by inserting the implications of f = 1 into the circuit, followed by a run of logic simulation, x = 1 would be obtained as a result. This new implication is then added as an additional outgoing dashed edge from f = 1 in the implication graph as shown in Figure 4.24. Another nontrivial implication that can be inferred from each indirect implication is based on the contrapositive law. According to the contrapositive law, if N v → M w t1 , then M w → N v −t1 . Because f 1 → x 1 0 , by the contrapositive law, x 0 → f 0 0 . 3. Extended backward (EB) implications: Extended backward implications aim to increase the number of implications for any single node by exploring the unjustified implied nodes in the implication list. Using the same circuit shown in Figure 4.22 again, in the implication list of f = 1, d = 1 is an unjustified gate because none of d’s inputs has been implied to a value of logic 1. Thus, d is a candidate for the application of extended backward implications. To obtain extended backward implications on d, a transitive closure is first performed d=1 0 f=1 0 0 g=1 0 0 0 k= 1 0 e=1 –1 j=1 c=1 x=1 FIGURE 4.24 Adding indirect implications for f = 1. Test Generation 191 for each of its unspecified inputs. In this case, impl a = 1 and impl b = 1 are first computed. The implications of f = 1 are logic simulated together with each of d’s unspecified input’s implication sets in turn, creating a set of newly found logic assignments for each input of the chosen unjustified gate. For this example, when the implications of a = 1 and f = 1 are simulated, the new assignments seta found include w 0 0 and z 0 0 . Similarly, for the combined implication set of b = 1 and f = 1 , the new assignments setb found include y 0 0 and z 0 0 . All logic assignments that are not already in Impl f = 1 which are common to seta and setb are the extended backward implications. These new implications are added as new edges to the original node f = 1. In this running example, because z 0 0 is common in seta and setb, it is a new implication. The corresponding new implication graph is illustrated in Figure 4.25, where the new implication is shown as a dotted edge. 4.4.7 Dynamic Logic Implications While static implications are computed one time for the entire circuit, dynamic implications are performed during the ATPG process. At a given step in the ATPG process, some signals in the circuit would have taken on values, including D or D. This set of values may imply other signals which are currently unassigned to necessary value assignments. In general, dynamic implications work locally around assigned signals to see if any implication can be derived. For instance, consider the simple AND gate c = a · b. According to static logic implications, c = 0 does not imply any value on either a or b. However, if a = 1 has been assigned by the current decision process, then c = 0 would imply b = 0. This can be deduced readily. The implicant, b = 0, may be propagated further to imply other signals. The concept of direct, indirect, and extended backward implications can be applied in dynamic implications as well. Consider the circuit shown in Figure 4.26. Suppose c = 1 has been achieved by the decision process. Then, in order to achieve z = 0, either d must be 0 or e must be 0. For d = 0, both a and b must be 0. On the other hand, for e = 0, since c = 1, the only way for e = 0 is that b be assigned to 0. 0 f=1 0 0 0 0 0 0 d=1 g=1 k=1 e=1 x=1 0 –1 j =1 c=1 z=0 FIGURE 4.25 Adding extended backward implications for f = 1. 192 VLSI Test Principles and Architectures a b c FIGURE 4.26 Dynamic implications. d z e a d b z e c f FIGURE 4.27 Another dynamic implications example. The intersection of a = 0 b = 0 and b = 0 is b = 0 . In other words, the dynamic implication for z = 0 given c = 1 is b = 0. Dynamic implications can also be applied to signals with a fault-effect. For instance, consider the circuit shown in Figure 4.27. Suppose there is a D on signal b, and this fault-effect is the only one for the current target fault. Then, in order to propagate the fault-effect to the primary output z, f = 1 is a necessary condition. This dynamic implication can be obtained via the following analysis. For b = D to propagate to z, either a = 0 or c = 1 is needed, resulting in a fault effect at signal d or e. Regardless of which path the fault effect propagates, signal f = 1 is a necessary condition for the fault effect to propagate to z. Such an observation was made in [Akers 1976] [Fujiwara 1983]. The work in [Hamzaoglu 1999] extended this concept of dynamic implications a step further. Suppose the D-frontier for the current target fault consists of gates g1 g2 gn. By a similar analysis as the previous example shown in Figure 4.27, each gate gi ∈ D-frontier would have a set of necessary assignments, Ai. Clearly, the necessary assignment for any single fault-effect may not be necessary for detecting the target fault. However, in order to propagate the fault effect to a primary output, at least one fault effect in the D-frontier must be sensitized to the output. Subsequently, the intersection of all the necessary assignments for each of the gates in the D-frontier would be the set of required assignments for detection of the target fault. Test Generation 193 In other words, ∩∀ - gi∈D frontier Ai is the set of necessary assignments for detecting the target fault. Finally, another form of dynamic learning consists of finding a partial circuit decomposition in the form of a frontier called the evaluation frontier (or E-frontier for short) [Giraldi 1990]. The idea behind this is that at any point in the decision process there exists a frontier of evaluated gates, and that the same frontier may be achieved by a different set of decision variables. For instance, three value assignments are possible to achieve the output of an AND gate set to logic 0. Each frontier can be associated with an edge in the decision tree. Suppose a set of E-frontiers has been learned for fault fi and the corresponding decision tree for fi is available. Now, for a different fault fj, if a similar E-frontier is obtained, where the E-frontier has at least one fault effect as illustrated in Figure 4.28, the subtree for fj’s decision tree could be directly copied from the subtree in fi’s decision tree, to which the E-frontier was mapped. Note that the set of current primary input assignments is sufficient to justify the E-frontier, and all nodes to the right of the E-frontier are all “don’t cares.” In this figure, the only primary inputs that could have been used to propagate the fault effect are a, b, and m. If there was an assignment on these three primary inputs that was able to propagate the D for fault fi to a primary output, then the same assignment would be able to propagate the D for fj as it had the same E-frontier. In other words, the decision variables in the subtree corresponding to this point in the decision process consisted of only these three variables outside the a=X b =X 1 D fi 0 m=X 1 0 a=X b=X m =X FIGURE 4.28 Example of evaluation frontier. 1 D fj 0 1 0 E -frontier E -frontier 194 VLSI Test Principles and Architectures E-frontier. Stated differently, the propagation of the fault effect could directly be borrowed from a previous fault. The same concept can be extended to untestable faults as well. 4.5 DESIGNING A SEQUENTIAL ATPG 4.5.1 Time Frame Expansion Test generation for sequential circuits bears much similarity with that for combinational circuits. However, one vector may be insufficient to detect the target fault, because the excitation and propagation conditions may necessitate some of the flip-flop values to be specified at certain values. The general model for a sequential circuit is shown in Figure 4.29, where flipflops constitute the memory/state elements of the design. All the flip-flops receive the same clock signal, so no multiple clocks are assumed in the circuit model. Figure 4.30 illustrates an example of a sequential circuit which is unrolled into several time frames, also called an iterative logic array of the circuit. For each time frame, the flip-flop inputs from the previous time frame are often referred to as pseudo primary inputs with respect to that time frame, and the output signals to feed the flip-flops to the next time frame are referred to as pseudo primary outputs. Note that in any unrolled circuit, a target fault is present in every time frame. When the test generation begins, the first time frame is referred to as time frame 0. An ATPG search similar to a combinational circuit is carried out. At the end of Primary Inputs Primary Outputs Combinational Logic FIGURE 4.29 Model of a sequential circuit. Clock Memory Elements Test Generation 195 FF’s Time frame –k FIGURE 4.30 An ILA model. PRIMARY INPUTS 1 s-a-0 FE 1 0 1/0 FE PRIMARY OUTPUTS Time frame 0 Time frame 1 FE FE Time frame j the search, a combinational vector is derived, where the input vector consists of primary inputs and pseudo primary inputs. The fault-effect for the target fault may be sensitized to either a primary output of the time frame or a pseudo primary output. If at least one pseudo primary input has been specified, then the search must attempt to justify the needed flip-flop values in time frame −1. Similarly, if fault-effects only propagate to pseudo primary outputs, the ATPG must try to propagate the fault-effects across time frame +1. Note that this results in a test sequence of vectors. As opposed to combinational circuits, where a single vector is sufficient to detect a detectable fault, in sequential circuits a test sequence is often needed. One question naturally arises: Should the ATPG first attempt the fault excitation via several time frames −1 −2, etc., or should the ATPG attempt to propagate the fault-effect through time frames 1, 2, etc.? It can be observed that in propagating the fault-effect in time frame 1, the search may place additional values on the flip-flops between the boundary of time frames 0 and 1. These added constraints propagate backward and may add additional values needed at the pseudo primary inputs at time frame 0. In other words, if the ATPG first justifies the pseudo primary inputs at time frame 0, it would have missed the additional constraints placed by the propagation. Therefore, the ATPG first tries to propagate the fault-effect to a primary output via several time frames, with all the intermediate flip-flop values propagated back to time frame 0. Then, the ATPG proceeds to justify all the pseudo primary input values at time frame 0. While easy to understand, the process can be very complex. For example, if the fault-effect has propagated forward for three time frames: time frames 1, 2, and 3. Now in time frame 4, suppose the ATPG successfully propagates the fault-effect to a primary output (i.e., it has derived a vector at time frame 4), it must go back to time frame 3 to make sure the values assigned to the flip-flops at the boundary between time frames 3 and 4 are indeed possible. It must perform this check for time frames 2, 1, and 0. If at any time frame a conflict occurs, the vector derived at time frame 4 is actually invalid, as it is not justifiable from the previous vectors. 196 VLSI Test Principles and Architectures At this time, a backtrack occurs in time frame 4 and the ATPG must try to find a different solution vector #4. This process is repeated. One way to reduce the complexity discussed above is to try to propagate the fault-effect in an unrolled circuit instead of propagating the fault-effect time frame by time frame. In doing so, a k-frame combinational circuit is obtained, say k = 256, and the ATPG views the entire 256-frame circuit as one large combinational circuit. However, the ATPG must keep in mind that the target fault is present in all 256 time frames. This eliminates the need to check for state boundary justifiability and allows the ATPG to propagate the fault-effect across multiple time frames at a time. When the fault-effect has been propagated to at least one primary output, the pseudo primary inputs at time frame 0 must be justified. Again, the justification can be performed in a similar process of viewing an unrolled 256-frame circuit. As before, the ATPG must ensure that the fault is present in every time frame of the unrolled circuit. 4.5.2 5-Valued Algebra Is Insufficient Because the fault is present in every time frame, it makes value justification tricky. For example, when justifying the pseudo primary input vector 01X1, is it sufficient to obtain the fault-free values of 01X1, or do the corresponding faulty values on these inputs need to be at the same logic values as fault-free values? If the faulty values can be different from the fault-free values, the 5-valued logic would be insufficient for this task [Muth 1976]. In other words, to justify a fault-free value of 1, the corresponding faulty value could be X and the justified state may still be sufficient to propagate the fault-effect to the primary output. Consider the circuit shown in Figure 4.31a. In the one-time-frame illustration of the sequential circuit, the target fault is b/0. Because the fault is present in every time frame of the unrolled ILA, the fault-free and faulty values arriving at the flip-flops in the previous time frame may be different. Taking this into consideration, it may be possible to obtain a value of 1/0 or 1/1 at signal a. However, when looking at this target fault, either 1/0 or 1/1 would be able to successfully propagate the fault effect at b to the output of the AND gate. Therefore, a = 1/X is a sufficient condition and should be returned by the getObjective() function of the ATPG. If a = 1/1 were the objective returned by the getObjective() function, it may not be possible to derive this value from the flip-flops, thus over-constraining the search space. By a similar discussion, the b/1 fault shown in Figure 4.31b only requires a = X/1 in order to propagate the fault effect. HITEC [Niermann 1991] is a popular sequential test generator that performs the search similar to the discussed methodologies with a 9-valued algebra. In addition, it uses the concept of dominators to help reduce the search complexity. A dominator for a target fault is a gate in the circuit through which the fault-effect must traverse [Kirkland 1987]. Therefore, for a given target fault, all inputs of any dominator gate that are not in the fanout cone of the fault must be assigned to noncontrolling values in order to detect the fault. Test Generation 197 a = 1/X 1/0 b 1/0 (a) Stuck-at 0 fault at b a = X/1 0/1 b 0/1 (b) Stuck-at 1 fault at b FIGURE 4.31 The need for 9-valued algebra in sequential circuits. The concept of controllability and observability metrics can be extended to sequential circuits such that the backtrace routine would prefer to backtrace toward primary inputs and those easy-to-justify flip-flops. Using sequential testability metrics allows the ATPG to narrow the search space by favoring the easy-to-reach states and avoiding getting into difficult-to-justify states. The computational complexity of a sequential ATPG is intuitively higher than that of the combinational ATPG. Therefore, aggressive learning can help to reduce the computational cost. For instance, if a known subset of unreachable states is available, this information can be used to allow the ATPG to backtrack much sooner when an intermediate state is unreachable. This can avoid successive justification of an unreachable state. Likewise, if a justification sequence has been successfully computed for state S before, and a different target fault requires the same state S, the previous justification sequence can be used to guide the search. Note that, because the target faults are different, the justification sequence may not simply be copied from the solution for one fault to another. 4.5.3 Gated Clocks and Multiple Clocks All the algorithms for sequential ATPG thus far assumed the sequential circuit has a single global clock. This assumption is simple as all memory elements (flipflops) switch synchronously at every clock; however, in modern digital systems, this assumption is often not true. For instance, gated clocks (illustrated in Figure 4.32a) and multiple clocks (Figure 4.32b) are becoming mainstream. Gated clocks are 198 VLSI Test Principles and Architectures a DQ a DQ b Clock (a) Gated Clock FIGURE 4.32 Non-traditional clocking schemes. Clock1 b DQ Clock2 (b) Multiple Clocks mostly used for power savings, such that not all memory elements will switch at every clock. On the other hand, multiple clocks benefit performance, power, and design as blocks can be partitioned to different clock domains. If circuit modification is not possible, ATPG should be designed to perform some circuit modeling as a preprocessing step to ease the ATPG process. Actually, this is the approach taken by most current EDA vendors today. In other words, instead of designing new ATPG algorithms that can handle designs with gated clocks and multiple clocks, it may be easier to slightly modify the circuit such that the original circuit is transformed to one that uses only a single, global clock such that the transformed circuit is functionally equivalent to the original design. For instance, consider the gated clock case. The memory element that depends on a gated clock can easily be modified to one that depends on a single global clock by adding a small multiplexer, as shown in Figure 4.33. In the top half of the figure, the gated clock with signal b is easily transformed to the one shown on the right. The lower portion of the figure shows an example where the clock signal is an arbitrary internal signal; this also can be transformed in a similar manner. Note that the transformed designs shown on the right are functionally equivalent to the original designs. Likewise, for a circuit with multiple clocks, a transformation is possible with similar design changes. Figure 4.34 illustrates the modification. The modified design is one where the clock is modified. This can further be converted by adding a multiplexer as done in the gated-clock scenario so the resulting design has a single global clock. In particular, the “new a” and “new b” signals can be converted to those having MUX-based inputs, as shown in Figure 4.33. The Clock1 and Clock2 signals may be used as the select signals for the multiplexers. After a circuit with gated and/or multiple clocks has been modified, conventional stuck-at ATPG algorithms (combinational or sequential) will be readily applicable. Test Generation 199 a b Clock a DQ DQ b FIGURE 4.33 Transformation of gated clock. a DQ 0 a 1 b Clock DQ 0 a 1 b Clock DQ new a DQ Clock1 b DQ Clock2 FIGURE 4.34 Transformation of multiple clocks. new b f (Clock1, Clock2) DQ Note, however, fault models other than the stuck-at model may not necessarily benefit from this transformation. Finally, alternatives to the above MUX-based modifications are possible for handling designs with multiple clocks. They include the one-hot or the staggered clocking schemes. The details of the clocking are described in Section 5.7. One-hot clocking gives better fault coverage, but it suffers from potential large test sets. On the other hand, staggered clocking results in slightly lower fault coverages, but it can be applied using a combinational ATPG with circuit expansion. Sequential ATPG may be used as well, but it may incur longer execution times. In addition to one-hot and staggered clocking, simultaneous clocking allows for all clocks to be run at the same time, but it marks unknowns (X’s) between clock domains and uses one-time-frame combinational ATPG. EDA vendors tend to start 200 VLSI Test Principles and Architectures with staggered or simultaneous clocking schemes, then a one-hot clocking scheme is used to detect any remaining faults [Wang 2003]. 4.6 UNTESTABLE FAULT IDENTIFICATION Untestable faults are faults for which there exists no test pattern that can both excite the fault and propagate its fault-effect to a primary output. Thus, a fault may be untestable for any of the following three reasons: The conditions necessary to excite the fault are not possible. The conditions necessary to propagate the fault-effect to a primary output are not possible. The conditions for fault excitation and fault propagation cannot be simultaneously satisfied. In combinational circuits, untestable faults are due to redundancies in the circuit, while in sequential circuits untestable faults may also result from the presence of unreachable states or impossible state transitions. From an ATPG’s point of view, the presence of untestable faults in a design can degrade the performance of the ATPG tool. When considering untestable faults, an ATPG engine must exhaust the entire search space before declaring such faults as untestable. Thus, the performance of ATPG engines (as well as fault-simulators) can be enhanced if knowledge of untestable faults is available a priori. In other words, untestable faults can first be filtered from the fault list and the tools work only on the remaining faults, which could be much fewer than the original number of faults. There are additional benefits of untestable fault identification: Untestable faults in the form of redundancies increase the chip area; they may also increase the power consumption and the propagation delays through a circuit [Friedman 1967]. The presence of an untestable fault can potentially prevent the detection of other faults in the circuit [Friedman 1967]. Finally, untestable faults may result in unnecessary yield loss in scan-based testing. This is because even though the circuit remains fully operational in the presence of untestable faults, scan-based testing may detect such faults and reject the chip. As a result, significant effort has been invested in the efficient identification of untestable faults. The techniques that have been proposed in the past for untestable fault identification can be classified into fault-oriented methods based on deterministic ATPG [Cheng 1993] [Agrawal 1995] [Reddy 1999], fault-independent methods [Iyer 1996a] [Iyer 1996b] [Hsiao 2002] [Syal 2003] [Syal 2004], and hybrid methods [Peng 2000]. The fault-independent methods generally are based on conflict analysis. While the deterministic ATPG-based methods outperform fault-independent methods for smaller circuits, the computational complexity of deterministic ATPGs makes them impractical for large circuits. On the other hand, conflict-based analysis targets the identification of untestable faults that require a conflicting scenario in the circuit. These methods do not target specific faults, thus they are fault-independent Test Generation 201 approaches. FIRE [Iyer 1996a] is a technique to identify untestable faults based on conflict analysis. While the theory can be applicable to any conflicting scenario, only single-line conflicts were implemented in FIRE. The basic idea behind FIRE is very simple. Because it is impossible for a single line to take on both logic values 0 and 1 simultaneously, logic values 0 and 1 set on any signal would clearly be a conflicting scenario. Subsequently, any fault that requires a signal set to both logic values 0 and 1 for its detection would be untestable. In order to reduce the computational cost, FIRE restricts its search to only fanout stems instead of every gate in the circuit. In the single-line conflict analysis, for each gate in the circuit, the following two sets are computed: S0—Set of faults not detectable when signal g = 0. S1—Set of faults not detectable when signal g = 1. Essentially, all the faults in each set Si require g = ¯i for their detection. Thus, any fault that is in the intersection of sets S0 and S1 would be untestable because it requires conflicting values on g as necessary conditions for its detection. The following example illustrates the single line conflict analysis. Consider the circuit shown in Figure 4.35. During static learning, the implications for every gate can be computed as discussed earlier in this chapter. For example, Impl b 1 0 = b 1 0 b1 1 0 b2 1 0 d 1 0 x 0 0 z 0 0 . Faults unexcitable due to b = 1 With b = 1, it would not be possible to set line d = 0, as b = 1 → d = 1 . Thus, fault d/1 would be unexcitable when b = 1. In other words, this fault requires b = 0 as a necessary condition for its detection. Essentially, if k v t ∈ Impl N w , then fault k/v would be unexcitable in time frame t with N = w in the reference time frame 0. Similarly, faults b/1 b1/1 b2/1 d/1 x/0 z/0 would be unexcitable with b = 1. Faults unobservable due to b = 1 Because b = 1 → x = 0 , line y is blocked. Hence, faults y/0 and y/1 would require b = 0 as a necessary condition for their detection. Similarly, any faults a d b1 b x e1 z b2 e e2 y c FIGURE 4.35 Example of single line conflict analysis. 202 VLSI Test Principles and Architectures appearing on lines a, e1, e2, etc., would also be blocked due to implications of b = 1. The unobservable information could be propagated backwards until a fanout stem is reached at which the faults on the fanout stem may no longer be unobservable. The condition for checking if the fanout stem is unobservable is to see if the stem can reach any of the blocking conditions for each of the fanout branches. For instance, using the circuit illustrated in Figure 4.35, if a = 1 and c = 0, both fanout branchs b1 and b2 would be unobservable. However, because the fanout stem b cannot reach any of the conditions for blocking any of the branches (i.e., the blocking condition for b1 is a = 1 and the blocking condition for b2 is c = 0), stem b would still be unobservable. The complete set of faults that cannot be propagated due to b = 1 is: a/0 a/1 e1/0 e1/1 y/0 y/1 e2/0 e2/1 e/0 e/1 c/0 c/1 b2/0 b2/1 Thus, S1 is the union of the two sets computed above: S1 = b/1 b1/1 b2/1 d/1 x/0 z/0 a/0 a/1 e1/0 e1/1 y/0 y/1 e2/0 e2/1 e/0 e/1 c/0 c/1 b2/0 b2/1 Now, consider the implications of b = 0: Impl b 0 0 = b 0 0 b1 0 0 b2 0 0 e 0 0 e1 0 0 e2 0 0 y 1 0 Similar to the analysis performed for b = 1, faults that are unexcitable and unobservable due to b = 0 can be computed, resulting in: S0 = b/0 b1/0 b2/0 e/0 e1/0 e2/0 y/1 c/0 c/1 Now that both S1 and S0 are computed, any fault that is in the intersection of the two sets would be untestable. In this example, S0 S1 = b2/0 e/0 e1/0 e2/0 y/1 c/0 c/1 . These faults are untestable because they require a conflicting assignment on line b (b = 1 and b = 0 simultaneously) as a necessary condition for their detection. In a follow-up work to FIRE, FIRES [Iyer 1996b] targeted untestable faults in sequential circuits based on single-line conflicts. In addition, FILL and FUNI [Long 2000] adapted the concept of single-line conflicts to multiple nodes on the state variables (flip-flops) because any illegal state in sequential circuits is considered an impossible value assignment. As a result, any fault that requires an illegal state necessary for its detection would be untestable. A binary decision diagram (BDD)-based approach is used to identify illegal states, and FUNI [Long 2000] utilized this illegal state space information to identify untestable faults. MUST [Peng 2000] was built over the framework of FIRES as a hybrid approach (fault-oriented and fault-independent) to identify untestable faults; however, the memory requirement for MUST can be quadratic in the number of signals in the circuit. Next, Hsiao presented a fault-independent technique to identify untestable faults using multiple-node impossible value combinations [Hsiao 2002]. Finally, the concept of multiplenode conflicts is extended in [Syal 2004] to identify more untestable faults. The underlying concept of multiple line conflict is discussed next. Test Generation 203 4.6.1 Multiple-Line Conflict Analysis The application of logic implications to quickly identifying untestable faults is evident from the previous example. However, it is restricted to single-line conflicts. The application of logic implications to the identification of untestable faults can be taken to the next level, where impossible value combinations on multiple signals in the circuit are used as conflicting scenarios. These impossible value combinations are then used to identify untestable faults. Finding trivial conflicting value assignments from the implication graph is easy, but it will not help to find more untestable faults because the single-line conflict approach has already taken these conflicts into account. For instance, if the implication set impl[x,0] includes [y,1], then the pair x 0 y 0 naturally forms a conflicting value assignment. However, in the original FIRE algorithm, if Set0 and Set1 have been computed to be the faults that require x = 0 and x = 1, respectively, then Set1 already contains all the faults that require y = 0 to be testable. This can be explained as follows: Because the set of faults that require y = 0 are obtained as those undetectable due to the value assignments in impl[y,1], and because y = 0 → x = 1, by the contrapositive law x = 0 → y = 1 can be obtained. Thus, impl y 1 ⊆ impl x 0 . This leads to the following observation: The set of faults requiring x = 1, set1 (i.e., undetectable computed from impl[x,0]) must contain every fault that requires y = 0 as well. Consequently, methods that can quickly identify non-trivial impossible combinations are needed in order to find more untestable faults. Finding arbitrary value conflicts in the circuit can be computationally expensive, thus any algorithm must limit the search for conflicting value assignments to computationally feasible approaches. In [Hsiao 2002], the impossible value assignments are limited to those associated with a single Boolean gate, making the algorithm of O n complexity, where n is the number of gates in the circuit. Consider the AND gate and its implication graph again, shown in Figure 4.36. When considering a single-line-conflict algorithm, there are three such cases for the AND gate: a = 0 a = 1 b = 0 b = 1 , and c = 0 c = 1 . (Recall that identification of undetectable faults when a = 0 requires impl a = 1 , as described earlier.) By traversing the implication graph, the impossible value combination imposed by the conflicting line assignment a = 0 a = 1 includes the set a = 0 a = 1 c = 0 . Similarly, one can obtain the sets of impossible value combination for conflicting a b FIGURE 4.36 AND gate example. 0 a=0 c b=0 0 c=0 a=1 b=1 0 c=1 0 204 VLSI Test Principles and Architectures line assignments b = 0 b = 1 and c = 0 c = 1 as b = 0 b = 1 c = 0 and c = 0 c = 1 a = 1 b = 1 , respectively. Note that there exist other sets of impossible value combinations not covered by any of these three single-line conflicts. Not all remaining conflicting combinations are nontrivial. For example, consider the conflicting scenario a = 0 c = 1 . This is a trivial value conflict because a = 0 → c = 0 and c = 1 → a = 1 . Therefore, a = 0 c = 1 is already covered by the single-line conflicts a = 0 a = 1 and c=0 c=1 . There exists a conflicting assignment that is not covered by any single-line conflicts: a = 1 b = 1 c = 0 . In order to compute the corresponding impossible value assignment set, it is necessary to compute the following implications: impl a = 0 impl b = 0 , and impl c = 1 . By traversing the implication edges in the graph, the impossible value assignment set a = 0 b = 0 c = 0 c = 1 a = 1 b = 1 is obtained. This set has not been covered in any of the previous impossible value assignment sets, and hence the value set a = 1 b = 1 c = 0 may be used for obtaining additional untestable faults that require this conflict. Impossible value combinations for other gate primitives and/or gates with different number of inputs can be derived in a similar manner. The technique would then identify the value combination of a = 1 b = 1 c = 0 as impossible to achieve, and then untestable faults would be identified by creating the following sets: S0—Set of faults not detectable when signal a = 0. S1—Set of faults not detectable when signal b = 0. S2—Set of faults not detectable when signal c = 1. The faults in S0, S1, and S2 require a = 1, b = 1, and c = 0, respectively, as necessary conditions for their detection. Then, the intersection of S0, S1, and S2 would represent the set of untestable faults due to this conflicting value assignment. Because the aim is to identify as many nontrivial conflicting value assignments as possible, which leads to untestable faults, the new approach of maximizing local impossibilities is performed on top of the single-line conflict FIRE algorithm, which is described below in Algorithm 11. In this algorithm, the implication graph is first constructed, with indirect implications computed and added to the graph. Then, a single-line conflict FIRE algorithm is performed (line #3). Next, for each set of conflicting values not covered by the single-line conflict for each gate, the set of faults untestable due to such conflicts is computed. Because the algorithm on maximizing local value impossibilities is performed once for each gate, the complexity is kept linear in the size of the circuit. For large circuits, the number of additional untestable faults identified can be significant. Maximizing local impossibilities can be extended further so the conflicting value assignments are no longer local to a Boolean gate. Consider the circuit shown in Figure 4.37. In [Hsiao 2002], the technique would identify the value combination of g = 1 h = 1 z = 0 as impossible to achieve, and then untestable faults would be identified correspondingly. Test Generation 205 Algorithm 11 MaxLocalConflicts() 1: construct implication graph (learn any additional implications via extended backward impl, etc.); 2: for each line l in circuit do 3: identify all untestable faults using the single-line-conflict FIRE algorithm; 4: end for 5: /* maximizing impossibilities algorithm */ 6: for for each gate g in circuit do 7: SIV = set of impossible value combinations not yet covered for gate g; 8: i = 0; 9: for each value assignment a = v in SIV do 10: seti = faults requiring a = v to be detectable; 11: i = i + 1; 12: end for 13: untestable_faults = untestable_faults ∪ ∩∀iseti ; 14: end for a f h b c z d g e FIGURE 4.37 Circuit to illustrate multi-node impossible combination. Now, it is interesting to note from Figure 4.37 that the value combination d = 0, e = 0 f = 1 c = 1 z = 0 also forms a conflicting value assignment. In addition, because Impl f 0 0 ⊃ Impl h 0 0 and Impl c 0 0 ⊃ impl h 0 0 , the set of faults untestable due to f = 0 and c = 0 could potentially be greater than that due to h = 0. Similarly, the set of faults that can be identified as untestable due to d = 1 and e = 1 could be greater than that untestable due to g = 0. Consequently, the set of untestable faults identified using this new conflicting combination could be greater than that identified with the original conflicting value set g = 1 h = 1 z = 0 . This comes at a small price: The number of sets for which intersection must be performed for the conflict f = 1 c = 1 d = 0 e = 0 z = 0 would be greater than that for g = 1 h = 1 z = 0 . However, because set intersection can be performed on the fly (with the faults computed for each implication set), the intersection operation can be aborted as soon as the intersection becomes empty. A larger conflicting value set might hurt the performance if each set intersection remains non-empty until the last intersection is performed and the intersection becomes empty only after the last intersection operation. However, this does not happen 206 VLSI Test Principles and Architectures often, and the computational overhead due to a bigger set of impossible value combinations remains acceptable. Before proceeding to the algorithm, the following terms are first defined: Definition 1 Nonterminating necessary condition set (NTC): NTC for an assignment x = v is defined as the set of value assignments ai = wi wi ∈ 0 1 that are necessary to achieve x = v. However, there may exist other assignments that are necessary to achieve some or all conditions in NTC. For example, in Figure 4.37, h = 1 and g = 1 are necessary for z = 1. However, there exist assignments (f = 1, c = 1, d = 1, and e = 1) that are necessary to achieve h = 1 and g = 1. Thus, h = 1, g = 1 forms the NTC for z = 1. Definition 2 Terminating necessary condition set (TNC): TNC for an assignment x = v is the set of value assignments ai = wi wi ∈ 0 1 necessary to achieve x = v such that there exist no additional assignments that are necessary to achieve any conditions in this set. For example, in Figure 4.37, f = 1, c = 1, d = 0, and e = 0 form the TNC for z = 1. According to Definitions 1 and 2, the set of conflicting conditions obtained in [Hsiao 2002] would correspond to the NTC set for a gate x = v. These conflicting conditions would form the TNC only if NTC = TNC for any x = v. In the new approach [Syal 2004], the TNC for any assignment x = v is first identified (rather than the NTC). Then the set TNC x = v forms a conflicting assignment. As the size of the TNC is greater than that of NTC, the new approach may take more execution time than that taken by the previous approach in [Hsiao 2002], but the following definition and corresponding lemma guarantee that the new approach always identifies at least as many (and potentially more) untestable faults as identified in [Hsiao 2002]. Definition 3 Related elements: Gates a and b are related elements if there exists at least one topological path from a to b. Lemma 2 If two related elements a and b exist such that the assignment a = v is a part of TNC for a gate g = u and b = w is a part of NTC for the same gate g = u, then impl a v ⊇ impl b w . Test Generation 207 Algorithm 12 Multi-Line-Conflicts() 1: construct implication graph; 2: /* identification of impossible combinations */ 3: for each gate assignment g = val do 4: identify the TNC for g = val; 5: Impossible Combination (IC) set = TNC, g = val; 6: i = 0, Suntest = ∅; 7: for each assignment a = w in IC do 8: Si = fault untestable with a = w; 9: if i == 0 then 10: Suntest = Suntest ∪ Si ; 11: else 12: Suntest = Suntest ∩ Si ; 13: end if 14: if Suntest = ∅ then 15: break; 16: else 17: i + +; 18: end if 19: end for 20: end for Proof Because b = w is not a terminating necessary condition for g = u, there must exist some necessary conditions to achieve b = w. Now, because a = v is a terminating condition for g = u and because a and b are related, then a = v must be a part of the conditions necessary to set b = w. This means that in order to set b = w, gate a must be set to v, or in other words, b w 0 → a v 0 . By contrapositive law, a v 0 → b w 0 . Thus, impl a v 0 ⊇ impl b w 0 . Thus, according to Lemma 2, the implications of the complement of all elements in a TNC are a superset of the complemented related elements in a NTC for any given assignment. Therefore, the set of untestable faults obtained using TNCs is always a superset of those using NTCs as used in [Hsiao 2002]. The complete algorithm to identify untestable faults using a multiple-line conflict analysis is shown in Algorithm 12. 4.7 DESIGNING A SIMULATION-BASED ATPG In this section, we will discuss how simulation, as opposed to deterministic algorithms, can be used for generating test vectors. This section begins with an overview of how simulation can be used to guide the test generation process and then discusses how tests can be generated in specific frameworks, such as genetic algorithms, state partitioning, spectrum, etc. 208 VLSI Test Principles and Architectures 4.7.1 Overview As we have already seen earlier in this chapter, the random test generator is a simple type of simulation-based ATPG. The vectors are randomly generated and simulated on the circuit under test, and any vector that is capable of detecting new faults is added to the test set. While this concept is relatively simple, its applicability is limited as random ATPG cannot generate vectors that target hard faults. Simulation-based test generators were first proposed in 1962 by Seshu and Freeman [Seshu 1962]. Subsequently, several other simulation-based test generators have been developed, including [Breuer 1971], [Schnurmann 1975], [Lisanke 1987], [Wunderlich 1990], [Snethen 1977], and [Agrawal 1989]. Each of these test generators will be described in the following discussion. Random vectors are simulated and selected using a fault simulator in [Breuer 1971]. Weighted random test generators were introduced in [Schnurmann 1975], [Lisanke 1987], and [Wunderlich 1990], in which each bit is generated with a biased coin (as opposed to an unbiased one in the simple random test pattern generator), and high fault coverages were reported for combinational circuits. Specific faults are targeted in the test generators proposed in [Snethen 1977] and [Agrawal 1989], and the ATPGs only considered vectors of Hamming distance equal to one between consecutive vectors. In other words, any two successive vectors can differ in only a single bit. Finally, cost functions computed during fault simulation were used to evaluate the generated vectors in [Agrawal 1989]. While these aforementioned simulation-based ATPGs were able to reduce the test generation time, the test sets generated were typically much longer than those generated by deterministic test generators. In addition, in sequential circuits, many difficult-to-test faults were frequently aborted. Finally, even when simulation-based test generators can be effective in detecting hard faults, simulation-based algorithms, per their nature, cannot detect untestable faults. In this regard, deterministic algorithms will be needed to uncover any faults that are untestable. 4.7.2 Genetic-Algorithm-Based ATPG A simple genetic algorithm (GA) can be used for the generation of individual test vectors for combinational as well as sequential circuits. In a typical GA, a population of individuals (or chromosomes) is defined, where each individual is a candidate solution for the problem at hand. As the individual represents a test vector for combinational circuit test generation, each character in the individual is mapped to a primary input. If a binary coding is used, the individual simply represents a test vector. Each individual is associated with a fitness, which measures the quality of this individual for solving the problem. In the test generation context, this fitness measures how good the candidate individual is for detecting the faults. The fitness evaluation can simply be computed by logic or fault simulation. Based on the evaluated fitness, the evolutionary processes of selection, crossover, and mutation are used to generate a new population from the existing population. The process is repeated until the fitness of the best individual cannot be improved or is satisfactory. Test Generation 209 1 10111010 2 01101110 3 10000101 4 00101111 Fitness Evaluation n 11010011 Generation 0 FIGURE 4.38 GA framework. Selection Crossover Mutation 1 11010000 2 00101011 3 01001110 4 10011101 n 01111101 Generation 1 One simple application of GAs for test generation is to select the best test vectors for each GA run. A simple view of a GA framework is illustrated in Figure 4.38. The test generator starts with a random population of n individuals, and a (fault) simulator is used to calculate the fitness of each individual. The best test vector evolved in any generation is selected and added to the test set. Then, the fault set is updated by removing the detected faults by the added vector(s). The GA process repeats itself until no more faults can be detected. Because a new random population is used initially, the GA process may not guarantee that a successful vector can be found. Likewise, in sequential circuits, a number of vectors may be necessary to drive the circuit to a state before the fault can be excited. Therefore, a progress limit should be used to limit the amount of execution allowed before the the entire process stops. When the population does not start with a right combination of individuals, the GA process may not result in an effective test vector. When this happens, the GA is reinitialized with a new random population, and a new GA attempt proceeds. This overall procedure is shown in Algorithm 13. Note that in this procedure, the GA operators of selection, crossover, and mutation are applied in each iteration. Rather than exposing the reader to the numerous schemes for each GA operator, the following discussion will focus on the classic methods. First, for the selection operator, two popular schemes are often used: binary tournament selection and roulette wheel selection. In binary tournament selection, to select one individual from the population, two individuals are first randomly chosen from the population, and the one with the greater fitness value is selected as a parent individual. This is repeated to select a second parent. Note that, because a comparison is made in the process, selection is biased toward the more fit individuals. In the roulette wheel selection scheme, the n individuals in the population are mapped onto n slots on the wheel, where the size of each slot corresponds to the fitness of the individual, as illustrated in Figure 4.39. Thus, when the roulette wheel is spun, the position where the marker lands will determine the individual selected. Note that both roulette wheel and binary tournament selections may be conducted with or without replacement. When no replacement is used, the individuals selected are not put back into the population for the subsequent selection. In other words, an individual will not be selected more than once as a 210 VLSI Test Principles and Architectures Algorithm 13 Simple_GA_ATPG 1: test set T = ∅; 2: while there is improvement do 3: initialize a random GA currentPopulation; 4: compute fitness of currentPopulation; 5: for i = 1 to maxGenerations do 6: add the best individual to test set T; 7: nextPopulation = ∅; 8: for j = 1 to populationSize/2 do 9: select parent1 and parent2 from currentPopulation; 10: crossover parent1 parent2 child1 child2 ; 11: mutate child1 ; 12: mutate child2 ; 13: place child1 and child2 to nextPopulation; 14: end for 15: compute fitness of nextPopulation; 16: currentPopulation = nextPopulation; 17: end for 18: end while FIGURE 4.39 Roulette wheel selection. n1 2 3 6 4 5 candidate parent individual. Finally, when comparing the effectiveness of roulette wheel with binary tournament selections, the notion of selection pressure is necessary. Selection pressure is the driving force that determines the convergence rate of the GA population, in which the population converges to n identical (or very similar) individuals. Note that fast convergence may not necessarily lead to a better solution. Roulette wheel selection with replacement results in a higher selection pressure than binary tournament selection when there are some highly fit individuals in the population. On the other hand, when individuals’ fitnesses have a small variance, binary selection will apply a higher selection pressure. Test Generation 211 The next GA operator to be discussed is the crossover operator. Again, the discussion will focus on classic crossover techniques. In essence, once two parent individuals are selected, crossover is applied to the two parent individuals to produce two children individuals, where each child inherits parts of the chromosomes from each parent. The idea behind crossover is that the building blocks from two different solutions are combined in a random fashion to produce two new solutions. Intuitively, a more fit individual contains more valuable building blocks when compared with a less fit individual. Because the selection biases toward more fit individuals, the building blocks from the more fit parents are passed down to the next generation. When the valuable building blocks from different fit parents are combined, more fit individuals may result. In the following, one-point, two-point, and uniform crossover are explained. Suppose the length of an individual is . In one-point crossover, the two parents are crossed at a randomly chosen point, r, between 1 and − 1. Consequently, the first child inherits the first r bits from parent #1 and the final − r bits from parent #2, while the second child inherits the first r bits from parent #2 and the final − r bits from parent #1. Table 4.7 illustrates an example of the one-point crossover scheme. The vertical line in the table indicates the crossover point. Similar to the one-point crossover, two-point crossover works in a similar fashion except that two points are chosen instead of one. The portion of the parent individuals between the two points are swapped to produce the new individuals. Table 4.8 illustrates an example for the two-point crossover scheme. Again, the vertical lines indicate the crossover point. Finally, in uniform crossover, a crossover mask is first generated randomly, and the bits between the two parent individuals are swapped whenever the corresponding bit position in the crossover mask is one. Table 4.9 illustrates an example for the uniform crossover scheme. The reader is encouraged to try applying crossover on individuals over a few generations to see how new individuals may be produced, similar to the examples illustrated here. TABLE 4.7 One-Point Crossover Parent #1 Parent #2 Child #1 Child #2 110011001100 101010101010 110011001100 101010101010 110011001100 101010101010 101010101010 110011001100 TABLE 4.8 Two-Point Crossover Parent #1 Parent #2 Child #1 Child #2 11001100 10101010 11001100 10101010 11001100 10101010 10101010 11001100 11001100 10101010 11001100 10101010 212 VLSI Test Principles and Architectures TABLE 4.9 Uniform Crossover Mask Parent #1 Parent #2 Child #1 Child #2 010011100100010011110101 110011001100110011001100 101010101010101010101010 100010101000100010101000 111011001110111011001110 TABLE 4.10 Mutating Bit Position #3 Before mutation After mutation 110011001100110011001100 111011001100110011001100 The third GA operator to be discussed is the mutation operator. It allows the child individual to vary slightly from the two parents it had inherited. The mutation operator simply selects a random bit position in an individual and flips its logic value with a mutation probability. An example of mutating bit #3 is shown in Table 4.10. Let be the mutation probability. If is too small, children individuals that are produced after crossover may rarely see any mutation. In other words, it is less likely that new genes (building blocks) will be produced. On the other hand, if is too large, too much random perturbation may occur, and the resemblance may soon be lost after a few generations. 4.7.2.1 Issues Concerning the GA Population The population size should be a function of the individual length. In sequential circuits, the individual length is equal to the number of primary inputs in the circuit multiplied by the test sequence length. The population size may be increased from time to time to increase the diversity of the individuals, thereby helping to expand the search space. One pertinent issue in the GA population is the encoding of the individuals: whether a binary or nonbinary coding should be used. In a binary coding, the individual is simply the test vector itself (or a sequence of vectors in the case of sequential circuits). Thus, the GA operates directly on that string. For instance, bitwise crossover and bitwise mutation can be used. (Bitwise mutation is simply the flipping of a single bit in the vector.) On the other hand, in a nonbinary coding, several bits are combined and represented by a separate character in the alphabet, and the GA operates on the individual as a string of characters. Special operators are needed for the nonbinary alphabet. For example, crossover can now occur only at multi-bit boundaries, and mutation involves replacing a given character in an individual with a randomly generated character. Finally, in a nonbinary coding, a larger population size and mutation rate may be required to ensure adequate diversity. Obtaining a compact test set is another concern; thus, an accurate fitness measure is needed. As fault simulation is used to compute the fitness, computation of the fitnesses in each GA generation can be costly. To reduce this cost, approximation Test Generation 213 can be used, in which a fault sample from the complete fault list may be used. In doing so, fault simulation only has to consider the faults in the sample rather than the entire fault list. Another method to reduce the execution time is to use overlapping populations in the GA. In overlapping populations, some individuals from the parent generation are copied over to the offspring generation. Therefore, only a fraction of the population is replaced in each generation. The success of using GAs to obtain the desired solution depends also on how the GA parameters are chosen. First and foremost, the population size of the GA should be such that adequate diversity is represented. In the context of test generation, certain values on specific primary inputs may be necessary to excite a fault. If no individual in the initial population has this specific combination, then none of the strings in the population would have been able to excite the fault. As the number of bit combinations increases exponentially with the vector length, the population size should be large enough to appropriately reflect the embedded diversity. However, the population should not be too large to the extent that the cost of evaluating the fitnesses of individual becomes infeasible. These two factors must be carefully considered when determining the GA population size. 4.7.2.2 Issues Concerning GA Parameters The first GA parameter to be considered is the number of generations necessary to achieve a desirable solution. Similar to population size, the number of generations necessary to obtain an individual with a specific bit pattern requires the GA designer’s attention. For instance, if the target fault demands a pattern of “1011” among four bits in the vector, and if this pattern is absent in the initial population, it may take several generations before an individual arrives at this pattern. The number of generations is also related to the population size. Larger populations will likely require more generations to allow for more diverse pairs of individuals to be as parent individuals. Thus, it may suffice to have a small population and a small number of generations to target the easy to detect faults and then increase both the population size and the number of generations when targeting the more difficult faults. The next two parameters are the crossover and mutation probabilities. A crossover probability of 1.0 means that two parent individuals are always crossed so that two children individuals are produced from the parents. Mutation is used to introduce added diversity. A population after several generations will be more likely to have individuals that are more fit than those in the initial population. As the more fit individuals may have similarities, mutation can randomly flip certain bits among the individuals to decrease their similarity. However, mutation can also destroy those good patterns already achieved in some individuals. Thus, an appropriate mutation probability is needed to achieve an appropriate balance. 4.7.2.3 Issues Concerning the Fitness Function How the fitness values are computed for the individuals in the population is a very important concern, as the search critically relies on the fitness values. An ill-defined 214 VLSI Test Principles and Architectures fitness metric can mislead the GA to arrive at a suboptimal solution, or even no solution at all. For instance, a population whose individuals’ fitnesses are similar will not allow the selection process to identify more highly fit individuals to act as parents. Furthermore, without a metric, the individuals may become indistinguishable even when they really are distinguishable. For example, if the fitness function is simply a binary function, where an individual’s fitness is equal to one if the target fault is excited and zero otherwise, this will result in many individuals with fitness equal to zero if they do not excite the target fault. It is clear, however, that some individuals may be closer to exciting the target fault than others. However, the aforementioned binary fitness function would prevent the GA from distinguishing those more fit individuals from the less fit ones. At the start of the ATPG process, there may exist many easy-to-detect faults; therefore, it may be advantageous to first detect them before targeting the harder faults. In this regard, dividing the ATPG process into different phases would be desirable. As an example, CONTEST [Agrawal 1989] targets test generation in three phases, each having its own distinct fitness measure. A two-stage ATPG process is described here. In the first stage, the aim is to detect as many faults as possible. The fitness function could simply be the number of faults detected. This fitness metric allows the GA to bias toward those vectors that could potentially detect more faults. One can refine this fitness function to become: Fitness = × detected + × excited In this case, individuals that detect the same number of faults may be distinguished. Initially, when there are still many easy faults undetected, many individuals will have high fitness values. As vectors are added to the test set and detected faults removed from the fault list, the average fitness of individuals will be expected to come down. When this occurs, it will become increasingly difficult for the GA to distinguish good individuals from the less fit individuals, as discussed earlier. Consequently, the ATPG enters the second stage, where the goal is targeting individual faults instead. In the second stage, each GA process targets a specific fault. Thus, the fitness function should also be adjusted similarly for this purpose. The fitness ought to measure how close the individual is to exciting the fault, as well as how close it is to propagating the fault-effect to a primary output. For measuring how close the individual is to exciting the fault, one can check the number of necessary value assignments. For instance, suppose the target fault is h/0 at the output of AND gate h, as illustrated in Figure 4.40. Then, an individual that sets both inputs of h to logic 0 (Case 2 in the figure) is further away from exciting the fault than another individual that sets one input to logic 1 (Case 1 in the figure). For measuring how close the individual propagates a fault effect to a primary output, the fitness can measure the number of D or D present in the circuit generated by the individual, together with the observability value associated with the lines to which the D D has propagated. For sequential circuits, it may be appropriate to have a stage zero where the goal is to initialize all the flip-flops. The fitness of an individual is then simply the Test Generation 215 a1 1 b0 0 c0 d e Case 1 a0 0 b0 0 c0 d e Case 2 FIGURE 4.40 Fitness measure on how close a fault is excited. h stuck-at 0 z h stuck-at 0 z number of additional flip-flops set to logic zero or logic one, as done in [Rudnick 1994a] [Rudnick 1994b]. Note that only logic simulation is needed in this stage. For subsequent stages, the fitness function may take into account the fault-effects that propagate to flip-flops as well, as it may take several time frames in order to propagate the fault-effect to a primary output. As calculating the fitnesses of individuals dominates the computational cost of the GA, care must be taken when designing the fitness functions. Data structures that allow for fast access to the fault-free and faulty values in the circuit, for instance, would be desired. When fitness value calculation becomes prohibitive, one may reduce the cost by estimating the fitness instead of computing the exact fitness. In stage one, for example, fault samples may be used instead of simulating all faults. Also, counting the number of events in logic simulation may be used to estimate the number of faults excited; this may eliminate the high cost of fault simulation. When using such fitness estimates, one must be aware of the potential loss in the quality of the derived solution and that the final fault coverage may also be reduced. 4.7.2.4 CASE Studies In the GA-based ATPG by Srinivas and Patnaik [Srinivas 1993], combinational circuits were targeted. Each individual represented a test vector. The fitness function accounted for excitation of the fault and propagation of the fault effect. Depending on the fitness of an individual, different crossover and mutation rates were used. While test sets were large, high coverages were obtained. 216 VLSI Test Principles and Architectures Genetic algorithms based on [Holland 1975] were used in CRIS [Saab 1992] in which two individuals were evolved in each generation, which replaced the least fit individuals with some probability. The fitness measure was based on the fault-free activities in the internal nodes in the circuit. This allowed the fitness evaluation to be simple, as only logic simulation is required, thus significantly reducing the computation costs. The circuit is divided into various partitions based on each primary output, and the fitness function favors those individuals that produce similar levels of activity in each partition. It has been presumed that vectors that induce high levels of activity are expected to result in higher fault coverage. As the fitness metric is an estimate of fault coverage, the resulting test sets are longer and may have lower fault coverage compared to deterministic test generators. GATTO [Prinetto 1994] targeted sequential circuits and was based on GAs in the fault propagation phase during the test generation process. First, a reset state was assumed and random vectors were generated from the reset state until at least one fault had been excited. Then, for a limited group of excited faults (up to at most 64 faults), the GAs were used to propagate them toward the primary outputs or flip-flops. If any fault-effect reached a primary output, the corresponding test sequence was added to the test set. If the GAs were unsuccessful in propagating the fault-effects to a primary output, the GA stopped and started over from the reset state to obtain a different set of excited faults. GATTO was able to achieve higher fault coverages compared to CRIS for some circuits. A GA-based combinational test generator was developed by Pomeranz and Reddy [Pomeranz 1997] in which problem-specific information was used. In this case, circuit information played a significant role. For instance, primary inputs lying in the same cone of logic were grouped together, and crossover was limited to primary input group boundaries. This enforced that fault excitation and propagation information from effective individuals are preserved during and after crossover operation. The grouping of the primary inputs was done carefully so that no group was either too large or too small. Note that, because a primary input can belong to multiple groups, care must be taken when copying bit values from a parent individual to a child individual. Uniform crossover was used, and only individuals that were shown to improve the fault coverage were added to the GA population. Further, the population size increased dynamically and the GA process terminated when all faults were detected or a given number of iterations had been reached. A three-phased sequential test generator based on GAs was developed in GATEST [Rudnick 1994a] [Rudnick 1994b] that is based on the PROOFS sequential circuit fault simulator [Niermann 1992]. Table 4.11 shows the population sizes and mutation probabilities used in GATEST as a function of the vector length. Tournament selection without replacement and uniform crossover are used. In the initial phase of GATEST, the aim is to initialize all the flip-flops. Thus, the fitness metric measures the number of new flip-flops initialized to a known value from a previously unknown state. In this phase, only logic simulation is needed. When all flip-flops have been initialized, GATEST exits phase one and enters the second phase. In phase two, the goal is to detect as many faults as possible in any GA attempt. So the fitness is simply the number of faults detected by the candidate individual and the number of faults excited and propagated to flip-flops, with more emphasis placed TABLE 4.11 GA Parameter Values Vector Length (L) Population Size <4 8 4–16 16 17–49 16 50–63 24 64–99 24 > 99 32 Test Generation 217 Mutation Probability 1/8 1/16 1/L 1/L 1/64 1/64 on fault detection. Phase two continues until no more faults can be detected, at which point GATEST enters phase three. Similar to phase two, phase three aims to detect as many faults as possible, except that the fitness function now accounts for the fault-free and faulty circuit activities in addition to fault detection and propagation. Individuals that induce more activity would have higher fitness values. GATEST allows for phase three to exit and return to phase two when vectors are found to detect additional faults. Finally, in phase four, sequences of vectors are used as individuals, and the fitness function is similar to phase two, except that the test sequence length is also factored in. The fitness of a candidate test for each phase is calculated as follows: Phase 1—Fitness is a function of total new flip-flops initialized. Phase 2—Fitness is a function of the number of faults detected and the number of faults propagated to flip-flops. Phase 3—Fitness is a function of the number of faults detected, the number of faults propagated to flip-flops, and the number of fault-free and faulty circuit events. Phase 4—Fitness is a function of the number of faults detected and the number of faults propagated to flip-flops for a test sequence. Because one fault is targeted at a time and the majority of time spent by the GA is in the fitness evaluation, parallelism among the individuals can be exploited. Parallel-fault simulation [Abramovici 1994] [Bushnell 2000] [Jha 2003] is used to speed up the process. High fault coverages and compact test sets have been obtained by GATEST for combinational circuits. For some circuits, however, deterministic ATPGs could achieve higher coverage in much less time. For sequential circuits, the number of faults detected is either greater than or equal to that of deterministic test generators for most circuits, and the test set sizes are much shorter. In most cases, GATEST takes only a fraction of the execution time compared to deterministic test generators. Thus, GATEST can be used as a preprocessor in test generation to screen out many faults before applying a more expensive deterministic test generator. 218 VLSI Test Principles and Architectures 4.8 ADVANCED SIMULATION-BASED ATPG 4.8.1 Seeding the GA with Helpful Sequences Genetic algorithms have been shown to be effective for test generation in the above discussion. However, for some difficult faults, the previous GA-based methods may still underperform the deterministic ATPGs. For such faults, it may be helpful to embed certain individuals in the initial population to guide the GA. This is called seeding. For example, suppose a fault has been excited and propagated to one or more flip-flops in a sequential circuit, and now the GA attempts to drive the fault-effect from those flip-flops to a primary output. If there are previously known sequences that were successful in propagating fault-effects from a similar set of flip-flops, then seeding these sequences into the initial population may tremendously help the GA. The DIGATE [Hsiao 1996a] [Hsiao 1998] and the STRATEGATE test generators [Hsiao 1997] [Hsiao 2000] aggressively apply seeding of useful sequences for the GA. When there are no such sequences available, both DIGATE and STRATEGATE try to genetically engineer such sequences. For example, initially, there are no known sequences that could propagate a fault-effect from any flip-flop to a primary output. So the test generator generates some of these sequences in a preprocessing step. Essentially, propagating a fault-effect from a flip-flop to a primary output is the same as trying to distinguish between two sets of states in the circuit. Two states, S1 and S2, are said to be distinguishable if there exists a finite sequence T such that the output sequence observed by applying T starting at state S1 differs from the output sequence observed by applying T starting at state S2. If such a sequence T exists, T is a candidate distinguishing sequence for states S1 and S2. Figure 4.41 illustrates an example of a distinguishing sequence for a state pair. The sequence of four vectors, ‘1001, 0101, 1011, 0111’, distinguishes the state pair (11010, 11000). In the context of test generation, consider a sequential circuit with five flipflops, ff1 through ff5. Suppose a fault has been excited and propagated to ff4, and suppose the fault-free state at this time is ff1 ff5 = 11010. Then, the faulty state must be 11000, in which the faulty value at ff4 differs from the fault-free value. Thus if a sequence exists that can distinguish the state pair (11010, 11000), by definition of a distinguishing sequence, it would be able to produce different output sequences starting from these two states. In other words, the fault-effect at ff4 would likely be propagated to at least one primary output by the application of this sequence. Note that this sequence may not detect the fault because the faulty circuit is slightly different from the fault-free circuit. Therefore, the test generator is trying to distinguish the state 11010 in the fault-free circuit from the state 11000 in the faulty circuit. Nevertheless, for most cases, the distinguishing sequence is effective in propagating the fault-effect to a primary output. Generating distinguishing sequences for sequential circuits can be a very difficult task. As the main target is test generation, the underlying ATPG ought not spend too much time on generating distinguishing sequences, but the focus should be on generating those sequences that are sufficient to detect the set of hard faults. In other words, to facilitate a fast generation of distinguishing sequences, one cannot Test Generation 219 1001 0101 1011 0111 1 1 0 1 0 101 1001 110 0101 000 1011 011 0111 1 1 0 0 0 101 110 000 010 FIGURE 4.41 A distinguishing sequence that distinguishes states 11010 and 11000. afford to generate a distinguishing sequence for each possible state pair. Rather, the search may simply be on finding those distinguishing sequences that are applicable for distinguishing many pairs of states. Using the above five-flip-flop circuit example again, if a distinguishing sequence exists that can distinguish all pairs of states that differ in ff4, this sequence would be a powerful distinguishing sequence for many pairs of states. Although this type of distinguishing sequence can be computed prior to the start of test generation, such sequences may not exist for every flip-flop in the circuit. Thus, less powerful distinguishing sequences are also captured during test generation dynamically. However, less powerful sequences may only be applicable when the circuit is in a specific state. In both DIGATE and STRATEGATE, distinguishing sequences are generated both statically and dynamically during test generation with the help of the GA, and these sequences are used as seeds for the GA whenever they are applicable to propagate fault-effects from flip-flops to primary outputs. If a fault is excited and propagated to multiple flip-flops, all relevant distinguishing sequences corresponding to these flip-flops are seeded. Whenever newly distinguishing sequences are learned, they are recorded and saved for future use. To avoid having a huge database of distinguishing sequences, the list of distinguishing sequences is pruned dynamically such that less useful sequences are removed from the database. Results of DIGATE show very high fault coverages compared with previous GAbased ATPGs. For those faults that have been excited and propagated to at least one flip-flop, many of them would be detected via the help of the genetically engineered distinguishing sequences. Note that generation of distinguishing sequences on the 220 VLSI Test Principles and Architectures fault-free machine is possible using binary decision diagrams instead of GAs, as has been done in [Park 1995] for the purpose of test generation. However, no pruning of sequences was performed, and no procedure for modifying the sequences was available to handle faulty circuits. Despite the high coverages achieved by DIGATE, for some faults that were not activated to any flip-flop, seeding of distinguishing sequences would not be useful. These faults are those difficult-to-activate faults. They require specific states and justification sequences to arrive at those states in order for the faults to be excited and propagated to one or more flip-flops. For a number of circuits, previous GAbased methods, including DIGATE, achieved low fault coverages due to the lack of specific state justification successes with regard to exciting the difficult-to-activate faults. The difference in fault coverages for some of these circuits was up to 30%. Even when a GA was specifically targeted at state justification such as in [Rudnick 1995], the simple fitness function used was insufficient to successfully justify these states. Storing the complete state information for large sequential circuits is impractical, as there could potentially be 2n states for circuits with n flip-flops. Likewise, keeping a database of sequences capable of reaching each reachable state is infeasible. To tackle this problem, the STRATEGATE test generator [Hsiao 1997] [Hsiao 2000] was built on top of DIGATE for this very purpose. STRATEGATE uses the linear list of states obtained by the test vectors generated during ATPG to guide state justification. Thus, the storage requirement is only on the order of the number of test vectors rather than exponential based on the number of flip-flops. To facilitate the state justification, the set of visited states is stored in a table, together with the corresponding list of vectors that took the circuit to the state, as shown in Figure 4.42. During state justification, the aim is to engineer a sequence that will justify the target state from the current state. At any given time during ATPG, the current state reached by the current set of vectors in the test set is the starting state. Suppose the current state has been reached at the end of vectors i, k, and m. When justifying states that have been visited before, the target state is the state reached at the end of vectors j and l in Figure 4.42. Either sequence Visited States Starting State Ending State FIGURE 4.42 Data structure for dynamic state traversal. Test Sequence i T1 j k T2 l m Test Generation 221 i + 1 j or sequence k + 1 l would suffice to drive the circuit to the target ending state. However, if the target state has not been visited before, STRATEGATE tries to genetically engineer a sequence that can reach it. Note that a sequence that correctly justifies one portion of the desired state may simultaneously set a different value on the other portions, resulting in conflicts. Nevertheless, the justification sequences for each partial state may be viewed as a set of partial solutions for finding the justification sequence for the complete target state. In other words, the important information about justifying specific portions of a state is intrinsically embedded in each partial solution, and this information may be extremely helpful to the GA in deriving the complete solution. Based on the above discussion, during the state justification phase for a new state, STRATEGATE first gathers the set of ending states that closely match (i.e., are similar to) the target state from the visited state table. Then, the sequences corresponding to these states are seeded in the GA in an attempt to engineer a valid justification sequence for the target state. Consider the example illustrated in Figure 4.43 in which the state 1X0X10 has to be justified. Sequence T1 successfully justifies all but the third flip-flop value; on the other hand, sequence T2 justifies all but the final flip-flop value. As explained previously, these two sequences (T1 and T2) may provide important information for reaching the complete solution, T3, which justifies the complete state. T1 and T2 are thus used as seeds for the GA in an attempt to genetically engineer the sequence T3 in the faulty circuit. Because the GA performs simulation in the presence of the fault to derive a sequence, any sequence derived will still be valid. Note that the GA may still abort on the state justification step, in which it fails to justify the target state. When this happens, the GA enters the single-time-frame mode, which is discussed next. Essentially, the single-time-frame phase divides the state justification into two steps. First, it attempts to derive a single-time-frame vector (consisting of the primary input and flip-flop values) that can excite the fault and propagate its faulteffect to at least one flip-flop. Then, it tries to justify the state in the flip-flop portion of the single-time-frame vector from the current state. Because an unjustifiable state is undesirable, the fitness function also uses the dynamic controllability values of the flip-flops to guide the search toward more easily justifiable states. Note that the state portion of the vector is relaxed (some values are relaxed to “don’t cares”) Starting State 010101 010101 State-Transfer Sequence T1 State-Transfer Sequence T2 101110 State S1 110111 State S2 {T1, T2} Genetically Engineer 010101 State-Transfer Sequence T3 1X0X10 {T3} Desired State FIGURE 4.43 Genetic justification of desired state. 222 VLSI Test Principles and Architectures to ease the burden of state justification. The relaxed state is ensured by the engine such that the target fault is still excited and propagated. Even though STRATEGATE may not justify every required state, the embedded dynamic state traversal for state justification allows it to close the 30% gap in fault coverage difference among those circuits where previous GA-based approaches failed. For other circuits, STRATEGATE has been able to achieve extremely high fault coverages compared to other simulation-based and deterministic test generators. The STRATEGATE test sets are often more compact than those obtained by deterministic test generators, even when higher fault coverages are achieved. The test sets are more compact than those obtained by CRIS or DIGATE for most circuits. Finally, simulation-based test generation can be applied to design validation rather than manufacturing test, such as the work reported in [Hsiao 2001], [Sheng 2002], and [Wu 2004]. 4.8.2 Logic-Simulation-Based ATPG The GA-based ATPGs discussed thus far use repeated fault simulation runs to gather information related to targeted faults to guide the search for test sequences. As fault simulation can be significantly more computationally intensive compared to logic simulation, approaches that use logic simulation rather than fault simulation have been proposed. Logic-simulation-based test generators usually target some inherent “property” in the fault-free circuit and try to derive test vectors that exercise these properties. It has been brought up earlier in the chapter that the CRIS test generator attempts to maximize the circuit activity (events in logic simulation), as it has been observed that circuit activities are correlated to fault excitation. In another approach, LOCSTEP [Pomeranz 1995] made the observation that test sequences for sequential circuits achieved higher coverage when more states are visited. This is because difficult-to-test faults often require difficult-to-reach states in order to be excited, propagated, etc. Thus, LOCSTEP tries to maximize the number of new states visited. Because no fault simulation is invoked to remove the detected faults, and also because the number of reachable states can be huge in large sequential circuits, the number of vectors can potentially grow to be very large. In addition, the fault coverage obtained can be inferior to that achieved by fault-simulationbased test generators. Finally, in other ATPGs that target some properties, such as in [Guo 1999] and [Giani 2001], compaction is used to identify useful vectors that may be repeated to detect additional faults. However, repeated applications of fault simulation are necessary in test set compaction. More discussion on the use of compaction for test generation is provided later in the chapter. As logic-simulation-based ATPGs do not call fault simulation on a regular basis, we may end up with a large number of vectors, where many vectors may not contribute to detection of new faults. The reason why the indiscriminate addition of vectors may not contribute to the detection of new faults can be explained by the following: Because some flip-flops belong to the data path and others to the controller of the circuit, maximizing the number of new states on the data path generally will not play as significant a role as maximizing those on the controller. Test Generation 223 Global State S (8 flip-flops) Partitioned States S1 and S2 (2 sets of four flip-flops) Current Global State Table 00 11 12 23 FIGURE 4.44 State partition examples. Current Partitioned State Table S1 states: 0 1 2 S2 states: 0 1 2 3 Different states on the datapath generally map to different operand values for the functional units in the design, while different states in the controller dictate different modes of operation for the circuit. This implies that the underlying ATPG should not treat the entire state as one entity. In other words, treating the entire state as one entity may mislead the test generator, particularly by the “noise” from those unimportant states. Thus, partitioning of state will help to weed out the noise. State partitioning can remove the noise and provide better guidance in the search space, as shown in Figure 4.44. In Figure 4.44, consider a circuit with eight flip-flops. Let the global state, S, be partitioned into two partial states, S1 and S2, where the value of each partial state can be expressed in a hexadecimal number; for example, a partial state “1010” appearing on partition S1 is represented by the hexadecimal value ‘A’. The same notation is used for S2. For the global state S, a pair S1 S2 is used to represent its value. For example, the global state “0101 1010” is represented as (5, A). Assume that the current test set has traversed the following global states in the circuit: (0, 0), (1, 1), (1, 2), (2, 3). Correspondingly, the distinct partial states visited on S1 and S2 are 0 1 2 and 0 1 2 3 , respectively. Based on this partial state information, the following two scenarios can occur. First, suppose there are two new candidate sequences that drive the circuit from the current state to two new, but different, global states: (2, 1) and (3, 1). While both states are new, it may be possible that one is better than the other. If no distinction is made about these two global states, the test generator would simply pick one randomly. Now, considering state partition as discussed before, the two states can be differentiated by noting that (3, 1) may be a more useful state because 3 brings a new state in partition S1, while both 2 and 1 have been reached in the two separate partitions already. For the second scenario, suppose the two different global states reached by the two candidate sequences are (3,0) and (2,4), and, similar to the first scenario, both states are new global states; in addition, 3 is a new partial state on S1 and 4 is a new partial state on S2. In other words, both states bring something new. However, 224 VLSI Test Principles and Architectures if different weights are imposed on different state partitions, it may be possible to differentiate them. A partition has a greater weight if it is deemed to have greater influence on the circuit. Suppose the weight assigned to S1 is greater than S2, then (3, 1) will be favored. Based on the above discussion, a new test generator was proposed in [Sheng 2002b] that uses logic simulation as the core engine in the test generation process, in addition to state partitioning. Ideally, a clear distinction between control path flip-flops and the datapath flip-flops is desired. However, this may be difficult if the higher levels of the circuit description are unavailable. Without complete knowledge of controller and datapath, the partitioning is done in a different manner. One possibility is to partition all the circuit’s flip-flops based on the controllability values of the flip-flops. Flip-flops with similar ranges of controllability values are grouped together. The reason behind this grouping is based on the observation that in a given circuit, some state variables will be less controllable than others. Thus, less activity will occur in those less-controllable flip-flops. In order to traverse more useful states, it would be desirable to stimulate more activity on those less active flip-flops. By grouping them together, any new partial state value reached in that group will be regarded as valuable. Other partitioning methods exist, such as using the circuit’s structure to group those flip-flops that belong in the same output cone, etc. In addition to state partitioning, the search must avoid repeated visits of certain types of states, such as reset states. A technique called reset signal masking was proposed in [Sheng 2002b] for this very task. It is based on the following observation. Digital circuit designers often put reset or partial reset input signals in circuits for design for testability (DFT) purposes. When the circuit is extensively reset or partially reset, the chance of visiting new states is significantly reduced. Therefore, identifying the signals that can reset some of the flip-flops is necessary. Then, during test generation, those primary input values that can reset some (or all) flip-flops are avoided. This is the idea behind reset signal masking. Consider a state space in which the circuit is currently traversing, illustrated in Figure 4.45. In this figure, circles denote states, and edges denote transitions between the states. Generally speaking, the circuit visits a set of easy states initially (which may contain some reset or synchronizing states) such as those states in the dotted region of the figure. Then, this set of reached states grows gradually as more states are visited. As the goal is to expand the state space beyond the current frontier, the search must avoid repeating the visit of any previously visited states, including reset states. Using Figure 4.45 again, states A, B, and C are some of the states currently at the frontier of the reached state space. Consider the frontier state B. In order to avoid going back to a previously visited state, say A, the search must place constraints on the primary inputs so that returning to state A will not occur. The overall test generation procedures that incorporate reset signal masking and state partitioning are given in Algorithm 14. In this algorithm, static partitioning is used to obtain initial state partition. The stop condition is either 100,000 vectors have been generated or the execution time has reached a preset value. This is an efficient yet simple sequential circuit test generator based on logic simulation and circuit state partitioning. Very high Unexplored State Space Test Generation 225 Global State Space Reached State Space FIGURE 4.45 State space exploration. E D B A C Algorithm 14 LogicSimATPG 1: Identify reset signal masking for each primary input; 2: Partition the flip-flops (e.g., based on their controllability values.); 3: while stop condition not satisfied do 4: Generate test vectors that expand the search space the most using reset signal masking information and partition information; 5: Re-partition the flip-flops if desired; 6: end while fault coverage has been obtained for large sequential circuits with significantly less computational effort. For some circuits, the highest fault coverage was obtained compared with existing deterministic and simulation-based approaches. 4.8.3 Spectrum-Based ATPG Similar to logic-simulation-based ATPG, spectrum-based ATPG tries to seek embedded properties in the fault-free circuit that can help with the test generation process. For spectrum-based ATPG, the underlying sequential circuit is viewed as a blackbox system that is identifiable and predictable from its input/output signals, rather than the traditional view as a netlist of primitives. In studying a signal, the foremost concern is the predictability of the signal. If the signal is predictable, then a portion of it can be used to represent and reconstruct its entirety. Testing of sequential systems, then, becomes a problem of constructing a set of waveforms which when applied at the primary inputs of the circuit can achieve high fault coverages by exciting and propagating many faults in the circuit. 226 VLSI Test Principles and Architectures In order to capture the spectral characteristics of a signal, a clean representation for that signal is desired (wider spectra lead to more unpredictable or random signals). Thus, any embedded noise should be filtered from the signal. In the context of test generation, static test set compaction can be viewed as a filter as it reduces the size of the test set by removing any unnecessary vectors while retaining the useful ones that achieve the same fault coverage as the original uncompacted test set. In other words, static test set compaction filters unwanted noise from the derived test vectors, leaving a cleaner signal (narrower spectrum) for analysis. Vectors that are generated from the narrow spectrum may have better fault detection characteristics. Frequency decomposition is the most commonly used technique in signal processing. A signal can be projected to a set of independent waveforms that have different frequencies. In the work by Giani et al. [Giani 2001], Hadamard transform is used to perform frequency decomposition. The reader is referred to the cited work for details of Hadamard transform, as it is beyond the scope of this chapter. The overall framework of the spectrum-based test generation procedure is relatively straightforward. Initially (iteration 0), the test set simply consists of random vectors. A call to static compaction will filter any unnecessary vectors such that no fault coverage is lost. Then, using the Hadamard transform on the obtained compacted test set, each primary input is analyzed and the dominant frequency components for each primary input are identified. Next, test vectors are generated based on this identified spectrum. Any spectrum can be represented as a linear combination of the basis vectors. Then, test vectors can be generated by spanning the likely vector space using only the basis vectors. This process is repeated until either a desired fault coverage is obtained or a maximum number of iterations is reached. This approach has consistently achieved very high fault coverages and small vector sets in short execution times for most sequential benchmark circuits. 4.9 HYBRID DETERMINISTIC AND SIMULATION-BASED ATPG As both deterministic and simulation-based test generators have their own merits, in terms of coverage, execution time, test set size, etc., it may be beneficial to combine the two different types of ATPGs together. In general, deterministic ATPGs are better suited for control-dominant circuits, while simulation-based ATPGs perform better on data-dominant designs. In addition, circuits with many untestable faults should not be handled by simulation-based test generators, unless the untestable faults are first identified and removed from the fault list. A simple combination of the two approaches would be to start with a fast run of a simulation-based test generator, followed by a deterministic test generator to improve the fault coverage and to identify untestable faults. For instance, a quick run of a random TPG would remove many of the easy-to-detect faults, leaving the deterministic ATPG only those more difficult and untestable faults. The CRIS-hybrid test generator [Saab 1994] is also based on this notion. It switches from simulation-based to deterministic test generation when a fixed number of test vectors have been generated by the simulation-based ATPG without improving the fault coverage. During the deterministic ATPG phase, in addition to generation Test Generation 227 of vectors for some undetected faults, some untestable faults are also identified. Simulation-based test generation may resume after a test sequence is obtained from the deterministic procedure. There are of course other methods of combining simulation-based and deterministic algorithms for test generation. The GA–HITEC hybrid test generator [Rudnick 1995] uses deterministic algorithms for fault excitation and propagation and a GA for state justification. Deterministic procedures for state justification are used if the GA is unsuccessful. Instead of targeting one group of faults at a time, GA-HITEC targets one fault at a time, as is generally done in deterministic ATPGs. This particular method of combination in GA-HITEC is based on the observation that deterministic algorithms for combinational circuit test generation have proven to be more effective than genetic algorithms [Rudnick 1994]. Furthermore, in sequential circuits, state justification using deterministic approaches is known to be very difficult and is vulnerable to many backtracks, leading to excessive execution times. Therefore, it makes sense to include the deterministic algorithm for fault excitation and propagation, while the GA is used for state justification. Note that this approach cannot identify some untestable faults. In GA-HITEC, a fault is taken as a target. Then, the fault is excited by the deterministic engine, followed by propagation to a primary output, perhaps through several time frames, also by the deterministic engine. Through this process, several primary inputs and flip-flop variables at time frame 0 would have been chosen as decision points, as illustrated in Figure 4.46. The decisions made on the flip-flops Step 1: Deterministic ATPG in time-frame zero to derive a combinational vector x 1 x s-a-0 11 0 0 1/0 x Step 2: GA to derive the justification sequence 10101 s-a-0 00111 s-a-0 FIGURE 4.46 Test generation using GA for state justification. Target State 11010 s-a-0 x x 1 0 x 228 VLSI Test Principles and Architectures at time frame 0 now become the target state to be justified. The GA is invoked at this time to generate a justification sequence for the target state. If a sequence is found that justifies the target state, then this sequence is concatenated with the vectors derived for fault excitation and propagation, and the complete test sequence is added to the test set. Faults that are detected by this sequence are removed from the fault-list. On the other hand, if a justification sequence cannot be found by the GA, then backtracks are made in the fault propagation phase in the deterministic test generator, and attempts are made to justify any new state. In the state justification phase, the GA evolves over four full generations for each target state. Each individual in the population represents a candidate sequence of vectors. A small population size of 64 is used, and the number of generations is limited to four to reduce the execution time. The population size is doubled and the number of generations increased to eight later for the more difficult faults. The sequence length is also doubled. During the GA search for a justification sequence, both fault-free and faulty states are checked for each individual in the population. Note that this check is done for every vector in an individual, which contains several vectors. Thus, if a match is found, the length of the actual justification sequence may be less than the length of the individual. For the purposes of the GA, the fitness function simply measures how closely the final state matches the target state: fitness = 9 # flip-flops matched in fault-free circuit 10 + 1 # flip-flop matches in faulty circuit 10 A flip-flop is said to be matched if the value achieved is the same as the target value. If the target value is “don’t care,” it is considered matched as well. Therefore, if both the fault-free and faulty states match, the fitness will equal the total number of flip-flops in the circuit. Note that unequal weights are given to the fault-free and faulty states. Changing the weights will alter the search by placing emphases differently. Again, during fitness evaluation, parallelism among the individuals can be exploited, where 32 individuals may be simulated together to reduce the computational cost. Results of GA-HITEC have demonstrated that higher fault coverages can be obtained as compared to pure deterministic HITEC for many circuits. Similar numbers of untestable faults were identified as well. 4.9.1 ALT-TEST Hybrid ALT-TEST [Hsiao 1996b] is another hybrid approach that combines a GA-based test generator and a deterministic engine. HITEC [Niermann 1991] is again used as the deterministic test generator in ALT-TEST. The number of calls to the deterministic test generator is very few, which differs significantly from the CRIS hybrid, where hundreds of calls to the deterministic engines were made. ALT-TEST alternates repeatedly between GA-based and deterministic test generation. Test Generation 229 A fast run of a GA-based test generator is followed by a run of a deterministic test generator that targets faults that were left undetected by the previous GA-based test generator. Any successful sequences derived by the deterministic test generator are used as seeds for the successive GA-based ATPG run. The test sequences derived by the deterministic engine typically will traverse previously unvisited states. Thus, the deterministic test generator may be viewed as an external engine whose purpose is mainly to guide the GA to new state spaces of the circuit that have not been visited. By visiting new state spaces, the test generator can maximize the search space. Furthermore, the use of a deterministic test generator also helps to identify any untestable faults, thus saving the computational effort in the GA runs on those faults that could never be detected. The test generation process in ALT-TEST is divided into three stages; each of the three stages is composed of alternating phases of GA-based and HITEC test generation. The first stage attempts to detect as many faults as possible from the fault list. The second stage tries to maximize the number of visited states and propagate fault effects to flip-flops. Finally, the third stage tries to both detect the remaining faults and visit new states. In each of the three stages, the GA is first run until little or no more improvement is obtained, then the deterministic approach is used to target undetected faults. A stage is finished when no more improvements are made for the remaining undetected faults. The pseudo code for test generation within a stage is given in Algorithm 15. In each GA run, the initial population consists of: (1) the best sequence from the previous GA run or the deterministic engine, (2) the sequences having fitness Algorithm 15 ALT-TEST 1: while there is improvement in this stage do 2: /∗ GA-based test generation ∗/ 3: while there is improvement in the GA phase do 4: for all undetected faults, in groups of 31 faults do 5: select next 31 undetected faults as target faults; 6: best-individual = GA-evolve(); 7: add best-individual to test set; 8: seed the next GA population; 9: compute improvement; 10: end for 11: end while 12: /∗ deterministic test generation ∗/ 13: select the hard-to-detect faults; 14: best-sequence = deterministic-ATPG(hard faults); 15: if a best-sequence is found then 16: add best-sequence to test set; 17: end if 18: seed best-sequence into the next GA; 19: compute improvement; 20: end while 230 VLSI Test Principles and Architectures values greater than or equal to one-half of the best fitness from the previous GA run, and (3) random individuals to fill the entire population if needed. Instead of targeting individual faults, the GA tries to detect as many faults as possible by any individual. Because the target is to generate a sequence that can detect as many faults as possible, parallel-fault simulation (on 31 faults) is used during fitness evaluation; 31 faults are used instead of 32 due to the nature of the embedded fault simulator. A set of 31 undetected faults in the fault list are selected as target faults. All individuals in the population would then target the same group of 31 faults. For successive GA runs, faults are chosen cleverly so that efforts can be reduced. For instance, if the best sequence added to the test set detected a total of 20 faults, it may have also excited and propagated some faults to one or more flip-flops at the end of that sequence. These activated faults should be placed in the next targeted fault group, as faults that have propagated to at least one flip-flop are deemed to have a greater chance of being detected. If the more than 31 faults have propagated to the flip-flops, preference is given to those that have propagated to more flip-flops. On the other hand, if fewer than 31 faults have propagated to the flip-flops, the remaining faults in the group are filled from the undetected fault list. After the GA phase, the deterministic test generator is activated that targets the difficult-to-detect faults identified by the previous GA run. A difficult-to-detect fault is one that has never been detected by any of the test sequences added to the test set. The sequence generated by the deterministic test generator is also seeded to the next GA run with hopes that it can help to expand the search space. As the GA and deterministic phases alternate, the number of faults detected as a function of time will experience periodic jumps, as illustrated in Figure 4.47 for Number of detections Until at least 1 fault detected by deterministic ATPG GA FIGURE 4.47 Number of detections in alternating phases. Time GA Deterministic ATPG Test Generation 231 a case in which the deterministic ATPG successfully finds a sequence for at least one fault. The fitness functions for the three separate stages of ALT-TEST depend on a variety of parameters. Because each stage targets a different goal, the set of parameters that control the search will differ as well. The parameters that can affect the fitness of an individual include the following: P1—Number of faults detected P2—Number of flip-flops to which fault effects have arrived P3—Number of new states visited P4—Number of flip-flops set to their difficult-to-control values It can be seen that parameters P3 and P4 contribute to the expansion of the searched state space. While P3 explicitly aims for visitation of more states, P4 guides the search by favoring sequences that are able to set the difficult-to-control flip-flops to values that have not yet been encountered. Consequently, a new state is likely to be visited. All four parameters are given different weights across the three stages of ALT-TEST: Stage 1—Fitness = 0 8P1 + 0 1P2 + 0 1 P3 + P4 . Stage 2—Fitness = 0 1P1 + 0 45P2 + 0 45 P3 + P4 . Stage 3—Fitness = 0 4P1 + 0 2P2 + 0 4 P3 + P4 . In the first stage, because most faults have not yet been detected, the aim is thus to detect as many faults as possible, which makes the parameter P1 the most dominant. At the end of the first stage, little improvement in fault detection is observed, indicating that the fitness function is no longer effective. In other words, it is unlikely to detect faults without other ingredients added. Therefore, in the second stage, maximizing visitation of new states and fault-effect propagation to flip-flops becomes the aim. By doing this, the search tries to expand the state space together with those states that can still excite and propagate the fault-effects. Finally, in the third stage of ALT-TEST, the focus is shifted once again. Now the target is detecting the remainder of the faults that have been difficult to detect by the GA and the deterministic engine in the previous two stages. Therefore, the fitness function weights fault detections and new state identifications more heavily. ALT-TEST achieves high coverages compared with GA-HITEC for many circuits, with the ability to identify untestable faults. 4.10 ATPG FOR NON-STUCK-AT FAULTS 4.10.1 Designing an ATPG That Captures Delay Defects Today’s integrated circuits are seeing an escalating clock rate, shrinking dimensions, increasing chip density, etc. Consequently, there arises a class of defects that would affect the functionality of the design if the chip is run at a high speed. In other words, the design is functionally correct when it is operated at a slow clock. This type of defect is referred to as a delay defect. While the conventional stuck-at 232 VLSI Test Principles and Architectures testing can catch some delay defects, the stuck-at fault model is insufficient to model delay defects satisfactorily. This has prompted engineers and researchers to propose a variety of methods and fault models for detecting speed failures. Among the fault models are the transition fault [Levendel 1986] [Waicukauski 1987] [Cheng 1993], the path-delay fault [Smith 1985], and the segment delay fault [Heragu 1996]. This section is devoted to path-delay fault test generation. The path-delay fault model considers the cumulative effect of the delays along a specific combinational path in the circuit. If the cumulative delay in a faulty circuit exceeds the clock period for the path, then the test pattern that can exercise this path will fail the chip. The segment delay fault model targets path segments instead of complete paths. Because a transition has to be launched in order to propagate across a given path, two vectors are needed. The first vector initializes the circuit nodes, and the second vector launches a transition at the start of a path and ensures that the transition is propagated along the given path. Given a path P, a signal is an on-input of P if it is on P. Conversely, a signal is an off-input of P if it is an input to a gate in P but is not an on-input of P. A path-delay fault can be a rising fault, where a rising transition is at the start of the path, or a falling fault, where a falling transition is at the start of the path. The rising and falling path-delay faults are denoted with the up-arrow ↑ and the down-arrow ↓ before path P, respectively. For example, ↑ g1g4g7 is a rising path that traverses through gates g1 g4, and g7. Delay tests can be applied three different ways: launch-on-capture (also called broadside or double-capture) [Savir 1994], launch-on-shift (also called skewedload) [Savir 1993], and enhanced-scan [Dervisoglu 1991]. In launch-on-capturebased testing, the first n-bit vector is scanned in to the circuit with n scan flip-flops at a slow speed, followed by another clock which creates the transition. Finally, an at-speed functional clock is applied that captures the response. Thus, only one vector has to be stored per test, and the second vector is directly derived from the initial vector by pulsing the clock. In launch-on-shift-based testing, the first n − 1 bits of an n-bit vector are shifted in at a slow speed. The final nth shift is performed, and it is also used to launch the transition. This is followed by an at-speed quick capture. Similar to launch-on-capture, only one vector has to be stored per test, as the second vector is simply the shifted version of the first vector. Finally, in enhanced-scan testing, both vectors in the vector pair V1 V2 have to be stored in the tester memory. The first vector is loaded into the scan chain, followed by its immediate application to initialize the circuit under test. Next, the second vector is scanned in, followed by an immediate application and capture of the response. Note that the node values in the circuit is preserved during the shifting-in of the second vector V2. In order to achieve this, a hold-scan design [Dervisoglu 1991] is required. Because both launch-on-capture and launch-on-shift place constraints on what the second vector can be, they will achieve lower fault coverage when compared with enhanced-scan. However, enhanced-scan comes at a price of hold-scan cells, which consume more chip area. This may not be viewed as a huge negative in microprocessors and some custom-designed circuits because hold-scan cells are used to prevent the combinational logic from seeing the values being shifted. This Test Generation 233 is done because the intermediate state of the scan cells may cause contention in some of the signals in the logic, as well as reducing the power consumption in the combinational logic during the shifting of the data in scan cells. In addition, hold-scan cells also help increase the diagnostic capability on failing chips in which the data captured in the scan chain can be retrieved. In terms of test data volume, enhanced-scan tests may actually require less storage to achieve the same delay fault coverage. In other words, for launch-on-capture or launch-on-shift to achieve the same level of fault coverage, many more patterns may have to be applied. Unlike stuck-at faults, where a fault is either detected or not detected by a given test vector, a path-delay fault may be detected by different test patterns (consisting of two vectors) with differing levels of quality. In other words, some test patterns can detect a path-delay fault only with certain restrictions in place. Higher quality test patterns place more restrictions on sensitization of the path. On the other hand, similar to stuck-at faults, some paths may be untestable if the sensitization requirement for a given path is not satisfiable. For designs with two interactive clock domains, modifications can be made to allow for test. For example, the following at-speed delay test approaches can be used for both launch-on-capture and launch-on-shift architectures: one-hot double-capture, aligned double-capture, and staggered double-capture [Bhawmik 1997] [Wang 2002]. Details of these architectures are further explained in Chapter 5. 4.10.1.1 Classification of Path-Delay Faults Given the above discussion, the path-delay faults can be classified into several categories. A path P is said to be statically sensitizable if all the off-inputs of P can be justified to their corresponding noncontrolling values for some test vector. If all of the off-inputs of a path P cannot be justified to the respective noncontrolling values, P is said to be a statically unsensitizable path. A false path is a path such that no transition can propagate from the start to the end of the path. A path is false because the values necessary on the off-inputs of the path are not realizable by the circuit [Devadas 1993]. Note that a false path is always statically unsensitizable, but not vice versa. Figure 4.48 illustrates an example of a statically unsensitizable path ↓ abce, as signal d cannot be at the noncontrolling value in the second vector. But this path is not false, because a transition can propagate from a to the end of the path, e, via a multi-path from a to e. A path P is single-path sensitizable if the values of the off-inputs in P can be settled to their noncontrolling values in both vectors. This is the most stringent requirement, thus there are few paths that would satisfy this condition. In order to detect a delay defect along a path, it may be possible to relax the constraint according to the single-path sensitizability. In other words, it may be possible to detect the delay fault without having all off-inputs set to noncontrolling values. Consider the circuit illustrated in Figure 4.49. The falling path ↓ bdfg is the target path. Note that the value for signals a and e can be relaxed in the first vector such that the transition on b can still be propagated to g. This is because the 234 VLSI Test Principles and Architectures c a b e d Path: abce FIGURE 4.48 A statically unsensitizable but not false path. a X0 d b c S1 FIGURE 4.49 A robustly testable path. e X0 g f propagation of the falling transition from b to d is independent of the value of a in the first vector (and similarly for the transition from f to g). On the other hand, a steady 1 (S1) is needed for both the first and second vectors on signal c. Relaxing the value in the first vector could block the transition from d to f . The target path in the above example is said to be robustly testable. More specifically, the path is testable irrespective of other delay faults in the circuit [Smith 1985] [Lin 1987]. In the same running example shown in Figure 4.49, if the “don’t care” value in the first vector for signal a is a logic 1, the transition on b would still be propagated to d, as the transition on d depends on the later of the two transitions. In short, a delay on a will not prevent the target path from being detected. Given the above discussion, the value criteria for each off-input of P for a robustly testable path are as follows: When the corresponding on-input of P has a controlling to noncontrolling transition, the value in the first vector for the off-input can be “don’t care,” with the value for the off-input as a noncontrolling value in the second vector. On-input a b Test Generation 235 c FIGURE 4.50 Sensitization criteria. When the corresponding on-input of P has a noncontrolling to controlling transition, the values for the off-input must be a steady noncontrolling value for both vectors. Because a robust test for a path P can detect P irrespective of any other delay faults in the circuit, they are the most desirable tests. For most circuits, however, the number of robustly testable paths is small. Thus, for those robustly untestable paths, less restrictive tests must be sought. Consider the AND gate shown in Figure 4.50. Suppose signal a is the on-input and b is the off-input along some path. In the robust sensitization criterion, because the on-input is going from a noncontrolling to a controlling value, the off-input must be at steady noncontrolling value. As discussed before, such a restriction will ensure that the path going through a, if testable, will be tested irrespective of any other delay faults in the circuit. However, if such a test is not possible, one may wish to relax the condition such that the target path is the only faulty path in the circuit. In other words, if the off-input b is not late, then it may be possible to relax the steady noncontrolling value somewhat. In this example, if the transition on the target path through a is late, and if the transition on the off-input is on time, then the output c will still have a faulty value. Therefore, it may be sufficient to require the values of X1 for b instead of a steady 1. This sensitization condition is called the nonrobust sensitization condition. Figure 4.51 illustrates an example of a path, ↑ bcdf, that is robustly untestable but is nonrobustly testable. Note that in a robustly testable path, a transition is present at every gate along the path. On the other hand, in a nonrobustly testable path, some transitions may be lost along the path. In the example shown in Figure 4.51, the transition is lost at f . a S1 b c d f e FIGURE 4.51 A nonrobust path. 236 VLSI Test Principles and Architectures Given the above discussion, the value criteria for each off-input of P for a nonrobustly testable path are as follows: Irrespective of the transition on the on-input, the value in the first vector for the off-input can be “don’t care,” with the value for the off-input as a noncontrolling value in the second vector. There are other classes of path-delay faults, such as validatable nonrobustly testable path-delay faults, functional sensitizable path-delay faults, multi-path-delay faults, etc. They are not included in this discussion. 4.10.1.2 ATPG for Path-Delay Faults Unlike stuck-at test generation, where only one vector is necessary and the value on any signal can be 0, 1, D, D, or X, in path-delay fault test generation, two vectors are required, and the vector pair only has to ensure that a transition is launched at the start of the path and that the off-inputs satisfy the conditions specified by the robust or non-robust tests. For a given target path P, a test pattern (of two vectors) can be generated for P. One can go about generating the two vectors separately, or a different logic system may be used such that the two vectors can be derived simultaneously with a single copy of the circuit. When the two vectors are generated separately, each signal can be 0, 1, or X. The vector-pair generated must ensure that a transition is launched at the start of P and that all off-inputs adhere to the robust or nonrobust conditions specified by the test. The value justification of the off-inputs is similar to the multi-objective value justification in stuck-at ATPG. If two vectors are to be generated together, a value system different from the three-value system can be used to represent values over two vectors [Lin 1987]. In this case, a signal can be any of the following: S0—Initial and final values are both logic 0. S1—Initial and final values are both logic 1. U0—Initial logic can be either 0 or 1, but final value is logic 0. U1—Initial logic can be either 0 or 1, but final value is logic 1. XX—Both initial and final values are “don’t cares.” Boolean operators also work on this new system of values. For example, Tables 4.12, 4.13, and 4.14 show the AND, NOT, and OR operations over these five values, respectively. Such tables can be generated for other Boolean operations as well. Using the new 5-valued system, conventional ATPG algorithms can be applied to generate path-delay tests. Because many paths overlap and there may be an exponential number of paths, it may be possible and helpful to reuse some of the knowledge gained from targeting other paths. For instance, if it is known that a = 1 and b = 0 is not possible, then any path that requires this combination would be untestable. Likewise, if two paths share a segment, the two test patterns for the two paths may share bits in Test Generation 237 TABLE 4.12 AND Operation AND S0 U0 S1 U1 XX S0 S0 S0 S0 S0 S0 U0 S0 U0 U0 U0 U0 S1 S0 U0 S1 U1 XX U1 S0 U0 U1 U1 XX XX S0 U0 XX XX XX TABLE 4.13 NOT Operation NOT S0 S1 U0 U1 S1 S0 U1 U0 XX XX TABLE 4.14 OR Operation OR S0 U0 S1 U1 XX S0 S0 U0 S1 U1 XX U0 U0 U0 S1 U1 XX S1 S1 S1 S1 S1 S1 U1 U1 U1 S1 U1 U1 XX XX XX S1 U1 XX common. In RESIST [Fuchs 1994], this concept is taken into account such that a recursion-based ATPG algorithm searches starting from a primary input. The search progresses by targeting paths that differ only in the last segment; in other words, they share the same initial subpath. Essentially, RESIST starts at each primary input, and the circuit is traversed in a depth-first fashion. Once a complete path P from a primary input to primary output has been tested, a backtrack is invoked and a different path P2 that differs from P in only one segment is tried. At the end, all the paths in the output cone of the starting primary input would have been considered. In doing so, the decision tree can be shared among different paths and knowledge is reused. Likewise, if a subpath is found to be untestable, all paths that share the same initial subpath would be untestable. Then, RESIST repeats for another primary input until all primary inputs have been processed. RESIST is efficient because it incorporates knowledge into the ATPG process, and paths are handled such that much knowledge can be carried over from one path to the next. 238 VLSI Test Principles and Architectures 4.10.2 ATPG for Transition Faults If robust tests were possible for all the paths in a circuit, we would not need any additional test vectors for capturing the delay defects. However, because very few paths are robustly testable, there will be some delays that cannot be captured by either robust or nonrobust path-delay fault tests. Consider the situation where some small delay defects are distributed inside a circuit. If the circuit nodes lie on a robustly untestable path or a less critical path, then the path-delay fault test vectors may miss those faults. The segment delay fault model might also miss the faults because there might not be a path along which the effect may be propagated. A transition fault at node g assumes a delay defect is present at node g such that the propagation of the transition at g will not reach the flip-flop or primary output within the clock period. While the path-delay fault model considers the cumulative effect of the delays along a specific path, the transition fault model does not specify the path through which the fault is to be excited or propagated. Today, the transition fault model is the most practical as the number of transition faults is linear to the number of circuit nodes and commercial tools are available for computing such tests. On the other hand, the number of path-delay faults is exponential to the number of circuit lines, which makes critical path analysis and identification procedures necessary. Finally, transition tests have been generated to improve the detection of speed failures in microprocessors [Tendulkar 2002] as well as application-specific integrated circuits (ASICs) [Hsu 2001]. These reasons make transition faults popular in industry. Similar to the stuck-at fault model, two transition faults are possible at each node of the circuit: slow-to-rise and slow-to-fall. A test pattern for a transition fault consists of a pair of vectors V1 V2 where V1 (called the initial vector) is required to set the target node to an initial value, and V2 (called the test vector) is required to launch the corresponding transition at the target node and also propagate the fault effect to a primary output [Waicukauski 1987] [Savir 1993]. Lemma 3 A transition fault can be launched robustly or nonrobustly, or in neither way, through the segment PI-fault site. Proof Consider a slow-to-rise transition fault at the output of the OR gate in Figure 4.52. This transition can only be launched by having rising transitions at both inputs of this gate. Hence, neither of two paths passing through the OR gate can be robustly or nonrobustly tested. Lemma 4 A detectable transition fault can be detected by a robust segment or nonrobust segment, or in neither way, starting from the fault site to a primary output. Steady 1 Test Generation 239 FIGURE 4.52 Slow-to-rise transition at the input of an OR gate. a b Steady 1 FIGURE 4.53 Slow-to-fall transition propagation example. Proof Consider the circuit shown in Figure 4.53. A slow-to-fall transition fault at a is propagated to the primary output and hence detected, but neither path from a to b is robustly or nonrobustly testable due to off-path inputs at gate b. The two above lemmas conclude that both the launching and propagation of a transition fault can be done through multiple paths and none of the paths may be tested robustly or nonrobustly [Gupta 2004]. Hence, there are some faults that can be missed by the path-delay fault model and can only be captured by the transition fault model. But, for small delay defects, an enhanced transition fault model is needed to properly address the aforementioned issues. Transition tests can also be applied in three different ways as for the other delay fault models discussed earlier: launch-on-capture, launch-on-shift, and enhanced-scan. As with path-delay tests, because both launch-on-capture and launch-on-shift place constraints on what the second vector can be, they will achieve lower transition fault coverage when compared with enhanced-scan. 240 VLSI Test Principles and Architectures 4.10.3 Transition ATPG Using Stuck-At ATPG A transition fault can be modeled as two stuck-at faults. Thus, one can view testing transition faults as testing two stuck-at faults. For example, a transition fault a slowto-rise can be modeled as exciting the fault a/1 in the first time frame and detecting the fault a/0 in the second time frame. In other words, exciting a/1 requires setting a = 0, and testing for a/0 requires setting a = 1 and propagating its effect to an observable point. With enhanced-scan, because the two vectors are not correlated, these two vectors can be generated independently. For launch-on-capture or launch-on-shift, the two time frames must be handled together. In the launch-on-capture-based test scheme, one may view the excitation of the fault in the first time frame as a constraint for the ATPG for detecting the fault in the second time frame. In other words, for testing the transition fault a slow-to-rise, the stuck-at fault a/0 is the target fault in the right (second) time frame of the two-time-frame unrolled circuit. A stuck-at ATPG is invoked to detect a/0 with the constraint that the signal a in the first time frame must be set to logic 0. A slow-to-fall transition can be modeled in a similar manner. On the other hand, in launch-on-shift, the two time frames are related in a different way. The flip-flops of the second time frame are fed by a shifted version of the first time frame. Other than that, the ATPG setup is similar to the launchon-capture-based test. 4.10.4 Transition ATPG Using Stuck-At Vectors For enhanced-scan testing, because both vectors must be stored in the test equipment memory, there is considerable redundancy in the information stored. Consider the test sequence shown in Table 4.15. In this test sequence, V2 and V3 are used several times. Ideally, it would be desirable to store only one copy of V2 and V3. However, storing only one copy of a vector would require the ATE to have the ability to index and reuse the vector in a random order; this functionality is currently unavailable. Limited reuse of the information stored, however, may be possible. Whenever two copies of the same vector are stored in consecutive locations in the tester memory, it may be possible to store only one copy and scan in the vector as many times as needed during consecutive scan cycles. Thus, with the running example, the sequence V1 V2∗ V3∗ V4 V3 V5 V1 V3 can be restored and the vectors marked with the asterisk ∗ are scanned in twice. Information about vectors that must be scanned in multiple times is stored in the control memory of the tester. In this example, only 8 out of 10 vectors have to be stored. In this running example, the tester memory requirement was reduced at a price. Because vectors that are scanned in repeatedly do not form a regular pattern, the control memory necessary to store the asterisks can be costly. To avoid such a cost TABLE 4.15 Example Test Sequence V1 V2 V2 V3 V3 V4 V3 V5 V1 V3 Test Generation 241 we can do the following: Apply each vector twice except for the first and the last vectors stored in the tester memory. Consider the sequence V1 V2 V3 V4 V1 V3 V5 . Because all but the first and the last vectors are applied twice, the set of transition test patterns we obtain would be V1 V2 , V2 V3 , V3 V4 , V4 V1 , V1 V3 , and V3 V5 . This set of patterns includes all the test patterns of Table 4.15, plus the additional V4 V1 . This example shows that 7 vectors (instead of 10 vectors) can be sufficient to apply all the needed transition tests. Such sequences where all but the first and the last vectors are applied twice are called transition test chains. 4.10.4.1 Transition Test Chains via Weighted Transition Graph Because transition faults and stuck-at faults are closely related, it may be possible to construct transition test sets directly from stuck-at test sets using the concept of transition test chains [Liu 2005]. A weighted transition graph algorithm is used to construct transition test chains from a given stuck-at test set. Rather than computing a set of vector pairs and chaining them together as alluded to in the above examples, the weighted transition graph algorithm maps the chains onto a graph traversal problem. The algorithm first builds a weighted directed graph called the weighted transition-pattern graph. In this graph, each node represents a vector in the stuck-at test set; a directed edge from node Vi to node Vj denotes the transition test pattern Vi Vj ; and its weight indicates the number of transition faults that can be detected by Vi Vj . This may potentially result in a complete graph, where a directed edge exists between every pair of vertices. In order to reduce the graph size, a subset of the transition faults that were not detected by the application of the original stuck-at test set may be considered instead of considering all transition faults. The graph construction procedure is described in Algorithm 16. For example, consider a circuit with five gates, 10 stuck-at faults, and a stuck-at test set consisting of 4 vectors V1, V2, V3, and V4. Let the excitation and detection dictionary obtained be as shown in Table 4.16. Assuming the test set order is V1 V2 V3 V4 , then only 3 of the 10 transition faults can be detected, namely c slow-to-fall, e slow-to-fall, and c slow-to-rise. However, using Table 4.16, the nonconsecutive vectors can be combined to detect additional transition faults: V1 V3 can detect a slow-to-fall; V3 V1 detects a slow-to-rise; V1 V4 detects d slow-tofall; V4 V2 detects d slow-to-rise; V4 V1 detects a slow-to-rise, b slow-to-fall; and V2 V4 detects b slow-to-rise, e slow-to-rise, and d slow-to-fall. The corresponding weighted transition graph is shown in Figure 4.54. The weighted transition graph has a nice property that allows for formulation of the following theorem. Theorem 1 Faults detected by pattern Vi Vj and pattern Vj Vk are mutually exclusive. Proof This is proved by contradiction. Without loss of generality, suppose a fault f slowto-fall is detected by Vi Vj . Thus, Vi must excite f s-a-0(sets line f to 1) and Vj must 242 VLSI Test Principles and Architectures Algorithm 16 WeightedTransitionGraphConstruction(T) Require: stuck-at test set T = T1 TN 1: Perform transition fault simulation using pairs of vectors ∈ T T1 T2 T2 T3 TN−1 TN ; 2: UT = the set of undetected transition faults; 3: US = ∅; 4: if transition fault X slow-to-rise (or slow-to-fall) ∈ UT then 5: US = US ∪ X/0 X/1 ; 6: end if 7: Perform stuck-at fault simulation without fault dropping using the stuck-at test set T on only the stuck-at faults in US. 8: for each stuck-at fault f ∈ US do 9: record the vectors in T that can excite f and the vectors that can detect f ; 10: end for 11: for each vector v ∈ T do 12: record the faults excited and detected by v; 13: end for 14: for all vector pairs Ti and Tj do 15: Insert a directed edge from Vi to Vj if test pattern Ti Tj detects at least one transition fault in UT ; 16: weight of inserted directed edge = number of transition faults detected by Ti Tj ; 17: end for TABLE 4.16 Fault Dictionary Without Fault Dropping Vectors V1 V2 V3 V4 Excited Faults a/0 b/1 c/1 d/0 e/0 b/1 c/0 d/0 e/1 a/1 c/1, a/1 b/0 d/1 e/0 Detected Faults a/0 b/1 c/0 d/0 e/1 a/1 c/1 b/0 d/1 e/0 V1 V2 V1 V2 11 2 31 1 1 1 V3 V4 (a) Original graph FIGURE 4.54 Weighted transition-pattern graph example. V3 V4 (b) Updated graph Test Generation 243 detect f s-a-1. If Vj Vk also detects the transition fault f slow-to-fall, the vector Vj must set line f to 1, which is a contradiction. A Eulerian trail in a graph is a path such that each edge in the graph is traversed exactly once. Using this concept, a Eulerian trail in the transition-pattern graph traverses all the (non-zero weight) edges in the graph exactly once. It is tempting to conclude such a Euler trail in the weighted transition is the best transition test chain. However, the Eulerian trail assumes that the edge weights in the graph are static. This may not be true in the case of selecting test patterns, in which some transition faults may be detectable by different patterns. For example, if edge Vi Vj is traversed (i.e., test Vi Vj is selected), then a number of transition faults would have been detected by this test pattern. This also means that the weights on other edges should be modified because some other test patterns may have detected similar faults as well. Some of the edge weights may even become zero. Based on Theorem 1, edges whose weights will not change are only those originating from Vj. Thus, after a directed edge Vi Vj is selected, all other directed edges that do not start at Vj must have their edge weights updated. This, however, would involve extensive fault simulation, which could be expensive. To reduce the cost of fault simulation, the edge weights could be updated periodically instead of after traversing each edge. A simple algorithm is outlined in Algorithm 17 where T is the transition test chain computed by the algorithm from the given stuck-at test set. The idea behind this algorithm is as follows: First identify a test sequence of length 3 that can cover the most faults by traversing the weighted transition pattern graph. For example, in the original weighted transition pattern graph shown in Figure 4.54a V2 V4 V1 is the maximal-weight test chain of length 3. After traversing this chain, five transition faults (a slow-to-rise, b slow-to-rise, b slow-to-fall, d slowto-fall, and e slow-to rise) are detected. The updated graph is shown in Figure 4.54b. It should be noted that in addition to removing the edges V2 V4 and V4 V1 , two other edges ( V1 V4 and V3 V1 ) are also removed from the graph. This is because Algorithm 17 TransitionTestGeneration Require: T = V1 Vn ; 1: G = WeightedTransitionGraphConstruction(T); 2: while transition FC < 100% AND number of iterations < N do 3: identify edge Vi Vj ∈ G with the largest weight; 4: append vectors Vi and Vj to test set T; 5: for all edges that start at Vj do 6: search for an edge Vj Vk with the largest weight; 7: end for 8: append vector Vk to test set T; 9: end while 10: return T ; 244 VLSI Test Principles and Architectures the fault d slow-to-fall, which can be detected by V1 V4 , has already been detected by selecting the test chain V2 V4 V1 . Therefore, the edge V1 V4 can be removed from the weighted pattern graph because it no longer contributes to the detection of other transition faults. Similar argument can be made for the edge V3 V1 . Finally, all the seven originally undetected faults in Table 4.16 are detected with the test chain V2 V4 V1 V3 V4 V2 . 4.10.5 Bridging Fault ATPG Recall that bridging faults are those faults that involve a short between two signals in the circuit. Given a circuit with n signals, there are potentially n × n−1 possible bridging faults. However, practically, only those signals that are locally close on the die are more likely to be bridged. Therefore, the total number of bridging faults can be reduced to be linear in the number of signals in the circuit. Consider two signals x and y in the circuit that are bridged. This bridging fault will not be excited unless different values are placed on x and y. Note that the actual voltage at x and y may be different due to the resistance value of the bridge. Subsequently, the logic that takes x as its input may interpret the logic value differently from the logic that takes y as its input. In order to reduce the complexity, five common bridging fault models are often used: AND bridge—The faulty value of the bridge for x and y is taken to be the logical AND of x and y in the original fault-free circuit. OR bridge—The faulty value of the bridge for x and y is taken to be the logical OR of x and y in the original fault-free circuit. x DOM y bridge—x dominates y; in other words, the faulty value of the bridge for both x and y is taken to be the logic value of x in the fault-free circuit. x DOM1 y bridge—x dominates y if x = 1; in other words, the faulty value of x is unaffected, but the faulty value for y is taken to be the logical OR of x and y in the fault-free circuit. x DOM0 y bridge—x dominates y if x = 0; in other words, the faulty value of x is unaffected, but the faulty value for y is taken to be the logical AND of x and y in the fault-free circuit. Figure 4.55 illustrates the faulty circuit models corresponding to each of these five bridge types. If there exists a path between x and y, then the bridging fault is said to be a feedback bridging fault. Otherwise, it is a non-feedback bridging fault. Figure 4.56 illustrates a feedback bridging fault. In this figure, if abc = 110, then in the fault-free circuit z = 0. If the bridge is an AND-bridge, then a cycle would result. In other words, a becomes 0 and in turn makes z = 1. And because a = 1 initially, it will again try to drive z = 0, resulting in an infinite loop around the bridge. For the following discussion, only nonfeedback bridging faults will be considered. Test Generation 245 AND-bridge OR-bridge x DOM y x DOM1 y x DOM0 y FIGURE 4.55 Bridging fault models. Fault-free circuit Faulty-circuit model x x′ x x′ y y′ y y′ x x′ x x′ y y′ y y′ x x′ x x′ y y′ y y′ x x′ x x′ y y′ y y′ x x′ x x′ y y′ y y′ Feedback bridge a b z c FIGURE 4.56 A feedback bridging fault. Testing for bridging faults is similar to a constrained stuck-at ATPG. In other words, when testing for the AND-bridge x y , either (1) x/0 has to be detected with y = 0 or (2) y/0 has to be detected with x = 0 [Williams 1973]. A conventional stuckat ATPG can be modified to handle the added constraint. Likewise, the ATPG can be modified for other bridging fault types. 246 VLSI Test Principles and Architectures 4.11 OTHER TOPICS IN TEST GENERATION 4.11.1 Test Set Compaction The vectors generated by any ATPG may include too many vectors. In other words, it may be possible to reduce the length of the test set without compromising on the fault coverage. Test compaction can be performed either statically or dynamically. Static compaction attempts to combine and remove certain vectors after the test set has been generated by an ATPG. Dynamic compaction, on the other hand, is integrated within the ATPG, in which the ATPG tries to generate vectors such that each vector detects as many faults as possible [Pomeranz 1991] [Rudnick 1999]. Obviously, static compaction can be performed even after dynamic compaction has been used. Static compaction for combinational test vectors involves the selection of the minimal number of vectors that can detect all faults. Essentially, it is based on a covering algorithm, in which a matrix is constructed where the rows denote the vectors, and the columns denote the faults. A 1 is placed in element i j of the matrix if vector i detects fault j. This matrix can be constructed by fault simulating the test set without fault dropping. Then, the compaction is set up as a covering problem with the following goal: Select a set of rows such that all columns (faults) are covered. For example, Table 4.17 shows such a matrix. In this example, vector v2 is unnecessary because the faults that it detects can be detected by other vectors in the test set. Furthermore, vector v4 is an essential vector, as it detects one or more faults that cannot be detected by any other vector. Another form of static compaction is also possible in which compatible vectors are identified in a test set made up of incompletely specified vectors. For instance, vectors 11X1 and X101 are compatible. These two vectors can thus be combined, and one vector is sufficient. Dynamic compaction, on the other hand, tries to intelligently fill in the “don’t care” bits in the vectors such that more undetected faults can be detected. For example, when targeting fault fi, the vector 1x10x may be sufficient. By filling the two “don’t care” bits in a clever manner, more faults could be detected. Compaction for sequential circuits is more involved, since removing a vector may not be permitted. Instead, any removal of a vector or sequence of vectors must be validated with a fault simulation to ensure that fault coverage is retained. TABLE 4.17 Combinational Test Compaction Matrix f1 f2 f3 f4 f5 f6 v1 X X X v2 XX v3 X X X v4 XXXX Test Generation 247 4.11.2 N-Detect ATPG In order to enhance the quality of a test set, one may wish to derive different test sets targeting different fault models as an attempt to capture potential defects that could arise. However, this requires multiple ATPG engines, each targeting a different fault model. While this may be theoretically possible, it may not be possible in practice. Instead, to increase the coverage of all possible defects, one may generate a test set that achieves multiple detections of every fault under a given fault model. A fault is detected multiple times if it is detected with different vectors. By exciting the fault and propagating the fault effect different ways, it is hoped that any defect locally close to the target fault will have an increased change of being detected [Franco 1995] [Chang 1998] [Dworak 2000]. For instance, detection of stuck-at fault a/0 with b = 1 will not have detected the AND-bridge fault between a and b. However, a different test that detects a/0 with b = 0 would have excited the bridge by setting a = 1 and b = 0. In an n-detect setup, each fault must be targeted multiple times by an ATPG. In other words, all vectors generated that could detect a target fault are marked, and a fault is removed from further consideration when it has been detected n times. It has been shown that the size of an n-detect test set grows approximately linearly with respect to n [Reddy 1997]. 4.11.3 ATPG for Acyclic Sequential Circuits An acyclic sequential circuit is a circuit whose S-graph has no cycles. In such circuits, the sequential circuit may be transformed into a combinational circuit by unrolling the sequential circuit k time frames, where k is the sequential depth of the design [Kim 2001]. With the unrolled circuit, the circuit is inherently combinational and sequential ATPG is no longer needed. However, a fault in the original design may become a multiple stuck-at fault in the unrolled circuit, and the combinational ATPG must handle the multiple fault in order to detect the corresponding fault in the original sequential circuit. Several classes of acyclic circuits are studied in [Kim 2001], and different approaches to handling the test generation problem are reported. 4.11.4 IDDQ Testing Unlike the test generation methods discussed thus far, which are focused on driving specific voltage values to circuit nodes and observing the voltage levels at the observable points such as the primary outputs, IDDQ testing targets the current drawn in the fabricated chips. Given a good chip, an expected current can be measured for a small set of input vectors. On defective chips, the currents drawn may differ drastically. For example, consider a circuit with a p-transistor of an inverter that is always on. Then, whenever the n-transistor of the inverter is switched on, a power-to-ground short is created, and the measured current could surge. Measuring the current is much slower than measuring the voltage, thus much fewer vectors can be considered. Further, the noise in current measurement must also be dealt with to ensure the quality of the test application. 248 VLSI Test Principles and Architectures 4.11.5 Designing a High-Level ATPG Because of the exponentially complex nature of ATPG, its performance can be severely limited to the size of the circuit. As a result, conventional gate-level ATPG may produce unsatisfactory results for large circuit sizes. On the other hand, higher level ATPGs have the advantages of fewer circuit primitives and easier access to circuit functional information that may enhance the ATPG effort. The circuit is first given in a high-level description such as VHDL, Verilog, or SystemC. Then, the design is read in and an intermediate representation is constructed. Similar to gate-level ATPGs, the representation allows the high-level ATPG to traverse through the circuit and make decisions on the search. However, because the signals may not be Boolean, value justification and fault-effect propagation must work on the integer level. Backtracking mechanisms also have to be modified. An alternative to testing the design at the high level structurally is testing the design with its finite state machine (FSM) as the circuit description. FSM-based testing relies on the traversal of states and transitions in the FSM description. Given a state diagram or flow-table of the FSM, any fault in the design will map to an error in the FSM, where the error could be a wrong transition, a wrong output, etc. Based on the FSM, sequences of vectors can be generated to traverse the state diagram. With an initializing sequence, the FSM can be driven to a know state. Transfer sequences are used to traverse the FSM. In addition, a distinguishing sequence is used to ensure that the circuit has indeed arrived at the desired state. Each state transition Si → Sj in the FSM is targeted one at a time in the following steps: Step 1—Go to state Si from the current state. Step 2—Apply the input vector that takes the circuit from Si to Sj. Step 3—Apply the distinguishing sequence to check if the circuit is indeed in state Sj. Note that after the application of the distinguishing sequence the circuit may no longer be in state Sj. While this approach is simple, it may not be scalable when the FSM is enormous. Furthermore, the test set generated by traversing the FSM may be very large. Some success has been reported on some high-level ATPGs, where new value logic has been proposed. Nevertheless, high-level ATPGs remain an area of research in the days to come. 4.12 CONCLUDING REMARKS This chapter describes in detail the underlying theory and implementation of an ATPG engine. It starts out with random TPG, followed by deterministic ATPG for combinational circuits, where branch-and-bound search is used. Several algorithms are laid out with specific examples given. Next, sequential ATPG is discussed where a combinational ATPG is extended to a 9-valued logic. Untestable fault identification is covered in detail where static logic implications are aggressively applied to help quickly identify untestable faults. Simulation-based ATPG is explained with particular emphasis on genetic-algorithm-based approaches. ATPG for non-stuck-at Test Generation 249 faults is also covered, with emphasis on those fault models that address delay defects, such as the path-delay fault and the transition fault. Finally, additional topics are briefly addressed that relate to the topic of test generation. 4.13 EXERCISES 4.1 (Random Test Generation) Given a circuit with three primary outputs, x y, and z, the fanin cone of x is a b c , the fanin cone of y is c d e f , and the fanin cone of z is e f g . Devise a pseudo-exhaustive test set for this circuit. Is this test set the minimal pseudo-exhaustive test set? 4.2 (Random Test Generation) Using the circuit shown in Figure 4.10, compute the detection probabilities for each of the following faults: a. e/0 b. e/1 c. c/0 4.3 (Boolean Difference) Using the circuit shown in Figure 4.10, compute the set of all vectors that can detect each of the following faults using Boolean difference: a. e/0 b. e/1 c. c/0 4.4 (Boolean Difference) Using the circuit shown in Figure 4.16, compute the set of all vectors that can detect each of the following faults using Boolean difference: a. a/1 b. d/1 c. g/1 4.5 (Boolean Difference) Using the circuit shown in Figure 4.35, compute the set of all vectors that can detect each of the following faults using Boolean difference: a. a/1 b. b1/1 c. e/0 d. e2/1 250 VLSI Test Principles and Architectures 4.6 (Boolean Difference) Assume a single-output combinational circuit, where the output is denoted as f . If two faults, and , are indistinguishable, it means that there does not exist a vector that can detect only one and not the other. Show that f ⊕ f = 0 if they are indistinguishable. 4.7 (D Algorithm) Construct the table for the XNOR operation for the 5-valued logic similar to Tables 4.1, 4.2, and 4.3. 4.8 (D Algorithm) Using the circuit shown in Figure 4.35, use the D algorithm to compute a vector for the fault b/1. Repeat for the fault e/0. 4.9 (D Algorithm) Consider a three-input AND gate g. Suppose g ∈ D-frontier. What are all the possible value combinations the three inputs of g can take such that g is a valid D-frontier? 4.10 (PODEM) Repeat Problem 4.8 using PODEM instead of the D algorithm. 4.11 (PODEM) Using the circuit shown in Figure 4.22, compute the vector that can detect the fault f/0. Note that even though the circuit is sequential it can be viewed as a combinational circuit because the D flip-flop does not have an explicit feedback. 4.12 (Static Implications) Using the circuit shown in Figure 4.22 and given the fact that the implications of f = 1 are shown in Figure 4.25, how could you use this information as multiple objectives to speed up the test generation for the fault f/0? 4.13 (Static Implications) Construct the static implication graph for the circuit shown in Figure 4.57 with only indirect implications. Based on the implication graph: a. What are all the implications for g = 0? b. What are all the implications for f = 0? a d b e c FIGURE 4.57 Example circuit. f h g Test Generation 251 4.14 (Static Implications) Construct the static implication graph for the circuit shown in Figure 4.58 by considering: a. Only direct implications b. Direct and indirect implications, including those obtained by the contra- positive law a e c b d f FIGURE 4.58 Example circuit. g z 4.15 (Dynamic Implications) Consider the circuit shown in Figure 4.58. Suppose justifying e = 1 via a = 0 is not possible due to some prespecified constraints. Perform all dynamic implications for all signals based on the knowledge of this constraint. 4.16 (Dynamic Implications) Prove that two faults, f and g, in a combinational circuit with the same E-frontier that has at least one D or D, can be propagated to a primary output the same way. 4.17 (Untestable Fault Identification) Consider the circuit shown in Figure 4.58. a. Compute the static logic implications of b = 0. b. Compute the static logic implications of b = 1. c. Compute the set of faults that are untestable when b = 0. d. Compute the set of faults that are untestable when b = 1. e. Compute the set of untestable faults based on the stem analysis of b. 4.18 (PODEM) Consider the circuit shown in Figure 4.58, and use PODEM to generate a vector for each of the following faults: a. c/0 b. c/1 c. d/0 d. d/1 252 VLSI Test Principles and Architectures 4.19 (Untestable Fault Identification) Consider the circuit shown in Figure 4.59. a d b e c FIGURE 4.59 Example circuit. f h g i j z k a. Compute the static logic implications of b = 0. b. Compute the static logic implications of b = 1. c. Compute the set of faults that are untestable when b = 0. d. Compute the set of faults that are untestable when b = 1. e. Compute the set of untestable faults based on the stem analysis of b. 4.20 (PODEM) Consider the circuit shown in Figure 4.59, and use PODEM to generate a vector for each of the following faults: a. k/1 b. k/0 c. g/1 d. g/0 4.21 (Untestable Fault Identification) Prove that any fault that is combinationally untestable is also sequentially untestable. 4.22 (FAN) Consider the circuit shown in Figure 4.19. Suppose the constraint that y = 1 → x = 0 is given. How could one use this knowledge to reduce the search space when trying to generate vectors in the circuit? For example, suppose the target fault is y/0. 4.23 (Sequential ATPG) Consider the circuit shown in Figure 4.60. The target fault is a/0. a. Generate a test sequence for the target fault using only 5-valued logic. b. Generate a test sequence for the target fault using 9-valued logic. Test Generation 253 a DQ z FIGURE 4.60 Example sequential circuit. 4.24 (Sequential ATPG) Given a sequential circuit, is it possible that two stuck-at faults, a/0 and a/1, are both detected by the same vector vi in a test sequence v0 v1 vk? 4.25 (Sequential ATPG) Consider the sequential circuit shown in Figure 4.61. If the initial state is de = 00, what is the set of reachable states? Draw the corresponding state diagram for the finite state machine. a f g b i j h c d DQ e DQ FIGURE 4.61 Example sequential circuit. 4.26 (Sequential ATPG) Consider an iterative logic array (ILA) expansion of a sequential circuit, where the initial pseudo primary inputs are fully controllable. Show that the states reachable in successive time frames of the ILA shrink monotonically. 4.27 (Simulation-Based ATPG) Design a simple genetic-algorithm based ATPG for combinational circuits. Design the fitness to be the number of faults detected. Adjust the GA parameters to observe the effectiveness of the test generator. 254 VLSI Test Principles and Architectures 4.28 (Simulation-Based ATPG) Design a simple genetic-algorithm-based ATPG for sequential circuits, where an individual is a concatenation of several vectors. Design the fitness to be the number of faults detected. Adjust the GA parameters to observe the effectiveness of the test generator. 4.29 (Advanced Simulation-Based ATPG) Illustrate an example where a sequence that is able to propagate a fault-effect from a flip-flop FFi to a primary output for fault f1 cannot propagate a fault effect at the same flip-flop FFi for a different fault fj. 4.30 (Hybrid ATPG) Consider a fault f that is aborted by both deterministic and simulation-based test generators. a. What characteristics can be said for f considering that it is aborted by a deterministic ATPG? b. What characteristics can be said for f considering that it is aborted by a simulation-based ATPG? c. Suppose a hybrid ATPG detects f ; what synergy is explored to detect f ? 4.31 (Path-Delay ATPG) Consider the circuit fragment shown in Figure 4.62. i j a g b f e c h d FIGURE 4.62 Example circuit. a. Generate all paths in this circuit. How many paths are there in this circuit? b. Which paths are functionally unsensitizable? c. For those sensitizable paths, which ones are robustly testable, and which ones are nonrobustly testable? 4.32 (Path-Delay ATPG) Given a combinational circuit with the knowledge of the implication a = 1 → b = 1. How can this knowledge be used to deduce certain paths are unsensitizable? Test Generation 255 4.33 (Path-Delay ATPG) Construct the table for the XNOR operation for the 5-valued system similar to Tables 4.12, 4.13, and 4.14. 4.34 (Path-Delay ATPG) Consider a full-scan circuit. Discuss how incidental detection of a sequentially untestable path-delay fault in the full-scan mode can lead to yield loss. 4.35 (Transition Test Chains) Consider the dictionary of excited and detected stuck-at faults of a test set shown in Table 4.18. Construct the smallest set of vectors that can detect as many transition faults as possible using only these seven stuck-at vectors. TABLE 4.18 Fault Dictionary Without Fault Dropping Vectors V1 V2 V3 V4 V5 V6 V7 Excited Faults a/0 b/0 c/0 d/0 c/0 f/0 g/0 h/0 d/0 e/0 h/0 i/0 a/0 b/0 g/0 i/0 c/0 d/0 g/0 d/0 e/0 i/0 b/0 g/0 Detected Faults e/1 f/1 e/1 f/1 a/1 b/1 c/1 f/1 g/1 d/1 e/1 f/1 a/1 d/1 h/1 i/1 a/1 b/1 c/1 f/1 g/1 e/1 i/1 4.36 (Bridging Faults) Consider a bridging fault between the outputs of an AND gate x = ab and an OR gate y = c + d. What values to abcd would induce the largest current in the bridge? 4.37 (A Design Practice) Use the pseudo-random pattern generator and the ATPG program provided online to generate test sets for a number of combinational benchmark circuits. Compare and contrast the execution time and fault coverage obtained by the random TPG and the ATPG. What benefits does each have? 4.38 (A Design Practice) Repeat Problem 4.37 for sequential benchmark circuits. 4.39 (A Design Practice) Use the pseudo-random pattern generator provided online to generate test sets for a number of combinational benchmark circuits. Then, use the ATPG program also provided online to generate test vectors only for those undetected faults by the random vectors. Compare and contrast the execution time and fault coverage obtained by such a combined random and deterministic approach. 4.40 (A Design Practice) Repeat Problem 4.39 for sequential benchmark circuits. 256 VLSI Test Principles and Architectures References R4.1—Introduction [Abramovici 1994] M. Abramovici, M. A. Breuer, and A. D. Friedman, Digital Systems Testing and Testable Design, IEEE Press, Piscataway, NJ, 1994. [Bushnell 2000] M. L. Bushnell and V. D. Agrawal, Essentials of Electronic Testing for Digital, Memory, and Mixed-Signal VLSI Circuits, Springer, New York, 2000. [Holland 1975] J. H. Holland, Adaptation in Natural and Artificial Systems, University of Michigan Press, Ann Arbor, MI, 1975. [Jha 2003] N. Jha and S. Gupta, Testing of Digital Systems, Cambridge University Press, Cambridge, U.K., 2003. R4.2—Random Test Generation [David 1976] R. David and G. Blanchet, About random fault detection of combinational networks, IEEE Trans. Comput., C-25(6), 659–664, 1976. [Shedletsky 1977] J. J. Shedletsky, Random testing: practicality vs. verified effectiveness, in Proc. Int. Conf on Fault-Tolerant Computing, June 1977, pp. 175–179. R4.4—Designing a Stuck-At ATPG for Combinational Circuits [Akers 1976] S. B. Akers, A logic system for fault test generation, IEEE Trans. Comput., C-25(6), 620–630, 1976. [Amyeen 1999] M. E. Amyeen, W. K. Fuchs, I. Pomeranz, and V. Boppana, Implications and evaluation techniques for proving fault equivalence, in Proc. IEEE VLSI Test Symp., April 1999, pp. 201–207. [Arora 2004] R. Arora and M. S. Hsiao, Enhancing SAT-based bounded model checking using sequential logic implications, in Proc. IEEE Int. Conf on VLSI Design, January 2004, pp. 784–787. [El-Maleh 1998] A. El-Maleh, M. Kassab, and J. Rajski, A fast sequential learning technique for real circuits with application to enhancing ATPG performance, in Proc. Design Automation Conf., June 1998, pp. 625–631. [Fujiwara 1983] H. Fujiwara and T. Shimono, On the acceleration of test generation algorithms, IEEE Trans. Comput., C-32(12), 1137–1144, 1983. [Giraldi 1990] J. Giraldi and M. L. Bushnell, EST: the new frontier in automatic test pattern generation, in Proc. Design Automation Conf., June 1990, pp. 667–672. [Goel 1981] P. Goel, An implicit enumeration algorithm to generate tests for combinational logic circuits, IEEE Trans. Comput., C-30(3), 215–222, 1981. [Hamzaoglu 1999] I. Hamzaoglu and J. H. Patel, New techniques for deterministic test pattern generation, J. Electron. Testing: Theory Appl., 15(1–2), 63–73, 1999. [Hsiao 2002] M. S. Hsiao, Maximizing impossibilities for untestable fault identification, in Proc. IEEE Design, Automation, and Test in Europe Conf., March 2002, pp. 949–953. [Ichihara 1997] H. Ichihara and K. Kinoshita, On acceleration of logic circuits optimization using implication relations, in Proc. Asian Test Symp., November 1997, pp. 222–227. Test Generation 257 [Iyer 1996a] M. A. Iyer and M. Abramovici, FIRE: a fault independent combinational redundancy algorithm, IEEE Trans. VLSI Syst., 4(2), 295–301, 1996. [Iyer 1996b] M. A. Iyer, D. E. Long, and M. Abramovici, Identifying sequential redundancies without search, in Proc. of Design Automation Conf., June 1996, pp. 457–462. [Kajihara 2004] S. Kajihara, K. K. Saluja, and S. M. Reddy, Enhanced 3-valued logic/fault simulation for full scan circuits using implicit logic values, in Proc. IEEE European Test Symp., May 2004, pp. 108–113. [Kunz 1993] W. Kunz and D. K. Pradhan, Accelerated dynamic learning for test pattern generation in combinational circuits, IEEE Trans. Comput.-Aided Des., 12(5), 684–694, 1993. [Kunz 1994] W. Kunz and D. K. Pradhan, Recursive learning: a new implication technique for efficient solutions to CAD problems—test, verification, and optimization, IEEE Trans. Comput.-Aided Des., 13(9), 1149–1158, 1994. [Kunz 1997] W. Kunz, D. Stoffel, and P. R. Menon, Logic optimization and equivalence checking by implication analysis, IEEE Trans. Comput.-Aided Des., 16(3), 266–281, 1997. [Marques-Silva 1999a] J. Marques-Silva and T. Glass, Combinational equivalence checking using satisfiability and recursive learning, in Proc. Design, Automation, and Test in Europe Conf., 145–149, 1999. [Marques-Silva 1999b] J. P. Marques-Silva and K. A. Sakallah, GRASP: a search algorithm for propositional satisfiability, IEEE Trans. Comput., 48(5), 506–521, 1999. [Paul 2000] D. Paul, M. Chatterjee, and D. K. Pradhan, VERILAT: verification using logic augmentation and transformations, IEEE Trans. Comput.-Aided Des., 19(9), 1041–1051, 2000. [Peng 2000] Q. Peng, M. Abramovici, and J. Savir, MUST: multiple-stem analysis for identifying sequentially untestable faults, in Proc. IEEE Int. Test Conf., October 2000, pp. 839–846. [Rajski 1990] J. Rajski and H. Kox, A method to calculate necessary assignments in ATPG, in Proc. IEEE Int. Test Conf., October 1990, pp. 25–34. [Roth 1966] J. P. Roth, Diagnosis of automata failures: a calculus and a method, IBM J. R&D, 10(4), 278–291, 1966. [Roth 1967] J. P. Roth, W. G. Bouricius, and P. R. Schneider, Programmed algorithms to compute tests to detect and distinguish between failures in logic circuits, IEEE Trans. Electron. Comput., EC-16(10), 567–579, 1967. [Schulz 1988] M. H. Schulz, E. Trischler, and T. M. Sarfert, SOCRATES: a highly efficient automatic test pattern generation system, IEEE Trans. Comput.-Aided Des., 7(1), 126–137, 1988. [Schulz 1989] M. H. Schulz and E. Auth, Improved deterministic test pattern generation with applications to redundancy identification, IEEE Trans. Comput.-Aided Des., 8(7), 811–816, 1989. [Syal 2004] M. Syal and M. S. Hsiao, Untestable fault identification using recurrence relations and impossible value assignments, in Proc. IEEE Int. Conf. on VLSI Design, January 2004, pp. 481–486. [Tafertshofer 2000] P. Tafertshofer, A. Ganz, and K. J. Antreich, IGRAINE: an implication graph-based engine for fast implication, justification, and propagation, IEEE Trans. Comput.-Aided Des., 19(8), 907–927, 2000. 258 VLSI Test Principles and Architectures [Zhao 2001] J. Zhao, J. A. Newquist, and J. H. Patel, A graph traversal based framework for sequential logic implication with an application to C-cycle redundancy identification, in Proc. IEEE Int. Conf. on VLSI Design, January 2001, pp. 163–169. R4.5—Designing a Sequential ATPG [Kirkland 1987] T. Kirkland and M. R. Mercer, A topological search algorithm for ATPG, in Proc. IEEE Design Automation Conf., June 1987, pp. 502–508. [Muth 1976] P. Muth, A nine-valued circuit model for test generation, IEEE Trans. Comput., C-25(6), 630–636, 1976. [Niermann 1991] T. M. Niermann and J. H. Patel, HITEC: a test generation package for sequential circuits, in Proc. European Design Automation Conf., February 1991, pp. 214–218. [Wang 2003] L.-T. Wang, K.S. Abdel-Hafez, X. Wen, B. Sheu, and S.-M. Wang, Smart ATPG (Automatic Test Pattern Generation) for Scan-Based Integrated Circuits, U.S. Patent Application No. 20050262.409, May 23, 2003 (allowed May 2, 2006). R4.6—Untestable Fault Identification [Agrawal 1995] V. D. Agrawal and S. T. Chakradhar, Combinational ATPG theorems for identifying untestable faults in sequential circuits, IEEE Trans. Comput.-Aided Des., 14(9), 1155–1160, 1995. [Cheng 1993] K. T. Cheng, Redundancy removal for sequential circuits without reset states, IEEE Trans. CAD, 12(1), 13–24, 1993. [Friedman 1967] A. D. Friedman, Fault detection in redundant circuits, IEEE Trans. Electron. Comput., EC-16, 99–100, 1967. [Hsiao 2002] M. S. Hsiao, Maximizing impossibilities for untestable faul1 identification, in Proc. Design, Automation, and Test in Europe Conf., March 2002, pp. 949–953. [Iyer 1996a] M. A. Iyer and M. Abramovici, FIRE: a fault independent combinational redundancy algorithm, IEEE Trans. VLSI Syst., 4(2), 295–301, 1996. [Iyer 1996b] M. A. Iyer, D. E. Long, and M. Abramovici, Identifying sequential redundancies without search, in Proc. IEEE Design Automation Conf., June 1996, pp. 457–462. [Long 2000] D. E. Long, M. A. Iyer, and M. Abramovici, FILL and FUNI: algorithms to identify illegal states and sequentially untestable faults, ACM Trans. Des. Automat. Electron. Syst., 5(3), 631–657, 2000. [Peng 2000] Q. Peng, M. Abramovici, and J. Savir, MUST: multiple-stem analysis for identifying sequentially untestable faults, in Proc. IEEE Int. Test Conf., October 2000, pp. 839–846. [Reddy 1999] S. M. Reddy, I. Pomeranz, X. Lim, and N. Z. Basturkmen, New procedures for identifying undetectable and redundant faults in synchronous sequential circuits, in Proc. IEEE VLSI Test Symp., April 1999, pp. 275–281. [Syal 2003] M. Syal and M. S. Hsiao, A novel, low-cost algorithm for sequentially untestable fault identification, in Proc. IEEE Design, Automation, and Test in Europe Conf., March 2003, pp. 316–321. [Syal 2004] M. Syal and M. S. Hsiao, Untestable fault identification using recurrence relations and impossible value assignments, in Proc. IEEE Int. Conf. on VLSI Design, January 2004, pp. 481–486. Test Generation 259 R4.7—Designing a Simulation-Based ATPG [Agrawal 1989] V. D. Agrawal, K. T. Cheng, and P. Agrawal, A directed search method for test generation using a concurrent simulator, IEEE Trans. Comput.-Aided Des., 8(2), 131–138, 1989. [Breuer 1971] M. A. Breuer, A random and an algorithmic technique for fault detection test generation for sequential circuits, IEEE Trans. Comput., 20(11), 1364–1370, 1971. [Holland 1975] J. H. Holland, Adaptation in Natural and Artificial Systems, University of Michigan Press, Ann Arbor, MI, 1975. [Lisanke 1987] R. Lisanke, F. Brglez, A. J. Degeus, and D. Gregory, Testability-driven random test-pattern generation, IEEE Trans. Comput.-Aided Des., 6(6), 1082–1087, 1987. [Niermann 1992] T. M. Niermann, W.-T. Cheng, and J. H. Patel, PROOFS: A Fast, MemoryEfficient Sequential Circuit Fault Simulator, IEEE Trans. Comput.-Aided Des., 11(2), 198–207, February 1992. [Pomeranz 1997] I. Pomeranz and S. M. Reddy, On improving genetic optimization based test generation, in Proc. European Design and Test Conf., February 1997, pp. 506–511. [Prinetto 1994] P. Prinetto, M. Rebaudengo, and M. Sonza Reorda, An automatic test pattern generator for large sequential circuits based on genetic algorithms, in Proc. IEEE Int. Test Conf., October 1994, pp. 240–249. [Rudnick 1994a] E. M. Rudnick, J. G. Holm, D. G. Saab, and J. H. Patel, Application of simple genetic algorithms to sequential circuit test generation, in Proc. European Design and Test Conf., February 1994, pp. 40–45. [Rudnick 1994b] E. M. Rudnick, J. H. Patel, G. S. Greenstein, and T. M. Niermann, Sequential circuit test generation in a genetic algorithm framework, in Proc. Design Automation Conf., June 1994, pp. 698–704. [Saab 1992] D. G. Saab, Y. G. Saab, and J. A. Abraham, CRIS: a test cultivation program for sequential VLSI circuits, in Proc. IEEE Int. Conf. on Comput.-Aided Des., November 1992, pp. 216–219. [Schnurmann 1975] H. D. Schnurmann, E. Lindbloom, and R. G. Carpenter, The weighted random test-pattern generator, IEEE Trans. Comput., 24(7), 695–700, 1975. [Seshu 1962] S. Seshu and D. N. Freeman, The diagnosis of synchronous sequential switching systems, IEEE Trans. Electron. Comput., 11, 459–465, 1962. [Snethen 1977] T. J. Snethen, Simulator-oriented fault test generator, in Proc. IEEE Design Automation Conf., June 1977, pp. 88–93. [Srinivas 1993] M. Srinivas and L. M. Patnaik, A simulation-based test generation scheme using genetic algorithms, in Proc. IEEE Int. Conf. on VLSI Design, January 1993, pp. 132–135. [Wunderlich 1990] H.-J. Wunderlich, Multiple distributions for biased random test patterns, IEEE Trans. Comput.-Aided Des., 9(6), 584–593, 1990. R4.8—Advanced Simulation-Based ATPG [Giani 2001] A. Giani, S. Sheng, M. S. Hsiao, and V. Agrawal, Efficient spectral techniques for sequential ATPG, in Proc. IEEE Design, Automation, and Test in Europe Conf., March 2001, pp. 204–208. 260 VLSI Test Principles and Architectures [Guo 1999] R. Guo, S. M. Reddy, and I. Pomeranz, Proptest: a property based test pattern generator for sequential circuits using test compaction, in Proc. Design Automation Conf., June 1999, pp. 653–659. [Hsiao 1996a] M. S. Hsiao, E. M. Rudnick, and J. H. Patel, Automatic test generation using genetically engineered distinguishing sequences, in Proc. IEEE VLSI Test Symp., April 1996, pp. 216–223. [Hsiao 1997] M. S. Hsiao, E. M. Rudnick, and J. H. Patel, Sequential circuit test generation using dynamic state traversal, in Proc. European Design and Test Conf., February 1997, pp. 22–28. [Hsiao 1998] M. S. Hsiao, E. M. Rudnick, and J. H. Patel, Application of genetically engineered finite-state-machine sequences to sequential circuit ATPG, IEEE Trans. Comput.Aided Des., 17(3), 239–254, 1998. [Hsiao 2000] M. S. Hsiao, E. M. Rudnick, and J. H. Patel, Dynamic state traversal for sequential circuit test generation, ACM Trans. Des. Automat. Electron. Sys., 5(3), 548–565, 2000. [Hsiao 2001] M. S. Hsiao and J. Jain, Practical use of sequential ATPG for model checking: going the extra mile does pay off, in Proc. Int. Workshop on High Level Design Validation and Test, November 2001, pp. 39–44. [Park 1995] J. Park, C. Oh, and M. R. Mercer, Improved sequential ATPG based on functional observation information and new justification methods, in Proc. European Design and Test Conf., February 1995, pp. 262–266. [Pomeranz 1995] 1. Pomeranz and S. M. Reddy, LOCSTEP: a logic simulation based test generation procedure, in Proc. Fault Tolerant Computing Symp., June 1995, pp. 110–119. [Rudnick 1995] E. M. Rudnick and J. H. Patel, Combining deterministic and genetic approaches for sequential circuit test generation, in Proc. IEEE Design Automation Conf., June 1995, pp. 183–188. [Sheng 2002] S. Sheng, K. Takayama, and M. S. Hsiao, Effective safety property checking based on simulation-based ATPG, in Proc. IEEE Design Automation Conf., June 2002, pp. 813–818. [Sheng 2002b] S. Sheng and M. S. Hsiao, Efficient sequential test generation based on logic simulation, IEEE Des. Test Comput., 19(5), 56–64, 2002. [Wu 2004] Q. WU and M. S. Hsiao, Efficient ATPG for design validation based on partitioned state exploration histories, in Proc. IEEE VLSI Test Symp., April 2004, pp. 389–394. R4.9—Hybrid Deterministic and Simulation-Based ATPG [Hsiao 1996b] M. S. Hsiao, E. M. Rudnick, and J. H. Patel, Alternating strategies for sequential circuit ATPG, in Proc. European Design and Test Conf., February 1996, pp. 368–374. [Niermann 1991] T. M. Niermann and J. H. Patel, HITEC: a test generation package for sequential circuits, in Proc. European Design Automation Conf., February 1991, pp. 214–218. [Rudnick 1994] E. M. Rudnick, J. G. Holm, D. G. Saab, and J. H. Patel, Application of simple genetic algorithms to sequential circuit test generation, in Proc. European Design and Test Conf., February 1994, pp. 40–45. [Rudnick 1995] E. M. Rudnick and J. H. Patel, Combining deterministic and genetic approaches for sequential circuit test generation, in Proc. Design Automation Conf., June 1995, pp. 183–188. Test Generation 261 [Saab 1994] D. G. Saab, Y. G. Saab, and J. A. Abraham, Iterative [simulation-based genetics + deterministic techniques] = complete ATPG, in Proc. IEEE Int. Conf. on Comput.-Aided Des., November 1994, pp. 40–43. R4.10—ATPG for Non-Stuck-At Faults [Bhawmik 1997] S. Bhawmik, Method and Apparatus for Built-In Self-Test with Multiple Clock Circuits, U.S. Patent No. 5,680,543, 1997. [Cheng 1993] K. T. Cheng, S. Devadas, and K. Keutzer, Delay-fault test generation and synthesis for testability under a standard scan design methodology, IEEE Trans. Comput.-Aided Des., 12(8), 1217–1231, 1993. [Dervisoglu 1991] B. Dervisoglu and G. Stong, Design for testability: using scanpath techniques for path-delay test and measurement, in Proc. IEEE Int. Test Conf., October 1991, pp. 365–374. [Devadas 1993] S. Devadas, K. Keutzer, and S. Malik, Computation of floating mode delay in combinational circuits: theory and algorithms, IEEE Trans. Comput.-Aided Des., 12(12), 1913–1923, 1993. [Fuchs 1994] K. Fuchs, M. Pabst, and T. Rossel, RESIST: a recursive test pattern generation algorithm for path delay faults considering various test classes, IEEE Trans. Comput.Aided Des., 13(12), 1550–1562, 1994. [Gupta 2004) P. Gupta and M. S. Hsiao, ALAPTF: a new transition fault mode l and the ATPG algorithm, in Proc. IEEE Int. Test Conf., October 2004, pp. 1053–1060. [Heragu 1996] K. Heragu, J. H. Patel, and V. D. Agrawal, Segment delay faults: a new fault model, in Proc. IEEE VLSI Test Symp., April 1996, pp. 32–39. [Hsu 2001] F. F. Hsu, K. M. Butler, and J. H. Patel, A case study of the Illinois scan architecture, in Proc. IEEE Int. Test Conf., October 2001, pp. 538–547. [Levendel 1986] Y. Levendel and P. Menon, Transition faults in combinational circuits: input transition test generation and fault simulation, in Proc. Fault Tolerant Computing Symp., July 1986, pp. 278–283. [Lin 1987] C. J. Lin and S. M. Reddy, On delay fault testing in logic circuits, IEEE Trans. Comput.-Aided Des., 6(5), 694–703, 1987. [Liu 2005] X. Liu, M. S. Hsiao, S. Chakravarty, and P. J. Thadikaran, Efficient techniques for transition testing, ACM Trans. Des. Automat. Electron. Syst., 10(2), 258–278, 2005. [Savir 1993] J. Savir and S. Patil, Scan-based transition test, IEEE Trans. Comput.-Aided Des., 12(8), 1232–1241, 1993. [Savir 1994] J. Savir and S. Patil, On broad-side delay test, in Proc. IEEE VLSI Test Symp., April 1994, pp. 284–290. [Smith 1985] G. L. Smith, Model for delay faults based upon paths, in Proc. IEEE Int. Test Conf., October 1985, pp. 342–349. [Tendulkar 2002] N. Tendulkar, R. Raina, R. Woltenburg, X. Lin, B. Swanson, and G. Aldrich, Novel techniques for achieving high at-speed transition fault coverage for Motorola’s microprocessors based on PowerPC instruction set architecture, in Proc. IEEE VLSI Test Symp., April 2002, pp. 3–8. [Waicukauski 1987] J. A. Waicukauski, E. Lindbloom, B. K. Rosen, and V. S. Iyengar, Transition fault simulation, IEEE Des. Test Comput., 4, 32–38, 1987. [Wang 2002] L.-T. Wang, P.-C. Hsu, S.-C. Kao, M.-C. Lin, H.-P. Wang, H.-J. Chao, and X. Wen, Multiple-Capture DFT System for Detecting or Locating Crossing Clock-Domain Faults 262 VLSI Test Principles and Architectures During Self-Test or Scan-Test, U.S. Patent Application No. 20,020,120,896, August 29, 2002. [Williams 1973] M. J. Y. Williams and J. B. Angel, Enhancing testability of large-scale integrated circuits via test points and additional logic, IEEE Trans. Comput., C-22(1), 46–60, 1973. R4.11—Other Topics in Test Generation [Chang 1998] J. T.-Y. Chang, C.-W. Tseng, C.-M. J. Li, M. Purtell, and E. J. McCluskey, Analysis of pattern-dependent and timing-dependent failures in an experimental test chip, in Proc. IEEE Int. Test Conf., October 1998, pp. 184–193. [Dworak 2000] J. Dworak, M. R. Grimaila, S. Lee, L.-C. Wang, and M. R. Mercer, Enhanced DO-RE-ME based defect level prediction using defect site aggregation-MPG-D, in Proc. IEEE Int. Test Conf., October 2000, pp. 930–939. [Franco 1995] S. C. Ma, P. Franco, and E. J. McCluskey, An experimental chip to evaluate test technique experiment results, in Proc. IEEE Int. Test Conf., October 1995, pp. 663–672. [Kim 2001] Y. C. Kim, V. D. Agrawal, and K. K. Saluja, Combinational test generation for various classes of acyclic sequential circuits, Proc. IEEE Int. Test Conf., October 2001, pp. 1078–1087. [Pomeranz 1991] I. Pomeranz, L. N. Reddy, and S. M. Reddy, COMPACTEST: a method to generate compact test sets for combinatorial circuits, Proc. IEEE Int. Test Conf., October 1991, pp. 194–203. [Reddy 1997] S. M. Reddy, I. Pomeranz, and S. Kajihara, Compact test sets for high defect coverage, IEEE Trans. Comput.-Aided Des., 16(8), 923–930, 1997. [Rudnick 1999] E. M. Rudnick and J. H. Patel, Efficient techniques for dynamic test sequence compaction, IEEE Trans. Comput.-Aided Des., 48(3), 323–330, 1999. CHAPTER 5 LOGIC BUILT-IN SELF-TEST Laung-Terng (L.-T.) Wang SynTest Technologies, Inc., Sunnyvale, California ABOUT THIS CHAPTER Logic built-in self-test (BIST) is a design for testability (DFT) technique in which a portion of a circuit on a chip, board, or system is used to test the digital logic circuit itself. Logic BIST is crucial for many applications, in particular for lifecritical and mission-critical applications. These applications commonly found in the aerospace/defense, automotive, banking, computer, healthcare, networking, and telecommunications industries require on-chip, on-board, or in-system self-test to improve the reliability of the entire system, as well as the ability to perform remote diagnosis. This chapter first introduces the basic concepts and design rules of logic BIST. Next, we focus on a number of test pattern generation and output response analysis techniques suitable for BIST implementations. Test pattern generation techniques discussed include exhaustive testing, pseudo-random testing, and pseudoexhaustive testing. Output response analysis techniques discussed include ones count testing, transition count testing, and signature analysis. Specific logic BIST architectures along with methods to further improve the circuit’s fault coverage are then described, including the industry’s widely used STUMPS architecture. Finally, various BIST timing control diagrams are shown to illustrate how to test faults in a scan-based design containing multiple clock domains. This is particularly important for slow-speed testing of structural faults, such as stuck-at faults and bridging faults, as well as at-speed testing of timing-related delay faults, such as path-delay faults and transition faults. A primary objective of this chapter is to enable the reader to design a logic BIST system comprised of a test pattern generator, output response analyzer, and logic BIST controller; therefore, we include a design practice example at the end of the chapter and show all necessary steps to arrive at the logic BIST system design, verify its correctness, and improve its fault coverage. 264 VLSI Test Principles and Architectures 5.1 INTRODUCTION With recent advances in semiconductor manufacturing technology, the production and usage of very-large-scale integration (VLSI) circuits has run into a variety of testing challenges during wafer probe, wafer sort, pre-ship screening, incoming test of chips and boards, test of assembled boards, system test, periodic maintenance, repair test, etc. Traditional test techniques that use automatic test pattern generation (ATPG) software to target single faults for digital circuit testing have become quite expensive and can no longer provide sufficiently high fault coverage for deep submicron or nanometer designs from the chip level to the board and system levels. One approach to alleviate these testing problems is to incorporate built-in selftest (BIST) features into a digital circuit at the design stage [McCluskey 1986] [Abramovici 1994] [Bushnell 2000] [Mourad 2000] [Stroud 2002] [Jha 2003]. With logic BIST, circuits that generate test patterns and analyze the output responses of the functional circuitry are embedded in the chip or elsewhere on the same board where the chip resides. There are two general categories of BIST techniques for testing random logic: (1) online BIST and (2) offline BIST. A general form of logic BIST techniques is shown in Figure 5.1 [Abramovici 1994]. Online BIST is performed when the functional circuitry is in normal operational mode. It can be done either concurrently or nonconcurrently. In concurrent online BIST, testing is conducted simultaneously during normal functional operation. The functional circuitry is usually implemented with coding techniques or with duplication and comparison [Abramovici 1994]. When an intermittent or transient error is detected, the system will correct the error on the spot, rollback to its previously stored system states, and repeat the operation, or generate an interrupt signal for repeated failures. These techniques are discussed in more detail in Chapter 12. In nonconcurrent online BIST, testing is performed when the functional circuitry is in idle mode. This is often accomplished by executing diagnosis software routines (macrocode) or diagnosis firmware routines (microcode) [Abramovici 1994]. The test process can be interrupted at any time so that normal operation can resume. Offline BIST is performed when the functional circuitry is not in normal mode. This technique does not detect any real-time errors but is widely used in the industry BIST Offline Online Functional FIGURE 5.1 Logic BIST techniques. Structural Concurrent Nonconcurrent Logic Built-In Self-Test 265 for testing the functional circuitry at the system, board, or chip level to ensure product quality. Functional offline BIST performs a test based on the functional specification of the functional circuitry and often employs a functional or high-level fault model. Normally such a test is implemented as diagnostic software or firmware. Structural offline BIST performs a test based on the structure of the functional circuitry. There are two general classes of structural offline BIST techniques: (1) external BIST, in which test pattern generation and output response analysis is done by circuitry that is separate from the functional circuitry being tested, and (2) internal BIST, in which the functional storage elements are converted into test pattern generators and output response analyzers. Some external BIST schemes test sequential logic directly by applying test patterns at the inputs and analyzing the responses at its outputs. Such techniques are often used for board-level and systemlevel self-test. The BIST schemes discussed here all assume that the functional storage elements of the circuit are converted into a scan chain or multiple scan chains for combinational circuit testing. Such schemes are much more common than those that involve sequential circuit testing and are the primary focus of this chapter. Figure 5.2 shows a typical logic BIST system using the structural offline BIST technique. The test pattern generator (TPG) automatically generates test patterns for application to the inputs of the circuit under test (CUT). The output response analyzer (ORA) automatically compacts the output responses of the CUT into a signature. Specific BIST timing control signals, including scan enable signals and clocks, are generated by the logic BIST controller for coordinating the BIST operation among the TPG, CUT, and ORA. The logic BIST controller provides a pass/fail indication once the BIST operation is complete. It includes comparison logic to compare the final signature with an embedded golden signature, and often comprises diagnostic logic for fault diagnosis. As compaction is commonly used for output response analysis, it is required that all storage elements in the TPG, Logic BIST Controller Test Pattern Generator (TPG) Circuit Under Test (CUT) FIGURE 5.2 A typical logic BIST system. Output Response Analyzer (ORA) 266 VLSI Test Principles and Architectures CUT, and ORA be initialized to known states prior to self-test, and no unknown (X) values be allowed to propagate from the CUT to the ORA. In other words, the CUT must comply with additional BIST-specific design rules. There are a number of advantages to using the structural offline BIST technique rather than conventional scan: BIST can be made to effectively test and report the existence of errors on the board or system and provide diagnostic information as required; it is always available to run the test and does not require the presence of an external tester. Because BIST implements most of the tester functions on-chip, the origin of errors can be easily traced back to the chip; some defects are detected without being modeled by software. N-detect, a method for detecting a fault Ntimes, is done automatically. At-speed testing, which is inherent in BIST, can be used to detect many delay faults. Test costs are reduced due to reduced test time, tester memory requirements, or tester investment costs, as most of the tester functions reside on-chip itself. However, there are also disadvantages associated with this approach. More stringent BIST-specific design rules are required to deal with unknown (X) sources originating from analog blocks, memories, non-scan storage elements, asynchronous set/reset signals, tristate buses, false paths, and multiple-cycle paths, to name a few. Also, because pseudo-random patterns are mostly used for BIST pattern generation, additional test points (including control points and observation points) may have to be added to improve the circuit’s fault coverage. While BIST-specific design rules are required and the BIST fault coverage may be lower than that using scan, BIST does eliminate the expensive process of software test pattern generation and the huge test data volume necessary to store the output responses for comparison. More importantly, a circuit embedded with BIST circuitry can be easily tested after being integrated into a system. Periodic in-system self-test, even using test patterns with less than perfect fault coverage, can diagnose problems down to the level where the BIST circuitry is embedded. This allows system repair to become trivial and economical. 5.2 BIST DESIGN RULES Logic BIST requires much more stringent design restrictions when compared to conventional scan. While many scan design rules discussed in Chapter 2 are optional for scan designs, they are mandatory for BIST designs. The major logic BIST design restriction relates to the propagation of unknown (X) values. Because any unknown (X) value that propagates directly or indirectly to the output response analyzer will corrupt the signature and cause the BIST design to malfunction, no unknown (X) values can be tolerated. This is different from scan designs where unknown (X) values present in a scan design only result in fault coverage degradation. Therefore, when designing a logic BIST system, it is essential that the circuit under test meet Logic Built-In Self-Test 267 all scan design rules and BIST-specific design rules, called BIST design rules. The process of taking a scan-based design and making it meet all additional BIST-specific design rules turns the design into a BIST-ready core. 5.2.1 Unknown Source Blocking There are many unknown (X) sources in a CUT or BIST-ready core. Any unknown (X) source in the BIST-ready core, which is capable of propagating its unknown (X) value to the ORA directly or indirectly, must be blocked and fixed using a DFT repair approach often called X-bounding or X-blocking. Figure 5.3 shows a few of the more typically used X-bounding methods for blocking an unknown (X) source: The 0-control point forces an X source to 0; the 1-control point controls the X source to 1; the bypass logic allows the output of the X source to receive both 0 and 1 from a primary input (PI) or an internal node; the control-only scan point drives both 0 and 1 through a storage element, such as D flip-flop; and, finally, the scan point can capture the X-source value and drive both 0 and 1 through a scan cell, such as scan D flip-flop or level-sensitive scan design (LSSD) shift register latch (SRL) [Eichelberger 1977]. Depending on the nature of each unknown (X) source, several X-bounding methods can be appropriate for use. The most common problems inherent in these approaches include: (1) that they might increase the area of the design, and (2) that they might impact timing. 5.2.1.1 Analog Blocks Examples of analog blocks are analog-to-digital converters (ADCs). Any analog block output that can exhibit unknown (X) behavior during test has to be forced to a X BIST_mode (a) X BIST_mode (b) X 0 1 from PI or Internal node BIST_mode (c) X 0 1 D DQ CK CK BIST_mode (d) X 0 0 1 D 1 DQ SE BIST_mode CK CK (e) FIGURE 5.3 Typical X-bounding methods for blocking an unknown (X) source: (a) 0-control point; (b) 1-control point; (c) bypass logic; (d) control-only scan point; and (e) scan point. 268 VLSI Test Principles and Architectures known value. This can be accomplished by adding a 0-control point, 1-control point, bypass logic, or control-only scan point. We recommend the latter two approaches because they yield higher fault coverage than the former two approaches. 5.2.1.2 Memories and Non-Scan Storage Elements Examples of memories are dynamic random-access memories (DRAMs), static random-access memories (SRAMs), or flash memories. Examples of non-scan storage elements are D flip-flops or D latches. Bypass logic is typically used to block each unknown (X) value originating from a memory or non-scan storage element. Another approach is to use an initialization sequence to set a memory or non-scan storage element to a known state. This is typically done to avoid adding delay to critical (functional) paths. Care must be taken to ensure that the stored state is not corrupted throughout the BIST operation. 5.2.1.3 Combinational Feedback Loops All combinational feedback loops must be avoided. If they are unavoidable, then each loop must be broken using a 0-control point, a 1-control point, or a scan point. We recommend adding scan points because they yield higher fault coverage than the other approaches. 5.2.1.4 Asynchronous Set/Reset Signals As indicated in Chapter 2, asynchronous set or reset can destroy the data during shift operation if a pattern causes the set/reset signal to become active. The asynchronous set or reset can be disabled using an external set/reset disable (RE) pin (see Figure 2.26). This set/reset disable pin must be set to 1 during shift operation. This may become cumbersome for BIST applications where there is a need to use the pin for other purposes. Thus, we recommend using the existing scan enable (SE) signal to protect each shift operation and adding a set/reset clock point (SRCK) on each set/reset signal to test the set/reset circuitry, as shown in Figure 5.4 [Abdel-Hafez 2004]. SRCK SE Functional Logic Scan-In 0 1 CK R DQ FIGURE 5.4 Set/reset clock point for testing a set/reset-type scan cell. Set / Reset Circuitry Logic Built-In Self-Test 269 Shift Window Capture Window Shift Window Capture Window Shift Window C1 CK ••• ••• ••• C2 SRCK SE FIGURE 5.5 Example timing control diagram for testing data and set/reset faults. In addition, we recommend testing all data and set/reset faults using two separate BIST sessions, as shown in Figure 5.5. The timing diagram in this figure is used for testing a circuit having one system clock (CK) and one added set/reset clock. To test data faults in the functional logic, a clock pulse C1 is triggered from CK while SRCK is held inactive in one capture window. Similarly, to test set/reset faults in the set/reset circuitry, C2 is enabled while CK is held inactive in another capture window. Using this approach, we can avoid races and hazards and prevent data in scan cells from being destroyed by the set/reset signals. 5.2.1.5 Tristate Buses Bus contention occurs when two drivers force different values on the same bus which can damage the chip; hence, it is important to prevent bus conflicts during normal operation as well as shift operation [Cheung 1996]. For BIST applications, since pseudo-random patterns are commonly used, it is also crucial to protect the capture operation [Al-Yamani 2002]. To avoid potential bus contention, it is best to resynthesize each bus with multiplexers. If this is impractical, make sure only one tristate driver is enabled at any given time. The one-hot decoder shown in Figure 5.6 is an example of a circuit that can ensure that only one driver is selected during each shift or capture operation. EN1 EN1 SE D1 D1 EN2 D2 BIST_mode EN2 D2 (a) (b) FIGURE 5.6 A one-hot decoder for testing a tristate bus with two drivers: (a) tristate bus, and (b) one-hot decoder. 270 VLSI Test Principles and Architectures 5.2.1.6 False Paths False paths are not normal functional paths. They do no harm to the chip during normal operation; however, for delay fault testing, a pseudo-random pattern might adversely attempt to test a selected false path. Because false paths are not exercised during normal circuit operation, they typically do not meet timing specifications, which can result in a mismatch during logic BIST delay fault testing. To avoid this potential problem, we recommend adding a 0-control point or 1-control point to each false path. 5.2.1.7 Critical Paths Critical paths are timing-sensitive functional paths. Because the timing of these paths is critical, no additional gates are allowed to be added to the path, to prevent increasing the delay of the critical path. In order to remove an unknown (X) value from a critical path, we recommend adding an extra input pin to a selected combinational gate, such as an inverter, NAND gate, or NOR gate, on the critical path to minimize the added delay. The combinational gate is then converted to an embedded 0-control point or embedded 1-control point as shown in Figure 5.7, where an inverter is selected for adding the extra input. 5.2.1.8 Multiple-Cycle Paths Multiple-cycle paths are normal functional paths but data are expected to arrive after two or more cycles. Similar to false paths, they can cause mismatches if exercised during delay fault testing, as they are intended to be tested in one cycle. To avoid this potential problem, we recommend adding a 0-control point or 1-control point to each multiple-cycle path or holding certain scan cell output states to avoid those multiple-cycle paths. 5.2.1.9 Floating Ports Neither primary inputs (PIs) nor primary outputs (POs) can be floating. These ports must have a proper connection to power (VDD) or ground (VSS). Also, floating inputs to any internal modules must be avoided. This has a potential chance to propagate unknown (X) values to the ORA. X (a) X BIST_mode (b) X BIST_mode (c) FIGURE 5.7 Embedded control points for testing a critical path having an inverter: (a) inverter; (b) embedded 0-control point; and (c) embedded 1-control point. Logic Built-In Self-Test 271 EN SE D IO BIST_mode Z FIGURE 5.8 Forcing a bidirectional port to output mode. T DQ DQ P G CK CK CUT DQ DQ O R CK CK A CK1 CK2 CK3 FIGURE 5.9 Re-timing logic among the TPG, CUT, and ORA. 5.2.1.10 Bidirectional I/O Ports Bidirectional I/O ports are commonly used in a design. For BIST operations, make sure to fix the direction of each bidirectional I/O port to either input or output mode. Figure 5.8 shows an example of forcing a bidirectional I/O port to output mode. 5.2.2 Re-Timing Because the TPG and the ORA are typically placed far from the CUT, races and hazards caused by clock skews may occur between the TPG and the (scan chain) inputs of the CUT as well as between the (scan chain) outputs of the CUT and the ORA. To avoid these potential problems and ease physical implementation, we recommend adding re-timing logic between the TPG and the CUT and between the CUT and the ORA. The re-timing logic should consist of at least one negativeedge pipelining register (D flip-flop) and one positive-edge pipelining register (D flip-flop). Figure 5.9 shows an example of re-timing logic among the TPG, CUT, and ORA, using two pipelining registers on each end. Note that the three clocks (CK1, CK2, and CK3) could belong to one clock tree. 5.3 TEST PATTERN GENERATION For logic BIST applications, in-circuit TPGs constructed from linear feedback shift registers (LFSRs) are most commonly used to generate test patterns or test sequences for exhaustive testing, pseudo-random testing, and pseudo-exhaustive testing. Exhaustive testing always guarantees 100% single-stuck and multiplestuck fault coverage. This technique requires all possible 2n test patterns to be 272 VLSI Test Principles and Architectures applied to an n-input combinational circuit under test (CUT), which can take too long for combinational circuits where n is huge; therefore, pseudo-random testing [Bardell 1987] is often used for generating a subset of the 2n test patterns and uses fault simulation to calculate the exact fault coverage. In some cases, this might become quite time consuming, if not infeasible. In order to eliminate the need for fault simulation while at the same time maintaining 100% single-stuck fault coverage, we can use pseudo-exhaustive testing [McCluskey 1986] to generate 2w or 2k −1 test patterns, where w < k < n, when each output of the n-input combinational CUT at most depends on w inputs. For testing delay faults, hazards must also be taken into consideration. Standard LFSR Figure 5.10 shows an n-stage standard LFSR. It consists of n D flip-flops and a selected number of exclusive-OR (XOR) gates. Because XOR gates are placed on the external feedback path, the standard LFSR is also referred to as an external-XOR LFSR [Golomb 1982]. Modular LFSR Similarly, an n-stage modular LFSR with each XOR gate placed between two adjacent D flip-flops, as shown in Figure 5.11, is referred to as an internal-XOR LFSR [Golomb 1982]. The modular LFSR runs faster than its corresponding standard LFSR, because each stage introduces at most one XOR-gate delay. hn – 1 hn – 2 Si0 Si1 FIGURE 5.10 An n-stage (external-XOR) standard LFSR. h2 Sin – 2 h1 Sin – 1 h1 h2 Si 0 Si 1 FIGURE 5.11 An n-stage (internal-XOR) standard LFSR. hn – 2 Sin – 2 hn – 1 Sin – 1 Logic Built-In Self-Test 273 LFSR Properties The internal structure of the n-stage LFSR in each figure can be described by specifying a characteristic polynomial of degree n, f x , in which the symbol hi is either 1 or 0, depending on the existence or absence of the feedback path, where: f x = 1 + h1x + h2x2 + · · · + hn−1xn−1 + xn Let Si represent the contents of the n-stage LFSR after ith shifts of the initial contents, S0, of the LFSR, and let Si x be the polynomial representation of Si. Then, Si x is a polynomial of degree n − 1, where: Si x = Si0 + Si1x + Si2x2 + · · · + Sin−2xn−2 + Sin−1xn−1 If T is the smallest positive integer such that f x divides 1 + xT, then the integer T is called the period of the LFSR. If T = 2n − 1, then the n-stage LFSR generating the maximum-length sequence is called a maximum-length LFSR. For example, consider the four-stage standard and modular LFSRs shown in Figure 5.12a and Figure 5.12b, below. The characteristic polynomials, f x , used to construct both LFSRs are 1 + x2 + x4 and 1 + x + x4, respectively. The test sequences generated by each LFSR, when its initial contents, S0, are set to {0001} or S0 x = x3, are listed in Figures 5.12c and 5.12d, respectively. Because (a) (b) 0001 1000 0100 1010 0101 0010 0001 1000 0100 1010 0101 0010 0001 1000 0100 1010 (c) 0001 1100 0110 0011 1101 1010 0101 1110 0111 1111 1011 1001 1000 0100 0010 0001 (d) FIGURE 5.12 Example four-stage test pattern generators (TPGs): (a) four-stage standard LFSR; (b) four-stage modular LFSR; (c) test sequence generated by (a); and (d) test sequence generated by (b). 274 VLSI Test Principles and Architectures the first test sequence repeats after 6 patterns and the second test sequence repeats after 15 patterns, the LFSRs have periods of 6 and 15, respectively. This further implies that 1 + x6 can be divided by 1 + x2 + x4, and 1 + x15 can be divided by 1 + x + x4. Define a primitive polynomial of degree n over Galois field GF(2), p x , as a polynomial that divides 1 + xT, but not 1 + xi, for any integer i < T, where T = 2n − 1 [Colomb 1982]. A primitive polynomial is irreducible. Because T = 15 = 24 − 1, the characteristic polynomial, f x = 1 + x + x4, used to construct Figure 5.12b is a primitive polynomial; thus, the modular LFSR is a maximum-length LFSR. Let: r x = f x −1 = xnf x−1 Then r x is defined as a reciprocal polynomial of f x [Peterson 1972]. A reciprocal polynomial of a primitive polynomial is also a primitive polynomial. Thus, the reciprocal polynomial of f x = 1 + x + x4 is also a primitive polynomial, with p x = r x = 1 + x3 + x4. Hybrid LFSR Let a polynomial over GF(2), a x = 1+b x +c x , be said to be fully decomposable if both b x and c x have no common terms and there exists an integer j such that c x = xjb x , where j ≥ 1. If f x is fully decomposable such that: f x = 1 + b x + xjb x then a (hybrid) top–bottom LFSR [Wang 1988a] can be constructed using the connection polynomial: s x = 1 + ∧xj + xjb x where ∧xj indicates that the XOR gate with one input taken from the jth stage output of the LFSR is connected to the feedback path, not between stages. Similarly, if f x is fully decomposable such that: f x = b x + xjb x + xn then a (hybrid) bottom–top LFSR [Wang 1988a] can be constructed using the connection polynomial: s x = b x + ∧xn−j + xn It was shown in [Wang 1988a] that if top–bottom LFSRs exist for a characteristic polynomial, f x , then bottom–top LFSRs will exist for its reciprocal polynomial, r x . Assume that a standard or modular LFSR uses m XOR gates, where m is an odd number. If its characteristic polynomial, f x , is fully decomposable, then a hybrid LFSR can be realized with only (m + 1)/2 XOR gates. Figure 5.13 shows two example five-stage hybrid LFSRs each using two, rather than three, XOR gates. Logic Built-In Self-Test 275 (a) (b) FIGURE 5.13 Hybrid LFSRs: (a) five-stage top–bottom LFSR using s(x) = 1+ ∧x2 +x4 +x5 for f(x) = 1+x2 +x3 +x4 +x5, and (b) five-stage bottom–top LFSR using s(x) = 1 + x 2 + ∧x4 + x5 for f(x) = 1 + x + x2 + x3 + x5. Table 5.1 lists a set of primitive polynomials of degree n up to 100 [Bardell 1987]. A different set was given in [Wang 1988a]. Each polynomial can be used to construct minimum-length LFSRs in standard, modular, or hybrid form. For primitive polynomials of degree up to 300, consult [Bardell 1987]. 5.3.1 Exhaustive Testing Exhaustive testing requires applying 2n exhaustive patterns to an n-input combinational circuit under test (CUT). Any binary counter can be used as an exhaustive pattern generator (EPG) for this purpose; however, because the order of generation of the inputs is not important, it may be more efficient to use an autonomous, maximum-length LFSR that can cycle through all states. To do this, it is necessary to modify the LFSR so that the all-zero state is included [McCluskey 1981] [McCluskey 1986]. A general procedure for constructing modified (maximum-length) LFSRs that include the all-zero state is given in [Wang 1986b]. These modified LFSRs are called complete LFSRs (CFSRs). 5.3.1.1 Binary Counter Figure 5.14 shows an example of a 4-bit binary counter design [Wakerly 2000] for testing a four-input combinational CUT. Binary counters are simple to design but require more hardware than LFSRs. 5.3.1.2 Complete LFSR Figures 5.15a and 5.15b show two complete LFSRs for testing the four-input CUT. Each figure is reconfigured from a four-stage maximum-length LFSR such that the resulting standard or modular CFSR has period 16. In each CFSR, an XOR gate is inserted into the last stage of the LFSR, and a NOR gate (with n − 1 = 3 inputs from the first n − 1 stages of the LFSR) is used as a zero-detector. With this reconfiguration, both CFSRs insert the all-zero state right after state {0001} is reached. 276 VLSI Test Principles and Architectures TABLE 5.1 Primitive Polynomials of Degree n up to 100 n Exponents 10 2 10 3 10 4 10 5 20 6 10 7 10 8 6510 9 40 10 3 0 11 2 0 12 7 4 3 0 13 4 3 1 0 14 12 11 1 0 15 1 0 16 5 3 2 0 17 3 0 18 7 0 19 6 5 1 0 20 3 0 21 2 0 22 1 0 23 5 0 24 4 3 1 0 25 3 0 n Exponents 26 8 7 1 0 27 8 7 1 0 28 3 0 29 2 0 30 16 15 1 0 31 3 0 32 28 27 1 0 33 13 0 34 15 14 1 0 35 2 0 36 11 0 37 12 10 2 0 38 6 5 1 0 39 4 0 40 21 19 2 0 41 3 0 42 23 22 1 0 43 6 5 1 0 44 27 26 1 0 45 4 3 1 0 46 21 20 1 0 47 5 0 48 28 27 1 0 49 9 0 50 27 26 1 0 n Exponents n Exponents 51 16 15 1 0 76 36 35 1 0 52 3 0 77 31 30 1 0 53 16 15 1 0 78 20 19 1 0 54 37 36 1 0 79 9 0 55 24 0 80 38 37 1 0 56 22 21 1 0 81 4 0 57 7 0 82 38 35 3 0 58 19 0 83 46 45 1 0 59 22 21 1 0 84 13 0 60 1 0 85 28 27 1 0 61 16 15 1 0 86 13 12 1 0 62 57 56 1 0 87 13 0 63 1 0 88 72 71 1 0 64 4 3 1 0 89 38 0 65 18 0 90 19 18 1 0 66 10 9 1 0 91 84 83 1 0 67 10 9 1 0 92 13 12 1 0 68 9 0 93 2 0 69 29 27 2 0 94 21 0 70 16 15 1 0 95 11 0 71 6 0 96 49 47 2 0 72 53 47 6 0 97 6 0 73 25 0 98 11 0 74 16 15 1 0 99 47 45 2 0 75 11 10 1 0 100 37 0 Note: “24 4 3 1 0’’ means p(x) = x24 + x4 + x3 + x1 + x0 = x24 + x4 + x3 + x + 1. Source: P. H. Bardell et al., Built-In Test for VLSI: Pseudorandom Techniques, John Wiley & Sons, Somerset, NJ, 1987. X1 X2 X3 X4 FIGURE 5.14 Example binary counter as EPG. 0 0 0 1 (a) 0 0 0 1 Logic Built-In Self-Test 277 0 0 0 1 (b) 1 0 0 0 (c) (d) FIGURE 5.15 Example complete LFSRs (CFSRs) as EPGs: (a) four-stage standard CFSR; (b) four-stage modular CFSR; (c) minimized version of (a); and (d) minimized version of (b). It is possible to further minimize both CFSR designs. For any standard CFSR, this can be by Boolean minimization, as shown in Figure 5.15c. For any modular CFSR, the minimization is done by replacing the XOR gate at the last stage by an OR gate and reconnecting the tap to the OR-gate output, as shown in Figure 5.15d. With this arrangement, the modular CFSR inserts the all-zero state right after state {1000} is reached and then switches to state {0100} on the next clock. If further minimization is necessary, then using the hybrid LFSR scheme presented above can save about half of the XOR gates required for the feedback connection. Exhaustive testing guarantees that all detectable, combinational faults (those that do not change a combinational circuit into a sequential circuit) will be detected. This approach is especially useful for circuits where the number of inputs, n, is a small number (e g , 20 or less). When n is larger than 20, the test time may be prohibitively long and is thus not recommended. The following techniques are aimed at reducing the number of test patterns. They are recommended when exhaustive testing is impractical. 5.3.2 Pseudo-Random Testing One approach that can reduce test length but sacrifices the circuit fault coverage uses a pseudo-random pattern generator (PRPG) for generating a pseudorandom sequence of test patterns [Bardell 1987] [Rajski 1998] [Bushnell 2000] [Jha 2003]. Pseudo-random testing has the advantage of being applicable to both sequential and combinational circuits; however, there are difficulties in determining the required test length and fault coverage. Schemes to estimate the random test length required to achieve a certain level of fault detection or obtain a certain 278 VLSI Test Principles and Architectures defect level can be found in [Savir 1984b], [Williams 1985], [Chin 1987], [Wagner 1987], and [Seth 1990]. Its effectiveness has been reported in [Lisanke 1987] and [Wunderlich 1988]. 5.3.2.1 Maximum-Length LFSR Maximum-length LFSRs are commonly used for pseudo-random pattern generation. Each LFSR produces a sequence with 0.5 probability of generating 1’s (or with probability distribution 0.5) at every output. The LFSR pattern generation technique that uses these LFSRs in standard, modular, or hybrid form to generate patterns for the entire design has the advantage of being very easy to implement. The major problem with this approach is that some circuits may be random-pattern resistant (RP-resistant) [Savir 1984a]; that is, either the probability of certain nodes randomly receiving a 0 or 1 or the probability of observing certain nodes at the circuit outputs is low, assuming equi-probable inputs. For example, consider a fiveinput OR gate. The probability of applying an all-zero pattern to all inputs is 1/32. This makes it difficult to test the RP-resistant OR-gate output stuck-at-1. 5.3.2.2 Weighted LFSR It is possible to increase fault coverage (and detect most RP-resistant faults) in RP-resistant designs. A weighted pattern generation technique employing an LFSR and a combinational circuit was first described in [Schnurmann 1975]. The combinational circuit inserted between the output of the LFSR and the CUT is to increase the frequency of occurrence of one logic value while decreasing the other logic value. This approach may increase the probability of detecting those faults that are difficult to detect using the typical LFSR pattern generation technique. Implementation methods for realizing this scheme are further discussed in [Chin 1984]. The weighted pattern generation technique described in that paper modifies the maximum-length LFSR to produce an equally weighted distribution of 0’s and 1’s at the input of the CUT. It skews the LFSR probability distribution of 0.5 to either 0.25 or 0.75 to increase the chance of detecting those faults that are difficult to detect using just a 0.5 distribution. Better fault coverage was also found in [Wunderlich 1987] where probability distributions in a multiple of 0.125 (rather than 0.25) are used. For some circuits, several programmable probabilities or weight sets are required in order to further increase each circuit’s fault coverage [Waicukauski 1989] [Bershteyn 1993] [Kapur 1994] [Lai 2005]. Additional discussions on weighted pattern generation can be found in the books [Rajski 1998] and [Bushnell 2000]. Figure 5.16 shows a four-stage weighted (maximum-length) LFSR with probability distribution 0.25 [Chin 1984]. 5.3.2.3 Cellular Automata Cellular automata were first introduced in [Wolfram 1983]. They yielded better randomness property than LFSRs [Hortensius 1989]. The cellular-automatonbased (or CA-based) pseudo-random pattern generator (PRPG) “is attractive for BIST applications” [Khara 1987] [Gloster 1988] [Wang 1989] [van Sas 1990] because it: (1) provides patterns that look more random at the circuit inputs, (2) has Logic Built-In Self-Test 279 1 0 0 0 X4 X3 X2 X1 FIGURE 5.16 Example weighted LFSR as PRPG. higher opportunity to reach very high fault coverage in a circuit that is RP-resistant, and (3) has implementation advantages as it only requires adjacent neighbor communication (no global feedback, unlike the modular LFSR case). A cellular automaton (CA) is a collection of cells with forward and backward connections. A general structure is shown in Figure 5.17a. Each cell can only connect to its local neighbors (adjacent left and right cells). The connections are expressed as rules; each rule determines the next state of a cell based on the state of the cell and its neighbors. Assume cell i can only talk with its neighbors, I − 1 and i + 1. Define: Rule 90 xi t + 1 = xi−1 t + xi+1 t and Rule 150 xi t + 1 = xi−1 t + xi t + xi+1 t ‘0’ Cell 0 ‘0’ X0 Cell Cell 1 n–2 (a) X1 X2 Cell n–1 ‘0’ ‘0’ X3 (b) (c) FIGURE 5.17 Example cellular automation (CA) as PRPG: (a) general structure of an n-stage CA; (b) four-stage CA; and (c) test sequence generated by (b). 280 VLSI Test Principles and Architectures Then the two rules, rule 90 and rule 150, can be established based on the following state transition table: xi−1 t xi t xi+1 t Rule 90 xi t + 1 Rule 150 xi t + 1 111 110 101 100 011 010 001 000 01011010 26 + 24 + 23 + 21 = 90 10010110 27 + 24 + 22 + 21 = 150 The terms rule 90 and rule 150 were derived from their decimal equivalents of the binary code for the next state of cell i [Hortensius 1989]. Figure 5.17b shows an example of a four-stage CA generated by alternating rules 150 (on even cells) and 90 (on odd cells). Similar to the four-stage modular LFSR given in Figure 5.12b, the four-stage CA generates a maximum-length sequence of 15 distinct states, as listed in Figure 5.17c. It has been shown in [Hortensius 1989] that, by combining cellular automata rules 90 and 150, an n-stage CA can generate a maximum-length sequence of 2n − 1. The construction rules for 4 ≤ n ≤ 53 can be found in [Hortensius 1989] and are listed in Table 5.2. [Serra 1990] and [Slater 1990] demonstrated an isomorphism between a onedimensional linear cellular automaton and a maximum-length LFSR having the same number of stages; however, state sequencing may still differ between the CA and the LFSR. CAs have much less shift-induced bit value correlation (only on those left-/right-edge-cells built with rule 90) than LFSRs. The LFSR, however, can be made more random by using a linear phase shifter [Das 1990]. The CA-based PRPG can be programmed as a universal CA for generating different orders of test sequences. A universal CA-cell for generating patterns based on rule 90 or rule 150 is given in Figure 5.18 [Wang 1989]. When the RULE150_SELECT signal is set to 1, the universal CA-cell will behave as a rule 150 cell; otherwise, it will act as a rule 90 cell. This universal CA structure is useful for BIST applications RULE150_SELECT Xi – 1 Xi FIGURE 5.18 A universal CA-cell structure. DQ Xi Xi + 1 Logic Built-In Self-Test 281 TABLE 5.2 Construction Rules for Cellular Automata of Length n up to 53 n Rulea n Rulea 4 05 29 2,512,712,103 5 31 30 7,211,545,075 6 25 31 04,625,575,630 7 152 32 10,602,335,725 8 325 33 03,047,162,605 9 625 34 036,055,030,672 10 0,525 35 127,573,165,123 11 3,252 36 514,443,726,043 12 2,525 37 0,226,365,530,263 13 14,524 38 0,345,366,317,023 14 17,576 39 6,427,667,463,554 15 44,241 40 00,731,257,441,345 16 152,525 41 15,376,413,143,607 17 175,763 42 11,766,345,114,746 18 252,525 43 035,342,704,132,622 19 0,646,611 44 074,756,556,045,302 20 3,635,577 45 151,315,510,461,515 21 3,630,173 46 0,112,312,150,547,326 22 05,252,525 47 0,713,747,124,427,015 23 32,716,432 48 0,606,762,247,217,017 24 77,226,526 49 02,675,443,137,056,631 25 136,524,744 50 23,233,006,150,544,226 26 132,642,730 51 04,135,241,323,505,027 27 037,014,415 52 031,067,567,742,172,706 28 0,525,252,525 53 207,121,011,145,676,625 a Rule is given in octal format. For n = 7, Rule = 152 = 001,101,010 = 1,101,010, where “0’’ denotes a rule 90 cell and “1’’ denotes a rule 150 cell, or vice versa. where it is required to obtain very high fault coverage for RP-resistant designs or detect additional classes of faults. 5.3.3 Pseudo-Exhaustive Testing Another approach to reduce the test time to a practical value while retaining many of the advantages of exhaustive testing is the pseudo-exhaustive test technique. It applies fewer than 2n test patterns to an n-input combinational CUT. The technique depends on whether any output is driven by all of its inputs. If none of the outputs depends on all inputs, a verification test approach proposed in [McCluskey 1984] can be used to test these circuits. In circuits where there is one output that 282 VLSI Test Principles and Architectures x1 x2 x3 x4 FIGURE 5.19 An (n, w) = (4, 2) CUT. y1 y2 y3 y4 depends on all inputs or the test time using verification testing is still too long, a segmentation test approach must be used [McCluskey 1981]. Pseudo-exhaustive testing guarantees single-stuck fault coverage without any detailed circuit analysis. 5.3.3.1 Verification Testing Verification testing [McCluskey 1984] divides the circuit under test into m cones, where m is the number of outputs. It is based on backtracing from each circuit output to determine the actual number of inputs that drive the output. Each cone will receive exhaustive test patterns, and all cones are tested concurrently. Assume the combinational CUT has n inputs and m outputs. Let w be the maximum number of input variables upon which any output of the CUT depends. Then, the n-input m-output combinational CUT is defined as an (n, w) CUT, where w < n. Figure 5.19 shows an n w = 4 2 CUT that will be used as an example for designing the pseudo-exhaustive pattern generators (PEPGs). Syndrome Driver Counter The first method for pseudo-exhaustive pattern generation was proposed in [Savir 1980]. Syndrome driver counters (SDCs) are used to generate test patterns [Barzilai 1981]. The SDC can be a binary counter, a maximum-length LFSR, or a complete LFSR. This method checks whether some circuit inputs can share the same test signal. If n − p inputs, p < n, can share the test signals with the other p inputs, then the circuit can be tested exhaustively with these p inputs. In this case, the test length becomes 2p if p = w or 2p − 1 if p > w. Figure 5.20a shows a three-stage SDC used to test the circuit given in Figure 5.19. Because both inputs x1 and x4 do not drive the same output, one test signal can be used to drive both inputs. In this case, p is 3, and the test length becomes 23 − 1 = 7. Designs based on the SDC method for in-circuit test pattern generation are simple. The problem with this method is that when p is close to n, it may still take too long to test the circuit. Constant-Weight Counter To resolve the test length problem, a pattern generation technique using constantweight counters (CWCs) was proposed in [McCluskey 1982] and [Tang 1983]. Constant-weight counters are constructed using constant-weight code or Logic Built-In Self-Test 283 X1 X2 X3 X4 X1 X2 X3 X4 0010 1001 1101 1111 0110 1011 0100 1101 0000 0110 1011 (a) (b) FIGURE 5.20 Example SDC and CWC as PEPGs: (a) three-stage syndrome driver counter, and (b) three-stage constantweight counter. M-out-of-N code. An M-out-of-N code contains a set of N-bit codewords, each having exactly M 1’s. Figure 5.20b shows a three-stage constant-weight counter for generating a combination of 2-out-of-3 code and 0-out-of-3 code. The constant-weight test set is shown to be a minimum-length test set for many circuits [McCluskey 1982]; however, for circuits requiring higher M-out-of-N codes (e g , a 10-out-of-20 code), CWCs can become very costly to implement. Combined LFSR/SR An alternative to the high implementation cost of CWCs that sacrifices the minimum test length requirement was proposed in [Barzilai 1983] and [Tang 1984]. A combined LFSR/SR approach using a combination of an LFSR and a shift register (SR) is used for pattern generation. Figure 5.21a shows a four-stage combined LFSR/SR and its generated test sequence. We can see any two outputs of the LFSR/SR contain four input combinations, {00, 01, 10, 11}, and hence each output cone of the (4, 2) CUT is tested exhaustively. The method is most effective when w is much less than n (e g , w < n/2); however, it usually requires at least two seeds (starting patterns). A similar method using maximum-length LFSRs for pseudo-exhaustive pattern generation was given in [Lempel 1985], [Chen 1986], [Golan 1988], and [Wang 1999]. The input register to the combinational CUT is reconfigured as a shift register during self-test. [Wang 1999] proposed inserting an AND gate and a toggle flip-flop between the maximumlength LFSR and the SR to reduce shift power. Test patterns are shifted in from the LFSR. Designs based on this method are simple but require more test patterns than when using other schemes. 284 VLSI Test Principles and Architectures X1 X2 X3 X4 X1 X2 X3 X1 X2 X3 X4 1100 1110 0111 1011 0101 0010 1001 (a) 1100 1111 0110 1010 0101 0011 1001 (b) FIGURE 5.21 Example combined LFSR/SR and combined LFSR/PS as PEPGs: (a) four-stage combined LFSR/SR, and (b) three-stage combined LFSR/PS. Combined LFSR/PS This multiple seed problem can be solved using linear sums [Akers 1985] or linear codes [Vasanthavada 1985]. A combined LFSR/PS approach using a combination of an LFSR and a linear phase shifter (PS) is used for pattern generation, where the linear phase shifter comprises a network of XOR gates. Figure 5.21b shows a threestage combined LFSR/PS and its associated test sequence. Once again, because any two outputs contain all four combinations, {00, 01, 10, 11}, this (4, 2) CUT can be tested exhaustively. Test lengths derived with this method are very close to the LFSR/SR approach, but this method uses at most two seeds; however, the implementation cost for most circuits, as in the case of using CWCs, is still high. Condensed LFSR The multiple seed and implementation cost problems can be solved by using the condensed LFSR approach proposed in [Wang 1986a]. Condensed LFSRs are constructed based on linear codes [Peterson 1972]. An (n, k) linear code over GF(2) generates a code space C containing 2k distinct codewords (n-tuples) with the following property: if c1 ∈ C and c2 ∈ C, then c1 + c2 ∈ C. Define an (n, k) condensed LFSR as an n-stage modular LFSR with period 2k − 1. A condensed LFSR for testing an (n, w CUT is constructed by first computing the smallest integer k such that: w ≤ k/ n − k + 1 + k/ n − k + 1 where x denotes the smallest integer equal to or greater than the real number x, and y denotes the largest integer equal to or smaller than the real number y. Then, by using: f x = g x p x = 1 + x + x2 + · · · + xn−k p x Logic Built-In Self-Test 285 X1 X2 X3 X4 (a) 1100 0110 0011 1010 0101 1001 1111 (b) FIGURE 5.22 Example condensed LFSR as PEPG: (a) a (4, 3) condensed LFSR, and (b) test sequence generated by (a). an (n, k) condensed LFSR can be realized, where g x is a generator polynomial of degree n − k generating the (n, k) linear code, and p x is a primitive polynomial of degree k. Consider the (n, k) = (4, 3) condensed LFSR shown in Figure 5.22a used to test the (n, w) = (4, 2) CUT. Because n = 4 and w = 2, we obtain k = 3 and n − k = 1. Selecting p x = 1 + x + x3, we have f x = 1 + x 1 + x + x3 = 1 + x2 + x3 + x4. Figure 5.22b lists the generated period-7 test sequence. It is important to note that the seed polynomial S0 x of the LFSR must be divisible by g x . In the example, we set S0 x = g x = 1 + x, or S0 to 1100 . For any given (n, w) CUT, this method uses at most two seeds and has shown to be effective when w ≥ n/2. Designs based on this method are simple; however, this technique uses more patterns than the LFSR/SR approach when w < n/2. Cyclic LFSR One approach for reducing the test length when w < n/2 is to use cyclic LFSRs for test pattern generation [Chen 1987] [Wang 1988b] [Wang 1988c]. Define an (n, k) cyclic LFSR as an n-stage LFSR with period 2k − 1. Cyclic LFSRs are based on cyclic codes [Peterson 1972]. An (n, k) cyclic code over GF(2) contains 2k distinct codewords (n-tuples) with the following property: If an n-tuple is a codeword, then the n-tuple obtained by rotating the codeword one bit to the right is also a codeword. Cyclic codes are a subset of linear codes. Each cyclic code has a minimum distance or weight d [Peterson 1972]. A cyclic code does not exist for every integer n; it exists for every n = 2b − 1 b > 1. To exhaustively test any (n, w) CUT using cyclic codes, one must start with the smallest integer n ≥ n. This method: (1) finds a generator polynomial g x of largest degree k (or smallest degree k) for generating an n k = n n − k cyclic code that divides 1 + xn and has a design distance d ≥ w + 1, from any coding theory book such as [Peterson 1972]; (2) uses h x = 1 + xn /g x to generate an (n k) cyclic code, which is the dual code of the (n n − k) cyclic code generated by g x [Hsiao 1977], and to construct an (n k) cyclic LFSR using: f x = h x p x = 1 + xn p x /g x where h x is the parity-check polynomial of g x that satisfies g x h x = 1 + xn ; and, finally, (3) shortens this (n k) cyclic LFSR to an (n, k) cyclic LFSR by deleting 286 VLSI Test Principles and Architectures TABLE 5.3 Generator Polynomials for Given n , k , and d n k d g (x) 7 4 3 1+x+x3 7 3 4 1+x 1+x+x3 7 1 6 1+x7 / 1+x 15 11 3 1+x+x4 15 10 4 1+x 1+x+x4 15 7 5 1+x+x4 1+x+x2 +x3 +x4 15 6 6 1+x 1+x+x4 1+x+x2 +x3 +x4 15 5 7 1+x+x4 1+x+x2 +x3 +x4 1+x+x2 15 4 8 1+x 1+x+x4 1+x+x2 +x3 +x4 1+x+x2 15 2 10 1+x 1+x+x4 1+x+x2 +x3 +x4 1+x3 +x4 15 1 14 1 + x 15 / 1 + x the rightmost, middle, or leftmost n − n stages from the (n k) cyclic LFSR. It was demonstrated in [Wang 1988b] that deleting the middle n − n stages from the (n k) cyclic LFSR yields the lowest overhead. Table 5.3 shows a partial list of (n k ) cyclic codes generated by g x . It was taken from Appendix D in [Peterson 1972]. Assume that an n w = 8 3 CUT is to be tested. Because a cyclic code does not exist for n = 8, we must choose an (n k ) cyclic code with the smallest integer n and largest integer k that has a design distance d ≥ w + 1 = 4 where n > n. From Table 5.3, we obtain n = 15 and k = 10. This allows us to build an n , k = n , n − k = 15, 10 cyclic code with g x = 1 + x 1 + x + x4 = 1 + x2 + x4 + x5, or an n , k = 15, 5 dual code using h x = 1 + x15 /g x . Selecting p x = 1 + x2 + x3 + x4 + x5 from [Peterson 1972], we can then construct an n , k = 15 5 cyclic LFSR with f x = h x p x = 1 + x3 + x5 + x8 + x9 + x11 + x12 + x13 + x15. This cyclic LFSR uses seven XOR gates. Figure 5.23 shows an n, k = 8, 5 cyclic LFSR obtained by picking the first six stages and the last two stages of the (15, 5) cyclic LFSR that uses the least number of XOR gates. The figure was derived according to [Wang 1988b], who described a procedure for choosing the stage positions to be deleted. The initial state {10100100} shown in the figure is set to its corresponding state, S0 x , of the 101 00 1 00 FIGURE 5.23 Example (8, 5) cyclic LFSR as PEPG. Logic Built-In Self-Test 287 (15, 5) cyclic LFSR, where S0 x = h x = 1 + x15 /g x = 1 + x2 + x5 + x6 + x8 + x9 + x10. This (8, 5) cyclic LFSR has period 31 and only uses three XOR gates. It was shown in [Wang 1987] that when n = 2b b > 2, an (n, k) cyclic LFSR can produce a longer test length than using the combined LFSR/PS approach. In this case, an (n, k − s) shortened cyclic LFSR can be employed, where s is the number of information bits to be deleted from the (n, k) cyclic code, 1 ≥ s < k < n. The (8, 4) shortened cyclic LFSR shown in Figure 5.24 uses eight XOR gates, but its test length has been reduced from 31 (in the cyclic LFSR case) to 15. Compatible LFSR Recall from [Savir 1980] that a p-stage syndrome driver counter can test each output cone of an (n, w) CUT exhaustively, w ≤ p < n, if n − p inputs can share test signals with the other p inputs. This means that the SDC can detect all single-stuck-at and multiple-stuck-at faults within each output cone. If we only consider singlestuck-at faults, [Chen 1998] shows that additional inputs can be further combined using a mapping logic without losing any single-stuck fault coverage. This method requires finding the compatibility classes for all inputs and may require a detailed fault simulation. The l-to-n mapping logic, l < p, can be implemented using simple buffers or inverters. Additional decoders [Chakrabarty 1997] or a more general combinational circuit [Hamzaoglu 2000] can also be used. An l-stage compatible LFSR, which is a combination of an l-stage LFSR and an l-to-n mapping logic, can now further reduce the test length for some (n, w) CUTs. Consider the n w = 5 4 CUT shown in Figure 5.25a [Jha 2003]. Because x1 and x5 do not drive the same output, we obtain p = 4. A four-stage SDC generating 2p − 1 = 15 patterns is required to detect all single-stuck-at and multiple-stuckat faults within each output cone; however, when only single-stuck-at faults are considered, the two-stage compatible LFSR shown in Figure 5.25b generating 22 = 4 patterns can be used to detect all faults [Chen 1998]. 5.3.3.2 Segmentation Testing There are circuits where either the test length using the previous techniques is still too long or an output depends on all circuit inputs. For these circuits, a pseudoexhaustive test is still possible, but it is necessary to resort to a partitioning or segmentation technique. Such a procedure is described in [McCluskey 1981]. This technique relies on exhaustive testing by dividing the circuit into segments or partitions in order to avoid excessively long test sequences. This is referred to 1 0 1 0 1 0 FIGURE 5.24 Example (8, 4) shortened cyclic LFSR as PEPG. 1 0 288 VLSI Test Principles and Architectures X1 Y1 X2 0 0 X3 X4 X5 Y2 X1 X2 X3 X4 X5 (a) (b) FIGURE 5.25 Example compatible LFSR as PEPG: (a) (n, w) = (5, 4) CUT, and (b) two-stage compatible LFSR. as segmentation testing. It differs from previous partitioning techniques in that the partitions may divide the signal paths through the circuit rather than only separating the signal paths from each other. There are two techniques that can be used to achieve this partitioning: hardware partitioning and sensitized partitioning [Bozorgui-Nesbat 1980] [McCluskey 1981]. Hardware partitioning is based on inserting multiplexers and connecting the embedded inputs and outputs of the subcircuit to those primary inputs and outputs that are not used by the subcircuit under test. Sensitized partitioning refers to the technique in which circuit partitioning and subcircuit isolation can be achieved by applying the appropriate input patterns to some of the input lines. Partitioning the circuit into several subcircuits and exhaustively testing each such subcircuit greatly simplifies the testing of the overall circuit; however, partitioning VLSI circuits is an NP-complete problem [Patashnik 1983]. Hardware partitioning using multiplexers can reduce the operating speed of a circuit and is costly to implement. Sensitized partitioning does not alter the functional circuitry and is therefore the preferred technique. This technique has been used in [Udell 1986] to develop pseudo-exhaustive test patterns. A reconfigurable counter that automatically generates these test patterns was given in [Udell 1987]. 5.3.4 Delay Fault Testing The BIST pattern generation techniques described above mainly target structural faults, such as stuck-at faults and bridging faults, which can be detected with onepattern vectors. For delay faults requiring two-pattern vectors for testing, these methods do not provide adequate fault coverage. In this section, we discuss a few approaches that can be used for delay fault testing. Unlike structural fault testing that requires an exhaustive one-pattern set of 2n test patterns, an exhaustive two-pattern set of 2n 2n − 1 patterns is required to test delay faults in an n-input CUT exhaustively. This means that, for delay fault testing, one must use a test pattern generator (TPG) with 2n or more stages. A maximumlength LFSR having 2n stages is called a double-length LFSR [Jha 2003]. Logic Built-In Self-Test 289 [Furuya 1991] has shown that when all even or odd stage outputs (called even taps or odd taps) of a 2n-stage double-length LFSR are connected to the n-input CUT, the LFSR can generate 22n − 1 vectors to test the CUT exhaustively. While all delay faults are tested exhaustively, there is a potential problem that the test set could cause test invalidation due to hazards present in the design [Bushnell 2000]. Test invalidation or hazards can occur when more than one circuit inputs change values. There are also risks that the power consumption during at-speed BIST can exceed the power rating of the chip or package. Increased average power can cause heating of the chip and increased peak power can produce noise-related failures [Bushnell 2000] [Girard 2002]. To solve these problems, it is important to generate single-input change (SIC) or one-transition patterns. [Breuer 1987] shows that when two-transition patterns are applied at the circuit inputs, no additional paths are tested for delay faults which could not be tested by one-transition test pairs. Due to complementary converging effects, increasing the number of simultaneous input transitions applied may lead to a reduction in the number of complete transition paths tested. [Breuer 1987] further proved that a delay fault TPG will require one-transition patterns not more than 2n2n + 1 but not less than n2n + 1. A Gray code counter, comprised of a binary counter or maximum-length LFSR, as well as a Johnson counter or ring counter are commonly used for this purpose [Breuer 1987] [Bushnell 1995] [Virazel 2002]. An example delay fault TPG for testing an n-input CUT is shown in Figure 5.26 [Bushnell 2000]. The standard maximum-length LFSR can cycle through 2n − 1 states. The n-bit Johnson counter can generate 2n one-transition patterns. By properly selecting the control signal TESTTYPE, the delay fault TPG can generate 2n 2n − 1 one-transition patterns for delay fault testing or 2n − 1 patterns for stuck fault testing. 5.3.5 Summary While many advantages for using exhaustive or pseudo-exhaustive testing exist, pseudo-random testing is still the most practical and commonly used technique for BIST pattern generation. Because this scheme generally leads to lower fault coverage, it is often required to augment pseudo-random test patterns, particularly for TESTTYPE hn – 1 hn – 2 h2 h1 0 1 X1 X2 Xn – 1 Xn FIGURE 5.26 Example delay fault TPG as PRPG or PEPG. 290 VLSI Test Principles and Architectures life-critical and mission-critical applications. Methods that have been proposed for fault coverage enhancement include inserting test points or embedding deterministic patterns to the circuit under test. These approaches are discussed extensively in Section 5.6. 5.4 OUTPUT RESPONSE ANALYSIS In the previous chapters where we discussed logic and fault simulation and test generation, our assumption was that output responses coming out of the circuit under test are compared directly on a tester. For BIST operations, it is impossible to store all output responses on-chip, on-board, or in-system to perform bit-by-bit comparison. An output response analysis technique must be employed such that output responses can be compacted into a signature and compared with a golden signature for the fault-free circuit either embedded on-chip or stored off-chip. Compaction differs from compression in that compression is loss-less, while compaction is lossy. Compaction is a method for dramatically reducing the number of bits in the original circuit response during testing in which some information is lost. Compression is a method for reducing the number of bits in the original circuit response in which no information is lost, such that the original output sequence can be fully regenerated from the compressed sequence [Bushnell 2000]. Because all output response analysis schemes involve information loss, they are referred to as output response compaction; however, there is no general consensus in academia yet as to when the terms “compaction” or “compression” are to be used. For example, in the random-access scan architecture described in Chapter 2, the authors prefer to use the term “compression” for output response analysis; however, for output response analysis throughout the remainder of the book we will refer to the lossy compression as “compaction.” In this section, we present three different output response compaction techniques: (1) ones count testing, (2) transition count testing, and (3) signature analysis. We also describe the architectures of the output response analyzers (ORAs) that are used. The signature analysis technique is described in more detail, as it is the most popular compaction technique in use today. When using compaction, it is important to ensure that the faulty and fault-free signatures are different. If they are the same, the faults can go undetected. This situation is referred to as error masking, and the erroneous output response is said to be an alias of the correct output response [Abramovici 1994]. It is also important to ensure that none of the output responses contain an unknown (X) value. If an unknown value is generated and propagated directly or indirectly to the output response analyzer (ORA), then the ORA can no longer function reliably. Therefore, it is necessary to fix all unknown (X) propagation problems to ensure that the logic BIST system will operate correctly by using the X-bounding techniques discussed in Section 5.2. Logic Built-In Self-Test 291 5.4.1 Ones Count Testing Assume that the CUT has only one output and the output contains a stream of L bits. Let the fault-free output response, R0, be r0r1r2 rL−1 . The ones count test technique will only require a counter to count the number of 1’s in the bit stream. For example, if R0 = 0101100 , then the signature or ones count of R0, OC R0 , is 3. If fault f1 present in the CUT causes an erroneous response R1 = 1100110 , then it will be detected because OC R1 = 4; however, fault f2 causing R2 = 0101010 will not be detected because OC R2 = OC R0 = 3. Let the fault-free signature or ones count be m. There will be C L, m possible ways having m 1’s in an L-bit stream. Assuming all faulty sequences are equally likely to occur as the response of the CUT, the aliasing probability or masking probability of using ones count testing having m 1’s [Savir 1985] can be expressed as: POC m = C L m − 1 / 2L − 1 In the previous example, where m = OC R0 = 3 and L = 7, POC m = 34/127 = 0 27. Figure 5.27 shows the ones count test circuit for testing the CUT with T patterns. The number of stages in the counter design must be equal to or greater than log2 L + 1 . 5.4.2 Transition Count Testing The theory behind transition count testing is similar to that for ones count testing, except that the signature is defined as the number of 0-to-1 and 1-to-0 transitions. The transition count test technique [Hayes 1976] simply requires using a D flipflop and an XOR gate connected to a ones counter (see Figure 5.28), to count the T CUT Counter Signature CLK FIGURE 5.27 Ones counter as ORA. T CUT CLK FIGURE 5.28 Transition counter as ORA. ri ri – 1 DQ Counter Signature 292 VLSI Test Principles and Architectures number of transitions in the output data stream. Consider the example given above. Because R0 = 0101100 , the signature or transition count of R0 TC R0 , will be 4. Assume that the initial state of the D flip-flop, r−1, is 0. Fault f1 causing an erroneous response R1 = 1100110 will not be detected because TC R1 = TC R0 = 4, but fault f2 causing R2 = 0101010 will be detected because TC R2 = 6. Let the fault-free signature or transition count be m. Because a given L-bit sequence R0 that starts with r0 = 0 has L − 1 possible transitions, the number of sequences with m transitions can be given by C L − 1 m . Because R0 can also start with r0 = 1, there will be a total of 2C L − 1 m possible ways to have m 0-to-1 and 1-to-0 transitions in an L-bit stream. Assuming all faulty sequences are equally likely to occur as the response of the CUT, the aliasing probability or masking probability of using transition count testing having m transitions [Savir 1985] is: PTC m = 2C L − 1 m − 1 / 2L − 1 In the previous example, where m = TC R0 = 4 and L = 7 PTC m = 29/127 = 0 23. Figure 5.28 shows the transition count test circuit. The number of stages in the counter design must be equal to or greater than log2 L + 1 . 5.4.3 Signature Analysis Signature analysis is the most popular response compaction technique used today. The compaction scheme, based on cyclic redundancy checking (CRC) [Peterson 1972], was first developed in [Benowitz 1975]. Hewlett-Packard commercialized the first logic analyzer (the HP 5004A Signature Analyzer) based on the scheme and referred to it as signature analysis [Frohwerk 1977]. In this section, we discuss two signature analysis schemes: (1) serial signature analysis for compacting responses from a CUT having a single output, and (2) parallel signature analysis for compacting responses from a CUT having multiple outputs. 5.4.3.1 Serial Signature Analysis Consider the n-stage single-input signature register (SISR) shown in Figure 5.29. This SISR uses an additional XOR gate at the input for compacting an L-bit h1 h2 M r0 r1 FIGURE 5.29 An n-stage single-input signature register (SISR). hn – 2 rn – 2 hn – 1 rn – 1 Logic Built-In Self-Test 293 output sequence, M, into the modular LFSR. Let M = m0m1m2 define: mL−1 , and M x = m0 + m1x + m2x2 + · · · + mL−1xL−1 After shifting the L-bit output sequence, M, into the modular LFSR, the contents (remainder) of the SISR, R, is given as r0r1r2 rn−1 , or: r x = r0 + r1x + r2x2 + · · · + rn−1xn−1 The SISR is basically a CRC code generator [Peterson 1972] or a cyclic code checker [Benowitz 1975]. Let the characteristic polynomial of the modular LFSR be f x . [Peterson 1972] has shown that the SISR performs polynomial division of M x by f x , or: M x =q x f x +r x The final state or signature in the SISR is the polynomial remainder, r x , of the division. Consider the four-stage SISR given in Figure 5.30 using f x = 1 + x + x4. Assuming M = 10011011 , we can express M x = 1 + x3 + x4 + x6 + x7. Using polynomial division, we obtain q x = x2 + x3 and r x = 1 + x2 + x3 or R = 1011 . The remainder {1011} is equal to the signature derived from Figure 5.30a when the SISR is first initialized to a starting pattern (seed) of {0000}. Now, assume fault f1 produces an erroneous output stream M = 11001011 or M x = 1 + x + x4 + x6 + x7, as given in Figure 5.30b. Using polynomial division, we obtain q x = x2 + x3 and r x = 1 + x + x2 or R = 1110 . Because the faulty signature R 1110 , is different from the fault-free signature R, {1011}, fault f1 is detected. For fault f2 with M = 11001101 or M x = 1 + x + x4 + x5 + x7 as given in M M r0 r1 r2 r3 1 0000 1 1000 0 1100 1 0110 1 1011 0 0001 0 1100 1 0110 R 1011 (a) M ′ r0 r1 r2 r3 1 0000 1 1000 0 1100 1 0110 0 1011 0 0001 1 1100 1 1100 R′ 1 1 1 0 (b) M ′′ r0 r1 r2 r3 1 0000 0 1000 1 0100 1 1010 0 1101 0 1010 1 0101 1 0110 R ′′ 1 0 1 1 (c) FIGURE 5.30 A four-stage SISR: (a) fault-free signature; (b) signature for fault f1; and (c) signature for fault f2. 294 VLSI Test Principles and Architectures Figure 5.30c, we have q x = x + x3 and r x = 1 + x2 + x3 or R = 1011 . Because R = R, fault f2 is not detected. The fault detection or aliasing problem of an SISR can be better understood by looking at the error sequence E or error polynomial E x of the fault-free sequence M and a faulty sequence M . Define E = M + M , or: E x =M x +M x If E x is not divisible by f x , then all faults generating the faulty sequence M will be detected; otherwise, these faults are not detected. Consider fault f1 again. We obtain E = 01010000 = M + M = 10011011 + 11001011 or E x = x + x3. Because E x is not divisible by f x = 1 + x + x4, fault f1 is detected. Consider fault f2 again. We have E = 01010110 = M + M = 10011011 + 11001101 or E x = x + x3 + x5 + x6. Because f x divides E x —that is, E x = x + x2 f x —fault f2 is not detected. Assume that the SISR consists of n stages. For a given L-bit sequence, L > n, there are 2 L−n possible ways of producing an n-bit signature of which one is the correct signature. Because there are a total of 2L − 1 erroneous sequences in an L-bit stream, the aliasing probability using an n-stage SISR for serial signature analysis (SSA) is: PSSA n = 2 L−n − 1 / 2L − 1 If L n, then PSSA n ≈ 2−n. When n = 20 PSSA n < 2−20 = 0 0001%. 5.4.3.2 Parallel Signature Analysis A common problem when using ones count testing, transition count testing, and serial signature analysis is the excessive hardware cost required to test an m-output CUT. It is possible to reduce the hardware cost by using an m-to-1 multiplexer, but this increases the test time m times. Consider the n-stage multiple-input signature register (MISR) shown in Figure 5.31. The MISR uses n extra XOR gates for compacting n L-bit output sequences, M0 to Mn−1, into the modular LFSR simultaneously. h1 h2 r0 r1 hn – 2 rn – 2 hn – 1 rn – 1 M0 M1 M2 Mn – 2 FIGURE 5.31 An n-stage multiple-input signature register (MISR). Mn – 1 Logic Built-In Self-Test 295 [Hassan 1984] has shown that the n-input MISR can be remodeled as a singleinput SISR with effective input sequence M x and effective error polynomial E(x expressed as: M x = M0 x + xM1 x + · · · + xn−2Mn−2 x + xn−1Mn−1 x and E x = E0 x + xE1 x + · · · + xn−2En−2 x + xn−1En−1 x Consider the four-stage MISR shown in Figure 5.32 using f x = 1+x+x4. Let M0 = 10010 M1 = 01010 M2 = 11000 , and M3 = 10011 . From this information, the signature R of the MISR can be calculated as {1011}. Using M x = M0 x + xM1 x + x2M2 x +x3M3 x , we obtain M x = 1 +x3 +x4 +x6 +x7 or M = 10011011 , as shown in Figure 5.33. This is the same data stream we used in the SISR example in Figure 5.30a. Therefore, R = 1011 . Assume there are mL-bit sequences to be compacted in an n-stage MISR, where L > n ≥ m ≥ 2. The aliasing probability for parallel signature analysis (PSA) now becomes: PPSA n = 2 mL−n − 1 / 2mL − 1 If L n, then PPSA n ≈ 2−n. When n = 20 PPSA n < 2−20 = 0 0001%. The result suggests that PPSA n mainly depends on n, when L n. Hence, increasing the number of MISR stages or using the same MISR but with a different f x can substantially reduce the aliasing probability [Hassan 1984] [Williams 1987]. M0 FIGURE 5.32 A four-stage MISR. FIGURE 5.33 An equivalent M sequence. M1 M2 M3 M0 1 0 0 1 0 M1 0 1 0 1 0 M2 11000 M3 10011 M 10011011 296 VLSI Test Principles and Architectures 5.5 LOGIC BIST ARCHITECTURES Several architectures for incorporating offline BIST techniques into a design have been proposed. These architectures generally fall into four categories: (1) those that assume no special structure to the circuit under test, (2) those that make use of scan chains in the circuit under test, (3) those that configure the scan chains for test pattern generation and output response analysis, and (4) those that use the concurrent checking (implicit test) circuitry of the design. In this section, we only discuss a few representative BIST architectures on each category. A more comprehensive survey can be found in [McCluskey 1985] and [Abramovici 1994]. To preserve integrity and continuity, we adopt the same naming convention used in [Abramovici 1994]. 5.5.1 BIST Architectures for Circuits without Scan Chains The first BIST architecture uses a pseudo-random pattern generator as well as a single-input signature register or multiple-input signature register for testing a combinational or sequential circuit that does not assume any special structure. This architecture is often used at the board or system level. Hewlett-Packard was among the first companies to adopt this BIST architecture for board-level fault diagnosis [Frohwerk 1977]. 5.5.1.1 A Centralized and Separate Board-Level BIST Architecture Figure 5.34a shows a BIST architecture described in [Benowitz 1975]. This is referred to as a centralized and separate board-level BIST architecture (CSBL) [Abramovici 1994]. Two LFSRs and two multiplexers are added to the circuit. The first multiplexer (MUX) selects either the primary inputs (PIs) or the PRPG outputs to drive the circuit under test (CUT). The CUT is typically a sequential circuit (S) but can be a combinational circuit (C) as well. The second multiplexer routes the primary outputs (POs) of the circuit to the SISR. Additional circuitry (not shown in the figure) is used to compare the final signature of the SISR with an embedded golden signature (known good signature). It also provides a pass/fail indication once the test is complete. n PIs n M U X n CUT (C or S) m PRPG TEST MUX k k = [log2m] POs SISR FIGURE 5.34 The centralized and separate board-level BIST (CSBL) architecture. Logic Built-In Self-Test 297 5.5.1.2 Built-In Evaluation and Self-Test (BEST) A similar BIST architecture is described in [Perkins 1980]. This architecture makes use of a PRPG and a MISR that are external to the chip but could be located on the same board. The logic being tested on the chip is typically a sequential circuit but can be a combinational circuit as well. Pseudo-random patterns are applied in parallel from the PRPG to the chip’s primary inputs, and a MISR is used to compact the chip’s output responses. Both PRPG and MISR can also be embedded inside the chip. This architecture, referred to as a built-in evaluation and self-test (BEST), is shown in Figure 5.35. 5.5.2 BIST Architectures for Circuits with Scan Chains For designs that incorporate scan chains, it is possible to make use of this scan architecture for the BIST circuitry. The resulting BIST architecture is generally referred to as a test-per-scan BIST system [Bushnell 2000]. 5.5.2.1 LSSD On-Chip Self-Test A BIST architecture that makes use of scan chains for the BIST circuitry was proposed in [Eichelberger 1983] and shown in Figure 5.36. It was called an LSSD on-chip self-test (LOCST) architecture [Abramovici 1994]. In addition to the internal scan chain comprised of LSSD shift register latches (SRLs), an external scan chain comprised of all primary inputs and primary outputs of the circuit under test (CUT) is required. The external scan chain input is connected to the scan output P M PIs R P CUT (C or S) I S POs G R FIGURE 5.35 The built-in evaluation and self-test (BEST) architecture. Sin PRPG R1 PIs SRL SISR Sout R2 CUT (C) Si So POs SRL FIGURE 5.36 The LSSD on-chip self-test (LOCST) architecture. 298 VLSI Test Principles and Architectures of the internal scan chain. Pseudo-random patterns are generated by a PRPG and are shifted into the combined scan chain. The system clocks are triggered and the contents of the scan chain latches are shifted out to a SISR. The final signature is then compared in the SISR with a precomputed fault-free signature in order to generate a pass/fail error signal. The scan output is also connected to a pin so, in case of a failure, intermediate signatures can be examined externally for diagnosis purposes. 5.5.2.2 Self-Testing Using MISR and Parallel SRSG A similar design was presented in [Bardell 1982]. This design, shown in Figure 5.37, contains an PRPG (parallel shift register sequence generator [SRSG]) and a MISR. The scan chains are loaded in parallel from the PRPG. The system clocks are then triggered and the test responses are shifted to the MISR for compaction. New test patterns are shifted in at the same time while test responses are being shifted out. This BIST architecture is referred to as self-testing using MISR and parallel SRSG (STUMPS) [Bardell 1982]. Due to the ease of integration with traditional scan architecture, the STUMPS architecture is the only BIST architecture widely used in industry to date. In order to further reduce the lengths of the PRPG and MISR and improve the randomness of the PRPG, a STUMPS-based architecture that includes an optional linear phase shifter and an optional linear phase compactor is often used in industrial applications [Nadeau-Dostie 2000] [Cheon 2005]. The linear phase shifter and linear phase compactor typically comprise a network of XOR gates. Figure 5.38 shows the STUMPS-based architecture. 5.5.3 BIST Architectures Using Register Reconfiguration A concern with BIST designs is the amount of test time required. One technique for reducing the test time is to make use of the storage elements already in the design for both test generation and response analysis. The storage elements are redesigned so they can function as pattern generators or signature analyzers for test purposes. This BIST architecture is generally referred to as a test-per-clock BIST system [Bushnell 2000]. PRPG CUT (C) MISR FIGURE 5.37 The self-testing using MISR and parallel (STUMPS) architecture. Logic Built-In Self-Test 299 PRPG Linear Phase Shifter CUT (C ) FIGURE 5.38 A STUMPS-based architecture. Linear Phase Compactor MISR 5.5.3.1 Built-In Logic Block Observer The architecture described in [Ko¨ nemann 1979] and [Ko¨ nemann 1980] applies to circuits that can be partitioned into independent modules (logic blocks). Each module is assumed to have its own input and output registers (storage elements), or such registers are added to the circuit where necessary. The registers are redesigned so that for test purposes they act as PRPGs for test generation or MISRs for signature analysis. The redesigned register is referred to as a built-in logic block observer (BILBO). The BILBO is operated in four modes: normal mode, scan mode, test generation or signature analysis mode, and reset mode. A typical three-stage BILBO that is reconfigurable into an TPG or a MISR during self-test is shown in Figure 5.39. It B2 B1 1 0 Y0 DQ Y1 DQ Y2 DQ Scan-In SCK X0 X1 FIGURE 5.39 A three-stage built-in logic block observer (BILBO). Scan-Out /X2 300 VLSI Test Principles and Architectures is controlled by two control inputs B1 and B2. When both control inputs B1 and B2 are equal to 1, the circuit functions in normal mode with the inputs Yi gated directly into the D flip-flops. When both control inputs are equal to 0, the BILBO is configured as a shift register. Test data can be shifted in via the serial scan-in port or shifted out via the serial scan-out port. Setting B1 = 1 and B2 = 0 converts the BILBO into a MISR. It can then be used in this configuration as a TPG by holding every Yi input to 1. The BILBO is reset after a system clock is triggered when B1 = 0 and B2 = 1. This technique is most suitable for testing circuits, such as RAMs, ROMs, or busoriented circuits, where input and output registers of the partitioned modules can be reconfigured independently. For testing finite-state machines or pipelined-oriented circuits, as shown in Figure 5.40, the signature data from the previous module must be used as test patterns for the next module, because the test generation and signature analysis modes cannot be separated. In this case, a detailed fault simulation is required to achieve 100% single-stuck fault coverage. 5.5.3.2 Modified Built-In Logic Block Observer One technique that overcomes the above BILBO problem is described in [McCluskey 1981]. It uses an additional control input to separate test generation from signature analysis. Such a modified BILBO (MBILBO) design is shown in Figure 5.41. The modification is obtained from the original BILBO by adding one more OR gate to each Yi input. The control input B3 is always set to 0 except when the register has to be configured into a TPG. In that case, B3 is set to 1. For testing the pipelinedoriented circuit shown in Figure 5.40b, the MBILBO cells can now be used, and CC1 and CC2 will be tested alternatively. However, this approach still cannot test the finite-state machine of Figure 5.40a exhaustively, because the receiving BILBO cell must be always in signature analysis mode. 5.5.3.3 Concurrent Built-In Logic Block Observer The above BILBO and MBILBO problems can be resolved by using the concurrent BILBO (CBILBO) approach [Wang 1986c]. It uses two storage elements to perform test generation and signature analysis simultaneously. A CBILBO design is shown BILBO BILBO BILBO Combinational CUT BILBO MISR CC1 MISR CC2 (a) (b) FIGURE 5.40 BILBO architectures: (a) for testing a finite-state machine, and (b) for testing a pipelined-oriented circuit. B3 Y0 B2 B1 Logic Built-In Self-Test 301 Y1 Y2 1 DQ DQ DQ 0 Scan-In SCK X0 X1 FIGURE 5.41 A three-stage modified built-in logic block observer (MBILBO). Scan-Out / X2 B1 0 1 Y0 Y1 Y2 DQ DQ Scan-Out DQ 1 1D 1D 1D 2D Q 2D Q 2D Q 0 SEL SEL SEL Scan-In B2 SCK X0 FIGURE 5.42 A three-stage concurrent BILBO (CBILBO). X1 X2 in Figure 5.42, where only three modes of operation are considered: normal, scan, and test generation and signature analysis. When B1 = 0 and B2 = 1, the upper D flip-flops act as a MISR for signature analysis, whereas the lower two-port D flipflops form a TPG for test generation. Because signature analysis is separated from test generation, an exhaustive or pseudo-exhaustive pattern generator (EPG/PEPG) can now be used for test generation; therefore, no fault simulation is required and it is possible to achieve 100% single-stuck fault coverage using the CBILBO architectures shown in Figure 5.43. However, the hardware cost associated with 302 VLSI Test Principles and Architectures TPG Combinational CUT MISR TPG MISR MISR TPG CC1 MISR TPG CC2 CBILBO CBILBO CBILBO CBILBO (a) (b) FIGURE 5.43 CBILBO architectures: (a) for testing a finite-state machine, and (b) for testing a pipelined-oriented circuit. using the CBILBO approach is generally higher than for the BILBO or MBILBO approach. A gate-level design of the CBILBO one-cell structure using D latches is given in [Wang 1986c]. A CMOS version of the CBILBO structure can be found in [Liu 1987]. 5.5.3.4 Circular Self-Test Path (CSTP) The hardware cost can be substantially reduced using the circular self-test path (CSTP) architecture [Krasniewski 1989] shown in Figure 5.44a. In the CSTP configuration, all primary inputs and primary outputs are reconfigured as external scan cells. They are connected to the internal scan cells to form a circular path. If the entire circular path has n scan cells, then it corresponds to a MISR with characteristic polynomial f x = 1 + xn. During self-test, all primary inputs are connected as a shift register, whereas all internal scan cells and primary outputs are reconfigured as a MISR. The MISR consists of a number of self-test cells connected in series, where in self-test mode, CIRCULATE Sin 0 1 PIs SR MISR CUT (C ) Sout MISR MISR TEST Yi Xi – 1 0 DQ Xi 1 CLK POs (a) (b) FIGURE 5.44 The circular self-test path (CSTP) architecture: (a) CSTP architecture, and (b) self-test cell. Logic Built-In Self-Test 303 each self-test cell takes as input from an XOR gate output of input Yi and its previous scan cell output Xi−1, as shown in Figure 5.44b. One requirement for the CSTP design is that all registers must be initialized to known states prior to self-test. After initialization of all registers, the circuit runs for a number of clock cycles and then the final signature is read out for analysis. Because the characteristic polynomial, f x = 1 + xn, is nonlinear, the CSTP design can lead to low fault coverage [Stroud 1988] [Pilarski 1992] [Carletta 1994] [Touba 2002]. The CSTP architecture is similar to the simultaneous self-test architecture [Bardell 1982] and the circular BIST architecture [Stroud 1988]. The primary differences in the three architectures are the functional modes of operation supported by the registers. Both simultaneous self-test and circular BIST architectures included scan chain capabilities. As a result, the fault coverage obtained during BIST operation could be augmented with additional scan vectors in the event that low fault coverage was obtained for a given application. 5.5.4 BIST Architectures Using Concurrent Checking Circuits For systems that include concurrent checking circuits, it is possible to use the circuitry to verify the output response during explicit (offline) testing; hence, the need to implement a separate response analysis circuit, such as a MISR, is avoided. 5.5.4.1 Concurrent Self-Verification A BIST architecture shown in Figure 5.45, concurrent self-verification (CSV), was described in [Sedmak 1979] and [Sedmak 1980]. A PRPG is applied to the functional circuitry (CUT) and the duplicate circuitry. The duplicate circuitry is realized in complementary form to reduce design and common-mode faults. Because the PRPG n Functional Circuitry m Duplicate Circuitry m Checking Circuitry Two-rail code FIGURE 5.45 The concurrent self-verification (CSV) architecture. 304 VLSI Test Principles and Architectures TABLE 5.4 Representative Logic BIST Architectures Architecture Level TPG ORA Circuit CSBL B or C PRPG SISR C or S BEST B or C PRPG MISR C or S LOCST C PRPG SISR C STUMPS B or C PRPG MISR C BILBO C PRPG MISR C MBILBO C PRPG MISR C CBILBO C EPG/PEPG MISR C CSTP C PRPG MISR C or S CSV C PRPG Checker C or S BIST Test-per-clock Test-per-clock Test-per-scan Test-per-scan Test-per-clock Test-per-clock Test-per-clock Test-per-clock Test-per-clock checking circuitry recommended involves comparing the outputs of the two implementations, this technique avoids the aliasing problem and consequent loss of effective fault coverage. The checking circuitry is a totally self-checking two-rail checker [Abramovici 1994]. 5.5.5 Summary Many logic BIST architectures have been proposed in the 1980s. In this section, we have presented a number of representative BIST architectures for testing combinational or sequential circuits at the board or chip level. Table 5.4 shows some of the main attributes of the BIST architectures presented. A BIST technique that can be used for testing sequential circuits (S) can also be used for testing combinational circuits (C). Similarly, a BIST technique suitable for board-level testing (B) is also applicable for chip-level testing (C). The CBILBO architecture is the only architecture that can be used for exhaustive or pseudo-exhaustive testing. The CSV architecture is the only architecture that does not require an additional SISR or MISR for output response analysis. Due to its ease of integration with traditional scan architecture, the STUMPS architecture is the only architecture widely used in industry to date; however, because pseudorandom patterns are used, fault coverage is still a concern. This has prevented the technique from being accepted across all industries. 5.6 FAULT COVERAGE ENHANCEMENT In pseudo-random testing, the fault coverage is limited by the presence of randompattern resistant (RP-resistant) faults. If the fault coverage is not sufficient, then three approaches can be used to enhance the fault coverage: (1) test point insertion, Logic Built-In Self-Test 305 (2) mixed-mode BIST, and (3) hybrid BIST. The first two approaches are applicable for in-field coverage enhancement, and the third approach is applicable for manufacturing coverage enhancement. Test point insertion adds control points and observation points for providing additional controllability and observability to improve the detection probability of RP-resistant faults so they can be detected during pseudo-random testing. Mixedmode BIST involves supplementing the pseudo-random patterns with some deterministic patterns that detect RP-resistant faults and are generated using on-chip hardware. When BIST is performed during manufacturing test where a tester is present, hybrid BIST involves combining BIST and external testing by supplementing the pseudo-random patterns with deterministic data from the tester to improve the fault coverage. This third option is not applicable when BIST is used in the field, as the tester is not present. Each of these approaches is described in more detail in the following subsections. 5.6.1 Test Point Insertion Test points can be used to increase the circuit’s fault coverage to a desired level. Figure 5.46 shows two typical types of test points that can be inserted. A control point can be connected to a primary input, an existing scan cell output, or a dedicated scan cell output. An observation point can be connected to a primary output through an additional multiplexer, an existing scan cell input, or a dedicated scan cell input. Figure 5.47b shows an example where one control point and one observation point are inserted to increase the detection probability of a six-input AND-gate given in Figure 5.47a. By splitting the six-input AND gate into two fewer-input AND gates and placing a control point and an observation point between the two fewerinput AND gates, we can increase the probability of detecting faults in the original six-input AND gate (e g , output Y stuck-at-0 and any input Xi stuck-at-1), thereby making the circuit more RP-testable. After the test points are inserted, the most difficult fault to detect is the bottom input of the four-input AND gate stuck-at-1. In that case, one of inputs X1 X2, and X3 must be 0, the control point must be Observation Point Observation Point 0 Control Point 1 Control Point BIST_mode (a) BIST_mode (b) FIGURE 5.46 Typical test points inserted for improving a circuit’s fault coverage: (a) test point with a multiplexer, and (b) test point with AND–OR gates. 306 VLSI Test Principles and Architectures X1 X2 X3 X4 Y X5 X6 X1 X2 X3 Control Point X4 X5 X6 Y Observation Point Min. Detection Probability = 1 64 Min. Detection Probability = 7 128 (a) (b) FIGURE 5.47 Example of inserting test points to improve detection probability: (a) an output RP-resistant stuck-at-0 fault, and (b) example inserted test points. 0, and all inputs X4 X5, and X6 must be 1, resulting in a detection probability of 7/128 = 7/8 × 1/2 × 1/2 × 1/2 × 1/2 . 5.6.1.1 Test Point Placement Because test points add area and performance overhead, an important issue for test point insertion is where to place the test points in the circuit to maximize the coverage and minimize the number of test points required. Note that it is not sufficient to only use observation points, as some faults require control points in order to be detected. Optimal placement of test points in circuits with reconvergent fanout has been shown to be NP-complete [Krishnamurthy 1987]. Several approximation techniques for placement of test points have been developed. They can be categorized depending on whether they use fault simulation or testability measures to guide them. Fault simulation guided techniques require that the TPG is known ahead of time and can be simulated to determine the exact set of patterns that will be applied during self-test. Given this set of patterns, fault simulation is used to identify which faults will not be detected during self-test. Test points are then inserted to enable those faults to be detected. The technique in [Iyengar 1989] uses fault simulation to identify gates that block fault propagation and then inserts test points to allow propagation. The technique in [Touba 1996] uses path tracing to identify a set of test point solutions for each undetected fault, and then a covering algorithm is used to select the smallest set of test points that will allow detection of all faults. A limitation of fault simulation guided techniques is that the TPG must be known ahead of time which is not always the case, especially for cores that may be used in different system-on-chips (SOCs) with different BIST controllers. Also, if there are any late engineering changes that alter the set of patterns that are applied during self-test, then the fault coverage may be reduced. Testability measure guided techniques avoid these problems because they do not require any knowledge of the TPG. They focus on improving the detection probability of RP-resistant faults which is approximated with testability measures. The Logic Built-In Self-Test 307 gradient technique in [Seiss 1991] forms a cost function based on the controllability/observability program (COP) testability measures [Brglez 1984] and then computes, in linear time, the gradient of the function with respect to each possible test point. The gradients are used to approximate the global testability impact for inserting a particular test point. Based on these approximations, the test point that has maximum benefit is inserted and the COP testability measures are recomputed. The process continues iteratively adding additional test points until the testability is satisfactory. Methods for speeding up this process are described in [Tsai 1998], where a hybrid cost function is used to estimate the actual cost function, and in [Nakao 1997], where several techniques including simultaneous selection of test points and candidate reduction are used. The technique in [Tamarapalli 1996] uses probabilistic fault simulation, which provides greater accuracy than COP testability measures, to guide the selection of test points to maximize the number of faults that exceed a specified detection probability threshold. In [Boubezari 1999], testability measures are computed and test points are inserted at the RTL. This has the advantage of allowing RTL synthesis procedures to take the test points into consideration when optimizing the design. In [Touba 1999], a logic synthesis procedure is described which uses testability-driven factoring combined with test point insertion to automatically synthesize random-pattern testable circuits. In [Xiang 2005], observation points are inserted in the scan chains and multiple capture cycles are used during shift operation. One important concern with inserting test points is the impact on performance. If a test point adds delay on a critical timing path, then the timing requirements may not be satisfied. Timing-driven test point insertion techniques have been developed to address this problem. The technique in [Tsai 1998] computes the timing slack of each node and eliminates any node whose slack is not sufficiently long as a candidate for test point insertion. As test points are inserted, the slack information is updated. Because test points are not permitted in some locations due to timing constraints, the number of test points that is inserted to achieve sufficient fault coverage may be increased. 5.6.1.2 Control Point Activation Once the test points have been inserted, the logic that drives the control points must be designed. When a control point is activated, it forces the logic value at a particular node in the circuit to a fixed value. During normal operation, all control points must be deactivated. During testing, there are different strategies as to when and how the control points are activated. One approach is random activation, where the control points are driven by the pseudo-random generator. The drawback of this approach is that when a large number of control points are inserted, they can interfere with each other and may not improve the fault coverage as much as desired. An alternative to random activation is to use deterministic activation. The technique in [Tamarapalli 1996] divides the BIST into phases and deterministically activates some subset of the control points in each phase. The technique in [Touba 1996] uses pattern decoding logic to activate the control points only for certain patterns where they are needed to detect RP-resistant faults. 308 VLSI Test Principles and Architectures 5.6.2 Mixed-Mode BIST A major drawback of test point insertion is that it requires modifying the circuit under test. In some cases this is not possible or not desirable (e g , for hard cores, macros, hand-crafted designs, or legacy designs). An alternative way to improve fault coverage without modifying the CUT is to use mixed-mode BIST. Pseudorandom patterns are generated to detect the RP-testable faults, and then some additional deterministic patterns are generated to detect the RP-resistant faults. There are a number of ways for generating deterministic patterns on-chip. Three approaches are described below. 5.6.2.1 ROM Compression The simplest approach for generating deterministic patterns on-chip is to store them in a read-only memory (ROM). The problem with this approach is that the size of the required ROM is often prohibitive. Several ROM compression techniques have been proposed for reducing the size of the ROM in [Agarwal 1981], [Aboulhamid 1983], [Dandapani 1984], and [Edirisooriya 1992]. 5.6.2.2 LFSR Reseeding Instead of storing the test patterns themselves in a ROM, techniques have been developed for storing LFSR seeds that can be used to generate the test patterns [Ko¨ nemann 1991]. The LFSR that is used for generating the pseudo-random patterns is also used for generating the deterministic patterns by reseeding it with computed seeds. The seeds can be computed with linear algebra as described in [Ko¨ nemann 1991]. Because the seeds are smaller than the test patterns themselves, they require less ROM storage. One problem is that for an LFSR with a fixed characteristic (feedback) polynomial, it may not always be possible to find a seed that will efficiently generate the required deterministic test patterns. A solution to that problem was proposed in [Hellebrand 1995a] in which a multiple-polynomial LFSR (MP-LFSR), as illustrated in Figure 5.48, is used. An MP-LFSR is an LFSR Decoding ••• Poly. Id Logic •• ••• LFSR ••• ••• Seeds ••• ••• FIGURE 5.48 Reseeding with multiple-polynomial LFSR. Logic Built-In Self-Test 309 with a reconfigurable feedback network. A polynomial identifier is stored with each seed to select the characteristic polynomial that will be used for that seed. Techniques for further reductions in storage can be achieved by using variable-length seeds [Rajski 1998], a special ATPG algorithm [Hellebrand 1995b], folding counters [Liang 2001], and seed encoding [Al-Yamani 2005]. 5.6.2.3 Embedding Deterministic Patterns A third approach for mixed-mode BIST is to embed the deterministic patterns in the pseudo-random sequence. Many of the pseudo-random patterns generated during pseudo-random testing do not detect any new faults, so some of those “useless” patterns can be transformed into deterministic patterns that detect RP-resistant faults [Touba 1995]. This can be done by adding mapping logic between the scan chains and the CUT [Touba 1995] or in a less intrusive way by adding the mapping logic at the inputs to the scan chains to either perform bit-fixing [Touba 2001] or bit-flipping [Kiefer 1998]. Figure 5.49 shows a bit-flipping BIST scheme taken from [Kiefer 1998]. A bit-flipping function detects these “useless” patterns and maps them to deterministic patterns through the use of an XOR gate that is inserted between the LFSR and each scan chain. 5.6.3 Hybrid BIST For manufacturing fault coverage enhancement where a tester is present, deterministic data from the tester can be used to improve the fault coverage. The simplest approach is to perform top-up ATPG for the faults not detected by BIST to obtain a set of deterministic test patterns that “top-up” the fault coverage to the desired level and then store those patterns directly on the tester. In a system-on-chip, test scheduling can be done to overlap the BIST run time with the transfer time for loading the deterministic patterns from the tester [Sugihara 1998] [Jervan 2003]. More elaborate hybrid BIST schemes have been developed which attempt to store the deterministic patterns on the tester in a compressed form and then make use of the existing BIST hardware to decompress them. Such techniques are described in [Das 2000], [Dorsch 2001], [Ichino 2001], [Krishna 2003], [Wohl 2003], [Jas 2004], and [Lei 2005]. More discussions on test compression can be found in Chapter 6. FIGURE 5.49 Bit-flipping BIST. LFSR Bit-Flipping Function Scan Chain 310 VLSI Test Principles and Architectures 5.7 BIST TIMING CONTROL While logic BIST can be used to reduce test costs by moving most of the tester functionality onto the circuit under test, its real value is in providing at-speed testing for high-speed and high-performance circuits. These circuits often contain multiple clock domains, each running at a frequency that is either synchronous or asynchronous to the other clock domains. The most critical yet difficult part of using logic BIST is how to test intraclock-domain faults and inter-clock-domain faults thoroughly and efficiently with a proper capture-clocking scheme. An intra-clock-domain fault originates at one clock domain and terminates at the same clock domain. An inter-clock-domain fault originates at one clock domain but terminates at another clock domain. There are three basic capture-clocking schemes that can be used for testing multiple clock domains: (1) single-capture, (2) skewed-load, and (3) double-capture. We will illustrate with BIST timing control diagrams how to test synchronous and asynchronous clock domains using these schemes. Two clock domains are said to be synchronous if the active edges of both clocks controlling the two clock domains can be aligned precisely or triggered simultaneously. Two clock domains are said to be asynchronous if they are not synchronous. Throughout this section, we will assume that a STUMPS-based architecture is used and that each clock domain contains one test clock and one scan enable signal. The faults we will consider include structural faults, such as stuck-at faults and bridging faults, as well as timing-related delay faults, such as path-delay faults and transition faults. 5.7.1 Single-Capture Single-capture is a slow-speed test technique in which only one capture pulse is applied to each clock domain. It is the simplest for testing all intra-clock-domain and inter-clock-domain structural faults. There are two approaches that can be used: (1) one-hot single-capture, and (2) staggered single-capture. 5.7.1.1 One-Hot Single-Capture Using the one-hot single-capture approach, a capture pulse is applied to only one clock domain during each capture window, while all other test clocks are held inactive. A sample timing diagram is shown in Figure 5.50. In the figure, because only one capture pulse (C1 or C2) is applied during each capture window, this scheme can only test intra-clock-domain and inter-clock-domain structural faults. The main advantage of this approach is that the designer does not have to worry about clock skews between the two clock domains during self-test, as each clock domain is tested independently. The only requirement is that delays d1 and d2 be properly adjusted; hence, this approach can be used for slow-speed testing of both synchronous and asynchronous clock domains. Another benefit of using this approach is that a single, slow-speed global scan enable (GSE) signal can be used Logic Built-In Self-Test 311 CK1 CK2 Shift Window Capture Window C1 d1 Shift Window Capture Window d2 C2 Shift Window GSE FIGURE 5.50 One-hot single-capture. for driving both clock domains, which makes it easy to integrate with scan. A major drawback is longer test time, as all clock domains have to be tested one at a time. 5.7.1.2 Staggered Single-Capture The long test time problem using one-hot single-capture can be solved using the staggered single-capture approach [Wang 2006]. A sample timing diagram is shown in Figure 5.51. In this approach, capture pulses C1 and C2 are applied in a sequential or staggered order during the capture window to test all intra-clock-domain and inter-clock-domain structural faults in the two clock domains. For clock domains that are synchronous, adjusting d2 will allow us to detect inter-clock-domain delay faults between the two clock domains at-speed. In addition, because d1 and d3 can be as long as desired, a single, slow-speed GSE signal can be used. This significantly simplifies the logic BIST physical implementation for designs with multiple clock domains. There may be some structural fault coverage loss between clock domains if the ordered sequence of capture clocks is fixed for all capture cycles. 5.7.2 Skewed-Load Skewed-load is an at-speed delay test technique in which a last shift pulse followed immediately by a capture pulse, running at the test clock’s operating CK1 CK2 GSE Shift Window ••• d1 ••• Capture Window C1 d2 d3 C2 FIGURE 5.51 Staggered single-capture. Shift Window ••• ••• 312 VLSI Test Principles and Architectures frequency, are used to launch the transition and capture the output response [Savir 1993]. It is also referred to as launch-on-shift. This technique addresses the intraclock-domain delay fault detection problem which cannot be tested using singlecapture schemes. Skewed-load uses the value difference between the last shift pulse and the next-to-last-shift pulse to launch the transition and uses the capture pulse to capture the output response. In order for the last shift pulse to launch the transition, the scan enable signal associated with the clock domain must be able to switch operations from shift to capture in one clock cycle. There are three approaches that can be used: (1) one-hot skewed-load, (2) aligned skewed-load, and (3) staggered skewed-load. 5.7.2.1 One-Hot Skewed-Load Similar to one-hot single-capture, the one-hot skewed-load approach tests all clock domains one by one [Bhawmik 1997]. A sample timing diagram is shown in Figure 5.52. The main differences are: (1) It applies shift-followed-by-capture pulses (S1-followed-by-C1 or S2-followed-by-C2) to detect intra-clock-domain delay faults, and (2) each scan enable signal (SE1 or SE2) must switch operations from shift to capture within one clock cycle (d1 or d2). Thus, this approach can only be used for at-speed testing of intra-clock-domain delay faults in both synchronous and asynchronous clock domains. The disadvantages are: (1) It cannot be used to detect inter-clock-domain delay faults, (2) it has a long test time, and (3) it is incompatible with scan, as a single, slow-speed GSE signal can no longer be used. 5.7.2.2 Aligned Skewed-Load The disadvantages of one-hot skewed-load can be resolved by using the aligned skewed-load scheme. One aligned skewed-load approach that aligns all capture edges together is illustrated in Figure 5.53 [Nadeau-Dostie 1994] [Nadeau-Dostie 2000]. The approach is referred to as capture aligned skewed-load. The major advantage of using this approach is that all intra-clock-domain and inter-clockdomain faults can be tested. The arrows shown in Figure 5.53 indicate the delay CK1 SE1 CK2 SE2 Shift Window ••• Capture Window S1 C1 d1 Shift Window Capture Window Shift Window ••• ••• S2 C2 ••• ••• d2 ••• FIGURE 5.52 One-hot skewed-load. Logic Built-In Self-Test 313 S1 C S2 S3 CK1 SE1 CK2 SE2 CK3 SE3 FIGURE 5.53 Capture aligned skewed-load. faults that can be tested. For example, the three arrows from S1 (CK1) to C are used to test all intra-clock-domain delay faults in the clock domain controlled by CK1 and all inter-clock-domain delay faults from CK1 to CK2 and CK3. The remaining six arrows shown from S2 (CK2) to C and from S3 (CK3) to C are used to test all the remaining delay faults. Because the active edges (rising edges) of the three capture pulses (see dash line C) must be aligned precisely, the circuit must contain one reference clock, and the frequency of all remaining test clocks must be derived from the reference clock. In the example given here, CK1 is the reference clock operating at the highest frequency, and CK2 and CK3 are derived from CK1 and designed to operate at 1/2 and 1/4 the frequency, respectively; therefore, this approach is only applicable for at-speed testing of intra-clock-domain and inter-clock-domain delay faults in synchronous clock domains. A similar aligned skewed-load approach that aligns all last shift edges, rather than capture edges, is shown in Figure 5.54 [Hetherington 1999] [Rajski 2003]. This approach is referred to as launch aligned skewed-load. Similar to capture aligned skewed-load, it is also only applicable for at-speed testing of intra-clock-domain and inter-clock-domain delay faults in synchronous clock domains. Consider the three clock domains, driven by CK1, CK2, and CK3, again. The eight arrows among the dash line S and the three capture pulses (C1, C2, and C3) indicate the intra-clock-domain and inter-clock-domain delay faults that can be tested. Unlike Figure 5.53, however, in order to test the inter-clock-domain delay faults from CK1 to CK3, a special shift pulse S1 (when SE1 is set to 1) is required. As this method requires a much more complex timing-control diagram, a clock suppression circuit is used to enable or disable selected shift or capture pulses [Rajski 2003]. The dotted clock pulses shown in the figure indicate the suppressed shift pulses. 314 VLSI Test Principles and Architectures S C1 Capture Window S1 CK1 SE1 C2 CK2 SE2 C3 CK3 SE3 FIGURE 5.54 Launch aligned skewed-load. 5.7.2.3 Staggered Skewed-Load While the above aligned skewed-load approaches can test all intra-clock-domain and inter-clock-domain faults in synchronous clock domains, their physical implementation is extremely difficult. There are two main reasons. First, in order to effectively align all active edges in either capture or last shift, the circuit must contain a reference clock. This reference clock must operate at the fastest clock frequency, and all other clock frequencies must be derived from the reference clock; such designs rarely exist. Second, for any two edges that cannot be aligned precisely due to clock skews, we must either resort to a one-hot skewed-load approach or add capture-disabling circuitry on the functional data paths of the two clock domains to prevent the cross-domain logic from interacting with each other during capture. This increases the circuit overhead, degrades the functional circuit performance, and reduces the ability to test inter-clock-domain faults. The staggered skewed-load approach shown in Figure 5.55 relaxes these conditions [Wang 2005b]. For test clocks that cannot be precisely aligned, a delay d3 is inserted, to eliminate the clock skew interaction between the two clock domains. The two last shift pulses (S1 and S2) are used to create transitions at the outputs of some scan cells, and the output responses to these transitions are captured by the following two capture pulses (C1 and C2), respectively. Both delays d1 and d2 are set to their respective clock domains’ operating frequencies; hence, this scheme can be used to test all intra-clock-domain faults and inter-clock-domain structural faults in asynchronous clock domains. A problem still exists, as each clock domain requires an at-speed scan enable signal, which complicates physical implementation. Logic Built-In Self-Test 315 Shift Window CK1 ••• SE1 CK2 ••• SE2 Capture Window S1 C1 d1 Shift Window ••• d3 S2 C2 d2 ••• FIGURE 5.55 Staggered skewed-load. 5.7.3 Double-Capture The physical implementation difficulty using skewed-load can be resolved by using the double-capture scheme. Double-capture is another at-speed test technique in which two consecutive capture pulses are applied to launch the transition and capture the output response. It is also referred to as broad-side [Savir 1994] or launch-on-capture. The double-capture scheme can achieve true at-speed test quality for intra-clock-domain and inter-clock-domain faults in any synchronous or asynchronous design and that is easy for physical implementation. Here, true at-speed testing is meant to: (1) allow detection of intra-clock-domain faults within each clock domain at its own operating frequency and detection of inter-clockdomain structural faults or delay faults, depending on whether the circuit under test is synchronous, asynchronous, or a mix of both; and (2) ease physical implementation for seamless integration with the conventional scan/ATPG technique. 5.7.3.1 One-Hot Double-Capture Similar to one-hot skewed-load, the one-hot double-capture approach tests all clock domains one by one. A sample timing diagram is shown in Figure 5.56. The CK1 CK2 GSE Shift Window ••• ••• Capture Window C1 C2 d1 Shift Window ••• ••• Capture Window Shift Window ••• C3 C4 d2 ••• FIGURE 5.56 One-hot double-capture. 316 VLSI Test Principles and Architectures main differences are: (1) Two consecutive capture pulses are applied (C1-followedby-C2 or C3-followed-by-C4) at their respective clock domains’ frequencies (of period d1 or d2) to test intra-clock-domain delay faults, and (2) a single, slow-speed GSE signal is used to drive both clock domains. Hence, this scheme can be used for true at-speed testing of intra-clock-domain delay faults in both synchronous and asynchronous clock domains. Two drawbacks remain: (1) It cannot be used to detect inter-clock-domain delay faults, and (2) it has a long test time. 5.7.3.2 Aligned Double-Capture The drawbacks of the one-hot double-capture scheme can be resolved by using an aligned double-capture approach. Similar to the aligned skewed-load approach, the aligned double-capture scheme allows all intra-clock-domain faults and interclock-domain faults to be tested [Wang 2006]. The main differences are: (1) Two consecutive capture pulses are applied, rather than shift-followed-by-capture pulses, and (2) a single, slow-speed GSE signal is used. Figures 5.57 and 5.58 show two C1 C C2 C3 CK1 CK2 CK3 GSE FIGURE 5.57 Capture aligned double-capture. C C1 CK1 CK2 CK3 GSE Capture Window C4 C2 C3 FIGURE 5.58 Launch aligned double-capture. Logic Built-In Self-Test 317 sample timing diagrams. This scheme can be used for true at-speed testing of synchronous clock domains. One major drawback is that precise alignment of the capture pulses is still required. This complicates physical implementation for designs with asynchronous clock domains. 5.7.3.3 Staggered Double-Capture The capture alignment problem in the aligned double-capture approach can finally be relaxed by using the staggered double-capture scheme [Wang 2005a] [Wang 2006]. A sample timing diagram is shown in Figure 5.59. During the capture window, two capture pulses are generated for each clock domain. The first two capture pulses (C1 and C3) are used to create transitions at the outputs of some scan cells, and the output responses to the transitions are captured by the second two capture pulses (C2 and C4), respectively. Both delays d2 and d4 are set to their respective domains’ operating frequencies. Because d1, d3, and d5 can be adjusted to any length, we can simply use a single, slow-speed GSE signal for driving all clock domains; hence, true at-speed testing is guaranteed using this approach for asynchronous clock domains. Because a single GSE signal is used, this scheme significantly eases physical implementation and allows us to integrate logic BIST with scan/ATPG easily in order to improve the circuit’s manufacturing fault coverage. 5.7.4 Fault Detection Scan ATPG and logic BIST are currently the two most widely used structural offline test techniques for improving a circuit’s fault coverage and product quality. Unfortunately, 100% single-stuck fault coverage using scan ATPG does not guarantee perfect product quality (i e , no test escapes) [McCluskey 2000] [Li 2002]. Recent investigations reported in [McCluskey 2004] further revealed that only 5% (15) of the 324 defective ELF35 chips contained defects that acted as single-stuck-at faults, while 35% (41) of the 116 defective Murphy chips acted as single-stuck-at faults. The remaining defects were (1) timing dependent, (2) sequence dependent, CK1 CK2 GSE Shift Window ••• d1 ••• Capture Window C1 C2 d2 d3 d4 d5 C3 C4 Shift Window ••• ••• FIGURE 5.59 Staggered double-capture. 318 VLSI Test Principles and Architectures or (3) attributed to timing-independent, non-single-stuck-at faults, such as multiplestuck-at faults or non-feedback bridging faults. Possible causes of timing-dependent defects are resistive opens, connections that have significant higher resistance than intended or transistors with lower drive than designed for. Possible causes of sequence-dependent defects are: (1) a defect that acts like a stuck-open fault [Li 2002] or (2) one that causes a feedback bridging fault. The paper found that all test sets using 15-detect (an N-detect method for detecting a single stuck-at fault multiple times) [Ma 1995] or transition faults propagated to all reachable outputs (TARO) [Tseng 2001] resulted in zero to three test escapes on both devices. This suggests that in order to screen out more defects delay fault testing is no longer optional. Test patterns targeting single-stuck-at faults multiple times or all possible transition paths (not just critical paths) are also required. Logic BIST automatically addresses these issues as it is able to detect defects that cannot be modeled for scan ATPG. Intra-clock-domain delay fault testing is relatively easy using any of the above skewed-load and double-capture timing control schemes. Inter-clock-domain delay fault testing, however, is more complex. [Wang 2005a] conducted an experiment that showed that applying a single capture pulse to each clock domain, rather than two pulses, as shown in Figure 5.60, yields the highest fault coverage. In this figure, d has to be set correctly to detect inter-clock-domain faults between the two clock domains. Table 5.5 shows the type of faults that can be detected and the design styles that must be adopted when using the above timing control schemes. Each scheme has its advantages and disadvantages; for example, 1. One-hot single-capture yields the highest fault coverage for both intra-clockdomain and inter-clock-domain structural faults. 2. Staggered single-capture yields the highest fault coverage for inter-clockdomain delay faults. 3. One-hot skewed-load may yield the highest fault coverage for intra-clockdomain delay faults but may over-test the circuit by creating more invalid states in the functional circuitry than the one-hot double-capture approach. Shift Window CK1 ••• CK2 ••• GSE FIGURE 5.60 Inter-clock-domain fault detection. Capture Window C1 d C2 Shift Window ••• ••• Logic Built-In Self-Test 319 TABLE 5.5 Fault Detection Capability Capture-Clocking Scheme One-hot single-capture Staggered single-capture One-hot skewed-load Aligned skewed-load Staggered skewed-load One-hot double-capture Aligned double-capture Staggered double-capture IntraStructural √ √ √ √ √ √ √ √ IntraDelay – – √ √ √ √ √ √ InterStructural √ √ InterDelay – √ √ – √ √ √ √ √ – √ √ √ √ Sync. Design √ √ √ √ √ √ √ √ Async. Design √ √ √ – √ √ – √ 4. Aligned skewed-load and aligned double-capture are best suited for testing synchronous clock domains. 5. Staggered skewed-load and staggered double-capture are best suited for testing asynchronous clock domains. To summarize, a hybrid double-capture scheme using staggered double-capture and aligned double-capture seems to be the preferred scheme for true at-speed testing of designs having a number of synchronous and asynchronous clock domains. This hybrid approach makes physical implementation easier than other approaches and allows for seamless integration with any conventional scan/ATPG technique to further improve the circuit’s fault coverage. 5.8 A DESIGN PRACTICE In this section, we show an example of designing a logic BIST system for testing a scan-based design (core) comprised of two clock domains using s38417 and s38584. The two clock domains are taken from the ISCAS-1989 benchmark circuits [Brglez 1989] and their statistics are shown in Table 5.6. The design we consider is described at the register-transfer level (RTL). We show you all the necessary steps to arrive at the logic BIST system design, verify its correctness, and improve its fault coverage. TABLE 5.6 Design Statistics Clock Domain No. of PIs No. of POs No. of Flip-Flops No. of Gates CD1 (s38417) 28 106 1636 22179 CD2 (s38584) 12 278 1452 19253 320 VLSI Test Principles and Architectures 5.8.1 BIST Rule Checking and Violation Repair The first step is to perform logic BIST design rule checking on the RTL design. All DFT rule violations of the scan design rules and BIST-specific design rules provided in Section 2.6 of Chapter 2 and Section 5.2 must be repaired. Once all DFT rule violations are repaired, the design should meet all scan and logic BIST design rules. In addition, we should be aware of the following design parameters: The number of test clocks present in the design, each used for controlling one clock domain. The number of set/reset clocks present in the design to be used for breaking all asynchronous set/reset loops. In the example given above, the design contains two test clocks and does not require any additional set/reset clock. The new RTL design (core) after BIST rule repair is performed is referred to as an RTL BIST-ready core. 5.8.2 Logic BIST System Design The second step is to design the logic BIST system at the RTL. The decisions that need to be made at this stage include: The type of logic BIST architecture to adopt. The number of PRPG–MISR (or PEPG–MISR) pairs to use. The length of each PRPG–MISR (or PEPG–MISR) pair. The faults to be tested and BIST timing control diagrams to be used for testing these faults. The types of optional logic to be added in order to ease physical implementation and facilitate debug and diagnosis, as well as improve the circuit’s fault coverage. 5.8.2.1 Logic BIST Architecture In accordance with the logic BIST architectures summarized in Table 5.4, we choose to implement a STUMPS-based architecture, as it is easy to integrate with scan/ATPG and is the architecture widely used in the industry. We recommend using one PRPG–MISR pair for each clock domain, whenever possible, as the resulting BIST architecture is easier to debug. In addition, the use of one PRPG– MISR pair for each clock domain can eliminate the need for additional design efforts for managing clock skews between interactive clock domains, even when they operate at the same frequency. If it is required to use a single PRPG–MISR pair to test multiple clock domains, these clock domains should be placed within physical proximity in order to simplify physical implementation. An example logic BIST system based on the STUMPS architecture for testing the design given in Table 5.6 is shown in Figure 5.61. Logic Built-In Self-Test 321 SCK1 SCK2 Data / Control Start Finish Result Logic BIST Controller PLL CK1 CK2 Test Controller CCK1 CCK2 Clock Gating Block TCK1 TCK2 TPG PRPG1 PRPG2 PS1/SpE1 PS2/SpE2 Input Selector Clock Domain C CD1 Clock Domain CD2 BIST-Ready Core SpC1 SpC2 MISR1 MISR2 ORA FIGURE 5.61 A logic BIST system for testing a design with two cores. PIs/SIs POs/SOs The BIST architecture used for testing the BIST-ready core consists of a TPG for generating test stimuli, an input selector for providing pseudo-random or ATPG patterns to the core-under-test, an ORA for compacting the test responses, and a logic BIST controller for coordinating the overall BIST operation. The logic BIST controller consists of a test controller and a clock gating block. The test controller initiates the BIST operation upon receiving a Start signal, issues a Finish signal once the BIST operation is complete, and reports the pass/fail status of the test through the Result bus. The clock gating block accepts internal PLL clocks (CK1 and CK2) derived from external functional clocks (SCK1 and SCK2) and generates the required test clocks (TCK1 and TCK2) and controller clocks (CCK1 and CCK2) for controlling the BIST-ready core and test controller, respectively. During normal functional operation, both CK1 and CK2 can run faster or slower than SCK1 and SCK2, respectively. 5.8.2.2 TPG and ORA Next, we need to determine the length of each PRPG–MISR pair. Using a separate PRPG–MISR pair for each clock domain allows us to reduce the length of each PRPG and MISR. In the example shown in Figure 5.61, the linear phase shifters, PS1 and PS2, and space expanders, SpE1 and SpE2, can be used to further reduce the length of the PRPGs, whereas the space compactors, SpC1 and SpC2, can be used to further reduce the length of the MISRs. Each space expander or space compactor typically consists of an XOR-gate tree. Now, suppose we decide to: (1) synthesize the two clock domains, CD1 and CD2, each with 20 balanced scan chains; (2) run 100,000 pseudo-random patterns to obtain very high BIST fault coverage by adding additional test points; and 322 VLSI Test Principles and Architectures (3) perform top-up ATPG after BIST to further increase the circuit’s fault coverage. Because CD1 has 28 PIs, a logical conclusion would be to expect the length of the PRPG1 to be 48 for using a 48-stage PRPG to drive 28 PIs and 20 scan chains. Because we plan to perform top-up ATPG, which requires sharing 20 out of the 28 PIs with scan inputs (SIs), and another 20 POs with scan outputs (SOs), another possible length for the PRPG1 would be 28. What we need to determine is whether a 28-stage PRPG, constructed from a maximum-length LFSR or CA, is adequate for generating the required 100,000 pseudo-random patterns. For CD1 with 20 balanced scan chains, 82 shift clock pulses are required (1636 flip-flops/20 scan chains) to scan-in a single pseudo-random pattern. This means that a total of 8.2 million shift clock pulses are required to scan-in all 100,000 patterns. This number is much smaller than the 256 million 228 − 1 patterns generated using a 28-stage maximum-length LFSR or CA for the PRPG1. From Table 5.1, we choose a 28-stage maximum-length LFSR with characteristic polynomial f x = 1 + x3 + x28. A similar analysis applies for CD2. The main difference is that CD2 has 12 PIs. Suppose we pick 10 out of the 12 PIs to share with 10 SIs for top-up ATPG. We will need to use a 10-to-20 space expander (SpE2) for driving the 20 scan chains and a 20-to-10 space compactor (SpC2) for driving the 10 SOs. Because testing this clock domain requires a total of 7.3 million (1452/20×100,000) shift clock pulses, we need to use at least a 23-stage maximum-length LFSR or CA as PRPG2 to drive the 12 PIs. From Table 5.1, we choose a 25-stage maximum-length LFSR with characteristic polynomial f x = 1 + x3 + x25. As indicated in Section 5.4.3, each MISR can cause an aliasing problem, but the problem is of less concern when the MISR length is greater than 20. Because CD1 and CD2 both have 106 and 278 POs, we choose a 106-to-27 space compactor (SpC1) and a 278-to-35 space compactor (SpC2), respectively. Thus, we will use a 47-stage MISR and a 45-stage MISR to compact the test responses from both CD1 and CD2, respectively, where 47 = 27 (shared POs) + 20 (SOs) and 45 = 35 (shared POs) + 10 (SOs). From Table 5.1, we choose to implement the 47-stage MISR with f x = 1 + x5 + x47 and the 45-stage MISR with f x = 1 + x + x3 + x4 + x45. Table 5.7 shows the decisions made for each PRPG–MISR pair so far. 5.8.2.3 Test Controller The test controller plays a central role in coordinating the overall BIST operation. In general, a finite-state machine written at the RTL is used to implement the test TABLE 5.7 PRPG–MISR Choices Clock Domain CD1 (s38417) CD2 (s38584) No. of Scan Chains 20 20 No. of Shared SIs or SOs 20 10 Maximum Scan Chain Length 82 73 PRPG Length 28 25 MISR Length 47 45 Logic Built-In Self-Test 323 controller for interfacing with all external signals, such as Start, Finish, and Result, and generating the required timing control signals for controlling each PRPG–MISR pair and the BIST-ready core. Comparison logic is included in the test controller to compare the final signature with an embedded golden signature. Often, these interface signals are controlled through an IEEE 1149.1 boundaryscan-standard-based test access port (TAP) controller. In this case, all signals can be assessed through the TAP: test data in (TDI), test data out (TDO), test clock (TCK), and test mode select (TMS). Optionally, an IEEE 1500 standardbased wrapper may be also embedded in each selected clock domain. Both IEEE standards are discussed extensively in Chapter 10. In order to test structural faults in the BIST-ready core, we choose the staggered single-capture approach rather than the one-hot single-capture approach. The slowspeed timing control diagram is shown in Figure 5.62, where test clocks TCK1 and TCK2 are staggered and generated by the clock gating block shown in Figure 5.61. In order to test delay faults in the BIST-ready core, we choose the staggered doublecapture approach if CD1 and CD2 are asynchronous or the aligned double-capture approach if they are synchronous. This is due to the fact that either approach allows us to operate a GSE signal at slow speed for driving all clock domains simultaneously, in both BIST and scan ATPG modes. The at-speed timing control diagrams using the staggered double-capture and launch aligned double-capture schemes are shown in Figures 5.63 and 5.64, respectively. 5.8.2.4 Clock Gating Block In order to generate an ordered sequence of single-capture or double-capture clocks, clock suppression [Rajski 2003] [Wang 2004], daisy-chain clock triggering, or tokenring clock enabling [Wang 2005a] can be used. The clock suppression scheme typically requires using a reference clock operating at the highest frequency. Daisychain clock triggering means that a completion of one event automatically triggers the next event, as the arrows show in Figure 5.65. The only difference between daisy-chain clock triggering and token-ring clock enabling is that the former uses a clock edge to trigger the next event, while the latter uses a signal level to enable the next event. Shift Window TCK1 ••• TCK2 ••• GSE Capture Window C1 C2 FIGURE 5.62 Slow-speed timing control using staggered single-capture. Shift Window ••• ••• 324 VLSI Test Principles and Architectures Shift Window TCK1 ••• TCK2 ••• GSE Capture Window C1 C2 d C3 C4 Shift Window ••• ••• FIGURE 5.63 At-speed timing control using staggered double-capture. Shift Window TCK1 ••• TCK2 ••• GSE Capture Window C1 C2 C3 C4 Shift Window ••• ••• FIGURE 5.64 At-speed timing control using launch aligned double-capture. GSE TCK1 ••• TCK2 ••• FIGURE 5.65 Daisy-chain clock triggering. C1 C2 d C3 C4 Figure 5.66 shows a daisy-chain clock-triggering circuit for generating the staggered double-capture waveform given in Figure 5.65. When the BIST mode is activated, the SE1/SE2 generators and two-pulse controllers will generate the required scan enable and double-capture clock pulses, per the arrows shown in Figure 5.65. Each SE1/SE2 can be treated as a GSE signal for CD1/CD2. Figure 5.67 shows a clock suppression circuit for generating the launch aligned double-capture waveform given in Figure 5.64. This circuit uses a reference clock (CK1) to program the capture window. The contents of the 8-bit shift register are preset to {0011,1111} during each shift window. Due to its programmability, the Logic Built-In Self-Test 325 BIST mode SE1 Generator 2-Pulse Controller CK1 SE2 SE2 Generator SE1 CK1 TCK1 2-Pulse Controller CK2 TCK2 CK2 FIGURE 5.66 A daisy-chain clock triggering circuit for generating the waveform given in Figure 5.65. BIST mode ‘0’ CK1 GSE Generator GSE ‘0’ CK1 0011 CK1 1111 CK2 FIGURE 5.67 A clock suppression circuit for generating the waveform given in Figure 5.64. TCK1 TCK2 approach can also be used to generate timing waveforms for testing asynchronous designs. One major requirement is that we guarantee that the delay measured by the number of reference clock pulses will be longer than delay d between C2 and C3, as shown in Figure 5.63. 5.8.2.5 Re-Timing Logic The main difference between ATE-based scan testing and logic BIST is that the latter requires that more complex BIST circuitry be implemented on the functional circuitry. Successfully completing the physical implementation of the functional circuitry of a high-speed and high-performance design is a challenge in itself. If the BIST circuitry adds a large number of timing critical signals and requires strict clock-skew management, the physical implementation of logic BIST can become extremely difficult; therefore, we recommend adding two pipelining registers (see Figure 5.9) between each PRPG and the BIST-ready core and two additional pipelining registers between the BIST-ready core and each MISR. In this case, the maximum scan chain length for each clock domain, CD1 or CD2, is effectively increased by 2, not 4. 5.8.2.6 Fault Coverage Enhancing Logic and Diagnostic Logic The drawback to using pseudo-random patterns is that the circuit may not meet the target fault coverage goal. In order to improve the circuit’s fault coverage, we recommend adding extra test points and additional logic for top-up ATPG support at the RTL. A general rule of thumb is to add one extra test point every 1000 326 VLSI Test Principles and Architectures TABLE 5.8 Example Test Modes Supported by the Logic BIST System Test Mode CD1 Effective Chain Count CD2 Effective Chain Count Normal 0 0 BIST 20 20 ATPG 20 10 ATPG compression 20 20 Serial debug and diagnosis 1 1 gates. For top-up ATPG support, the inserted logic includes an input selector for selecting test patterns either from the PRPGs or PIs/SIs, as shown in Figure 5.61, as well as circuitry for reconfiguring the scan chains to perform top-up ATPG in: (1) ATPG mode, or (2) ATPG compression mode, which is discussed in more detail in Chapter 6. We also recommend including diagnostic logic in the RTL BIST code to facilitate debug and diagnosis. One simple approach is to connect all PRPG–MISR pairs (and all scan chains) as a serial scan chain and make them externally accessible. (Please refer to Chapter 7 for more advanced BIST diagnosis techniques.) Table 5.8 summarizes all possible test modes of the logic BIST system along with the effective scan chain counts for each test mode. 5.8.3 RTL BIST Synthesis Once all decisions regarding the logic BIST architecture are made, it is time to create the RTL logic BIST code. At this stage, it is possible to either design the logic BIST system by hand or generate the RTL code automatically using a (commercially available) RTL logic BIST tool. In either case, the number of scan chains for each clock domain should be specified along with the names of their associated scan inputs and scan outputs without inserting the actual scan chains into the circuit. The scan synthesis task can be handled as part of the general synthesis task, implemented using any commercially available synthesis tool for converting the RTL BIST-ready core and the logic BIST system into a gate-level netlist. 5.8.4 Design Verification and Fault Coverage Enhancement Finally, the synthesized netlist must be verified with functional or timing verification to ensure that the logic BIST system functions as intended. If any pattern mismatch occurs, the problem must be identified and resolved. Next, fault simulation must be performed on the pseudo-random patterns generated by the TPG in order to determine the circuit’s fault coverage. If the circuit does not reach the target fault coverage goal, additional test points should be inserted or top-up ATPG should be used. The extra test points that were added in advance at the RTL design should allow you to achieve the target fault coverage goal; otherwise, the test point insertion and fault simulation process may have to be repeated until the final fault Logic Built-In Self-Test 327 Test Point Selection at RTL Design Logic/Scan Synthesis Fault Simulation Gate-Level Test No Point Insertion FIGURE 5.68 Fault simulation and test point insertion flow. Coverage Acceptable? Yes Done coverage goal is reached. Once this process is complete, the golden signature can be either recorded to be compared externally or hard-coded into the comparison logic. The fault simulation and test point insertion flow are illustrated in Figure 5.68. 5.9 CONCLUDING REMARKS Bardell and McAnney [Bardell 1982] are among the pioneers who have proposed a widely adopted logic BIST architecture, called STUMPS, for scan-based designs. The acceptance of this STUMPS architecture is mostly due to the ease of integration of the BIST circuitry into a scan design; however, the efforts required to implement the BIST circuitry and the loss of the fault coverage for using pseudo-random patterns have prevented the STUMPS-based logic BIST architecture from being widely used across all industries. As the semiconductor manufacturing technology moves into the nanometer design era, it remains to be seen how the CBILBObased architecture proposed by Wang and McCluskey [Wang 1986c], which can always guarantee 100% single stuck-at fault coverage and has the ability of running 10 times more BIST patterns than the STUMPS-based architecture, will perform. Challenges lie ahead with regard to whether or not pseudo-exhaustive testing will become a preferred BIST pattern generation technique. 5.10 EXERCISES 5.1 (BIST Design Rules) A scan design can contain many asynchronous set/reset signals that may require adding two or more set/reset clock points to break all ripple set/reset loops. A ripple set/reset loop is a combinational feedback loop. 328 VLSI Test Principles and Architectures Assume that the design now contains two system clocks (CK1 and CK2) and two set/reset clocks (SRCK1 and SRCK2). Derive two BIST timing control diagrams, including a scan enable (SE) signal, to test all data faults and set/reset faults controlled by these four clocks. Explain which timing control diagram can detect more faults. 5.2 (BIST Design Rules) Design a one-hot decoder for testing a tristate bus with four independent tristate drivers in BIST mode. 5.3 (BIST Design Rules) Design an X-bounding circuit for improving the fault coverage of a bidirectional I/O port by forcing it to input mode during BIST operation. 5.4 (Complete LFSR) Insert a zero-state into each hybrid LFSR given in Figures 5.13a and 5.13b. Minimize each modified hybrid LFSR, called complete LFSR, so it contains the least number of gates. What is the period of each complete LFSR? 5.5 (Weighted LFSR) Design a four-stage weighted LFSR with each output having a different weight of 0.75, 0.5, 0.25, or 0.125. 5.6 (Cellular Automata) Prove why the cellular automaton of length 5 given in Table 5.2 can generate a maximum-length sequence of 25 − 1. Derive the construction rules for cellular automata of lengths 54 and 55. 5.7 (Condensed LFSR) Design an (n, k) condensed LFSR to test each output cone of an n w = 8 3 CUT exhaustively. Compare its pros and cons with the (8, 5) cyclic LFSR given in Figure 5.23. 5.8 (Cyclic LFSR) Derive how the (8, 5) cyclic LFSR given in Figure 5.23 is shortened from the (15, 5) cyclic LFSR with g x = 1 + x 1 + x + x4 = 1 + x2 + x4 + x5 h x = 1 + x15 /g x p x = 1 + x2 + x3 + x4 + x5, and f x = h x p x = 1 + x3 + x5 + x8 + x9 + x11 + x12 + x13 + x15. 5.9 (Shortened Cyclic LFSR) Assume that the number of information bits to be deleted (s) is 1. Derive how the (8, 4) shortened cyclic LFSR given in Figure 5.24 is shortened from the n − s k − s = 15 − 1 5 − 1 = 14 4 shortened cyclic LFSR with g x = 1 + x 1 + x + x4 = 1 + x2 + x4 + x5 p x = 1 + x + x4 h x = 1 + x15 /g x , and f x = h x p x . 5.10 (Compatible LFSR) Mark all collapsed single stuck-at faults in Figure 5.25a with up and down arrows. Mark faults detected by each test pattern X1 X3 = 00 01 10 11 given in Figure 5.25b. 5.11 (Ones Count Testing versus Transition Count Testing) Assume a faultfree output response R0 = 01101111 and a faulty response R1 = 00110001 . Compute the ones-count and transition-count signatures; indicate which compaction scheme can detect the faulty response, and show the aliasing probability using either compaction scheme. Logic Built-In Self-Test 329 5.12 (Serial Signature Analysis) Compute the signature of the SISR using f x = 1 + x + x4 given in Figure 5.30 for a faulty sequence M = 11111111 . Explain why M is detected or not detected. 5.13 (Parallel Signature Analysis) Let M0 = 00010 M1 = 00010 M2 = 11100 , and M3 = 10000 . Compute the signature of the MISR using f x = 1 + x + x4 given in Figure 5.32 and explain why M is detected or not detected. 5.14 (BILBO versus MBILBO versus CBILBO) Discuss further the advantages and disadvantages of using the BILBO, modified BILBO (MBILBO), and concurrent BILBO (CBILBO) approaches for testing a pipeline-oriented circuit, from the points of view of hardware cost, test time, and fault coverage. 5.15 (STUMPS versus BILBO) Compare the performance of a STUMPS design and a BILBO design. Assume that both designs operate at 200 MHz and the circuit under test has 100 scan chains each having 1000 scan cells. Compute the test time for each design when 100,000 test patterns are to be applied. In general, the shift (scan) speed is much slower than a circuit’s operating speed. Assume that the shift speed is 20 MHz, and compute the test time for the STUMPS design again. Explain further why the STUMPS-based architecture is gaining more popularity than the BILBO-based architecture. 5.16 (Test Point Insertion) For the circuit shown in Figure 5.47, calculate the detection probabilities, before and after test point insertion, for a stuck-at-0 fault present at input X3 and then for a stuck-at-1 fault at input X6. 5.17 (Test Point Insertion) For the circuit shown in Figure 5.69, insert two test points so the minimum detection probability for any fault in the circuit is greater than or equal to 1/16 and draw the resulting circuit. Assume control points are randomly activated. 5.18 (Aligned Skewed-Load versus Aligned Double-Capture) Assume there are four synchronous clock domains each controlled by a capture clock, CK1, CK2, CK3, or CK4, and each is operated at a frequency F1 = 2 × F2 = 4 × F3 = 8 × F4. Derive BIST timing control diagrams using aligned skewed-load and aligned double-capture to test all intra-clock-domain and inter-clock-domain delay faults. Specify by arrows the delay faults that can be detected in the diagram. X1 X2 X3 X4 X5 Y X6 FIGURE 5.69 An example circuit for Problem 5.17. 330 VLSI Test Principles and Architectures 5.19 (Staggered Skewed-Load versus Staggered Double-Capture) Assume there are four asynchronous clock domains each controlled by a capture clock, CK1, CK2, CK3, or CK4, and each is operated at a frequency F1 > F2 > F3 > F4. Derive BIST timing control diagrams using staggered skewed-load and staggered double-capture to test all intra-clock-domain and inter-clock-domain delay faults. Specify by arrows the delay faults that can be detected in the diagram. 5.20 (Hybrid Double-Capture) Assume there are four mixed synchronous and asynchronous clock domains each controlled by a capture clock, CK1, CK2, CK3, and CK4, operating at F1 = 100 MHz F2 = 50 MHz F3 = 60 MHz, and F4 = 30 MHz, respectively. Derive a BIST timing control diagram using a hybrid double-capture scheme comprised of staggered double-capture and aligned double-capture to test all intra-clock-domain and inter-clock-domain delay faults. Specify by arrows the delay faults that can be detected in the diagram. 5.21 (A Design Practice) Use the logic BIST programs and user’s manuals contained on the companion Web site to design the logic BIST system using staggered double-capture for the circuit given in Section 5.8. Report the circuit’s BIST fault coverage every 10,000 increments up to 100,000 pseudo-random patterns. 5.22 (A Design Practice) Repeat Problem 5.21, but instead imple- ment the two pseudo-random pattern generators, PRPG1 and PRPG2, with a 28-stage CA and a 25-stage CA, respec- tively, using the construction rules given in Table 5.2. Explain why the CA-based logic BIST system can or cannot reach higher BIST fault coverage than the LFSR-based logic BIST system given in Problem 5.21. 5.23 (A Design Practice) Use the ATPG programs and user’s man- uals contained on the Web site to report the circuit’s ATPG fault coverage when the logic BIST system is reconfigured in ATPG mode. If the BIST fault coverage in Problem 5.21 is lower than the ATPG fault coverage, insert as many test points as required in the logic BIST system to reach the ATPG fault coverage; alternatively, run top-up ATPG in both ATPG compression and ATPG modes and report the circuit’s final fault coverage. 5.24 (A Design Practice) Write a C/C++ program to backtrace from a circuit output (primary output or scan cell input) to determine the maximum number of inputs (w, primary inputs and scan cell outputs, excluding clocks and set/reset ports) that drive the output. Assume the scan-based circuit under test (CUT) has n inputs and m outputs. The n-input, m-output CUT is defined as an (n, w) CUT, where w ≤ n. Find out which (n, w) CUTs are for both clock domains s38417 and s38584, given in Table 5.6. Logic Built-In Self-Test 331 5.25 (A Design Practice) Use the logic BIST programs and user’s manuals contained on the Web site with data provided in Problem 5.24 to design a CBILBO-based logic BIST system using staggered single-capture for the circuit given in Section 5.8. Report the circuit’s BIST fault coverage every 10,000 increments up to 100,000 pseudo-exhaustive patterns. Compare the observed BIST fault coverage with the ATPG fault coverage given in Problem 5.23, and explain why both methods produce the same or different fault coverage numbers. Acknowledgments The author wishes to thank Prof. Nur A. Touba of University of Texas at Austin for contributing the Fault Coverage Enhancement section; Prof. Charles Stroud of Auburn University; Khader S. Abdel-Hafez and Shianling Wu of SynTest Technologies for editing the chapter; and Teresa Chang and Renay Chang of SynTest Technologies for formatting the text and drawing all figures. References R5.0—Books [Abramovici 1994] M. Abramovici, M. A. Breuer, and A. D. Friedman, Digital Systems Testing and Testable Design, IEEE Press, Piscataway, NJ, 1994 (revised printing). [Bardell 1987] P. H. Bardell, W. H. McAnney, and J. Savir, Built-In Test for VLSI: Pseudorandom Techniques, John Wiley & Sons, Somerset, NJ, 1987. [Bushnell 2000] M. L. Bushnell and V. D. Agrawal, Essentials of Electronic Testing for Digital, Memory and Mixed-Signal VLSI Circuits, Springer Science, New York, 2000. [Golomb 1982] S. W. Golomb, Shift Register Sequence, Aegean Park Press, Laguna Hills, CA, 1982. [Jha 2003] N. K. Jha and S. K. Gupta, Testing of Digital Systems, Cambridge University Press, Cambridge, U.K., 2003. [McCluskey 1986] E. J. McCluskey, Logic Design Principles: With Emphasis on Testable Semiconductor Circuits, Prentice Hall, Englewood Cliffs, NJ, 1986. [Mourad 2000] S. Mourad and Y. Zorian, Principles of Testing Electronic Systems, John Wiley & Sons, Somerset, NJ, 2000. [Nadeau-Dostie 2000] B. Nadeau-Dostie, Design for At-Speed Test, Diagnosis and Measurement, Springer, Boston, MA, 2000. [Peterson 1972] W. W. Peterson and E. J. Weldon, Jr., Error-Correcting Codes, MIT Press, Cambridge, MA, 1972. [Rajski 1998] J. Rajski and J. Tyszer, Arithmetic Built-In Self-Test for Embedded Systems, Prentice Hall, Englewood Cliffs, NJ, 1998. [Stroud 2002] C. E. Stroud, A Designer’s Guide to Built-In Self-Test, Springer Science, Boston, MA, 2002. [Wakerly 2000] J. Wakerly, Digital Design Principles and Practices, 3rd ed., Prentice Hall, Englewood Cliffs, NJ, 2000. 332 VLSI Test Principles and Architectures R5.2—BIST Design Rules [Abdel-Hafez 2004] K. S. Abdel-Hafez, L.-T. Wang, A. Kifli, F.-S. Hsu, X. Wen, M.-C. Lin, and H.-P. Wang, Method and Apparatus for Testing Asynchronous Set/Reset Faults in a Scan-Based Integrated Circuit, U.S. Patent Application No. 20040153926, August 5, 2004. [Al-Yamani 2002] A. A. Al-Yamani, S. Mitra, and E. J. McCluskey, Avoiding Illegal States in Pseudorandom Testing of Digital Circuits, Technical Report (CRC TR) No. 02-2, Center for Reliable Computing, Stanford University, December 2002. [Cheung 1996] B. Cheung and L.-T. Wang, The seven deadly sins of scan-based designs, Integrated Syst. Des., August, 1996 (www.eetimes.com/editorial/1997/test9708.html). [Eichelberger 1977] E. B. Eichelberger and T. W. Williams, A logic design structure for LSI testability, in Proc. Des. Automat. Conf., June 1977, pp. 462–468. R5.3—Test Pattern Generation [Akers 1985] S. B. Akers, On the use of linear sums in exhaustive testing, in Digest of Papers, Fault-Tolerant Computing Symp., June 1985, pp. 148–153. [Barzilai 1981] Z. Barzilai, J. Savir, G. Markowsky, and M. G. Smith, The weighted syndrome sums approach to VLSI testing, IEEE Trans. Comput., 30(12), 996–1000, December 1981. [Barzilai 1983] Z. Barzilai, D. Coppersmith, and A. Rosenberg, Exhaustive bit pattern generation in discontiguous positions with applications to VLSI testing, IEEE Trans. Comput., 32(2), 190–194, 1983. [Bershteyn 1993] M. Bershteyn, Calculation of multiple sets of weights for weighted random testing, in Proc. Int. Test Conf., October 1993, pp. 1031–1040. [Bozorgui-Nesbat 1980] S. Bozorgui-Nesbat and E. J. McCluskey, Structured design for testability to eliminate test pattern generation, in Digest of Papers, Fault-Tolerant Computing Symp., June 1980, pp. 158–163. [Breuer 1987] M. A. Breuer and N. K. Nanda, Simplified Delay Testing for LSI Circuit Faults, U.S. Patent No. 4,672,307, June 9, 1987. [Bushnell 1995] M. L. Bushnell and I. Shaik, Robust Delay Fault Built-In Self-Testing Method and Apparatus, U.S. Patent No. 5,422,891, June 6, 1995. [Chakrabarty 1997] K. Chakrabarty, B. T. Murray, J. Liu, and M. Zhu, Test width compression for built-in self-testing, in Proc. Int. Test Conf., November 1997, pp. 328–337. [Chen 1986] C. L. Chen, Linear dependencies in linear feedback shift register, IEEE Trans. Comput., 35(12), 1086–1087, 1986. [Chen 1987] C. L. Chen, Exhaustive test pattern generation using cyclic codes, IEEE Trans. Comput., 37(3), 329–338, 1987. [Chen 1988] C.-A. Chen and S. K. Gupta, Efficient BIST TPG designs and test set compaction via input reduction, IEEE Trans. Comput.-Aided Des., 17(8), 692–705, 1988. [Chin 1984] C. K. Chin and E. J. McCluskey, Weighted Pattern Generation for Built-In SelfTest, Technical Report (CRC TR) No. 84-7, Center for Reliable Computing, Stanford University, August 1984. [Chin 1987] C. K. Chin and E. J. McCluskey, Test length for pseudorandom testing, IEEE Trans. Comput., 36(2), 252–256, 1987. Logic Built-In Self-Test 333 [Das 1990] A. K. Das, M. Pandey, A. Gupta, and P. P. Chaudhuri, Built-in self-test structures around cellular automata and counters, IEEE Proc. Comput. Digital Tech., Part E, 37(1), 268–276, 1990. [Furuya 1991] K. Furuya and E. J. McCluskey, Test-pattern test capabilities of autonomous TPG circuits, in Proc. Int. Test Conf., October 1991, pp. 704–711. [Girard 2002] P. Girard, Survey of low-power testing of VLSI circuits, IEEE Des. Test Comput., May/June 82–92, 2002. [Gloster 1988] C. S. Gloster, Jr., and F. Brglez, Boundary scan with cellular built-in self-test, in Proc. Int. Test Conf., September 1988, pp. 138–145. [Golan 1988] P. Golan, O. Novak, and J. Hlavicka, Pseudoexhaustive test pattern generator with enhanced fault coverage, IEEE Trans. Comput., 37(4), 496–500, 1988. [Hamzaoglu 2000] I. Hamzaoglu and J. H. Patel, Reducing test application time for built-in self-test test pattern generators, in Proc. VLSI Test Symp., April 2000, pp. 369–375. [Hortensius 1989] P. D. Hortensius, R. D. McLeod, W. Pries, D. M. Miller, and H C. Card, Cellular automata-based pseudorandom number generators for built-in self-test, IEEE Trans. Comput.-Aided Des., 8(8), 842–859, 1989. [Hsiao 1977] M. Y. Hsiao, A. M. Patel, and D. K. Pradhan, Store address generator with online fault detection capability, IEEE Trans. Comput., 26(11), 1144–1147, 1977. [Kapur 1994] R. Kapur, S. Patil, T. J. Snethen, and T. W. Williams, Design of an efficient weighted random pattern generation system, in Proc. Int. Test Conf., October 1994, pp. 491–500. [Khara 1987] M. Khara and A. Albicki, Cellular automata used for test pattern generation, Proc. Int. Conf. on Computer Design, October 1987, pp. 56–59. [Lai 2005] L. Lai, J. H. Patel, T. Rinderknecht, and W.-T. Cheng, Hardware efficient LBIST with complementary weights, in Proc. Int. Conf. on Computer Design, October 2005, pp. 479–481. [Lempel 1985] A. Lempel and M. Cohn, Design of universal test sequences for VLSI, IEEE Trans. Inform. Theory, IT-31(1), 10–17, 1985. [Lisanke 1987] R. Lisanke, F. Brglez, A. J. de Geus, and D. Gregory, Testability-driven random test-pattern generation, IEEE Trans. Comput.-Aided Des., 6(6), 1082–1087, 1987. [McCluskey 1981] E. J. McCluskey and S. Bozorgui-Nesbat, Design for autonomous test, IEEE Trans. Comput., 30(11), 860–875, 1981. [McCluskey 1982] E. J. McCluskey, Built-in verification test, in Proc. Int. Test Conf., November 1982, pp. 183–190. [McCluskey 1984] E. J. McCluskey, Verification testing: A pseudoexhaustive test technique, IEEE Trans. Comput., 33(6), 541–546, 1984. [Patashnik 1983] O. Patashnik, Circuit Segmentation for Pseudo-Exhaustive Testing, Technical Report (CRC TR) No. 83–14, Center for Reliable Computing, Stanford University, 1983. [Savir 1980] J. Savir, Syndrome-testable design of combinational circuits, IEEE Trans. Comput., 29(6), 442–451, 1980. [Savir 1984a] J. Savir, G. S. Ditlow, and P. H. Bardell, Random pattern testability, IEEE Trans. Comput., 33(1), 79–90, 1984. [Savir 1984b] J. Savir and P. H. Bardell, On random pattern test length, IEEE Trans. Comput., 33(6), 467–474, 1984. 334 VLSI Test Principles and Architectures [Schnurmann 1975] H. D. Schnurmann, E. Lindbloom, and R. G. Carpenter, The weighted random test-pattern generator, IEEE Trans. Comput., 24(7), 695–700, 1975. [Serra 1990] M. Serra, T. Slater, J. C. Muzio, and D. M. Miller, The analysis of onedimensional linear cellular automata and their aliasing properties, IEEE Trans. Comput.Aided Des., 9(7), 767–778, 1990. [Seth 1990] S. C. Seth, V. D. Agrawal, and H. Farlet, A statistical theory of digital circuit testability, IEEE Trans. Comput., 39(4), 582–586, 1990. [Slater 1990] T. Slater and M. Serra, Tables of Linear Hybrid 90/150 Cellular Automata, Technical Report DCS-105-IR, Department of Computer Science, University of Victoria, British Columbia, Canada 1990. [Tang 1983] D. T. Tang and L. S. Woo, Exhaustive test pattern generation with constant weight vectors, IEEE Trans. Comput., 32(12), 1145–1150, 1983. [Tang 1984] D. T. Tang and C. L. Chen, Logic test pattern generation using linear codes, IEEE Trans. Comput., 33(9), 845–850, 1984. [Udell 1986] J. G. Udell, Jr., Test set generation for pseudoexhaustive BIST, in Proc. Int. Conf. on Comput.-Aided Des., November 1986, pp. 52–55. [Udell 1987] J. G. Udell, Jr., Reconfigurable Hardware for Pseudo-Exhaustive Test, Technical Report (CRC TR) No. 87–4, Center for Reliable Computing, Stanford University, February 1987. [van Sas 1990] J. van Sas, F. Catthoor, and H. D. Man, Cellular automata-based self-test for programmable data paths, in Proc. Int. Test Conf., September 1990, pp. 769–778. [Virazel 2002] A. Virazel and H.-J. Wunderlich, High defect coverage with low-power test sequences in a BIST environment, IEEE Des. Test Comput., 19(5), 44–52, 2002. [Vasanthavada 1985] N. Vasanthavada and P. N. Marinos, An operationally efficient scheme for exhaustive test-pattern generation using linear codes, in Proc. Int. Test Conf., November 1985, pp. 476–482. [Wagner 1987] K. D. Wagner, C. K. Chin, and E. J. McCluskey, Pseudorandom testing, IEEE Trans. Comput., 36(3), 332–343, 1987. [Waicukauski 1989] J. A. Waicukauski, E. Lindbloom, E. B. Eichelberger, and O. P. Forenza, WRP: A method for generating weighted random test patterns, IBM J. Res. Dev., 33(2), 149–161, 1989. [Wang 1986a] L.-T. Wang and E. J. McCluskey, Condensed linear feedback shift register (LFSR) testing: A pseudoexhaustive test technique, IEEE Trans. Comput., 35(4), 367–370, 1986. [Wang 1986b] L.-T. Wang and E. J. McCluskey, Complete feedback shift register design for built-in self-test, in Proc. Int. Conf. on Comput.-Aided Des., November 1986, pp. 56–59. [Wang 1987] L.-T. Wang and E. J. McCluskey, Circuits for pseudo-exhaustive test pattern generation using shortened cyclic codes, in Proc. Int. Conf. on Computer Design: VLSI in Computers & Processors, October 1987, pp. 450–453. [Wang 1988a] L.-T. Wang and E. J. McCluskey, Hybrid designs generating maximum-length sequences, special issue on testable and maintainable design, IEEE Trans. Comput.-Aided Des., 7(1), 91–99, 1988. [Wang 1988b] L.-T. Wang and E. J. McCluskey, Circuits for pseudo-exhaustive test pattern generation, IEEE Trans. Comput.-Aided Des., 7(10), 1068–1080, 1988. [Wang 1988c] L.-T. Wang and E. J. McCluskey, Linear feedback shift register design using cyclic codes, IEEE Trans. Comput., 37(10), 1302–1306, 1987. Logic Built-In Self-Test 335 [Wang 1989] L.-T. Wang, M. Marhoefer, and E. J. McCluskey, A self-test and self-diagnosis architecture for boards using boundary scan, in Proc. of the First European Test Conf., April 1989, pp. 119–126. [Wang 1999] S. Wang and S. K. Gupta, LT-RTPG: A new test-per-scan BIST TPG for low heat dissipation, in Proc. Int. Test Conf., October 1999, pp. 85–94. [Williams 1985] T. W. Williams, Test length in a self-testing environment, IEEE Des. Test Comput., 2, 59–63, April 1985. [Wolfram 1983] S. Wolfram, Statistical mechanics of cellular automata, Rev. Mod. Phys., 55(3), 601–644, 1983. [Wunderlich 1987] H.-J. Wunderlich, Self test using unequiprobable random patterns, in Digest of Papers, Fault-Tolerant Computing Symp., July 1987, pp. 258–263. [Wunderlich 1988] H.-J. Wunderlich, Multiple distributions for biased random test patterns, in Proc. Int. Test Conf., September 1988, pp. 236–244. R5.4—Output Response Analysis [Benowitz 1975] N. Benowitz, D. F. Calhoun, G. E. Alderson, J. E. Bauer, and C. T. Joeckel, An advanced fault isolation system for digital logic, IEEE Trans. Comput., 24(5), 489–497, 1975. [Carletta 1994] J. Carletta and C. Papachristou, Structural constraints for circular self-test paths, in Proc. VLSI Test Symp., April 1994, pp. 87–92. [Cheon 2005] B. Cheon, E. Lee, L.-T. Wang, X. Wen, P. Hsu, J. Cho, J. Park, H. Chao, and S. Wu, At-speed logic BIST for IP cores, in Proc. Design, Automation and Test in Europe, March 2005, pp. 860–861. [Eichelberger 1983] E. B. Eichelberger and E. Lindbloom, Random-pattern coverage enhancement and diagnosis for LSSD logic self-test, IBM J. Res. Dev., 27(3), 265–272, 1983. [Frohwerk 1977] R. A. Frohwerk, Signature analysis: A new digital field service method, Hewlett-Packard J., 28, 2–8, 1977. [Hassan 1984] S. Z. Hassan and E. J. McCluskey, Increased fault coverage through multiple signatures, in Digest of Papers, Fault-Tolerant Computing Symp., June 1984, pp. 354–359. [Hayes 1976] J. P. Hayes, Transition count testing of combinational logic circuits, IEEE Trans. Comput., 25(6), 613–620, 1976. [Ko¨ nemann 1979] B. Ko¨ nemann, J. Mucha, and G. Zwiehoff, Built-in logic block observation techniques, in Proc. Int. Test Conf., October 1979, pp. 37–41. [Ko¨ nemann 1980] B. Ko¨ nemann, J. Mucha, and G. Zwiehoff, Built-in test for complex digital circuits, IEEE J. Solid-State Circuits, 15(3), 315–318, 1980. [Krasniewski 1989] A. Krasniewski and S. Pilarski, Circular self-test path: A low cost BIST technique for VLSI circuits, IEEE Trans. Comput.-Aided Des., 8(1), 46–55, 1989. [Liu 1987] D. L. Liu and E. J. McCluskey, High fault coverage self-test structures for CMOS ICs, in Proc. Custom Integrated Circuits Conf., May 1987, pp. 68–71. [McCluskey 1981] E. J. McCluskey and S. Bozorgui-Nesbat, Design for autonomous test, IEEE Trans. Comput., 30(11), 860–875, 1981. [McCluskey 1985] E. J. McCluskey, Built-in self-test structures, IEEE Des. Test Comput., 2(2), 29–36, 1985. 336 VLSI Test Principles and Architectures [Perkins 1980] C. C. Perkins, S. Sangani, H. Stopper, and W. Valitski, Design for in-situ chip testing with a compact tester, in Proc. Int. Test Conf., November 1980, pp. 29–41. [Pilarski 1992] S. Pilarski, A. Krasniewski, and T. Kameda, Estimating test effectiveness of the circular self-test path technique, IEEE Trans. Comput.-Aided Des., 11(10), 1301–1316, 1992. [Savir 1985] J. Savir and W. H. McAnney, On the masking probability with ones count and transition count, in Proc. Int. Conf. on Comput.-Aided Des., pp. 111–113, November 1985. [Sedmak 1979] R. M. Sedmak, Design for self-verification: An approach for dealing with testability problems in VLSI-based designs, in Proc. Int. Test Conf., October 1979, pp. 112–124. [Sedmak 1980] R. M. Sedmak, Implementation techniques for self-verification, in Proc. Int. Test Conf., October 1980, pp. 267–278. [Stroud 1988] C. Stroud, An automated built-in self-test approach for general sequential logic synthesis, in Proc. Des. Automat. Conf., June 1988, pp. 3–8. [Touba 2002] N. A. Touba, Circular BIST with state skipping, IEEE Trans. VLSI Syst., 10(5), 668–672, 2002. [Wang 1986c] L.-T. Wang and E. J. McCluskey, Concurrent built-in logic block observer (CBILBO), in Proc. Int. Symp. on Circuits and Systems, Vol. 3, May 1986, pp. 1054–1057. [Williams 1987] T. W. Williams, W. Daehn, M. Gruetzner, and C. W. Starke, Aliasing errors in signature analysis registers, IEEE Des. Test Comput., 4(4), 39–45, 1987. R5.5—Logic BIST Architectures [Bardell 1982] P. H. Bardell and W. H. McAnney, Self-testing of multiple logic modules, in Proc. Int. Test Conf., November 1982, pp. 200–204. [Carletta 1994] J. Carletta and C. Papachristou, Structural constraints for circular self-test paths, in Proc. VLSI Test Symp., April 1994, pp. 87–92. [Cheon 2005] B. Cheon, E. Lee, L.-T. Wang, X. Wen, P. Hsu, J. Cho, J. Park, H. Chao, and S. Wu, At-speed logic BIST for IP cores, Proc. Design, Automation and Test in Europe, March 2005, pp. 860–861. [Eichelberger 1983] E. B. Eichelberger and E. Lindbloom, Random-pattern coverage enhancement and diagnosis for LSSD logic self-test,” IBM Journal of Research and Development, 27(3), 265–272, March 1983. [Ko¨ nemann 1979] B. Ko¨ nemann, J. Mucha, and G. Zwiehoff, Built-in logic block observation techniques, Proc. Int’l Test Conf., October 1979, pp. 37–41. [Ko¨ nemann 1980] B. Ko¨ nemann, J. Mucha, and G. Zwiehoff, Built-in test for complex digital circuits, IEEE Journal of Solid-State Circuits, 15(3), 315–318, June 1980. [Krasniewski 1989] A. Krasniewski and S. Pilarski, Circular self-test path: A low cost BIST technique for VLSI circuits, IEEE Trans. on Comput.-Aided Des., 8(1), 46–55, January 1989. [Liu 1987] D. L. Liu and E. J. McCluskey, High fault coverage self-test structures for CMOS ICs, Proc. Custom Integrated Circuits Conf., May 1987, pp. 68–71. [McCluskey 1981] E. J. McCluskey and S. Bozorgui-Nesbat, Design for autonomous test, IEEE Trans. on Computers, 30(11), 860–875, November 1981. [McCluskey 1985] E. J. McCluskey, Built-in self-test structures, IEEE Des. Test Comput., 2(2), pp. 29–36, April 1985. Logic Built-In Self-Test 337 [Perkins 1980] C. C. Perkins, S. Sangani, H. Stopper, and W. Valitski, Design for in-situ chip testing with a compact tester, in Proc. Int. Test Conf., November 1980, pp. 29–41. [Pilarski 1992] S. Pilarski, A. Krasniewski and T. Kameda, Estimating test effectiveness of the circular self-test path technique, IEEE Trans. on Comput.-Aided Des., 11(10), 1301–1316, October 1992. [Sedmak 1979] R. M. Sedmak, Design for self-verification: An approach for dealing with testability problems in VLSI-based designs, in Proc. Int. Test Conf., October 1979, pp. 112–124. [Sedmak 1980] R. M. Sedmak, Implementation techniques for self-verification, in Proc. Int. Test Conf., October 1980, pp. 267–278. [Stroud 1988] C. Stroud, An automated built-in self-test approach for general sequential logic synthesis, in Proc. Design Automation Conf., June 1988, pp. 3–8. [Touba 2002] N. A. Touba, Circular BIST with state skipping, IEEE Trans. on Very Large Scale Integration (VLSI) Systems, 10(5), 668–672, October 2002. [Wang 1986c] L.-T. Wang and E. J. McCluskey, Concurrent built-in logic block observer (CBILBO), in Proc. Int. Symp. on Circuits and Systems, 3, 1054–1057, May 1986. R5.6—Fault Coverage Enhancement [Aboulhamid 1983] M. E. Aboulhamid and E. Cerny, A class of test generators for built-in testing, IEEE Trans. Comput., C-32(10), 957–959, 1983. [Agarwal 1981] V. K. Agrawal and E. Cerny, Store and generate built-in testing approach, in Digest of Papers, Fault-Tolerant Computing Symp., June 1981, pp. 35–40. [Al-Yamani 2005] A. Al-Yamini, S. Mitra, and E. J. McCluskey, Optimized reseeding by seed ordering and encoding, IEEE Trans. Comput.-Aided Des., 24(2), 264–270, 2005. [Boubezari 1999] S. Boubezari, E. Cerny, B. Kaminska, and B. Nadeau-Dostie, Testability analysis and test-point insertion in RTL VHDL specifications for scan-based BIST, IEEE Trans. Comput.-Aided Des., 18(9), 1327–1340, 1999. [Brglez 1984] F. Brglez, On testability of combinational networks, in Proc. Int. Symp. on Circuits and Systems, May 1984, pp. 221–225. [Cheng 1995] K.-T. Cheng and C.-J. Lin, Timing-driven test point insertion for full-scan and partial-scan BIST, in Proc. Int. Test Conf., October 1995, pp. 506–514. [Dandapani 1984] R. Dandapani, J. Patel, and J. Abraham, Design of test pattern generators for built-in test, in Proc. Int. Test Conf., October 1984, pp. 315–319. [Das 2000] D. Das and N. A. Touba, Reducing test data volume using external/LBIST hybrid test patterns, in Proc. Int. Test Conf., October 2000, pp. 115–122. [Dorsch 2001] R. Dorsch and H.-J. Wunderlich, Tailoring ATPG for embedded testing, in Proc. Int. Test Conf., October 2001, pp. 530–537. [Edirisooriya 1992] G. Edirisooriya and J. P. Robinson, Design of low cost ROM based test generators, in Proc. VLSI Test Symp., April 1992, pp. 61–66. [Hellebrand 1995a] S. Hellebrand, J. Rajski, S. Tarnick, S. Venkataramann, and B. Courtois, Generation of vector patterns through reseeding of multiple-polynomial linear feedback shift registers, IEEE Trans. Comput., 44(2), 223–233, 1995. [Hellebrand 1995b] S. Hellebrand, B. Reeb, S. Tarnick, and H.-J. Wunderlich, Pattern generation for a deterministic BIST scheme, in Proc. Int. Conf. on Comput.-Aided Des., November 1995, pp. 88–94. 338 VLSI Test Principles and Architectures [Ichino 2001] K. Ichino, T. Asakawa, S. Fukumoto, K. Iwasaki, and S. Kajihara, Hybrid BIST using partially rotational scan, in Proc. Asian Test Symp., November 2001, pp. 379–384. [Iyengar 1989] V. S. Iyengar and D. Brand, Synthesis of pseudo-random pattern testable designs, in Proc. Int. Test Conf., August 1989, pp. 501–508. [Jas 2004] A. Jas, C. V. Krishna, and N. A. Touba, Weighted pseudo-random hybrid BIST, IEEE Trans. VLSI Syst., 12(12), 1277–1283, 2004. [Jervan 2003] G. Jervan, P. Eles, Z. Peng, R. Ubar, and M. Jenihhin, Test time minimization for hybrid BIST of core-based systems, in Proc. Asian Test Symp., November 2003, pp. 318–323. [Kiefer 1998] G. Kiefer and H.-J. Wunderlich, Deterministic BIST with multiple scan chains, in Proc. Int. Test Conf., October 1998, pp. 1057–1064. [Ko¨ nemann 1991] B. Ko¨ nemann, LFSR-coded test patterns for scan designs, in Proc. European Test Conf., April 1991, pp. 237–242. [Krishna 2003] C. V. Krishna and N. A. Touba, Hybrid BIST using an incrementally guided LFSR, in Proc. Symp. on Defect and Fault Tolerance, November 2003, pp. 217–224. [Krishnamurthy 1987] B. Krishnamurthy, A dynamic programming approach to the test point insertion problem, in Proc. Des. Automat. Conf., June 1987, pp. 695–704. [Lei 2005] L. Lei and K. Chakrabarty, Hybrid BIST based on repeating sequences and cluster analysis, in Proc. Design, Automation and Test in Europe, March 2005, pp. 1142–1147. [Liang 2001] H.-G. Liang, S. Hellebrand, and H.-J. Wunderlich, Two-dimensional test data compression for scan-based deterministic BIST, in Proc. Int. Test Conf., September 2001, pp. 894–902. [Nakao 1997] M. Nakao, K. Hatayama, and I. Higashi, Accelerated test points selection method for scan-based BIST, in Proc. Asian Test Symp., November 1997, pp. 359–364. [Rajski 1998] J. Rajski, J. Tyszer, and N. Zacharia, Test data decompression for multiple scan designs with boundary scan, IEEE Trans. Comput., 47(11), 1188–1200, 1998. [Seiss 1991] B. H. Seiss, P. M. Trouborst, and M. H. Schulz, Test point insertion for scanbased BIST, in Proc. European Test Conf., April 1991, pp. 253–262. [Sugihara 1998] M. Sugihara, H. Date, and H. Yasuura, A novel test methodology for corebased system LSIs and a testing time minimization problem, in Proc. Int. Test Conf., October 1998, pp. 465–472. [Tamarapalli 1996] N. Tamarapalli and J. Rajski, Constructive multi-phase test point insertion for scan-based BIST, in Proc. Int. Test Conf., October 1996, pp. 649–658. [Touba 1995] N. A. Touba and E. J. McCluskey, Transformed pseudo-random patterns for BIST, in Proc. VLSI Test Symp., April 1995, pp. 410–416. [Touba 1996] N. A. Touba and E. J. McCluskey, Test point insertion based on path tracing, in Proc. VLSI Test Symp., April 1996, pp. 2–8. [Touba 1999] N. A. Touba and E. J. McCluskey, RP-SYN: Synthesis of random-pattern testable circuits with test point insertion, IEEE Trans. Comput.-Aided Des., 18(8), 1202–1213, 1999. [Touba 2001] N. A. Touba and E. J. McCluskey, Bit-fixing in pseudorandom sequences for scan BIST, IEEE Trans. Comput.-Aided Des., 20(4), 545–555, 2001. [Tsai 1998] H.-C. Tsai, K.-T. Cheng, C.-J. Lin, and S. Bhawmik, Efficient test point selection for scan-based BIST, IEEE Trans. VLSI Syst., 6(4), 667–676, 1998. Logic Built-In Self-Test 339 [Wohl 2003] P. Wohl, J. Waicukauski, S. Patel, and M. Amin, X-tolerant compression and applications of scan-ATPG patterns in a BIST architecture, in Proc. Int. Test Conf., October 2003, pp. 727–736. [Xiang 2005] D. Xiang, M.-J. Chen, J.-G. Sun, and H. Fujiwara, Improving test effectiveness of scan-based BIST by scan chain partitioning, IEEE Trans. Comput.-Aided Des., 24(6), 916–927, 2005. R5.7—BIST Timing Control [Bhawmik 1997] S. Bhawmik, Method and Apparatus for Built-In Self-Test with Multiple Clock Circuits, U.S. Patent No. 5,680,543, October 21, 1997. [Hetherington 1999] G. Hetherington, T. Fryars, N. Tamarapalli, M. Kassab, A. Hassan, and J. Rajski, Logic BIST for large industrial designs: Real issues and case studies, in Proc. Int. Test Conf., October 1999, pp. 358–367. [Li 2002] J. C.-M. Li and E. J. McCluskey, Diagnosis of sequence-dependent chips, in Proc. VLSI Test Symp., April 2002, pp. 187–192. [Ma 1995] S. C. Ma, P. Franco, and E. J. McCluskey, An experimental chip to evaluate test techniques: Experimental results, in Proc. Int. Test Conf., October 1995, pp. 663–672. [McCluskey 2000] E. J. McCluskey and C.-W. Tseng, Stuck-fault tests vs. actual defects, in Proc. Int. Test Conf., October 2000, pp. 336–343. [McCluskey 2004] E. J. McCluskey, A. Al-Yamani, J. C.-M. Li, C.-W. Tseng, E. Volkerink, F.-F. Ferhani, E. Li, and S. Mitra, ELF-Murphy data on defects and test sets, in Proc. VLSI Test Symp., April 2004, pp. 16–22. [Nadeau-Dostie 1994] B. Nadeau-Dostie, A. Hassan, D. Burek, and S. Sunter, Multiple Clock Rate Test Apparatus for Testing Digital Systems, U.S. Patent No. 5,349,587, September 20, 1994. [Rajski 2003] J. Rajski, A. Hassan, R. Thompson, and N. Tamarapalli, Method and Apparatus for At-Speed Testing of Digital Circuits, U.S. Patent Application No. 20030097614, May 22, 2003. [Savir 1993] J. Savir and S. Patil, Scan-based transition test, IEEE Trans. Comput.-Aided Des., 12(8), 1232–1241, 1993. [Savir 1994] J. Savir and S. Patil, Broad-side delay test, IEEE Trans. Comput.-Aided Des., 13(8), 1057–1064, 1994. [Tseng 2001] C.-W. Tseng and E. J. McCluskey, Multiple-output propagation transition fault test, in Proc. Int. Test Conf., October 2001, pp. 358–366. [Wang 2005a] L.-T. Wang, X. Wen, P.-C. Hsu, S. Wu, and J. Guo, At-speed logic BIST architecture for multi-clock designs, in Proc. Int. Conf. on Computer Design: VLSI in Computers and Processors, October 2005, pp. 475–478. [Wang 2005b] L.-T. Wang, M.-C. Lin, X. Wen, H.-P. Wang, C.-C. Hsu, S.-C. Kao, and F.-S. Hsu, Multiple-Capture DFT System for Scan-Based Integrated Circuits, U.S. Patent No. 6,954,887, October 11, 2005. [Wang 2006] L.-T. Wang, P.-C. Hsu, S.-C. Kao, M.-C. Lin, H.-P. Wang, H.-J. Chao, and X. Wen, Multiple-Capture DFT System for Detecting or Locating Crossing Clock-Domain Faults during Self-Test or Scan-Test, U.S. Patent No. 7,007,213, February 28, 2006. 340 VLSI Test Principles and Architectures R5.8—A Design Practice [Brglez 1989] F. Brglez, D. Bryan, and K. Kozminski, Combinational profiles of sequential benchmark circuits, in Proc. Int. Symp. on Circuits and Systems, August 1989, pp. 1929–1934. [Rajski 2003] J. Rajski, A. Hassan, R. Thompson, and N. Tamarapalli, Method and Apparatus for At-Speed Testing of Digital Circuits, U.S. Patent Application No. 20030097614, May 22, 2003. [Wang 2004] L.-T. Wang, X. Wen, K.S. Abdel-Hafez, S.-H. Lin, H.-P. Wang, M.-T. Chang, P.-C. Hsu, S.-C. Kao, M.-C. Lin, and C.-C. Hsu, Method and Apparatus for Unifying Self-Test with Scan-Test during Prototype Debug and Production Test, U.S. Patent Application No. 20040268181, December 30, 2004. [Wang 2005a] L.-T. Wang, X. Wen, P.-C. Hsu, S. Wu, and J. Guo, At-speed logic BIST architecture for multi-clock designs, in Proc. Int. Conf. on Computer Design: VLSI in Computers and Processors, October 2005, pp. 475–478. R5.9—Concluding Remarks [Bardell 1982] P. H. Bardell and W. H. McAnney, Self-Testing of multiple logic modules, in Proc. Int. Test Conf., November 1982, pp. 200–204. [Wang 1986c] L.-T. Wang and E. J. McCluskey, Concurrent built-in logic block observer (CBILBO), in Proc. Int. Symp. on Circuits and Systems, 3, May 1986, pp. 1054–1057. CHAPTER 6 TEST COMPRESSION Xiaowei Li Chinese Academy of Sciences, Beijing, China Kuen-Jong Lee National Cheng Kung University, Tainan, Taiwan Nur A. Touba University of Texas, Austin, Texas ABOUT THIS CHAPTER Test compression involves compressing the amount of test data (both stimulus and response) that must be stored on automatic test equipment (ATE) for testing with a deterministic (automatic test pattern generation [ATPG]-generated) test set. This is done by adding some additional on-chip hardware before the scan chains to decompress the test stimulus coming from the ATE and after the scan chains to compress the response going to the ATE. This differs from built-in self-test (BIST) and hybrid BIST in that the test vectors that are applied to the circuit under test (CUT) are exactly the same as the test vectors in the original deterministic (ATPG-generated) test set (no additional pseudo-random vectors are applied). Test compression can provide a 10× or even 100× reduction in the amount of test data stored on the ATE. This greatly reduces ATE memory requirements and even more importantly reduces test time because less data has to be transferred across the limited bandwidth between the ATE and the chip. Moreover, test compression methodologies are easy to adopt in industry because they are compatible with the conventional design rules and test generation flows used for scan testing. This chapter begins with an introduction to the basic concepts and principles of test compression. Then we focus on test stimulus compression and describe three different categories of schemes: (1) using data compression codes, (2) employing linear decompression, and (3) broadcasting the same value to multiple scan chains. Next we focus on test response compaction and look at different ways for dealing with unknown (nondeterministic) values in the output response. Finally, we discuss commercial tools that are used for implementing test compression in industry. 342 VLSI Test Principles and Architectures 6.1 INTRODUCTION Automatic test equipment (ATE) has limited speed, memory, and I/O channels. The test data bandwidth between the tester and the chip, as illustrated in Figure 6.1, is relatively low and generally is a bottleneck with regard to how fast a chip can be tested [Khoche 2000]. The chip cannot be tested any faster than the amount of time required to transfer the test data which is equal to: Amount of Test Data on Tester Number of Tester Channels Tester Clock Rate The idea in test compression is to compress the amount of test data (both stimulus and response) that is stored on the tester. This provides two advantages. The first is that it reduces the amount of tester memory that is required. The second and more important advantage is that it reduces test time because less test data has to be transferred across the low bandwidth link between the tester and the chip. Test compression is achieved by adding some additional on-chip hardware before the scan chains to decompress the test stimulus coming from the tester and after the scan chains to compact the response going to the tester. This is illustrated in Figure 6.2. This extra on-chip hardware allows the test data to be stored on the tester in a compressed form. Test data is inherently highly compressible. Test vectors have many unspecified bits that are not assigned values during ATPG (i.e., they are “don’t cares” that can be filled with any value with no impact on the fault coverage). In fact, typically only 1 to 5% of the bits have specified (care) values, and even the specified values tend to be highly correlated due to the fact that faults are structurally related in the circuit. Consequently, lossless compression techniques can be used to significantly reduce the amount of test stimulus data that must be stored on the tester. The on-chip decompressor expands the compressed test stimulus back into the original test vectors (matching in all the care bits) as they are shifted into the scan chains. Output Tester Test Data Test Data Bandwidth = (# Channels* Clock Rate) Chip FIGURE 6.1 Block diagram illustrating test data bandwidth. Test Compression 343 Compressed Stimulus Low-Cost ATE D e c o m p r e s s o Stimulus Core Response C o m Scan-Based p Circuit a c (CUT) t o r r Compacted Response FIGURE 6.2 Architecture for test compression. response is even more compressible than test stimulus because lossy compression (also known as “compaction”) can be used. This is similar to the techniques used in BIST as described in Chapter 5. Output response compaction converts long output response sequences into short signatures. Because the compaction is lossy, some fault coverage can be lost due to aliasing when a faulty output response signature is identical to the fault-free output response signature; however, with proper design of the compaction circuitry, the probability of aliasing can be kept negligibly small. A more challenging issue for output response compaction is dealing with unknown (nondeterministic) values (commonly referred to as X’s) that might appear in the output sequence, as they can corrupt compacted signatures. This can be addressed by “X-blocking” or “X-bounding,” where the design is modified to eliminate any sources of X’s in the output as is done in BIST; however, this adds additional design complexity. Alternatively, “X-masking” can be done to selectively mask off the X’s in the output sequence, or an “X-tolerant” compaction technique can be used. If it is still impossible to prevent all X’s from reaching the compactor, then an “X-impact” compaction technique that uses ATPG assignments to avoid propagating X’s can be used. This technique is discussed further in Section 6.3. Test compression differs from (logic) BIST and hybrid BIST. Traditional standalone BIST does all the test pattern generation and output response analysis on-chip, without requiring any tester storage. The advantage of stand-alone BIST is that it can perform self-test out in the field where there is no access to the tester; however, to achieve high fault coverage with stand-alone BIST, typically a lot of overhead is required (either test points or deterministic pattern embedding logic). Moreover, stringent BIST design rules are necessary in order to eliminate all X’s in the output response. If BIST is only going to be used for manufacturing test, then hybrid BIST, where some data are stored on the tester to aid in detecting random-pattern resistant faults, offers a more efficient solution. Hybrid BIST and test compression are similar in that they both use on-chip hardware to reduce the amount of data stored on the tester. The difference is that test compression applies a precise deterministic (ATPG-generated) test set to the CUT whereas hybrid BIST applies a large number of pseudo-random patterns plus a smaller number of deterministic patterns for the random-pattern resistant faults. Hybrid BIST can reduce 344 VLSI Test Principles and Architectures the amount of test data on the tester more than test compression, but it generally requires longer overall test time because more test patterns are applied to the CUT than with test compression (in essence, it trades off more test time for less tester storage). The advantage of test compression is that the exact set of patterns that are applied to the CUT is selected through ATPG and thus can be minimized with respect to the desired fault coverage. Moreover, test compression is easy to adopt in industry because it is compatible with the conventional design rules and test generation flows used for scan testing. The amount of test data required to test integrated circuits (ICs) is growing rapidly in each new generation of technology. Increasing integration density results in larger designs with more scan cells and more faults. Moreover, achieving high test quality in ever smaller geometries requires more test patterns targeting delay faults and other fault models beyond stuck-at faults. As the amount of test data has increased, test compression has become very attractive as the additional hardware overhead is relatively low and significant reductions (10× or even 100×) in the amount of test data that must be stored on the tester can be achieved. One benefit of test compression is that it can extend the life of older “legacy” testers that may have limited memory by making it possible to fit all of the test data in the tester memory (note that reloading the tester memory is very time consuming and thus highly undesirable). Even for testers that have plenty of memory, test compression is still very attractive because it can reduce the test time for a given test data bandwidth. 6.2 TEST STIMULUS COMPRESSION A test cube is defined as a deterministic test vector in which the bits that are not assigned values by the ATPG procedure are left as “don’t cares” (X’s). Normally, ATPG procedures perform random fill, in which all the X’s in the test cubes are filled randomly with 1’s and 0’s to create fully specified test vectors; however, for test stimulus compression, random fill is not performed during ATPG so the resulting test set consists of incompletely specified test cubes. The X’s make the test cubes much easier to compress than fully specified test vectors. As mentioned earlier, test stimulus compression should be an information lossless procedure with respect to the specified (care) bits in order to preserve the fault coverage of the original test cubes. After decompression, the resulting test patterns shifted into the scan chains should match the original test cubes in all the specified (care) bits. Many schemes for compressing test cubes have been proposed. They can be broadly classified into the three categories shown below; these schemes are described in detail in the following subsections (shown in parentheses): 1. Code-based schemes (6.2.1)—These schemes use data compression codes to encode the test cubes. 2. Linear-decompression-based schemes (6.2.2)—These schemes decompress the data using only linear operations (e.g., linear feedback shift registers [LFSRs] and exclusive-OR [XOR] networks). 3. Broadcast-scan-based schemes (6.2.3)—These schemes are based on broadcasting the same value to multiple scan chains. Test Compression 345 6.2.1 Code-Based Schemes One approach for test compression is to use data compression codes to encode the test cubes. Data compression codes partition the original data into symbols, and then each symbol is replaced with a codeword to form the compressed data. The decompression is performed by having a decoder that simply converts each codeword into the corresponding symbol. Data compression codes can be classified into four categories, depending on whether the symbols have a fixed size (i.e., each symbol contains exactly n bits) or a variable size (i.e., different symbols have different numbers of bits) and whether the codewords have a fixed or variable size. Table 6.1 provides examples of data compression codes in each category. Note that the codes listed in Table 6.1 are only representative examples of each category and are by no means an exhaustive list. One representative example code from each category is described in detail in this subsection. Brief descriptions and references for other codes that have been proposed in each category are also provided. 6.2.1.1 Dictionary Code (Fixed-to-Fixed) In fixed-to-fixed coding, the original test cubes are partitioned into n-bit blocks to form the symbols. These symbols are then encoded with codewords that each have b bits. In order to get compression, b must be less than n. One can view each symbol as an entry in a dictionary and each codeword as an index into the dictionary that points to the corresponding symbol. There are 2n possible symbols and 2b possible codewords, so not all possible symbols can be in the dictionary. If Sdictionary is the set of symbols that are in dictionary and Sdata is the set of symbols that occur in the original data, then if Sdata ⊆ Sdictionary, it is a complete dictionary; otherwise, it is a partial dictionary. Compression can be achieved with a complete dictionary provided that the number of distinct symbols that occur in the original data Sdata is much less than 2n, the number of all possible symbols. The compression ratio that can be achieved with a complete dictionary is equal to: 2 1 n− log2 sdata A test compression scheme that uses a complete dictionary was described in [Reddy 2002]. The scheme is illustrated in Figure 6.3. There are n scan chains, and the test cubes are partitioned into n-bit symbols such that each scan slice corresponds to a symbol. Each scan slice is comprised of the n-bits that are loaded TABLE 6.1 Four Categories of Data Compression Codes Category Example Data Compression Code Ref. Fixed-to-fixed Fixed-to-variable Variable-to-fixed Variable-to-variable Dictionary code Huffman code Run-length code Golomb code [Reddy 2002] [Jas 2003] [Jas 1998] [Chandra 2001a] 346 VLSI Test Principles and Architectures “scan-slice” (n -bits) Channels b-bits From Tester Dictionary FIGURE 6.3 Test compression using a complete dictionary. Scan Chain 1 Scan Chain 2 Scan Chain n into the scan chains in each clock cycle as illustrated in Figure 6.3. The X’s in the test cubes are filled so as to minimize the number of distinct symbols (i.e., Sdata ). The size of each codeword is b bits, where b = log2 Sdata . Note that, with this scheme, b channels from the tester can be used to load n scan chains. Normally, b channels from the tester can only load b scan chains. By having more scan chains, the length of each scan chain becomes shorter, thus reducing the number of clock cycles required to load each scan vector and therefore reducing the test time. This is a good illustration of how test compression reduces not only tester storage but also test time. A drawback of using a complete dictionary is that the size of the dictionary can become very large, resulting in too much overhead for the decompressor. In [Li 2003], a partial dictionary coding scheme was proposed in which the size of the dictionary is selected by the user based on how much area the user wants to allocate for the decompressor. If the size of the dictionary is 2b, then the 2b symbols that occur most frequently in the test cubes are placed in the dictionary. For any symbol that is not in the dictionary, the symbol is left unencoded and the dictionary is bypassed. An extra bit is added to each codeword to indicate whether or not to use the dictionary. In [Wu¨ rtenberger 2004], a partial dictionary is used along with a “correction” network that flips bits to convert a dictionary entry into the desired scan slice. By using the correction network, the size of the dictionary can be reduced. 6.2.1.2 Huffman Code (Fixed-to-Variable) In fixed-to-variable coding, the original test cubes are partitioned into n-bit blocks to form the symbols. These symbols are then encoded using variable-length codewords. One form of fixed-to-variable coding is statistical coding, where the idea is to calculate the frequency of occurrence of the different symbols in the original test cubes and make the codewords that occur most frequently have fewer bits and those that occur least frequently more bits. This minimizes the average length of a codeword. A Huffman code [Huffman 1952] is an optimal statistical code that is proven to provide the shortest average codeword length among all uniquely decodable fixed-to-variable length codes. A Huffman code is obtained by constructing a Test Compression 347 Huffman tree as described in [Huffman 1952]. The path from the root to each leaf in the Huffman tree gives the codeword for the binary string corresponding to the leaf. An example of constructing a Huffman code can be seen in Table 6.2 and Figures 6.4 and 6.5. An example of a test set divided into 4-bit symbols is shown in Figure 6.4. Table 6.2 shows the frequency of occurrence of each of the possible symbols. The example shown in Figure 6.4 has a total of 60 4-bit symbols. Figure 6.5 shows the Huffman tree for this frequency distribution, and the corresponding codewords are shown in Table 6.2. In [Jas 2003], a scheme for test compression based on Huffman coding was described. The test cubes are partitioned into symbols and then the X’s in the test cubes are filled to maximally skew the frequency of occurrence of the symbols. A selective Huffman code in which only the k most frequently occurring symbols are encoded is used. The reason for this is that using a full Huffman code that encodes all n-bit symbols requires a decoder with 2n − 1 states. By only selectively encoding the k most frequently occurring symbols, the decoder requires only n + k TABLE 6.2 Statistical Coding Based on Symbol Frequencies for Test Set in Figure 6.4 Symbol Frequency Pattern Huffman Code Selective Code S0 22 0010 10 10 S1 13 0100 00 110 S2 7 0110 110 111 S3 5 0111 010 00111 S4 3 0000 0110 00000 S5 2 1000 0111 01000 S6 2 0101 11100 00101 S7 1 1011 111010 01011 S8 1 1100 111011 01100 S9 1 0001 111100 00001 S10 1 1101 111101 01101 S11 1 1111 111110 01111 S12 1 0011 111111 00011 S13 0 1110 — — S14 0 1010 — — S15 0 1001 — — 0010 0100 0010 0110 0000 0010 1011 0100 0010 0100 0110 0010 0010 0100 0010 0110 0000 0110 0010 0100 0110 0010 0010 0000 0010 0110 0010 0010 0010 0100 0100 0110 0010 0010 1000 0101 0001 0100 0010 0111 0010 0010 0111 0111 0100 0100 1000 0101 1100 0100 0100 0111 0010 0010 0111 1101 0010 0100 1111 0011 FIGURE 6.4 Example of test set divided into 4-bit blocks. 348 VLSI Test Principles and Architectures 60 0 1 23 01 37 01 13 10 s1 01 22 15 s0 01 5 5 s3 01 32 s4 s5 2 s6 7 8 s2 0 1 4 0 1 2 01 4 1 0 2 01 11 s7 s8 11 s9 s10 2 01 11 s11 s12 FIGURE 6.5 Huffman tree for the code shown in Table 6.4. states. It was shown in [Jas 2003] that a selective Huffman code achieves only slightly less compression than a full Huffman code for the same symbol size while using a much smaller decoder. Because the decoder size grows only linearly with selective Huffman encoding, it is possible to use a much larger symbol size, which significantly improves the effectiveness of the code thereby achieving much more overall compression. In selective Huffman coding, an extra bit is added at the beginning of each codeword to indicate whether or not it is coded. As an example, consider selective Huffman coding for the test set shown in Figure 6.4, where only the three most frequency occurring symbols are encoded (i.e., k = 3). A Huffman tree is built only for the three most frequently occurring symbols, as shown in Figure 6.6. The codewords are then constructed as shown in Table 6.2. The first bit of the codewords for the three most frequently occurring symbols is “1” to indicate that they are coded (and hence must pass through the decoder). The first bit of the rest 42 0 1 22 20 s0 01 13 7 s1 s2 FIGURE 6.6 Huffman tree for the three highest frequency symbols in Table 6.2. Test Compression 349 of the codewords is a “0” to indicate that they are not coded (i.e., the remainder of the codeword is simply the unencoded symbol itself). A method for improving the compression with a statistical code by modifying the test cubes without losing fault coverage is described in [Ichihara 2000]. The goal is to modify the specified bits in the test cubes in a way that maximally skews the frequency distribution. Another type of fixed-to-variable coding, which differs from statistical coding, exploits the fact that most scan slices have a relatively small number of specified bits. If there are b channels coming from the tester, the techniques described in [Reda 2002], [Han 2005b], and [Wang 2005a] use a variable number of b-bit codewords to decode the specified bits in each scan slice. Each b-bit codeword can decode a small number of specified bits. For scan slices with very few specified bits, a single b-bit codeword may be sufficient, while for more heavily specified scan slices several b-bit codewords may be required to decode all the specified bits. [Reda 2002] and [Han 2005b] actually encode the specified bits that differ between the previous scan slice and the current scan slice to take advantage of correlation between the scan slices. 6.2.1.3 Run-Length Code (Variable-to-Fixed) In variable-to-fixed coding, the original test cubes are partitioned into variablelength symbols, and the codewords are each b-bits long. In run-length coding, one particular variable-to-fixed coding scheme, the symbols consist of runs of consecutive 0’s or 1’s. An example of a 3-bit run-length code for runs of 0’s is given in Table 6.3. Each codeword is 3 bits long and encodes different length runs of 0’s. As an example, the sequence 001 0001 01 0000001 1 000001 can be encoded into 010 011 001 110 000 101, which is a reduction from 23 bits to 18 bits. For very long runs of 0’s (longer than 7), codeword 111 can be used repeatedly as needed. Note that only data with an unbalanced number of 0’s and 1’s can be efficiently compressed by a run-length code. In [Jas 1998], test compression based on a run-length code was proposed using a cyclical scan architecture as shown in Figure 6.7. The cyclical scan architecture XORs the data currently being shifted in with the previous test vector. Thus, instead TABLE 6.3 3-Bit Run-Length Code Symbol Codeword 1 01 001 0001 00001 000001 0000001 0000000 000 001 010 011 100 101 110 111 350 VLSI Test Principles and Architectures Scan Chain Circuit Under Test FIGURE 6.7 Cyclical scan architecture for applying difference vectors. of applying the original test set, TD = t1 t2 t3 tn , a difference vector set, Tdiff = t1 t1 ⊕ t2 t2 ⊕ t3 tn−1 ⊕ tn , is applied instead. The advantage of this is that the test vectors can be ordered so similar test vectors come after each other so the dif- ference vectors have many 0’s. This enhances the effectiveness of run-length coding. Other types of variable-to-fixed codes that have been proposed for test stimulus compression include LZ77 [Wolff 2002] and LZW [Knieser 2003]. 6.2.1.4 Golomb Code (Variable-to-Variable) In variable-to-variable coding, both the symbols and codewords have variable length. A Golomb code [Chandra 2001] is a variable-to-variable code that evolved from the run-length code. To construct a Golomb code, a specific parameter m, called the group size (usually a power of 2), is first chosen. All the run-lengths are divided into groups of size m denoted by A1 A2 A3 . The set of run-lengths 0 1 2 m − 1 form the first group A1, the set of run-lengths m m + 1 2m form the second group A2, and so on. Each codeword of a Golomb code consists of two parts: a group prefix and a tail. A run-length L that belongs to group Ak is assigned a group prefix k − 1 of ones followed by a zero. The tail is an index of the run-length in a group. If m is chosen to be a power of 2 (i.e., m = 2N for some integer N), then each group contains 2N members, and a log2 m-bit-long sequence (tail) can uniquely identify each member within the group. Table 6.4 shows an example of Golomb code in which each group contains four run-lengths. Example 6.1 Figure 6.8 shows an example using the Golomb code of Table 6.4. In the original test sequence TD, the run-length of the 0’s before the first 1 is 2. Based on Table 6.4, the sequence “001” is encoded as “010,” in which the “0” is the prefix and “10” is the tail. Similar procedures are repeated until all the run-lengths are processed. It can be found that the length of the test sequence can be reduced from 43 to 32. In a Golomb code, each group contains the same number of run-lengths and thus may still be inefficient in some cases. In [Chandra 2003], a frequency-directed runlength (FDR) code was proposed that has variable-length tails based on the group index. It can be constructed such that a shorter run-length can be encoded into a shorter codeword to give better compression. An even more optimized run-length Test Compression 351 TABLE 6.4 Golomb Code with Four Run-Lengths for Each Group Group Run-Length Group Prefix Tail Codeword A1 0 1 2 3 A2 4 5 6 7 A3 8 9 10 11 … … 0 10 110 … 00 000 01 001 10 010 11 011 00 1000 01 1001 10 1010 11 1011 00 11000 01 11001 10 11010 11 11011 … … TD = 001 00001 0001 00001 00001 0000 01 001 00000001 00 01 l1 = 2 l2 = 4 l3 = 3 l4 = 4 l5 = 4 l6 = 5 l7 = 2 l8 = 7 Using Golomb code shown in Table 6.4 l9 = 3 TE = 010 1000 011 1000 1000 1001 010 1011 011 The length of TD is 43 bits The length of TE is 32 bits FIGURE 6.8 A test sequence and its encoded test data using Golomb code. code is the variable-length-input Huffman code (VIHC) described in [Gonciari 2003]. In [Wu¨ rtenberger 2003], a hybrid approach that combines dictionary coding with run-length coding was proposed. Other variable-to-variable codes that are not based on run-length coding include packet-based codes [Volkerink 2002] and nine-coded compression [Tehranipoor 2005]. 6.2.2 Linear-Decompression-Based Schemes Another class of test stimulus compression schemes is based on using linear decompressors to expand the data coming from the tester to fill the scan chains. Any decompressor that consists of only XOR gates and flip-flops is a linear decompressor. Linear decompressors have a very useful property: Their output space (i.e., the space of all possible test vectors that they can generate) is a linear subspace that is spanned by a Boolean matrix. In other words, for any linear decompressor that expands an m-bit compressed stimulus from the tester into an n-bit stimulus (test vector), there exists a Boolean matrix An×m such that the set of test vectors 352 VLSI Test Principles and Architectures that can be generated by the linear decompressor is spanned by A. A test vector Z can be compressed by a particular linear decompressor if and only if there exists a solution to a system of linear equations, AX = Z, where A is the characteristic matrix of the linear decompressor and X is a set of free variables stored on the tester (every bit stored on the tester can be thought of as a “free variable” that can be assigned any value, 0 or 1). The characteristic matrix for a linear decompressor can be obtained by doing symbolic simulation where each free variable coming from the tester is represented by a symbol. An example of this is shown in Figure 6.9, where a sequential linear decompressor containing an LFSR is used. The initial state of the LFSR is represented by the free variables X1 − X4, and the free variables X5 − X10 are shifted in from two channels as the scan chains are loaded. After symbolic simulation, the final values in the scan chains are represented by the equations for Z1 − Z12. The corresponding system of linear equations for this linear decompressor is shown in Figure 6.10. The symbolic simulation goes as follows. Assume that the initial seed X1 − X4 has been already loaded into the flip-flops. In the first clock cycle, the top flip-flop is loaded with the XOR of X2 and X5, the second flip-flop is loaded with X3, the third flip-flop is loaded with the XOR of X1 and X4, and the bottom flip-flop is loaded with the XOR of X1 and X6. Thus, we obtain Z1 = X2 ⊕ X5, Z2 = X3, Z3 = X1 ⊕ X4, and Z4 = X1 ⊕ X6. In the second clock cycle, the top flip-flop is loaded with the XOR of X9 X7 X5 X10 X8 X6 X1 Z9 Z5 Z1 + X2 Z10 Z6 Z2 X3 Z11 Z7 Z3 + X4 Z12 Z8 Z4 + Z9 = X1 ⊕ X4 ⊕ X9 Z10 = X1 ⊕ X2 ⊕ X5 ⊕ X6 Z11 = X2 ⊕ X3 ⊕ X5 ⊕ X7 ⊕ X8 Z12 = X3 ⊕ X7 ⊕ X10 Z5 = X3 ⊕ X7 Z6 = X1 ⊕ X4 Z7 = X1 ⊕ X2 ⊕ X5 ⊕ X6 Z8 = X2 ⊕ X5 ⊕ X8 FIGURE 6.9 Example of symbolic simulation for linear decompressor. Z1 = X2 ⊕ X5 Z2 = X3 Z3 = X1 ⊕ X4 Z4 = X1 ⊕ X6 Test Compression 353 0 1 00 1 00 0 00 0 0 10 0 00 0 00 1 0 01 0 00 0 00 1 0 00 0 10 0 00 0 0 10 0 01 0 00 1 0 01 0 00 0 00 1 1 00 1 10 0 00 0 1 00 1 00 1 00 1 0 01 0 00 0 10 1 1 00 1 10 0 00 0 1 10 1 01 1 00 0 0 10 0 01 0 01 Z1 X1 Z2 X2 Z3 X3 Z4 X4 Z5 X5 X6 = Z6 Z7 X7 Z8 X8 Z9 X9 Z10 X10 Z11 Z12 FIGURE 6.10 System of linear equations for the decompressor in Figure 6.9. the contents of the second flip-flop X3 and X7; the second flip-flop is loaded with the contents of the third flip-flop X1 ⊕ X4 ; the third flip-flop is loaded with the XOR of the contents of the first flip-flop X2 ⊕ X5 and the fourth flip-flop X1 ⊕ X6 ; and the bottom flip-flop is loaded with the XOR of the contents of the first flip-flop X2 ⊕ X5 and X8. Thus, we obtain Z5 = X3 ⊕ X7, Z6 = X1 ⊕ X4, Z7 = X1 ⊕ X2 ⊕ X5 ⊕ X6, and Z8 = X2 ⊕ X5 ⊕ X8. In the third clock cycle, the top flip-flop is loaded with the XOR of the contents of the second flip-flop X1 ⊕ X4 and X9; the second flip-flop is loaded with the contents of the third flip-flop X1 ⊕ X2 ⊕ X5 ⊕ X6 ; the third flipflop is loaded with the XOR of the contents of the first flip-flop X3 ⊕ X7 and the fourth flip-flop X2 ⊕ X5 ⊕ X8 ; and the bottom flip-flop is loaded with the XOR of the contents of the first flip-flop X3 ⊕ X7 and X10. Thus, we obtain Z9 = X4 ⊕ X9, Z10 = X1 ⊕ X6, Z11 = X2 ⊕ X5 ⊕ X8, and Z12 = X3 ⊕ X7 ⊕ X10. At this point, the scan chains are fully loaded with a test cube, so the simulation is complete. For a linear decompressor, finding an assignment for the free variables that will encode a particular test cube can be done by solving the system of linear equations for the specified bits in the test cube. Solving the linear equations can be done with Gauss–Jordan elimination [Cullen 1997] in time complexity O mn2 , where m is the number of columns (free variables) and n is the number of rows (number of specified bits in the test cube). Note that for Boolean matrices, XOR is used in place of addition and AND is used in place of multiplication. An example of solving the linear equations for a test cube is shown in Figure 6.11. There are five specified bits in the test cube, so the five linear equations correspond- ing to those bit positions must be simultaneously solved. One solution is shown, but note that there are many solutions to this system of linear equations. In Figure 6.12, an example of a test cube that does not have a solution is shown (note that row three cannot be solved). In this case, it is not possible to encode that test cube with this particular linear decompressor. There are a few different strategies for handling unencodable test cubes. A sim- ple approach is to just bypass the decompressor when applying those test cubes (directly shift them in unencoded form); however, that can significantly degrade the 354 VLSI Test Principles and Architectures Z = 1--011-----0 0 1 0 0 10 0 0 00 1 0 0 0 01 0 0 00 0 0 1 0 00 1 0 00 1 0 0 1 00 0 0 00 0 0 1 0 00 1 0 01 1 Gaussian 0 Elimination 1 1 0 X = 0111000001 1 0 0 0 0 10 0 0 0 0 0 1 0 0 1 00 0 0 0 1 0 0 1 0 0 01 0 0 0 1 0 0 0 1 0 10 0 0 0 1 0 0 0 0 0 00 0 0 1 1 FIGURE 6.11 Example of solving system for linear equations. Z = 1-0--1------ 0 1 0 0 1 0 0 0 0 0 1 Gaussian 1 0 0 1 0 0 0 0 0 0 0 Elimination 1001000000 1 X = No Solution 1001000000 0 0100100000 1 0000000000 1 FIGURE 6.12 Example of system of linear equations with no solution. overall compression. Another approach is to rerun the ATPG for the unencodable test cubes to try to find a different test cube that is encodable. A third approach is to redesign the linear decompressor so it uses more free variables when decompressing the test cubes, thereby making it easier to solve the linear equations. Note that it is very unlikely to be able to encode a test cube that has more specified bits than the number of free variables used to encode it. On the other hand, for linear decompressors that have diverse linear equations (e.g., an LFSR with a primitive polynomial), if the number of free variables is sufficiently larger than the number of specified bits, the probability of not being able to encode the test cube becomes negligibly small. For an LFSR with a primitive polynomial, it has been shown that if the number of free variables is 20 more than the number of specified bits, then the probability of not finding a solution is less than 10−6 [Chen 1986] [Ko¨ nemann 1991]. A figure of merit for linear decompressors is encoding efficiency, which is defined as follows: Specified Bits in Test Set Bits Stored on Tester How close a linear decompressor’s encoding efficiency is to 1 is a measure of its optimality. In general, it is not possible to achieve higher than an encoding efficiency of 1 because the probability of solving the linear equations when there are more specified bits than free variables is extremely low and would likely only happen for very few test cubes in a test set. Many different linear decompressor designs have been proposed. They can be categorized based on whether they use combinational logic or sequential logic and based on whether they use a fixed number of free variables when encoding each test cube or whether the number of free variables varies for different test cubes. Test Compression 355 6.2.2.1 Combinational Linear Decompressors The simplest linear decompressors use only combinational XOR networks. Each scan chain is fed by the XOR of some subset of the channels coming from the tester [Bayraktaroglu 2001] [Bayraktaroglu 2003] [Ko¨ nemann 2003]. The advantages compared with sequential linear decompressors are simpler hardware and control. The drawback is that, in order to encode a test cube, each scan slice must be encoded using only the free variables that are shifted from the tester in a single clock cycle (which is equal to the number of channels). The worst-case most highly specified scan slices tend to limit the amount of compression that can be achieved because the number of channels from the tester has to be sufficiently large to encode the most highly specified scan slices. Consequently, it is very difficult to obtain a high encoding efficiency (typically it will be less than 0.25); for the other less specified scan slices, a lot of the free variables end up getting wasted because those scan slices could have been encoded with many fewer free variables. One approach for improving the encoding efficiency of combinational linear decompressors that was proposed in [Krishna 2003] is to dynamically adjust the number of scan chains that are loaded in each clock cycle. So, for a highly specified scan slice, four clock cycles could be used in which 25% of the scan chains are loaded in each cycle, while for a lightly specified scan slice, only one clock cycle can be used in which 100% of the scan slices are loaded. This allows a better matching of the number of free variables with the number of specified bits to achieve a higher encoding efficiency. Note that it requires that the scan clock be divided into multiple domains. 6.2.2.2 Fixed-Length Sequential Linear Decompressors Sequential linear decompressors are based on linear finite-state machines such as LFSRs, cellular automata, or ring generators [Mrugalski 2004]. The advantage of a sequential linear decompressor is that it allows free variables from earlier clock cycles to be used when encoding a scan slice in the current clock cycle. This provides much greater flexibility than combinational decompressors and helps avoid the problem of the worst-case most highly specified scan slices limiting the overall compression. The more flip-flops that are used in the sequential linear decompressor, the greater the flexibility that is provided. Results in [Krishna 2001] and [Rajski 2004] have shown that a well-designed sequential linear decompressor with a sufficient number of flip-flops can provide greater than 0.95 encoding efficiency. A typical design of a sequential linear decompressor is shown in Figure 6.13. Different variants of this were described in [Krishna 2001], [Ko¨ nemann 2001], and [Rajski 2004]. There are b channels from the tester that inject free variables into a linear finite-state machine (in this case, it is shown as an LFSR, but it could also be a cellular automaton or a ring generator). The LFSR is then followed by a combinational linear XOR network that expands the outputs of the LFSR to fill the scan chains. When decompressing each test cube, the state of the LFSR is first reset and then a few initial clock cycles are used to load the LFSR with some initial free variables. After that, in each clock cycle the scan chains are loaded as additional free variables are injected into the LFSR. The total number of free variables that 356 VLSI Test Principles and Architectures b Channels from Tester L F Comb. Linear S Expand R Scan Chain 1 (m bits) Scan Chain 2 (m bits) Scan Chain n (m bits) FIGURE 6.13 Typical sequential linear decompressor. are used to generate each test cube is equal to b q + m , where b is the number of channels from the tester, q is the number of clock cycles used to initially load the LFSR, and m is the length of the longest scan chain. The reason for resetting the LFSR between test cubes is that it decouples the system of linear equations that have to be solved when encoding each test cube. If the LFSR is not reset, then the complexity of the linear equations would grow very large, as each test cube would depend on all the free variables injected up to that point. The reason why q clock cycles are used to initially load the LFSR before beginning to fill the scan chains is to create a reservoir of free variables that can be drawn upon in case the first scan slices are heavily specified. The simplest way to perform sequential linear decompression is to just shift in the same number of free variables for every test cube. The control logic in this case is very simple because every test cube is decompressed in exactly the same way. The drawback of this approach is that the encoding efficiency is limited by the worst-case most heavily specified test cube. If smax is the maximum number of specified bits in any test cube, then the number of free variables used to encode each test cube would have to be at least smax. If savg is the average number of specified bits in any test cube, then the highest encoding efficiency that can be achieved is savg/smax because every test cube is encoded with at least smax free variables. If the difference between savg and smax can be kept small, then high encoding efficiency can be achieved. One way to do this is to constrain the ATPG so smax does not become too large and stays near savg (this approach was taken in [Rajski 2004]). 6.2.2.3 Variable-Length Sequential Linear Decompressors An alternative to using a fixed number of free variables for decompressing every test cube is to use a sequential linear decompressor that can vary the number of free variables that are used for each test cube. The advantage of this is that better encoding efficiency can be achieved by using only as many free variables as are needed to encode each test cube. The cost is that more control logic and control information is needed. Test Compression 357 One approach for implementing variable-length sequential decompression that was described in [Ko¨ nemann 2001] and [Volkerink 2003] is to have an extra channel from the tester that gates the scan clock. If there is a heavily specified scan slice (or window of scan slices for [Volkerink 2003]), this extra gating channel can be used to stop the scan shifting for one or more cycles to allow the LFSR to accumulate a sufficient number of free variables to solve for the current scan slice before proceeding to the next one. With this approach it is very easy to control the number of clock cycles and hence the number of free variables that are used for decompressing each test cube. The drawback is the need for the additional gating channel, which diminishes the amount of test compression achieved in proportion with the total number of channels being used (note that, if 16 channels are used, then an additional channel would subtract around 6% from the overall compression). An alternative approach that eliminates the additional gating channel was described in [Krishna 2004]. The idea is that, when decompressing a test cube, in the first clock cycle the first b bits coming from the tester are used to specify how many clock cycles should be used for decompressing the test cube. These first b bits are used to initialize a counter that counts down until it reaches 0, at which point the scan vector is applied to the CUT and the next test cube is decompressed. As was mentioned earlier, the more flip-flops that are used in a sequential linear decompressor, the more flexibility it provides in solving the linear equations because more free variables from earlier clock cycles are retained and can be utilized. This improves the encoding efficiency. One idea for increasing the number of flip-flops without incurring a lot of overhead is to configure the scan chains themselves into a large LFSR as originally suggested in [Rajski 1998]. A particular architecture for this was proposed in [Krishna 2004]; it involves constructing a highly efficient three-stage linear decompressor as shown in Figure 6.14, where the parts in gray are configured from the scan cells themselves. The three stages of decompression are used to achieve high encoding efficiency for any distribution of specified bits in a test cube. The first stage is a combinational linear decompressor, the second stage is a vertical LFSR, and the third stage is a set of large horizontal LFSRs. The combinational linear decompressor is designed in a way that makes the large horizontal LFSRs linearly independent, thus allowing any test cube to be decompressed with this architecture, including fully specified ones. Encoding efficiencies greater than 0.99 can be obtained with this architecture without requiring any constraints on the ATPG. The drawback is the need to add logic in the scan chains to configure them as LFSRs. 6.2.2.4 Combined Linear and Nonlinear Decompressors The amount of compression that can be achieved with linear decompression is limited by the number of specified bits in the test cubes. While linear decompressors are very efficient at exploiting “don’t cares” in the test set, they cannot exploit correlations in the specified bits; hence, they cannot compress the test data to less than the total number of specified bits in the test data. The specified bits tend to be highly correlated, and one strategy that takes advantage of this is to combine 358 VLSI Test Principles and Architectures m -bit Scan Length b Channels from Tester n /b n /b b-to-n L Comb. F Linear S Expand R n /b (n/b)(m – 1)-bit LFSR (n/b)(m – 1)-bit LFSR (n/b)(m – 1)-bit LFSR 1-bit FIGURE 6.14 Three-stage sequential linear decompressor [Krishna 2004]. linear and nonlinear decompression together to achieve greater compression than either can alone. In [Krishna 2002], the inputs to a linear decompressor are encoded using a nonlinear code. A method is described in [Krishna 2002] for selecting the solution to the system of linear equations for each test cube in such a way that they can be effectively compressed by a statistical code. The statistical code reduces the number of bits that must be stored on the tester for the linear decompressor. In [Sun 2004], dictionary coding is combined with a linear decompressor. For each scan slice, either the dictionary is used to generate it, or, if it is not present in the dictionary, the linear decompressor is then used to generate it. In [Li 2005] and [Ward 2005], a nonlinear decompressor is placed between the linear decompressor and the scan chains as shown in Figure 6.15. In [Li 2005], the nonlinear decompressor is constructed by identifying scan chains that are compatible with a nonlinear combination of two other scan chains. For example, if scan chain a can be driven by the AND of the scan-in of scan chains b and c (this is From b Tester Linear Decompressor Nonlinear Decompressor FIGURE 6.15 One approach for combining linear and nonlinear decompressors. Scan Chain 1 Scan Chain 2 Scan Chain n Test Compression 359 checked by making sure that, in any scan slice where scan chain a has a specified “1,” neither scan chain b nor c has a specified “0”). A limitation of this approach is that as the scan length and number of test patterns increase, it becomes increasingly difficult to find such compatibility relationships among the scan chains. In [Ward 2005], a statistical code that compresses the number of specified bits is used. By reducing the number of specified bits that the linear decompressor has to produce, greater compression can be achieved because fewer free variables are required from the tester to solve the linear equations. 6.2.3 Broadcast-Scan-Based Schemes The third class of test stimulus compression schemes is based on broadcasting the same value to multiple scan chains. This was first proposed in [Lee 1998] and [Lee 1999]. Due to its simplicity and effectiveness, this method has been used as the basis of many test compression architectures, including some commercial design for testability (DFT) tools. 6.2.3.1 Broadcast Scan To illustrate the basic concept of broadcast scan, first consider two independent circuits C1 and C2. Assume that these two circuits have their own test sets T1 = and T2 = , respectively. In general, a test set may consist of random patterns and deterministic patterns. In the beginning of the ATPG process, usually random patterns are initially used to detect the easy-to- detect faults. If the same random patterns are used when generating both T1 and T2 then we may have t11 = t21 t12 = t22 , up to some ith pattern. After most faults have been detected by the random patterns, deterministic patterns are generated for the remaining difficult-to-detect faults. Generally, these patterns have many “don’t care” bits. For example, when generating t1 i+1 , many “don’t care” bits may still exist when no more faults in C1 can be detected. Using a test pattern with bits assigned so far for C1, we can further assign specific values to the “don’t care” bits in the pattern to detect faults in C2. Thus, the final pattern would be effective in detecting faults in both C1 and C2. The concept of pattern sharing can be extended to multiple circuits as illustrated in Figure 6.16. The problem is how to guide the ATPG tool to generate the patterns to be shared. If the ATPG tool has an option that allows the user to place the constraint that some inputs must always have the same values then the problem is solved. Note that the inputs here may include the primary inputs as well as the pseudo-primary inputs (i.e., the outputs of D flip-flops in a full-scan design). If the ATPG tool does not have this property, the concept of a virtual circuit presented in [Lee 1998] and [Lee 1999] can be used to deal with this problem. As shown in Figure 6.17, one may connect the inputs of the circuits that are to share the test patterns in a 1-to-1 mapping manner. This circuit is then handed to the ATPG tool as a single circuit, with the number of inputs being the maximum number of inputs among the circuits. The test compression can then be automatically done by the ATPG tool which will target faults as if it were a single circuit. This way of “cheating” 360 VLSI Test Principles and Architectures Scan_input SC1 SC2 … SCK 1 2 3 … N1 C1 1 2 3 … N2 C2 1 2 3 … Nk … Ck FIGURE 6.16 Broadcasting to scan chains driving independent circuits. Inputs Inputs 1234 123 C1 C2 FIGURE 6.17 Forcing ATPG tool to generate patterns for broadcast scan. the ATPG tool to generate compact tests does not require any modification to the ATPG program and hence can be applied to any ATPG tool. One major advantage of using broadcast scan for independent circuits is that all faults that are detectable in all original circuits will also be detectable with the broadcast structure. This is because if one test vector can detect a fault in a stand-alone circuit then it will still be possible to apply this vector to detect the fault in the broadcast structure. Thus, the broadcast scan method will not affect the fault coverage if all circuits are independent. Note that broadcast scan can also be applied to multiple scan chains of a single circuit if all subcircuits driven by the scan chains are independent. An example of this is the pipelined circuit shown in Figure 6.18, where each scan chain is driving an independent circuit. The response data from all subchains can be compacted by a multiple-input signature register (MISR) or other space/time compactor. 6.2.3.2 Illinois Scan If broadcast scan is used for multiple scan chains of a single circuit where the subcircuits driven by the scan chains are not independent, then the property of always being able to detect all faults is lost. The reason for this is that if two scan Scan Input Test Compression 361 CUTs SCk SC3 SC2 SC1 C1 C2 C3 ... FIGURE 6.18 Broadcast scan for a pipelined circuit. MISR chains are sharing the same channel, then the ith scan cell in each of the two scan chains will always be loaded with identical values. If some fault requires two such scan cells to have opposite values in order to be detected, it will not be possible to detect this fault with broadcast scan. To address the problem of some faults not being detected when using broadcast scan for multiple scan chains of a single circuit, the Illinois scan architecture was proposed in [Hamzaoglu 1999] and [Hsu 2001]. It got its name because the authors are with the University of Illinois at Urbana–Champaign. The Illinois scan architecture consists of two modes of operations, namely a broadcast mode and a serial scan mode, which are illustrated in Figure 6.19. The broadcast mode is first used to detect most faults in the circuit. During this mode, a scan chain is divided into multiple subchains called segments and the same vector can be shifted into Scan In Segment 1 Segment 2 Segment 3 Segment 4 MISR Scan Out (a) Broadcast Mode Scan In Scan Chain (b) Serial Chain Mode FIGURE 6.19 Two modes of Illinois scan architecture. Scan Out 362 VLSI Test Principles and Architectures all segments through a single shared scan-in input. The response data from all subchains are then compacted by a MISR or other space/time compactor. For the remaining faults that cannot be detected in broadcast mode, the serial scan mode is used where any possible test pattern can be applied. This ensures that complete fault coverage can be achieved. The extra logic required to implement the Illinois scan architecture consists of several multiplexers and some simple control logic to switch between the two modes. The area overhead of this logic is typically quite small compared to the overall chip area. The main drawback of the Illinois scan architecture is that no test compression is achieved when it is run in serial scan mode. This can significantly degrade the overall compression ratio that is achieved depending on how many test patterns must be applied in serial scan mode. To reduce the number of patterns that have to be applied in serial scan mode, multiple-input broadcast scan or reconfigurable broadcast scan can be used. These techniques are described next. 6.2.3.3 Multiple-Input Broadcast Scan Instead of using only one channel to drive all scan chains, a multiple-input broadcast scan could be used where there is more than one channel [Shah 2004]. Each channel can drive some subset of the scan chains. If two scan chains must be independently controlled to detect a fault, then they could be assigned to different channels. The more channels that are used and the shorter each scan chain is, the easier it is to detect more faults because fewer constraints are placed on the ATPG. Determining a configuration that requires the minimum number of channels to detect all detectable faults is thus highly desired with a multiple-input broadcast scan technique. 6.2.3.4 Reconfigurable Broadcast Scan Multiple-input broadcast scan may require a large number of channels to achieve high fault coverage. To reduce the number of channels that are required, a reconfigurable broadcast scan method can be used. The idea is to provide the capability to reconfigure the set of scan chains that each channel drives. Two possible reconfiguration schemes have been proposed, namely static reconfiguration [Pandey 2002] [Samaranayake 2003], and dynamic reconfiguration [Li 2004] [Sitchinava 2004] [Wang 2004] [Han 2005a]. In static reconfiguration, the reconfiguration can only be done when a new pattern is to be applied. For this method, the target fault set can be divided into several subsets, and each subset can be tested by a single configuration. After testing one subset of faults, the configuration can be changed to test another subset of faults. In dynamic reconfiguration, the configuration can be changed while scanning in a pattern. This provides more reconfiguration flexibility and hence can in general lead to better results with fewer channels. This is especially important for hard cores when the test patterns provided by core vendor cannot be regenerated. The drawback of dynamic reconfiguration versus static reconfiguration is that more control information is needed for reconfiguring at the right time, whereas for static reconfiguration the control information is much less because the reconfiguration is done only a few times (only after all the test patterns Test Compression 363 using a particular configuration have been applied). Dynamic reconfiguration is illustrated in the following example. Example 6.2 For the patterns shown in Figure 6.20, we only need four channels to drive the eight scan chains if two broadcast configurations are used to control the generation of the first five and last five bits for each scan chain, respectively. The first configuration is: 1 → 2 3 6 2 → 7 3 → 5 8 4 → 1 4 , where A → B1 B2 Bn means that the Ath channel drives the B1th, B2th, , Bnth scan chains. The other configuration is: 1 → 1 6 2 → 2 4 3 → 3 5 7 8 . The block diagram of a multiplexer (MUX) network for the above example is shown in Figure 6.21. It consists of five two-input multiplexers. Because there are two configurations, only one control line for the MUX network is required. In this example, when the control line is 0 (1), the first (second) configuration is selected. 6.2.3.5 Virtual Scan Rather than using MUX networks for test stimulus compression, combinational logic networks can also be used as decompressors. The combinational logic network can consist of any combination of simple combinational gates, such as buffers, inverters, AND/OR gates, MUXs, and XOR gates. This scheme, referred to as virtual scan, is different from reconfigurable broadcast scan and combinational linear decompression where pure MUX and XOR networks are allowed, respectively. The combinational logic network can be specified as a set of constraints or just as an expanded circuit for ATPG. In either case, the test cubes that ATPG generates are the compressed stimuli for the decompressor itself. There is no need to solve linear equations, and dynamic compaction can be effectively utilized during the ATPG process. The virtual scan scheme was proposed in [Wang 2002] and [Wang 2004]. In these papers, the decompressor was referred to as a broadcaster. The authors also proposed adding additional logic, when required, through VirtualScan inputs to reduce or remove the constraints imposed on the decompressor (broadcaster), thereby yielding very little or no fault coverage loss caused by test stimulus compression. Scan Chain 1 Scan Chain 2 Scan Chain 3 Scan Chain 4 Scan Chain 5 Scan Chain 6 Scan Chain 7 Scan Chain 8 1X 1XX XX 0X 1 XXXX 1 11XX 0 0X 1XX X0X 1X 0X 0XX XX 1XX X 00XX 0X1 X 1 1 1X X 1 0 0X 0 1 XXX X X 0X0 0 X 1 1X X X XX1 X X FIGURE 6.20 Test patterns for example of dynamic reconfiguration. 364 VLSI Test Principles and Architectures Pin Pin Pin Pin 1 2 3 4 Control Line 0 1 Scan Chain 1 0 Scan Chain 2 1 0 Scan Chain 3 1 0 Scan Chain 4 1 Scan Chain 5 Scan Chain 6 0 Scan Chain 7 1 Scan Chain 8 FIGURE 6.21 Block diagram of MUX network for Figure 6.20. In a broad sense, virtual scan is a generalized class of broadcast scan, Illinois scan, multiple-input broadcast scan, reconfigurable broadcast scan, and combinational linear decompression. The advantage of using virtual scan is that it allows the ATPG to directly search for a test cube that can be applied by the decompressor and allows very effective dynamic compaction. Thus, virtual scan may produce shorter test sets than any test stimulus compression scheme based on solving linear equations; however, because this scheme may impose XOR constraints directly on the original circuit, it may take longer than those based on solving linear equations to generate test cubes or compressed stimuli. 6.3 TEST RESPONSE COMPACTION Test response compaction is performed at the outputs of the scan chains. The purpose is to reduce the amount of test response that must be transferred back to the tester. While test stimulus compression must be lossless, test response compaction Test Compression 365 can be lossy. A large number of different test response compaction schemes have been presented and described to various extents in the literature. The schemes differ in the following attributes: time versus space, circuit-function-specific versus circuit-function-independent, linearity versus nonlinearity. Prior to describing the distinguishing attributes, it is useful to introduce some notations. Consider the general case of compaction where an m × n matrix of test data D = dij of m × n bits is transformed into a p × q matrix C = cij of p × q bits, where p < m and/or q < n. Denote the transformation operator as a matrix operator such that C = D . We refer to the ratio m p as the space compaction ratio and the ratio n q as the time compaction ratio. (I) Time versus space—The column index of test data matrix D is referred to as the time dimension because it corresponds to the output bits from a single circuit output resulting from the application of different input test patterns. If is such that C has its time dimension q < n, then time compaction occurs. The row index of the test data matrix D is referred to as the space dimension because it corresponds to the output bits from different circuit outputs resulting from the application of the input test pattern. Thus, if is such that C has its space dimension p < m, then space compaction occurs. Figure 6.22 can help explain the difference between space compaction and time compaction. A space compactor compacts an m-bit-wide output pattern to a p-bitwide output pattern (where p < m), whereas a time compactor compacts n output patterns to q output patterns (where q < n). It is possible to have both time and space compaction performed concurrently. The scheme combining both time and space compaction is referred to as mixed time and space compaction: Test Patterns Circuit Under Test Space Compactor m-bit wide output patterns p-bit wide output patterns Test Patterns Circuit Under Test Time Compactor n output patterns FIGURE 6.22 Time and space compaction schemes for response data. q output patterns 366 VLSI Test Principles and Architectures (II) Circuit-function-specific versus circuit-function-independent— Circuit-function-specific (CFS) is a characteristic referring to how a particular is selected. The compaction function is circuit function independent (CFI) (i e , not circuit function specific) if is selected regardless of the test data expected to originate from either the fault-free or faulty circuit. A that is CFI implies that it is selected independently from the circuit functionality in test mode (i e , independently from the functionality resulting from the application of a particular test set to the circuit). This is important, because frequently the compactor is designed before the actual design of the chip. If the compactor depends on the functionality of the design in the chip, then last-minute design changes may require you to modify the compactor. This may impact time-to-market. (III) Linearity versus nonlinearity—A (response) compactor is said to be linear if it consists of only XOR gates and flip-flops. For linear compactors, the compacting function is such that each bit of the compacted data matrix C can be expressed as a Boolean sum (XOR sum) of any number of bits of the data matrix D. Thus, for linear compactors, is a linear operator. Using the above attributes, we classify a number of known compaction functions in Table 6.5. The test response bits are obtained by using a logic simulator to simulate the fault-free design for the test stimulus. Unfortunately, for complex designs, logic simulators cannot always deterministically predict the logic values of all test response bits. For example, the simulator may not accurately predict values due to floating buses, uninitialized and uncontrollable storage elements, bus contention, or multiple clock domains or simply because the simulation model is inaccurate. The response bits whose logic values are not accurately predicted by the simulators are also called unknown test response bits or X’s. X’s significantly complicate response TABLE 6.5 Taxonomy of Various Response Compaction Schemes Compaction Scheme I II Space Time CFS CFI √ Zero-aliasing compactor [Chakrabarty 1998] [Pouya 1998] √ Parity tree [Karpovsky 1987] √ Enhanced parity tree [Sinanoglu 2003] √ X-Compact [Mitra 2004] q-Compactor [Han 2003] Convolutional compactor [Rajski 2005] √ OPMISR [Barnhart 2002] Block compactor [Wang 2003] √ i-Compact [Patel 2003] Compactor for SA [Wohl 2001] √ √ Scalable selector [Wohl 2004] √ √ √√ √ √ √ √ √ √ √ III Linearity Nonlinearity √ √ √ √ √ √ √ √ Test Compression 367 compression. For example, one unknown test response can render a signature of a MISR unknown and unusable. Test response compaction may induce some loss of information. Although the complete information of the original response is lost, the objective of fault detection can be still achieved. Because of the loss, response compaction techniques face two major challenges: (1) aliasing and (2) fault diagnosis. Aliasing is a problem where different uncompressed data A and uncompressed data B yield the same compressed data C after compaction, C = A = B . For example, a faulty circuit with an erroneous response can produce the same signature as the fault-free circuit, preventing the faulty circuit from being detected by the test. Hence, the response compaction techniques must be employed in a way to minimize aliasing. Another important challenge for response compaction techniques is the ability to perform fault diagnosis. In response compaction, a better diagnosis is to locate the failing scan cells in the scan chains from the outputs of the compactor without configuring the chip in a special diagnosis mode. In the following subsections, we will discuss in detail three types of response compaction techniques: (1) space compaction, (2) time compaction, and (3) mixed space and time compaction. 6.3.1 Space Compaction A space compactor is a combinational circuit for compacting m outputs of the circuit under test to n test outputs, where n < m. Space compaction can be regarded as the inverse procedure of linear expansion (which was described in Section 6.2.3). It can be expressed as a function of the input vector (i e , the data being scanned out) and the output vector (the data being monitored): Y= X where X is an m-bit input vector and Y is an n-bit output vector, n < m. Some linear codes can be used to implement space compaction. Parity tree cir- cuits have frequently been proposed for space compaction because of their good error propagation properties; however, while experimental results indicate that a high percentage of single stuck-at faults in typical logic circuits are detected with a parity tree space compactor, zero-aliasing compaction is rarely achieved. To provide better characteristics than a parity tree, a number of other compaction methods have been developed [Wohl 2001] [Wohl 2003a] [Das 2003] [Mitra 2004]. These include the enhanced single-error-correcting, double-error-detecting, or odd-errordetecting codes methods, which can reduce the aliasing ratio. 6.3.1.1 Zero-Aliasing Linear Compaction Consider a space compaction function Y = X . A space compactor is said to be transparent if any two different values X1 and X2 that appear at its input produce 368 VLSI Test Principles and Architectures different values Y1 and Y2 at its output, i.e., X1 = X2 . If X1 is the compactor input value in a correctly working circuit and X2 is the input value due to a fault, then because the corresponding output vectors will always be different for a transparent compactor it will be zero-aliasing [Chakrabarty 1998a,b]. For a space compaction function to guarantee zero-aliasing for the complete input vector space, the number of output bits for the compactor will have to be equal to or greater than the number of input bits. This means that if we want to design a full zero-aliasing space compactor then we cannot obtain any benefit of compaction. Therefore a practical space compactor cannot be zero-aliasing for all possible errors. Thus, the objective is to make it zero-aliasing only for the set of errors that can occur due to some set F of faults that actually occur in the circuit. An upper bound on the number of outputs of a compactor, given a specified test set T and a circuit C, is calculated in Theorem 6.1. Theorem 6.1 For any test set T, for a circuit that implements function C, there exists a zeroaliasing output space compactor for C with q outputs where q = log2 T + 1 . In the worst case, every fault-free response will be distinct. Each faulty input X needs to be mapped to a different Y (using function C). This means that such a space compactor guarantees zero-aliasing. It must produce T + 1 different output combinations, which implies that it must have at least log2 T + 1 output lines. Theorem 6.1 gives an upper bound on the number of outputs of the space compactor. This does not mean that we can only design the compactor with q outputs. A more efficient space compaction circuit may be possible by taking the fault set into account. This optimization can be realized by a graph model, also called a response graph. The response graph G = V E consists of the set of vertices V = v1 v2 vn corresponding to all possible responses of circuit C to test set T given fault set F, and the set edges E where vj vk ∈ E if and only if there exists a test pattern t ∈ T for which the fault-free response is vj, and a fault f ∈ F such that the faulty response of C for test t is vk. As an example, consider the ISCAS C17 benchmark circuit given in Figure 6.23. Figure 6.23a shows the fault-free response R = 00 11 11 00 for the minimal test set T = 10010 11010 10101 01111 . The response graph for this circuit is shown in Figure 6.23b. In this figure, for example, if there is a stuck-at-1 (SA1) fault at X1, the fault-free response is “00” and the erroneous response is “10,” so there is an edge between the state “00” and “10.” Other edges can be concluded by the definition. Theorem 6.2 Let G be a response graph. If G is 2q colorable, then there exists a q-output zeroaliasing space compactor for the circuit C. Every vertex v of G corresponds to an input vector X to the space compactor. The color assigned to v can be associated with the output of the compactor for input X. If G is 2q colorable, then the compactor realizes 2q different output values and can be represented with q output bits. Moreover, every faulty input X different from X Test Set T SA1 Fault: F1 0111 X1 NAND 1010 X2 1100 X3 NAND 1011 X4 1100 X5 NAND NAND SA1 Fault: F2 (a) 0000 Test Compression 369 NAND Test Response Y1 0 1 1 0 NAND Y2 0 1 1 0 0011 1100 1111 (b) FIGURE 6.23 An example of response graph: (a) The C17 circuit with a complete set of test patterns and fault-free response, and (b) response graph. produces a different output of the space compactor; therefore, all faults in C that cause X are detected. Hence, zero aliasing is ensured with q outputs. The problem with the above compacters is that unknown test responses may prevent error detectability. The next section presents a compaction tree that tolerates unknown test responses. 6.3.1.2 X-Compact X-compact [Mitra 2004] is an X-tolerant response compaction technique that has been used in several designs. The combinational compactor circuit designed using the X-compact technique is called an X-compactor. Figure 6.24 shows an example of an X-compactor with 8 inputs and 5 outputs. It is composed of 4 3-input XOR gates and 11 2-input XOR gates. The X-compactor can be represented as a binary matrix (matrix with only 0’s and 1’s) with n rows and k columns; this matrix is called the X-compact matrix. Each row of the X-compact matrix corresponds to a scan chain and each column corresponds to an X-compactor output. The entry in row i and column j of the 370 VLSI Test Principles and Architectures SC1 SC2 SC3 SC4 SC5 SC6 SC7 SC8 XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR Out 1 XOR Out 2 XOR Out 3 FIGURE 6.24 An X-compactor with eight inputs and five outputs. XOR Out 4 XOR Out 5 matrix is 1 if and only if the jth X-compactor output depends on the ith scan chain output; otherwise, the matrix entry is 0. The corresponding X-compact matrix M of the X-compactor shown in Figure 6.24 is: ⎡1 1 1 0 0⎤ M = ⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣111110 0 1 1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 1 001111⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦ 00111 For a conventional sequential compactor, such as a MISR, there are two sources of aliasing: error masking and error cancellation. Error masking occurs when one or more errors captured in the compactor during a single cycle propagate through the feedback path and cancel out with errors in the later cycles. Error cancellation occurs when an error bit captured in a shift register is shifted and eventually cancelled by another error bit. The error cancellation is a type of aliasing specific to the multiple-input sequential compactor. Because the X-compactor is a combinational compactor, it only results in error masking. To handle aliasing, the following theorems provide a basis for systematically designing X-compactors. Theorem 6.3 If only a single scan chain produces an error at any scan-out cycle, the X-compactor is guaranteed to produce errors at the X-compactor outputs at that scan-out cycle, if and only if no row of the X-compact matrix contains all 0’s. Test Compression 371 Theorem 6.4 Errors from any one, two, or an odd number of scan chains at the same scan-out cycle are guaranteed to produce errors at the X-compactor outputs at that scan-out cycle, if every row of the X-compact matrix is nonzero, distinct, and contains an odd number of 1’s. If all rows of the X-compact matrix are distinct and contain an odd number of 1’s, then a bitwise XOR of any two rows is nonzero. Also, the bitwise XOR of any odd number of rows is also nonzero. Hence, errors from any one or any two or any odd number of scan chains at the same scan-out cycle are guaranteed to produce errors at the compactor outputs at that scan-out cycle. Because all rows of the X-compact matrix of Figure 6.16 are distinct and odd, then by Theorem 6.2 simultaneous errors from any two or odd scan chains at the same scan-out cycle are guaranteed to be detected. The X-compact technique is nonintrusive and independent of the test patterns used to test the circuit. Insertion of the X-compactor does not require any major change to the ATPG flow; however, the X-compactor cannot guarantee that errors other than those described in Theorem 6.3 and Theorem 6.4 are detectable. 6.3.1.3 X-Blocking Instead of tolerating X’s on the response compactor, X’s can also be blocked before reaching the response compactor. During design, these potential X-generators (X-sources) can be identified using a scan design rule checker. When an X-generator is likely to reach the response compactor, it must be fixed [Naruse 2003] [Patel 2003]. The process is often referred to as X-blocking or X-bounding. In X-blocking, the output of an X-source can be blocked anywhere along its propagation paths before X’s reach the compactor. An example is shown in Figure 6.25. When the X-source has been blocked at a nearby location during test and will not reach the compactor, there is no need to fix further; however, care must be taken to ensure that no observation points are added between the X-source and the location at which it is blocked. For example, a non-scan flip-flop is a potential X-generator (X-source). If the non-scan flip-flop has two outputs (Q and QB), then one can add CoCmopmapcatcotror 0 X Source X select FIGURE 6.25 A simple illustration of the X-blocking scheme. 372 VLSI Test Principles and Architectures a control point to each of the outputs and activate it in test mode. Alternatively, if the flip-flip has an asynchronous set/reset pin, a control point can be added to permanently force the flip-flip to 0 or 1 during test. While a control point can be added to force the non-scan flip-flop to a constant value, it is recommended that for better fault coverage inserting a MUX control point driven by a nearby existing scan cell is preferred. X-blocking can ensure that no X’s will be observed; however, it does not provide a means for observing faults that can only propagate to an observable point through the now-blocked X-source. This can result in fault coverage loss. If the number of such faults for a given bounded X-generator justifies the cost, one or more observation points can be added before the X-source to provide an observable point to which those faults can propagate. These X-blocking or X-bounding methods have been extensively discussed in Section 5.2 (BIST Design Rules) of Chapter 5. 6.3.1.4 X-Masking While it may not result in fault coverage loss, the X-blocking technique does add area overhead and may impact delay due to the inserted logic. It is not surprising to find that, in complex designs, more than 25% of scan cycles could contain one or more X’s in the test response. It is difficult to eliminate these residual X’s by DFT; thus, an encoder with high X-tolerance is very attractive. Instead of blocking the X’s where they are generated, the X’s can also be masked off right before the response compactor [Wohl 2004] [Han 2005c] [Volkerink 2005] [Rajski 2005]. An example X-masking circuit is shown in Figure 6.26. The mask controller applies a logic value 1 at the appropriate time to mask off any scan output that contains an X. Mask data is required to indicate when the masking should take place. The mask data can be stored in compressed format and can be decompressed using on-chip hardware. Possible compression techniques are weighted pseudo-random LFSR reseeding or run-length encoding [Volkerink 2005]. Scan Out 1 Scan Out 2 Scan Out 3 Mask Controller FIGURE 6.26 An example X-masking circuit. Mask Bit 1 Mask Bit 2 Compactor Mask Bit 3 Test Compression 373 6.3.1.5 X-Impact While X-compact, X-blocking, and X-masking each can achieve significant reduction in fault coverage loss caused by X’s present at the inputs of a space compactor, the X-impact technique described in [Wang 2004] is helpful in that it simply uses ATPG to algorithmically handle the impact of residual X’s on the space compactor without adding any extra circuitry. Example 6.3 An example of algorithmically handling an X-impact is shown in Figure 6.27. Here, SC1 to SC4 are scan cells connected to a space compactor composed of XOR gates G7 and G8. Lines a b h are internal signals, and line f is assumed to be connected to an X-source (memory, non-scan storage element, etc.). Now consider the detection of the stuck-at-0 (SA0) fault f 1. Logic value 1 should be assigned to both lines d and e in order to activate f 1. The fault effect will be captured by scan cell SC3. If the X on f propagates to SC4, then the compactor output q will become X and f 1 cannot be detected. To avoid this, ATPG can try to assign either 1 to line g or 0 to line h in order to block the X from reaching SC4. If it is impossible to achieve this assignment, ATPG can then try to assign 1 to line c, 0 to line b, and 0 to line a in order to propagate the fault effect to SC2. As a result, fault f 1 can be detected. Thus, X-impact is avoided by algorithmic assignment without adding any extra circuitry. Example 6.4 It is also possible to use the X-impact approach to reduce aliasing. An example of algorithmically handling aliasing is shown in Figure 6.28. Here, SC1 to SC4 are scan cells connected to a compactor composed of XOR gates G7 and G8. Lines a b h are internal signals. Now consider the detection of the stuck-at-1 fault f 2. Logic value 1 should be assigned to lines c, d, and e in order to activate f 2, and logic value 0 should be assigned to line b in order to propagate the fault effect to SC2. If line a is set to 1, the fault effect will also propagate to SC1. In this case, ?a SC 1 G1 ?b ?c G2 G3 SC 2 1d 1e f1 G4 SC 3 Xf ?g ?h G5 G6 SC 4 FIGURE 6.27 Handling of X-impact. G7 p G8 q 374 VLSI Test Principles and Architectures FIGURE 6.28 Handling of aliasing. ?a SC1 G1 0b 1c f2 G2 G3 SC2 1d 1e G4 SC3 f g h G5 G6 SC4 G7 p G8 q aliasing will cause the compactor output p to have a fault-free value, resulting in an undetected f 2. To avoid this, ATPG can try to assign 0 to line a in order to block the fault effect from reaching SC1. As a result, fault f 2 can be detected. Thus, aliasing can be avoided by algorithmic assignment without any extra circuitry. 6.3.2 Time Compaction A time compactor uses sequential logic (whereas a space compactor uses combinational logic) to compact test responses. Because sequential logic is used, one must make sure that no unknown X values from the circuit under test will reach the compactor. If that happens, X-bounding or X-masking must be employed. The most widely adopted response compactor using time compaction is the multiple-input signature register (MISR). Consider the n-stage MISR shown in Figure 6.29. The internal structure of the n-stage MISR can be described by specifying a characteristic polynomial of degree n, f x , in which the symbol hi is either 1 or 0, depending on the existence or absence of the feedback path, where f x = 1 + h1x + h2x2 + · · · + hn−1xn−1 + xn The MISR uses n extra XOR gates for compacting nm-bit output sequences, M0 to Mm−1, into the modular LFSR simultaneously. The final contents stored in h1 h2 r0 r1 hn–2 rn–2 hn–1 rn–1 M0 M1 M2 Mn–2 FIGURE 6.29 An n-stage multiple-input signature register (MISR). Mn–1 Test Compression 375 M0 FIGURE 6.30 A four-stage MISR. FIGURE 6.31 An equivalent M sequence. M1 M2 M3 M0 1 0 0 1 0 M1 0 1 0 1 0 M2 11000 M3 10011 M 10011011 the MISR after compaction are called the (final) signature of the MISR. For more information on signature analysis and the MISR design, the reader is referred to Section 5.4.3 (Signature Analysis) of Chapter 5. Example 6.5 Consider the four-stage MISR shown in Figure 6.30 using f x = 1 + x + x4. Let M0 = 10010 M1 = 01010 M2 = 11000 , and M3 = 10011 . From this information, the signature R of the MISR can be calculated as 1011 . Using the formula M x = M0 x + xM1 x + x2M2 x + x3M3 x as discussed in Section 5.4.3 of Chapter 5, we obtain M x = 1 + x3 + x4 + x6 + x7 or M = 10011011 , as shown in Figure 6.31. The final signature is stored in the rightmost four bits of the M sequence; therefore, R = 1011 . 6.3.3 Mixed Time and Space Compaction In the previous two sections, we introduced different kinds of compactors for space compaction and time compaction independently. In this section, we introduce mixed time and space compactors. A mixed time and space compactor combines the advantages of a time compactor and a space compactor. Many mixed time and space compactors have been proposed in the literature, including OPMISR [Barnhart 2002], convolutional compactor [Rajski 2005], and q-compactor [Han 2003] [Han 2005c,d]. Because q-compactor is simple, this section uses it to introduce the conceptual architecture of a mixed time and space compactor. Figure 6.32 shows an example of a q-compactor assuming the inputs are coming from scan chain outputs. The spatial part of the q-compactor consists of single-output XOR networks (called 376 VLSI Test Principles and Architectures inputs output D D D D D FIGURE 6.32 An example q-compactor with single output. spread networks) connected to the flip-flops by means of additional two-input XOR gates interspersed between successive storage elements. As can be seen, every error in a scan cell can reach storage elements and then outputs in several possible ways. The spread network that determines this property is defined in terms of spread polynomials indicating how particular scan chains are connected to the register flip-flops. Different from a conventional MISR, the q-compactor presented in Figure 6.32 does not have a feedback path; consequently, any error or X injected into the compactor is shifted out after at most five cycles. The shifted-out data will be compared with the expected data and then the error will be detected. Example 6.6 An example of a q-compactor with six inputs, one output, and five storage elements—five per output—is shown in Figure 6.32. For the sake of simplicity, the injector network is shown here in a linear form rather than as a balanced tree. 6.4 INDUSTRY PRACTICES (EDITED BY LAUNG-TERNG WANG) During the last few years, several test compression products and solutions have been introduced by some of the major DFT vendors in the CAD industry. These products differ significantly with regard to technology, design overhead, design rules, and the ease of use and implementation. A few second-generation products have also been introduced by a few of the vendors. In this section, we briefly review a few of the products introduced by companies such as Cadence [Cadence 2006], Mentor Graphics [Mentor 2006], SynTest [SynTest 2006], Synopsys [Synopsys 2006], and LogicVision [LogicVision 2006]. Current industry solutions can be grouped under two main categories for stimulus decompression. The first category uses linear-decompression-based schemes, and the Test Compression 377 second category employs broadcast-scan-based schemes. The main difference between the two categories is the manner in which the ATPG engine is used. The first category includes products such as ETCompression from LogicVision [LogicVision 2006], TestKompress from Mentor Graphics [Rajski 2004], and SOCBIST from Synopsys [Wohl 2003b]. The second category includes products such as OPMISR+ from Cadence [Cadence 2006], VirtualScan [Wang 2004] and UltraScan [Wang 2005b] from SynTest, and DFT MAX from Synopsys [Sitchinava 2004]. For designs using linear-decompression-based schemes, test compression is achieved in two distinct steps. During the first step, conventional ATPG is used to generate sparse ATPG patterns (called test cubes), in which dynamic compaction is performed in a nonaggressive manner, while leaving unspecified bit locations in each test cube as X. This is accomplished by not aggressively performing the random fill operation on the test cubes which is used to increase coverage of individual patterns and hence reduce the total pattern count. During the second step, a system of liner equations that describe the hardware mapping from the external scan input ports to the internal scan chain inputs is solved in order to map each test cube into a compressed stimulus that can be applied externally. If a mapping is not found, a new attempt at generating a new test cube is required. For designs using broadcast-scan-based schemes, only a single step is required to perform test compression. This is achieved by embedding the constraints introduced by the decompressor as part of the ATPG tool such that the tool operates with much more restricted constraints. Hence, while in conventional ATPG each individual scan cell can be set to 0 or 1 independently, for broadcast-scan-based schemes the values to which related scan cells can be set are constrained. Thus, a limitation of this solution is that, in some cases, the constraints among scan cells can preclude some faults from being tested. These faults are typically tested as part of a later top-up ATPG process if required, similar to using linear-decompressionbased schemes. On the response compaction side, industry solutions have utilized either space compactors such as XOR networks or time compactors such as MISRs to compact the test responses. Currently, space compactors have a higher acceptance rate in the industry, as they do not involve the process of guaranteeing that no unknown X values are generated in the circuit under test. In this section, we briefly describe a number of test compression solutions and products currently supported by the EDA DFT vendors, including OPMISR+ from Cadence, TestKompress from Mentor Graphics, VirtualScan and UltraScan from SynTest, DFT MAX from Synopsys, and ETCompression from LogicVision. A summary of the different compression architectures used in these commercial products is listed at the end of the section. 6.4.1 OPMISR+1 OPMISR+ is the name of the test compression methodology that is a part of Cadence Design System’s Encounter Test product. It has its roots in IBM’s logic 1 Contributed by Brion Keller. 378 VLSI Test Principles and Architectures BIST and ATPG technology. Due to ever-increasing test data volume and test application time, the company decided to go with on-chip compression in early 1999. OPMISR+ originally was an intermediate step toward a more sophisticated compression approach called SmartBIST [Barnhart 2000] [Ko¨ nemann 2001]. SmartBIST combined the nearly complete output response compression of a multiple-input shift register (MISR) with a combinational or sequential “decompression” scheme based on a linear (XOR) spreader network fed from the scan inputs, optionally with a pseudo-random pattern generator (PRPG) in between. The structure of SmartBIST clearly borrows heavily from the STUMPS logic BIST architecture [Bardell 1982]. The first compression capability implemented, OPMISR [Barnhart 2001], was released in late 2000; it included just the output compression of a MISR. The enhanced version of OPMISR, called OPMISR+ [Barnhart 2002], appeared a year later, adding space compaction (also part of the eventual SmartBIST) so that when broadcast scan was used, the composite MISR signatures could be compared in a single tester cycle without requiring too many pins to do so. The general scan architecture for OPMISR+ is shown in Figure 6.33. By fanning out each scan input to multiple internal scan chains, it is possible to support many more scan chains than scan pins. The scan chains scan out into a set of MISRs that in aggregate create a signature for the whole design. Normally this signature is checked after each test and then reset, but it is also possible to accumulate the signature from many or all tests and check just the final signature for a go/nogo assessment of each chip, similar to a logic BIST approach but with high fault coverage and no need for test points to be inserted in the functional paths. Mask_Enable Scan-in & mask load streams Scan Load Bus Broadcast Scan (Fanout Buffer Network) Chip … … … FIGURE 6.33 OPMISR+ architecture. Mask MISR Mask MISR Space Compactor (XOR Network) Composite MISR Observe (MO) Mask MISR Test Compression 379 The architecture shown in Figure 6.33 shows the composite MISR signature being visible at MISR Observe (MO) pins through a space compactor. These MO pins can be shared with the scan-input (SI) pins to allow testing on reduced-pin testers. If the composite signatures are read out only at the end of each test, there is very little bandwidth needed for the MO pins, so they do not need to consume valuable tester scan pin resources; this allows the limited set of tester scan pins to be all dedicated to supplying input stimulus. For example, if a tester supports 32 scan pins, these would typically support up to 16 scan chains, with 2 tester scan pins attached to each chip scan chain. Because there is no need for any scan output pins, all 32 scan pins can be used to load scan data into the device, doubling the bandwidth for loading each test; with no output drivers switching during scan, power and noise during scan are also reduced. Doubling the number of scan-in pins in use helps to mitigate any potential issues associated with scan correlation because fewer chains have to share the same scan-in pin; even so, it is best to avoid fanout to scan chains in the same physical locality of the design to reduce the chance of correlations causing a problem. Also, like logic BIST, the signatures can be observed serially (not shown in Figure 6.33) instead of in parallel through the space compactor, which reduces the compression overhead at the cost of increased time to observe the signatures. Signatures become corrupted if they ever capture an unknown or unpredictable X response value, so it is required that either the design be free of all such unpredictability or that some means be provided to keep these values from corrupting the MISR signatures. As Figure 6.33 shows, mask registers and associated logic between the scan chain outputs and the MISRs can be used to eliminate these unknowns. The mask registers can be loaded using the full bandwidth provided by the scan input pins, and one or more Mask_Enable signals select between no masking and use of one of the mask registers on each scan cycle. Each Mask_Enable consumes a scan pin tester resource because they may change value on each scan cycle. One additional capability made useful by having no scan output streams is to utilize certain testers’ capability to repeat when the data values on all pins (both stimulus and response) repeat on consecutive tester cycles. Filling the “don’t care” bits in the scan-in stream by repeating the previous or next care bit value for each scan-in pin has shown that application of a simple run-length encoding provides an additional reduction in test data volume in the tester scan buffer. 6.4.2 Embedded Deterministic Test2 TestKompress® is the first commercially available on-chip test compression product and was introduced by Mentor Graphics [Mentor 2006] in 2001. It uses the embedded deterministic test (EDT) technology [Rajski 2002] [Rajski 2004] shown in Figure 6.34. The EDT architecture consists of an on-chip decompressor located between the external scan input ports and the internal scan chains, as well as an onchip selective compactor inserted between the internal scan chains and the external scan output ports. 2 Contributed by Janusz Rajski. 380 VLSI Test Principles and Architectures Circuit Under Test … Compactor … … Decompressor … Compressed Stimulus ATE Compacted Response FIGURE 6.34 EDT (TestKompress®) architecture. Because the decompressor determines the effectiveness of TestKompress stimuli compression, it was designed to achieve high compression ratio, very high speed of operation, very low silicon area, and high modularity. The decompressor, as shown in Figure 6.35, performs continuous flow decompression; that is, it has the ability to receive new information as the data are being decompressed and loaded to the scan chains. This property reduces dramatically the hardware overhead. The first silicon with EDT [Rajski 2002] used only a 20-bit ring generator with 5 injectors (external scan input ports) but was able to encode over 2000 positions in the scan chains. Conventional reseeding would require an LFSR of length 2000 and a shadow register to match that encoding capacity in this case. The sequential design of the decompressor provides a buffering function that enables sharing of FIGURE 6.35 Ring generator. 3 2 1 0 4 5 6 7 Phase Shifter (XOR Network) Test Compression 381 information between shift cycles that have very different numbers of specified bits. The decompressor can operate in an overdrive mode [Rajski 2004] where the stimuli of the input channels stay constant for a number of shift cycles. In this case, the ratio of volume compression is not limited by the ratio of internal scan chains to external channels. The compression algorithm is tightly integrated with the dynamic compaction of the ATPG engine. The linear equation solver works iteratively with ATPG to maximize compression. Every time ATPG generates a test cube for a new fault, the solver is invoked to compress it. As long as the solver can compress a test cube, the ATPG algorithm attempts to target additional faults and specify more bits. The solver operates incrementally. In every iteration, the system of linear equations gradually increases. The TestKompress compaction scheme, shown in Figure 6.36, is designed to preserve fault coverage. It provides the ability to deterministically handle X-values propagating to scan cells, eliminate aliasing effects completely, and support scan chain and combinational logic diagnosis. It comprises a number of space compactors driven by outputs of selected scan chains. While the space compactors are essentially XOR trees, they are not necessarily combinational circuits. If the propagation delay through the XOR tree becomes unacceptable with respect to the shift frequency, the XOR tree can be pipelined to allow faster operation. A distinct feature of the selective compactor is its ability to selectively mask some scan chains to ensure detection of the captured fault effects on other scan chains. This feature is implemented by gating logic that is capable of forcing some scan chain outputs to 0 while allowing data stored in other scan chains to pass through the compactor. The gating logic is controlled by a decoder driven by a select register loaded by the decompressor. The compactor guarantees observability of any scan cell regardless of the number and configuration of X-values. This functionality is essential in achieving very high fault coverage in designs with X-values. It is Scan chains FIGURE 6.36 Selective compactor. Decoder Select register Pipeline register 382 VLSI Test Principles and Architectures especially important for at-speed testing of designs with false and multiple-cycle paths. In addition to traditional fault models, TestKompress supports bridging faults extracted from layout as well as a wide range of fault models and functionality needed for at-speed testing. That includes transition faults and path-delay faults with an on-chip phase-locked loop (PLL) controlled launch and capture, small delay defects with timing, and analysis of false and multiple-cycle paths defined by design constraints. TestKompress also provides support for direct combinational logic and scan chain diagnosis from fail log data for compressed patterns [Leininger 2005]. This functionality is very useful in high-volume diagnosis performed for yield learning. 6.4.3 VirtualScan and UltraScan3 The VirtualScan and UltraScan test data volume and test application time reduction solutions were introduced by SynTest in 2002 and 2005, respectively [SynTest 2006]. VirtualScan [Wang 2004] was the first commercial product based on the broadcast scan scheme using combinational logic for pattern decompression. The VirtualScan architecture consists of three major parts: (1) a full-scan circuit; (2) a broadcaster with a 1-to-n scan configuration, which is driven by the external scan input ports and which drives the internal scan chain inputs of the full-scan circuit; and (3) a space compactor located between internal scan chain outputs of the full-scan circuit and the external scan output ports. The broadcaster, comprised of a network of combinational logic gates, is used to decompress an input compressed stimulus into decompressed stimulus for driving the scan data into the scan cells of all scan chains. The space compactor, comprised of a network of XOR gates, is used to compact the captured test responses. Figure 6.37 shows the general architecture of a VirtualScan circuit with a split ratio of four. The broadcaster has a 1-to-4 scan configuration, meaning that the broadcaster is used to split one original scan chain into four shorter balanced scan chains. The broadcaster is used to drive the shorter scan chains by broadcasting the m-bit input compressed stimulus to 4m-bit decompressed stimulus. This transformation can be implemented using any number of combinational logic gates, including AND, OR, NAND, NOR, MUX, XOR, and XNOR gates as well as buffers and inverters. Because the longest scan chain length is reduced by four times, this places a maximum limit on the maximum test data volume and test cycle reduction that can be achieved. Due to the stronger ATPG constraints introduced by the broadcaster, the actual reduction ratio achieved for a split ratio of four would typically be less than four. However, when required, additional logic provided by extra VirtualScan inputs added to the broadcaster can be used to further reduce or remove any fault coverage loss caused by test compression. UltraScan [Wang 2005b] is an extended version of VirtualScan. The UltraScan circuit consists of three major parts: (1) a VirtualScan circuit, (2) a time-division 3 Contributed by Laung-Terng Wang. Test Compression 383 Pass/Fail VirtualScan Circuit Full-Scan Circuit FIGURE 6.37 VirtualScan architecture. ATE Test Responses Comparator Expected Responses Test Patterns SI1 ... VirtualScan Inputs SIm Broadcaster s10 s11 s12 s13 . . . sm0 sm1 sm2 sm3 ... t10 t11 t12 t13 . . . tm0 tm1 tm2 tm3 Compactor SO1 ... SOm demultiplexer (TDDM) placed between the external scan input ports and the internal VirtualScan inputs, and (3) a time-division multiplexer (TDM) placed between the internal VirtualScan outputs and the external scan output ports. It relies on the fact that the frequency at which I/O pads are operated is typically much higher than the frequency at which the scan chains are operated. By matching the bandwidth difference between the I/O pad frequency and the scan chain shift clock frequency, one can easily reduce the test application time by a factor that is determined by dividing the frequency of the I/O pads by the frequency of the scan chains [Khoche 2002]. In general, the UltraScan technology can be applied to other test compression solutions as well. Figure 6.38 shows the general UltraScan architecture using the VirtualScan circuit with a split ratio of four. Surrounding the VirtualScan circuit, a time-division demultiplexer and a time-division multiplexer (TDDM/TDM) pair have been added, as well as a clock controller to create the UltraScan circuit. The TDDM and TDM pair can be built out of combinational circuits such as multiplexers and demultiplexers or sequential circuits such as shift-registers for bandwidth matching [Khoche 2002] [Wang 2005b]. In this UltraScan circuit, a small number of high-speed input pads, typically 16 to 32, are used as external scan input ports, which are connected to the inputs of the TDDM circuit. The TDDM circuit uses a high-speed clock, provided externally or generated internally using a phase-locked loop, to demultiplex the high-speed 384 VLSI Test Principles and Architectures Pass/Fail VirtualScan Circuit Full-Scan Circuit FIGURE 6.38 UltraScan architecture. ATE Test Responses Comparator Expected Responses Test Patterns ESI1 ... TDDM ESIn ck1 SI1 ... SIm VirtualScan Inputs Clock Controller Broadcaster s10 s11 s12 s13 . . . sm0 sm1 sm2 sm3 ... ck2 t10 t11 t12 t13 . . . tm0 tm1 tm2 tm3 Compactor SO1 ... TDM ESO1 . . . SOm ck1 ESOn compressed stimuli into compressed stimuli operating at a slower data rate for scan shift. Similarly, the TDM circuit will use the same high-speed clock to capture and shift out the test responses to high-speed output pads for comparison. The demultiplexing ratio, the ratio between the high-speed data rate and the low-speed data rate, is typically 16, which means that designers can generate 256 to 512 internal scan chains from the external scan I/O ports. The clock controller is used to derive the scan shift clock by dividing the high-speed clock by the demultiplexing ratio. In this example, for a desired scan shift clock frequency of 10 MHz, the external I/O pads are operated at 160 MHz. Note that the TDDM/TDM circuit does not compress test data volume but only reduces test application time or test pin count. It is also possible to use UltraScan to reduce test power using a similar approach as described in [Whetsel 1998] and [Khoche 2002]. Test Compression 385 6.4.4 Adaptive Scan4 Adaptive scan [Sitchinava 2004] is the recent test compression architecture adopted by Synopsys as part of their DFT MAX solution [Synopsys 2006]. This compression solution is designed to be the next-generation scan architecture. To address the need for reduced test data volume and test application time, combinational logic has been added to traditional scan implementation to allow the small input–output interface of scan to be used for a large number of scan chains. Multiplexers (MUXs) are added on the input side to maintain the simple relationship between scan cells and scan-in values. This allows for a simple upgrade to the highly tuned combinational ATPG algorithms to support the needs for compression. XORs are added on the output side to maintain the high observability of scan chains. The adaptive scan architecture of DFT MAX is shown in Figure 6.39. The combinational MUX network for stimulus decompression is controlled by select lines that allow mappings available through the data paths of the MUXs to be reconfigured on a per-shift basis. This allows a very large number of scan configurations to be implemented with very low area overhead. An X-tolerant XOR network for response compaction allows for good fault coverage in the place of X’s in the test response. The output compactor used in adaptive scan consists of a network of XOR gates. Unlike conventional compactors, adaptive scan adopts a space compactor that is capable of compacting test responses while tolerating unknown X values [Mitra 2004]. This can reduce fault coverage loss caused by X’s in the test response. While mainstream designs have few X’s, an optional masking control is available on the Select Lines … MUX Network … FIGURE 6.39 Adaptive scan architecture. 4 Contributed by Rohit Kapur. … XOR Network … Scan Chains 386 VLSI Test Principles and Architectures output side to provide a complete solution to the user when a larger number of X’s exist in the test response. The XOR circuitry of adaptive scan is designed to support diagnosis of a high volume of scan pattern failures observed on the tester. Because adaptive scan adds few combinational gates to existing scan flows, compression can be tightly integrated—and delivered—within the company’s flagship products, DFT compiler for one-pass scan synthesis, and TextraMAX for ATPG [Synopsys 2006]. Every test capability that was available in conventional scan is also available in the adaptive scan implementation; for example, PLL support, ATPG compaction support, adjacent-fill, and physical integration are all inherited from the previously available traditional scan implementation. 6.4.5 ETCompression5 Finally, LogicVision’s deterministic test compression solution, ETCompression, builds upon their embedded logic test (ELT) technology [LogicVision 2006]. Figure 6.40 shows the ETCompression architecture. A pseudo-random pattern generator drives the scan chains and has an autonomous (BIST) mode and a reseeding mode. ETCompression can be used with or without support of the autonomous mode. A multiple-input signature register (MISR) compresses the scan chain output values in both modes. A run-time programmable X-masking circuit is used to mask unknown X values that would corrupt the MISR signature. The input TAP/ WTAP tdi S E E D tdo Seed FSM SeedReady SeedLoaded Test Controller M A P S R K P G M M I A S S R K FSM FIGURE 6.40 ETCompression architecture. 5 Contributed by Benoit Nadeau-Dostie. Scan chains Test Compression 387 mask is used to load constant values in scan chains with hold-time problems. This reduces the number of X-values propagating to other scan chains. During the reseeding mode, the seed to be used for the next pattern is shifted at low speed (typically 10 to 50 MHz) from the tester to a shadow register in the test access port (TAP) or wrapper TAP (WTAP) of an embedded block (or core). The TAP and WTAP are implemented according to IEEE 1149.1 and 1500, respectively. Both standards are the main topics in Chapter 10. In the meantime, the current pattern is being decompressed by the PRPG and loaded in scan chains at a frequency which is run time programmable and which is often higher than the tester speed. This makes the PRPG reseeding approach attractive because it does not require shifting test data in and out of the scan chains at the frequency imposed by the tester interface. Using a faster frequency to load scan chains increases throughput and allows operating the circuit at a power level that is representative of the functional mode, which has been shown to be very useful in the characterization of power grids [Nadeau-Dostie 2005]. The transfer of the seed from the shadow register to the PRPG is performed using a simple asynchronous protocol because the frequency and phase of the clocks might not be related. When the PRPG is not decompressing a pattern, the next seed is transferred if it is available (i.e., SeedReady is active). If not, it waits until it is available. The TAP (or WTAP) is then informed that the next seed can be shifted in from the tester (i.e., SeedLoaded is active). The two signals are then reset and the process repeats as many times as there are seeds. The clocking used for both modes contributes a lot to the level of test compression achievable beyond the calculation of seeds from test cubes. First, a launch-onshift (or skewed-load) approach is used which has been shown to require up to an order of magnitude fewer patterns to achieve the same transition fault coverage [Jayaram 2003]. The scan-enable signal is pipelined locally to each domain to facilitate timing closure. Second, all multiple-cycle paths and cross-domain logic are tested concurrently so there is no need to rerun patterns with different clock edge placement and masking configurations. This is done in a such a way that both fault simulation and test generation are purely combinational to minimize run time. These techniques are explained in [Nadeau-Dostie 2000]. During the capture phase, all functional clocks are enabled to produce a burst of five clock cycles. The burst is long enough to make sure that the supply has time to stabilize before the launch and capture cycles [Rearick 2005]. For each clock domain, the clock burst is configurable at run time to mimic the functional mode of operation from a timing and power point of view. This is essential to catch subtle problems related to crosstalk or IR drop, for example, as explained in [Nadeau-Dostie 2005]. The alignment of synchronous clock domains is preserved. In order to further improve test compression efficiency, ETCompression supports test point insertion and the hierarchical test approach described in [Pateras 2003]. Test points are inserted in a nonoptimized gate-level representation of the circuit using the algorithm proposed in [Seiss 1991]. Layout tools are now capable of restructuring the logic and eliminating any timing impact. The hierarchical test approach allows the use of the deterministic mode only on a few problematic blocks while other blocks are tested in autonomous mode. The approach allows the use of 388 VLSI Test Principles and Architectures TABLE 6.6 Summary of Industry Practices Industry Practice Stimulus Decompressor Response Compactor OPMISR+ TestKompress VirtualScan DFT MAX ETCompression UltraScan Broadcast scan (Illinois scan) Ring generator Combinational logic network Combinational MUX network (Reseeding) PRPG TDDM MISR with XOR network XOR network XOR network XOR network MISR TDM Note: MISR, multiple-input signature register; MUX, multiplexer; PRPG, pseudo-random pattern generator; TDDM, time-division demultiplexer; TDM, time-division multiplexer; XOR, exclusive-OR. functional flip-flops to provide isolation of the core. These flip-flops are then used in both internal and external testing of the core and allow at-speed testing of the interface with the rest of the circuit. 6.4.6 Summary A summary of the different compression architectures used in the commercial products is shown in Table 6.6. It can be seen that the solutions offered by the current EDA DFT vendors are quite diverse on stimulus decompression and response compaction. For stimulus decompression, OPMISR+, VirtualScan, and DFT MAX are broadcast scan based, while TestKompress and ETCompression are linear decompression based. For response compaction, OPMISR+ and ETCompression include MISRs, while other solutions purely adopt (X-tolerant) XOR networks. For at-speed delay testing, ETCompression uses the launch-on-shift (or skewed-load) approach for ATPG, while other solutions support launch-on-capture (or doublecapture). The UltraScan TDDM/TDM architecture can be implemented on top of any test compression solution to further reduce test application time and test pin count. 6.5 CONCLUDING REMARKS Test compression is an effective method for reducing test data volume and test application time with relatively small cost. Due to these advantages, test compression is beginning to be adopted in different industrial designs. Many EDA vendors have released first- and even second-generation tools for test compression and integrated it successfully as part of the design flow. Test compression has proven to be easy to implement and capable of producing high-quality tests and has been demonstrated to be an efficient test structure for embedded hard cores. This has allowed test compression to become more widely accepted than logic BIST. While code-based test compression schemes produce good results, at present the industry seems to favor solutions based on broadcast scan and linear decompression. Test Compression 389 One remaining issue for test compression is standardization. Currently, different vendors have proposed their own proprietary solutions, which prevent users from utilizing different ATPG compression software with different compression architectures. Fortunately, a working group is now being organized by the IEEE to address this problem. 6.6 EXERCISES 6.1 (Dictionary Coding) For the given test data, TD = 0000 0110 0000 0000 0 100 0000 0001 1100 0000 0100. If it is partitioned into 4-bit symbols, how many entries would be required in a complete dictionary? What would be the compression ratio using the complete dictionary? 6.2 (Golomb Coding) For the given test data, TD = 00000110000000000 10000000001110000000100. If a Golomb code with m = 4 is used for compression, show the compressed test data TE and the compression ratio. 6.3 (Compatibility Analysis) Given two definitions: a. Incompatible—For a scan chain segment Si, define Si q as the value of the qth scan cell in Si. Two scan chain segments Si and Sj are said to be incompatible, if ∃ q 1 ≤ q ≤ T such that Si q ⊕ Sj q = 1, where T is the largest number of scan cells in both scan chain segments. b. CI-graph G(V, E)—Assuming that each node in a graph V represents a scan chain segment, a CI-graph G V E is constructed by associating an edge E between any two nodes whose values, Vi and Vj, are incompatible. If there are eight scan chains, each containing five scan cells, then for the following test pattern, construct the corresponding CI-graph: Chain 1 Chain 2 Chain 3 Chain 4 Chain 5 Chain 6 Chain 7 Chain 8 1st 2nd 3rd 4th 5th 1 X 1XX X X 0X1 X X XX1 1 1 XX0 0 X 1XX X 0 X1X 0 X 0XX X X 1XX (X: don’t-care bit) 6.4 (Linear Decompressor) What is the characteristic A matrix for the sequential linear decompressor shown below such that AX = Z? 390 VLSI Test Principles and Architectures X7 X6 X5 X1 + Z9 Z5 Z1 X2 + X3 + X4 + Z10 Z6 Z2 Z11 Z7 Z3 Z12 Z8 Z4 6.5 (Linear Decompressor) For the sequential linear decompressor shown in Figure 6.9 whose corresponding system of linear equations is shown in Figure 6.10, find the compressed stimulus X1 − X10 necessary to encode the following test cube: = <0- - -1-0- -110>. 6.6 (X-Compactor) For the X-compact matrix of the compactor shown below, design the corresponding X-compactor. What errors can the X-compactor detect? ⎡0 1 1 1 0⎤ ⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣011111 1 1 1 0 0 0 0 0 0 1 0 1 1 0 1 0 1 1 110110⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦ 00111 6.7 (X-Compactor) Prove the X-tolerant theorem of the X-compactor given in Section 6.3.3. 6.8 (A Design Practice) Use the VirtualScan program and user’s manuals provided online to split the ISCAS s38584 design [ISCAS 1989] into 4, 8, and 16 scan chains. Calculate the fault coverage loss in each case. Then, perform top-up ATPG in each case and report the additional number of test patterns required to uncover the fault coverage loss. Report the actual compression ratio in each case. Acknowledgments The authors wish to thank Dr. Erik H. Volkerink of Agilent Technologies for contributing a portion of the Test Response Compaction section; Dr. Laung-Terng Test Compression 391 (L.-T.) Wang of SynTest Technologies, Dr. Brion Keller of Cadence Design Systems, Dr. Janusz Rajski of Mentor Graphics, Dr. Rohit Kapur of Synopsys, and Dr. Benoit Nadeau-Dostie of LogicVision for contributing the Industry Practices section; Khader S. Abdel-Hafez of SynTest Technologies for reviewing the manuscript; and Dr. Yinhe Han of the Institute of Computing Technology, Chinese Academy of Sciences, for formatting the text and drawing the figures. References R6.0—Books [Chakrabarty 2002] K. Chakrabarty, V. Iyengar, and A. Chandra, Test Resource Partitioning for System-on-a-Chip, Kluwer Academic, Norwell, MA, 2002. [Nadeau-Dostie 2000] B. Nadeau-Dostie, Design for At-Speed Test, Diagnosis, and Measurement, Springer, Boston, MA, 2000. R6.1—Introduction [Khoche 2000] A. Khoche and J. Rivoir, I/O bandwidth bottleneck for test: Is it real?, in Proc. Int. Workshop on Test Resource Partitioning, Paper 2.3, Atlantic City, NJ, 2000, 6 pp. R6.2—Test Stimulus Compression [Bayraktaroglu 2001] I. Bayraktaroglu and A. Orailoglu, Test volume and application time reduction through scan chain concealment, in Proc. Design Automation Conf., June 2001, pp. 151–155. [Bayraktaroglu 2003] I. Bayraktaroglu and A. Orailoglu, Concurrent application of compaction and compression for test time and data volume reduction in scan designs, IEEE Trans. Comput., 52(11), 1480–1489, 2003. [Chandra 2001] A. Chandra and K. Chakrabarty, System-on-a-chip test-data compression and decompression architectures based on Golomb codes, IEEE Trans. Comput.-Aided Des., 20(3), 355–368, 2001. [Chandra 2003] A. Chandra and K. Chakrabarty, Test data compression and test resource partitioning for system-on-a-chip using frequency-directed run-length (FDR) codes, IEEE Trans. Comput., 52(8), 1076–1088, 2003. [Chen 1986] C. L. Chen, Linear dependencies in linear feedback shift registers, IEEE Trans. Comput., C-35(12), 1086–1088, 1986. [Cullen 1997] C. G. Cullen, Linear Algebra with Applications, Addison-Wesley, Boston, MA, 1997. [Gonciari 2003] P. T. Gonciari, B. M. Al-Hashimi, and N. Nicolici, Variable-length input Huffman coding for system-on-a-chip test, IEEE Trans. Comput.-Aided Des., 22(6), 783– 796, 2003. [Hamzaoglu 1999] I. Hamzaoglu and J. H. Patel, Reducing test application time for full scan embedded cores, in Proc. Int. Symp. on Fault-Tolerant Computing, July 1999, pp. 260–267. [Han 2005a] Y. Han, S. Swaminathan, Y. Hu, A. Chandra, and X. Li, Scan data volume reduction using periodically alterable MUXs decompressor, in Proc. 14th IEEE Asian Test Symp., November 2005, pp. 372–377. 392 VLSI Test Principles and Architectures [Han 2005b] Y. Han, Y. Hu, X. Li, H. Li, A. Chandra, and X. Wen, Wrapper scan chains design for rapid and low power testing of embedded cores, IEICE Trans. Inform. Syst., E88–D(9), 2126–2134, 2005. [Hsu 2001] F. F. Hsu, K. M. Butler, and J. H. Patel, A case study on the implementation of Illinois scan architecture, in Proc. IEEE Int. Test Conf., October 2001, pp. 538–547. [Huffman 1952] D. A. Huffman, A method for the construction of minimum redundancy codes, in Proc. IRE, 40(9), 1098–1101, 1952. [Ichihara 2000] H. Ichihara, K. Kinoshita, I. Pomeranz, and S. M. Reddy, Test transformation to improve compaction by statistical encoding, in Proc. of VLSI Design, January 2000, pp. 294–299. [Jas 1998] A. Jas and N. A. Touba, Test vector compression via cyclical scan chains and its application to testing core-based designs, in Proc. IEEE Int. Test Conf., October 1998, pp. 458–464. [Jas 2003] A. Jas, J. Ghosh-Dastidar, M. Ng, and N. A. Touba, An efficient test vector compression scheme using selective Huffman coding, IEEE Trans. Comput.-Aided Des., 22(6), 797–806, 2003. [Knieser 2003] M. Knieser, F. Wolff, C. Papachristou, D. Weyer, and D. McIntyre, A technique for high ratio LZW compression, in Proc. Design, Automation, and Test in Europe, March 2003, pp. 116–121. [Ko¨ nemann 1991] B. Ko¨ nemann, LFSR-coded test patterns for scan designs, in Proc. European Test Conf., April 1991, pp. 237–242. [Ko¨ nemann 2001] B. Ko¨ nemann, C. Barnhart, B. Keller, T. Snethen, O. Farnsworth, and D. Wheater, A SmartBIST variant with guaranteed encoding, in Proc. Asian Test Symp., November 2001, pp. 325–330. [Ko¨ nemann 2003] B. Ko¨ enemann, C. Barnhart, and B. Keller, Real-Time Decoder for Scan Test Patterns, U.S. Patent No. 6,611,933, August 26, 2003. [Krishna 2001] C. V. Krishna, A. Jas, and N. A. Touba, Test vector encoding using partial LFSR reseeding, in Proc. IEEE Int. Test Conf., October 2001, pp. 885–893. [Krishna 2002] C. V. Krishna, A. Jas, and N. A. Touba, Reducing test data volume using LFSR reseeding with seed compression, in Proc. IEEE Int. Test Conf., October 2002, pp. 321–330. [Krishna 2003] C. V. Krishna and N. A. Touba, Adjustable width linear combinational scan vector decompression, in Proc. Int. Conf. on Computer-Aided Design, September 2003, pp. 863–866. [Krishna 2004] C. V. Krishna and N. A. Touba, 3-stage variable length continuous-flow scan vector decompression scheme, in Proc. VLSI Test Symp., April 2004, pp. 79–86. [Lee 1998] K.-J. Lee, J. J. Chen, and C. H. Huang, Using a single input to support multiple scan chains, in Proc. Int. Conf. on Computer-Aided Design, November 1998, pp. 74–78. [Lee 1999] K.-J. Lee, J. J. Chen, and C. H. Huang, Broadcasting test patterns to multiple circuits, IEEE Trans. Comput.-Aided Des., 18(12), 1793–1802, 1999. [Li 2003] L. Li, K. Chakrabarty, and N. A. Touba, Test data compression using dictionaries with selective entries and fixed-length indices, ACM Trans. Design Autom. Electr. Syst., 8(4), 470–490, 2003. [Li 2004] L. Li and K. Chakrabarty, Test set embedding for deterministic BIST using a reconfigurable interconnection network, IEEE Trans. Comput.-Aided Des., 23(9), 1289–1305, 2004. Test Compression 393 [Li 2005] L. Li, K. Chakrabarty, S. Kajihara, and S. Swaminathan, Efficient space/time compression to reduce test data volume and testing time for IP cores, in Proc. VLSI Design, January 2005, pp. 53–58. [Mrugalski 2004] G. Mrugalski, J. Rajski, and J. Tyszer, Ring generators: New devices for embedded test applications, IEEE Trans. Comput.-Aided Des., 23(9), 1306–1320, 2004. [Pandey 2002] A. R. Pandey and J. H. Patel, Reconfiguration technique for reducing test time and test volume in Illinois scan architecture based designs, in Proc. IEEE VLSI Test Symp., April 2002, pp. 9–15. [Rajski 1998] J. Rajski, J. Tyszer, and N. Zacharia, Test data decompression for multiple scan designs with boundary scan, IEEE Trans. Comput., 47(11), 1188–1200, 1998. [Rajski 2004] J. Rajski, J. Tyszer, M. Kassab, and N. Mukherje, Embedded deterministic test, IEEE Trans. Comput.-Aided Des., 23(5), 776–792, 2004. [Reda 2002] S. Reda and A. Orailoglu, Reducing test application time through test data mutation encoding, in Proc. Design, Automation, and Test in Europe, March 2002, pp. 387–393. [Reddy 2002] S. M. Reddy, K. Miyase, S. Kajihara, and I. Pomeranz, On test data volume reduction for multiple scan chain designs, in Proc. IEEE VLSI Test Symp., April 2002, pp. 103–108. [Samaranayake 2002] S. Samaranayake, N. Sitchinava, R. Kapur, M. Amin, and T. W. Williams, Dynamic scan: Driving down the cost of test, IEEE Comput., 35(10), 65–70, 2002. [Samaranayake 2003] S. Samaranayake, E. Gizdarski, N. Sitchinava, F. Neuveux, R. Kapur, and T. W. Williams, A reconfigurable shared scan-in architecture, in Proc. IEEE VLSI Test Symp., April 2003, pp. 9–14. [Shah 2004] M. A. Shah and J. H. Patel, Enhancement of the Illinois scan architecture for use with multiple scan inputs, in Proc. Annual Symp. on VLSI, February 2004, pp. 167–172. [Sitchinava 2004] N. Sitchinava, S. Samaranayake, R. Kapur, E. Gizdarski, F. Neuveux, and T. W. Williams, Changing the scan enable during shift, in Proc. IEEE VLSI Test Symp., April 2004, pp. 73–78. [Sun 2004] X. Sun, L. Kinney, and B. Vinnakota, Combining dictionary coding and LFSR reseeding for test data compression, in Proc. IEEE Design Automation Conf., June 2004, pp. 944–947. [Tehranipoor 2005] M. Tehranipoor, M. Nourani, and K. Chakrabarty, Nine-coded compression technique for testing embedded cores in SoCs, IEEE Trans. VLSI, 13(6), 719–731, 2005. [Volkerink 2002] E. H. Volkerink, A. Khoche, and S. Mitra, Packet-based input test data compression techniques, in Proc. IEEE Int. Test Conf., October 2002, pp. 154–163. [Volkerink 2003] E. H. Volkerink and S. Mitra, Efficient seed utilization for reseeding based compression, in Proc. IEEE VLSI Test Symp., April 2003, pp. 232–237. [Wang 2002] L.-T. Wang, H.-P. Wang, X. Wen, M.-C. Lin, S.-H. Lin, D.-C. Yeh, S.-W. Tsai, and K. S. Abdel-Hafez, Method and Apparatus for Broadcasting Scan Patterns in a Scan-Based Integrated Circuit, U.S. Patent Appl. No. 20030154433, January 16, 2002. [Wang 2004] L.-T. Wang, X. Wen, H. Furukawa, F.-S. Hsu, S.-H. Lin, S.-W. Tsai, K. S. Abdel-Hafez, and S. Wu, VirtualScan: A new compressed scan technology for test cost reduction, in Proc. IEEE Int. Test Conf., October 2004, pp. 916–925. [Wang 2005a] Z. Wang and K. Chakrabarty, Test data compression for IP embedded cores using selective encoding of scan slices, in Proc. IEEE Int. Test Conf., October 2005, pp. 581–590. 394 VLSI Test Principles and Architectures [Ward 2005] S. Ward, C. Schattauer, and N. A. Touba, Using statistical transformations to improve compression for linear decompressors, in Proc. IEEE Int. Symp. on Defect and Fault Tolerance in VLSI Systems, October 2005, pp. 43–50. [Wolff 2002] F. G. Wolff and C. Papachristou, Multiscan-based test compression and hardware decompression using LZ77, in Proc. IEEE Int. Test Conf., October 2002, pp. 331–339. [Wu¨ rtenberger 2003] A. Wu¨ rtenberger, C. S. Tautermann, and S. Hellebrand, A hybrid coding strategy for optimized test data compression, in Proc. IEEE Int. Test Conf., October 2003, pp. 451–459. [Wu¨ rtenberger 2004] A. Wu¨ rtenberger, C. S. Tautermann, and S. Hellebrand, Data compression for multiple scan chains using dictionaries with corrections, in Proc. IEEE Int. Test Conf., October 2004, pp. 926–935. R6.3—Test Response Compaction [Barnhart 2002] C. Barnhart, V. Brunkhorst, F. Distler, O. Farnsworth, A. Ferko, B. Keller, D. Scott, B. Ko¨ nemann, and T. Onodera, Extending OPMISR beyond 10× scan test efficiency, IEEE Des. Test Comput., 19(5), 65–73, 2002. [Chakrabarty 1998] K. Chakrabarty, B. T. Murray, and J. P. Hayes, Optimal zero-aliasing space compaction of test responses, IEEE Trans. Comput., 47(11), 1171–1187, 1998. [Das 2003] S. R. Das, M. Sudarma, M. H. Assaf, E. M. Petriu, W.-B. Jone, K. Chakrabarty, and M. Sahinoglu, Parity bit signature in response data compaction and built-in self-testing of VLSI circuits with nonexhaustive test sets, IEEE Trans. Instrument. Measure., 52(5), 1363–1380, 2003. [Han 2003] Y. Han, Y. Xu, A. Chandra, H. Li, and X. Li, Test resource partitioning based on efficient response compaction for test time and tester channels reduction, in Proc. Asian Test Symp., November 2003, pp. 440–445. [Han 2005c] Y. Han, Y. Hu, H. Li, and X. Li, Theoretic analysis and enhanced X-tolerance of test response compact based on convolutional code, in Proc. Asia and South Pacific Design Automation Conf., January 2005, pp. 53–58. [Han 2005d] Y. Han, X. Li, H. Li, and A. Chandra, Test resource partitioning based on efficient response compaction for test time and tester channels reduction, J. Comput. Sci. Technol., 20(2), 201–210, 2005. [Ivanov 1996] A. Ivanov, B. Tsuji, and Y. Zorian, Programmable space compactors for BIST, IEEE Trans. Comput., 45(12), 1393–1405, 1996. [Karpovsky 1987] M. Karpovsky and P. Nagvajara, Optimal time and space compression of test response for VLSI devices, in Proc. IEEE Int. Test Conf., October 1987, pp. 523–529. [Mitra 2004] S. Mitra and K. S. Kim, X-compact: An efficient response compaction technique, IEEE Trans. Comput.-Aided Des., 23(3), 421–432, 2004. [Naruse 2003] M. Naruse, I. Pomerantz, S. M. Reddy, and S. Kundu, On-chip compression of output responses with unknown values using LFSR reseeding, in Proc. IEEE Int. Test Conf., October 2003, pp. 1060–1068. [Patel 2003] J. H. Patel, S. S. Lumetta, and S. M. Reddy, Application of Saluja-Karpovsky compactors to test responses with many unkowns, in Proc. IEEE VLSI Test Symp., April 2003, pp. 107–112. [Pouya 1998] B. Pouya and N. A. Touba, Synthesis of zero-aliasing space elementary-tree space compactors, in Proc. IEEE VLSI Test Symp., April 1998, pp. 70–77. Test Compression 395 [Rajski 2005] J. Rajski, J. Tyszer, C. Wang, and S. M. Reddy, Finite memory test response compactors for embedded test applications, IEEE Trans. Comput.-Aided Des., 24(4), 622–634, 2005. [Saluja 1983] K. K. Saluja and M. Karpovsky, Test compression hardware through data compression in space and time, in Proc. IEEE Int. Test Conf., October 1983, pp. 83–88. [Sinanoglu 2003] O. Sinanoglu and A. Orailoglu, Compacting test responses for deeply embedded SoC cores, IEEE Design Test Comput., 20(4), 22–30, 2003. [Volkerink 2005] E. H. Volkerink and S. Mitra, Response compaction with any number of unknowns using a new LFSR architecture, in Proc. Design Automation Conf., June 2005, pp. 117–122. [Wang 2003] C. Wang, S. M. Reddy, I. Pomeranz, J. Rajski, and J. Tyszer, On compacting test response data containing unknown values, in Proc. Int. Conf. on Computer-Aided Design, September 2003, pp. 855–862. [Wang 2004] L.-T. Wang, X. Wen, H. Furukawa, F.-S. Hsu, S.-H. Lin, S.-W. Tsai, K. S. Abdel-Hafez, and S. Wu, VirtualScan: A new compressed scan technology for test cost reduction, in Proc. IEEE Int. Test Conf., October 2004, pp. 916–925. [Williams 1989] T. W. Williams and W. Daehn, Aliasing errors in multiple input signature analysis registers, in Proc. European Test Conf., April 1989, pp. 338–345. [Wohl 2001] P. Wohl, J. A. Waicukauski, and T. W. Williams, Design of compactors for signature-analyzers in built-in self-test, in Proc. IEEE Int. Test Conf., October 2001, pp. 54–63. [Wohl 2003a] P. Wohl and L. Huisman, Analysis and design of optimal combinational compactors, in Proc. IEEE VLSI Test Symp., April 2003, pp. 101–106. [Wohl 2004] P. Wohl, J. A. Waicukauski, and S. Patel, Scalable selector architecture for X-tolerant deterministic BIST, in Proc. Design Automation Conf., June 2004, pp. 934–939. R6.4—Industry Practices [Bardell 1982] P. H. Bardell and W. H. McAnney, Self-testing of multi-chip logic modules, in Proc. IEEE Int. Test Conf., October 1982, pp. 200–204. [Barnhart 2000] C. Barnhart, B. Keller, and B. Ko¨ nemann, Logic DFT and test resource partitioning for 100M gate ASICs (parts I, II and III), presented at the Test Resource Partitioning Workshop, Session 4, presentations 1, 2, and 3 (no hardcopy), 2000. [Barnhart 2001] C. Barnhart, V. Burnkhorst, F. Distler, O. Farnsworth, B. Keller, and B. Ko¨ nemann, OPMISR: The foundation for compressed ATPG vectors, in Proc. IEEE Int. Test Conf., October 2001, pp. 748–757. [Barnhart 2002] C. Barnhart, V. Brunkhorst, F. Distler, O. Farnsworth, A. Ferko, B. Keller, D. Scott, B. Ko¨ nemann, and T. Onodera, Extending OPMISR beyond 10× scan test efficiency, IEEE Design Test Comput., 19(5), 65–73, 2002. [Cadence 2006] Cadence Design Systems (http://www.cadence.com), 2006. [Chickermane 2004] V. Chickermane, B. Foutz, and B. Keller, Channel masking synthesis for efficient on-chip test compression, in Proc. IEEE Int. Test Conf., October 2004, pp. 452–461. [Jayaram 2003] V. B. Jayaram, J. Saxena, and K. M. Butler, Scan-based transition-fault test can do job, EE Times, October 24, 2003, pp. 60–66. [Khoche 2002] A. Khoche, Test resource partitioning for scan architectures using bandwidth matching, IEEE Test Resource Partitioning Workshop, October 2002, pp. 1.4-1–1.4-8. 396 VLSI Test Principles and Architectures [Ko¨ nemann 2001] B. Ko¨ nemann, C. Barnhart, B. Keller, T. Snethen, O. Farnsworth, and D. Wheater, A SmartBIST variant with guaranteed encoding, in Proc. Asian Test Symp., November 2001, pp. 325–330. [Ko¨ nemann 1991] B. Ko¨ nemann, LFSR-coded test patterns for scan designs, in Proc. European Test Conf., April 1991, pp. 237–242. [Leininger 2005] A. Leininger, P. Muhmenthaler, W.-T. Cheng, N. Tamarapalli, W. Yang, and H. Tsai, Compression mode diagnosis enables high volume manitoring diagnosis flow, in Proc. IEEE Int. Test Conf., Paper 7.3, October 2005, 10 pp. [LogicVision 2006] LogicVision (http://www.logicvision.com), 2006. [Mentor 2006] Mentor Graphics (http://www.mentor.com), 2006. [Mitra 2004] S. Mitra and K. S. Kim, X-compact: An efficient response compaction technique, IEEE Trans. Comput.-Aided Des., 23(3), 421–432, 2004. [Nadeau-Dostie 2005] B. Nadeau-Dostie, J.-F. Coˆ te´, and F. Maamari, Structural test with functional characteristics, in Proc. Int. Workshop on Current and Defect-Based Testing Workshop, May 2005, pp. 57–60. [Pateras 2003] S. Pateras, Achieving at-speed structural test, IEEE Design Test Comput., 20(5), 26–33, 2003. [Rajski 2002] J. Rajski, J. Tyszer, M. Kassab, N. Mukherjee, R. Thompson, Kun-Han Tsai, A. Hertwig, N. Tamarapalli, G. Mrugalski, G. Eide, and J. Qian, Embedded deterministic test for low cost manufacturing test, in Proc. IEEE Int. Test Conf., October 2002, pp. 301–310. [Rajski 2004] J. Rajski, J. Tyszer, M. Kassab, and N. Mukherjee, Embedded deterministic test, IEEE Trans. Comput.-Aided Des., 23(5), 776–792, 2004. [Rearick 2005] J. Rearick and R. Rodgers, Calibrating clock stretch during AC-scan test, in Proc. IEEE Int. Test Conf., Paper 11.3, October 2005, 8 pp. [Seiss 1991] B. H. Seiss, P. Trouborst, and M. Schulz, Test point insertion for scan-based BIST, in Proc. European Test Conf., April 2003, pp. 253–262. [Sitchinava 2004] N. Sitchinava, S. Samaranayake, R. Kapur, E. Gizdarski, F. Neuveux, and T. W. Williams, Changing the scan enable during shift, in Proc. IEEE VLSI Test Symp., April 2004, pp. 73–78. [Synopsys 2006] Synopsys (http://www.synopsys.com), 2006. [SynTest 2006] SynTest Technologies (http://www.syntest.com), 2006. [Wang 2004] L.-T. Wang, X. Wen, H. Furukawa, F.-S. Hsu, S.-H. Lin, S.-W. Tsai, K. S. Abdel-Hafez, and S. Wu, VirtualScan: A new compressed scan technology for test cost reduction, in Proc. IEEE Int. Test Conf., October 2004, pp. 916–925. [Wang 2005b] L.-T. Wang, K. S. Abdel-Hafez, X. Wen, B. Sheu, S. Wu, S.-H. Lin, and M.-T. Chang, UltraScan: Using time-division demultiplexing/multiplexing (TDDM/TDM) with VirtualScan for test cost reduction, in Proc. IEEE Int. Test Conf., Paper 36.4, October 2005, 8 pp. [Whetsel 1998] L. Whetsel, Core test connectivity, communication, and control, in Proc. IEEE Int. Test Conf., October 1998, pp. 303–312. [Wohl 2003b] P. Wohl, J. A. Waicukauski, S. Patel, and M. B. Amin, Efficient compression and application of deterministic patterns in a logic BIST architecture, in Proc. Design Automation Conf., June 2003, pp. 566–569. CHAPTER 7 LOGIC DIAGNOSIS Shi-Yu Huang National Tsing Hua University, Hsinchu, Taiwan ABOUT THIS CHAPTER Given a logic circuit that fails a test, logic diagnosis is the process of narrowing down the possible locations of the defect. By reducing the candidate locations down to possibly only a few, subsequent physical failure analysis becomes much faster and easier when searching for the root causes of failure. For integrated circuit (IC) products, logic diagnosis is crucial in order to ramp up the manufacturing yield and in some cases to reduce the product debug time as well. This chapter begins by introducing the basic concepts of logic diagnosis. We then review the diagnosis techniques for combinational logic, scan chains, and logic built-in self-test (BIST). For combinational logic, it is assumed that a fault-free scan chain is in place to assist the diagnosis process. The two most commonly used paradigms—namely, cause–effect analysis and effect–cause analysis—along with their variants are introduced. Next, we describe three different methods for diagnosing faults within the scan chains, including hardware-assisted, modified inject-and-evaluate, and signal-profiling-based methods. Finally, we discuss the challenges of diagnosis in a logic BIST environment. 7.1 INTRODUCTION During the IC design and manufacturing cycle, a manufacturing test screens out the bad chips. Diagnosis is used to find out why the bad chips failed, which is especially important when the yield is low or when a customer returns a failed chip. Typically, a successful IC product goes through two manufacturing stages: (1) prototype or pilot-run stage, and (2) high-volume manufacturing stage. During the prototype stage, a small number of samples are produced to validate the functionality on the tester and on demo/prototype boards. During this stage, the 398 VLSI Test Principles and Architectures prototype samples could fail badly due to design bugs or unstable manufacturing processes. Some of the reasons for this include the following: Misunderstandings about the functionality. A complex product is generally defined or built by multiple engineers. Because the specifications are usually written in English, there can be ambiguities, inconsistencies, and contradictions (as is true for anything that is created by humans). The actual hardware description language (HDL) model (register-transfer level [RTL] code) or gate-level netlist may not conform to the desired specification under certain scenarios or the specification may simply have been misinterpreted. Functional test generation and simulation are very time consuming. Designers may not be able to verify their designs comprehensively before the tape-out; however, a rigorous functional verification methodology should be able to reduce the probability of this type of failure. Timing failure and circuit marginality issues. Fabricated silicon may not execute as fast as what is expected based on timing simulations, or it may not operate properly at certain supply voltages or temperatures. The mismatch between simulated behavior and actual behavior can be due to the inaccuracy of the tools or signal integrity (SI) effects that were not considered appropriately. For example, the voltage drop due to power grid resistance, coupling effects among signals, and other effects could slow down the actual operating speed of specific circuits within a chip. Such a timing failure requires the identification of the failing segments or paths of a circuit to guide the circuit optimization before respinning the design. Inappropriate layout design. For advanced nanometer technologies, the actual geometries of the devices and interconnecting wires fabricated on silicon will deviate from the drawn layout. This is due to optical effects during the lithography process (using light that has a much longer wavelength than the geometries that have to be printed). These mismatches give rise to potential shorts or opens, thereby leading to circuit failure. In light of this, certain design-for-manufacturability (DFM) rules could be added to the design rule set to ensure improved manufacturability; nevertheless, this is a slow learning process for each new technology generation. Diagnosis is required to shed some light on the layout patterns that may cause these types of failures in the early stages. During the design validation stage, the same failure may appear repeatedly for a high percentage of the prototype chips. One can usually determine whether it is a functionality failure or timing failure by turning down the clock speed. Sometimes, certain circuit marginality issues also can be exposed by changes in the supply voltage or temperature, etc. Then, the diagnosis (or debugging) process is initiated by a joint team that includes designers, layout editors, testing engineers, and perhaps process engineers. After a design has passed the prototype stage, bugs and circuit marginality issues are mostly resolved and the product can ramp up to high-volume production. During this ramp-up stage, the yield could be low or fluctuating. Yield improvement Logic Diagnosis 399 is necessary, and it can be accomplished by tuning the fabrication process. Even when a product reaches the peak run rate, the manufacturing yield could still fluctuate from one wafer to another. Continuous yield monitoring is necessary from time to time to respond to any unexpected low-yield situations [Khare 1995]. At this stage, the chip failures are more or less due to manufacturing imperfections, some of which are catastrophic (e.g., shorts and opens) and some parametric due to process variations. Published results for failure analysis have revealed a number of common defect mechanisms, including via misalignment, via/contact voiding, missing region of interconnecting metal (often called mouse-bites), oxide breakdown, and shorts between the drain and source of a transistor [Segura 2002]. For yield improvement, yield/failure analysis engineers must actually inspect the silicon by all means available (so they can identify the failure mechanisms and figure out ways to rectify them); such methods would include etching away certain layers, imaging the silicon surface by scanning electronic microscopy (SEM) or focused ion beam (FIB) systems.1 The silicon de-layering and imaging process is often laborious and time consuming. In a chip with millions of transistors, such a process is doomed to fail if not guided by a good diagnosis tool. The problem of diagnosis is illustrated in Figure 7.1, where we compare the behavior of a fault-free model (which is a gate-level circuit or a transistor schematic) with a failing chip. The fault-free model will be referred to as the circuit under diagnosis (CUD). Under the application of certain test patterns, the failing chip and CUD produce different responses at certain primary outputs. Similar to testing, we need to incorporate design-for-testability circuitry to reduce the complexity of diagnosis to a manageable level. For example, the interface signals between the logic test vectors fault-free expected response model = No faulty response Question: Where are the defect locations? FIGURE 7.1 The problem of logic diagnosis. 1 The usage of FIB has been widespread in the semiconductor industry. It provides site-specific trimming, milling, and deposition. In addition to defect analysis, FIB is also used for device trimming, circuit modification, or even mask repair. 400 VLSI Test Principles and Architectures components and embedded memories can be made controllable and observable, and most flip-flops, if not all, should have been included in the scan chains. With the DFT support, the question boils down to which logic gates or interconnect wires are responsible for producing the mismatches between the circuit model and the failing chip. Most existing diagnosis tools try to solve the problem in the logic domain. After analysis, some of them report a handful of candidates for the defect site, with each candidate referring to a gate or a signal. All of these candidates are considered to have equal probabilities of being a defect site. Some tools report a ranked list of candidates. A candidate with a higher ranking is considered more likely to be a defect site. Throughout this chapter, we use the following terminology: Definition 7.1 (Output Pair) z1 z2 is called an output pair if z1 and z2 are corresponding outputs from the CUD and the failing chip, respectively. Definition 7.2 (Failing Test Vector) A test vector v is called a failing test vector if it creates a mismatch at any output pair. The quality of a diagnosis tool can be measured in a number of ways. The most important criterion is whether it is good at pinpointing the defect sites. The second important criterion is whether it can complete the analysis within a reasonable time period (e.g., overnight for a fairly large chip). When it comes to the first criterion (i.e., the ability to pinpointing the defect sites), several different quality indexes have been proposed in the literature: Diagnostic resolution—The total number of defect candidates reported by a tool is defined as the diagnostic resolution. Ideally, the diagnostic resolution is just 1. In some sense, this index shows how focused the diagnosis tool is; however, a tool could have a good resolution (produce very few candidates) but still miss the target all the time. So, good resolution does not necessarily imply good accuracy. First-hit index—Diagnostic resolution has no meaning for a tool that only reports a ranked list, rather than a small number of candidates. In this case, the accuracy can be measured by how fast one can hit a true defect site. By definition, the first-hit index refers to the index of the first candidate in the ranked list that turns out to be a true defect site. The smaller this number (the closer it is to the top of the list), the more accurate the diagnosis process. Top-10 hit—It is possible that the chip could contain multiple defects. Because one cannot afford to target too many gates or signals during each inspecting session, candidates beyond the top 10 are usually ignored in a reported ranked list. Among the top-10 candidates, it is desirable that more than one defect is hit; therefore, the top-10 hit is defined as the number of defects hit by the Logic Diagnosis 401 top-10 candidates as a quality index for multiple-defect diagnosis. The larger this number, the better the diagnosis result. Success rate—The percentage of hitting at least one defect in one chip inspection session is defined as the success rate. This reflects the ultimate goal of failure analysis; however, this index is more judgmental because the success rate depends on how much time one is willing to spend. Also, the above first-hit index or top-10 hit indexes are linked closely to the success rate. A diagnosis algorithm with a better first-hit index or top-10 hit could translate to a higher success rate. Diagnosis has long been compared to the job of a criminal detective or medical doctor. In both cases, one would like to identify the root cause by analyzing the observed syndrome. Here, for logic diagnosis, the syndrome refers to when and for what output the chip produces a wrong binary response during the test application. These three types of jobs can be compared as follows: Logic diagnosis—(failing chip) → (syndrome) → (failing gates or wires) Criminal detection—(crime) → (crime scene) → (criminal) Medical diagnosis—(patient) → (syndrome) → (disease) A chip failure can occur anywhere. It can be in the flip-flops, combinational logic, or even the design for testability (DFT) circuitry (such as scan chains or logic BIST circuitry). In the past, most diagnosis work has been focused on combinational logic; however, the amount of DFT circuitry (e.g., scan chains and logic BIST) has increased, and failures there have become increasingly likely. In the rest of this chapter, we discuss combinational logic diagnosis and then address the diagnosis of failing scan chains. Finally, we describe methods for diagnosis in a logic BIST environment. 7.2 COMBINATIONAL LOGIC DIAGNOSIS In combinational logic diagnosis, we assume that the faults to be identified are within the combinational logic (in between the scan flip-flops) that performs the desired logic functionality. For the moment, we assume that the flip-flops and the scan chains are fault free. Two major paradigms have been proposed: cause–effect analysis and effect–cause analysis [Abramovici 1994]. After we have introduced these two paradigms, we will discuss how to apply them to a fairly large chip with multiple defects. 7.2.1 Cause–Effect Analysis Cause–effect analysis begins by confining the causes of failure to a specific fault type (generally stuck-at faults). Intensive fault simulation is performed to build a fault dictionary for deriving and recording the test responses with respect to the 402 VLSI Test Principles and Architectures applied test set and fault type. Once this dictionary is built, the effect or syndrome of the failing chip is analyzed using table look-up. In other words, the syndrome of the failing chip is matched up with the recorded possible syndromes in the dictionary. The closest one implies the most likely fault; therefore, it is often also referred to as the fault-dictionary based paradigm. Example 7.1 Consider a circuit under diagnosis, as shown in Figure 7.2. The circuit has three inputs a b c and one output g . Assume that five test vectors are generated in advance v1 v2 v3 v4 v5 . Based on the single stuck-at fault assumption, the fault universe will be f1 f2 f3 f4 f5 after equivalent fault collapsing. Figure 7.2b shows the full-response table of output signal g obtained by complete fault simulation, including those for the fault-free circuit and the five faulty circuits. One row corresponds to a circuit (either fault-free or faulty), whereas one column corresponds to the response of one test vector. From these simulation results, we first conclude that the test set has 100% fault coverage. Next, we will build a simple fault dictionary to aid the diagnosis process. A possible fault dictionary is shown in Figure 7.2c (this type of fault dictionary is specifically called a diagnostic tree). Note that this dictionary may not be the most economical in terms of size. We only use it to demonstrate the diagnosis process. The basic idea is to refine the fault candidates iteratively. Initially, the candidate set (as in an oval) contains all faults. After examining the response of a g b Circuit Under Diagnosis c (a) Circuit under diagnosis Circuits Fault-free Input vectors (a, b, c) v1 v2 v3 v4 v5 00001 f1 01111 f2 11101 f3 10011 f4 00100 f5 01101 (b) Full-response dictionary FIGURE 7.2 Example of cause–effect analysis. {f1, f2, f3, f4, f5} output = 0 output = 1 v1 {f1, f4, f5} {f2, f3} 0 1 v2 0 1 v2 f4 {f1, f5} f3 f2 0 1 v4 f5 f1 (c) Diagnostic tree Logic Diagnosis 403 the failing chip to the first test vector v1, we are able to narrow the candidate set down to one of a number of groups. In this example, there are two candidate sets: f1 f4 f5 and f2 f3 . Because the CUD has only one output, we can only achieve binary partitioning; however, in general, the partitioning could be faster. In this example, the refinement continues until we examine the responses of v1 v2, and v4. We stop here, as the cardinality of each candidate set has been reduced to 1. The overall diagnosis process is simply a traversal from the root of this tree to one of its leaf nodes, representing the final fault candidates. For example, if the response of a failing chip at output signal g under the five test vectors v1 v2 v3 v4 v5 is 0 1 1 0 1 , by traversing the diagnosis tree we can immediately deduce that the only faulty circuit that could produce the observed failing syndrome is f5. It may take time and space to construct the fault dictionary; however, once the dictionary is built, conducting syndrome analysis is usually fast. Because the fault dictionary is built once initially, the overall diagnosis process is computationally efficient; however, for practical applications, this approach could be limited by a number of problems: Dictionary size problem—A fault dictionary records every output response of each modeled fault at each clock cycle. Without proper compaction, the size is proportional to the product of three factors: F·V·O , where F is the number of modeled faults, V is the number of test vectors, and O is the number of outputs.2 In a logic chip with one million gates, 10,000 flip-flops, and 10,000 test vectors, the size will amount to 1012 bits, requiring extremely large storage. The entire dictionary also has to be regenerated even if a small logic change is made. With proper compression techniques, this problem can be relieved to some extent [Richman 1985] [Pomeranz 1992] [Chess 1999]; however, the excessive storage requirement and the inability to scale to ever-larger circuits still pose a serious limitation. Unmodeled-fault problem—The dictionary is built using a single stuck-at fault assumption. If the CUD truly contains a stuck-at fault only, then the result is highly accurate. However, realistic defects may not behave as single stuck-at faults, but often exhibit themselves as bridging faults (having two or more interconnects shorted together). In addition, the defects may have resistive characteristics [Aitken 1996]. These realistic defects compound the ever-growing storage requirement and could easily lead to misleading results. Although extensions have been proposed to resolve this problem to some extent by targeting popular bridging faults [Wu 2000], in general, the diagnostic accuracy of this approach is not as good as effect–cause analysis. 7.2.1.1 Compaction and Compression of Fault Dictionary We address the dictionary size problem in this subsection by showing how to compact or compress a fault dictionary. With respect to terminology, compression 2 Here we assume that the CUD has full-scan chains. The input of a flip-flop is also considered a pseudo output. 404 VLSI Test Principles and Architectures refers to techniques that reduce the size of a fault dictionary without sacrificing the diagnostic resolution for the modeled faults, whereas compaction refers to techniques that could degrade the resolution. Example 7.2 (Pass–Fail Dictionary) The simplest way of compacting a dictionary is to replace an output response vector by a single pass-or-fail bit. The size of the resulting dictionary is then independent of the number of outputs and only proportional to the order of F · V , where F is the total number of faults and V is the total number of test vectors. An example is shown in Figure 7.3b. Example 7.3 (P&R Compression Dictionary) The above pass–fail dictionary leads to a high compaction ratio; however, it is often a lossy technique, meaning that it may become infeasible to locate the root causes of failure. Pomeranz and Reddy (P&R) [Pomeranz 1992] solved the problem by selectively putting back a sufficient amount of output response information to restore the full diagnostic resolution, thus making it a compression technique. The Fault ID f1 f2 f3 f4 f5 f6 f7 f8 Output Response (z1, z2) t1 t2 t3 t4 1 0 10 1 1 10 0 0 00 1 1 00 0 0 00 0 0 00 0 1 00 0 0 01 0 1 00 0 1 01 0 1 00 0 1 01 1 0 00 1 0 00 1 1 11 1 1 11 (a) Full-response table Fault ID f1 f2 f3 f4 f5 f6 f7 f8 Pass (0) or Fail (1) t1 t2 t3 t4 1 1 0 1 1 0 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 (b) Pass-fail dictionary FIGURE 7.3 P&R compression fault dictionary. Fault ID f1 f2 f3 f4 f5 f6 f7 f8 Pass-fail + Extra outputs t1 t2 t3 t4 1 1 1 01 1 1 0 0 01 1 1 0 0 10 1 1 0 0 10 0 1 0 0 11 0 1 0 0 11 0 1 1 0 10 1 1 1 1 01 1 Response of z1 Response of z2 (c) P&R compression dictionary Logic Diagnosis 405 restoration process begins by first putting every pass-or-fail-bit output column with respect to each specific test vector into the dictionary. It then incrementally takes one output column at a time until the full resolution is achieved. In the example shown in Figure 7.3c, there are originally eight output columns, two for each test vector. This algorithm chooses two of them to restore the full resolution (i.e., z1 in response to test vector t1 and z2 in response to test vector t3 . It can be seen that the diagnostic resolution is originally two in the full-response table (faults f5 and f6 are not distinguishable). In the pass–fail dictionary, the resolution rises to three, with the equivalence groups being f1 f2 f3 f7 f4 f5 f6 f8 . Finally, in the compression dictionary the resolution has been reduced back to two again, with the equivalence groups being f1 f2 f3 f4 f5 f6 f7 f8 . Example 7.4 (Detection Dictionary) Another popular dictionary organization is called a detection dictionary. It is based on the idea that we only need to record the failing output vectors (i.e., the output vectors that are different from their counterparts in the fault-free circuit). Statistically, many output vectors may be fault free; therefore, we can drop a lot of unnecessary information without sacrificing resolution. One drawback of a detection dictionary is that the structure becomes irregular. As shown in Figure 7.4, we need to specify a test vector identifier along with a failing output vector. For example, for fault f1, the detection information is specified as (t1:10, t2:10, t4:10), meaning that the output responses under test vectors t1, t2, and t4 are failing in the presence of fault f1. In other words, the detection information for each fault is now a list of failing output vectors. Sometimes, a drop-on-k heuristic may be used to further reduce the size at the cost of some minor resolution degradation. The basic idea is to stop the recording after k failing output vectors have been collected. The total size of such a dictionary is on the order of F · log V · k · O , where F is the total number of modeled faults, log V is the number of bits for encoding a test vector identifier, k is the maximum number of failing output vectors, and O is the output number. 7.2.2 Effect–Cause Analysis Unlike the fault-dictionary-based paradigm, effect–cause analysis directly examines the syndrome (i.e., the effect) of the failing chip to derive the fault candidates (i.e., the cause) through Boolean reasoning on the CUD. Effect–cause analysis is superior to the fault-dictionary-based paradigm in a number of aspects: It does not assume an a priori fault model and thus is more suitable to handle non-stuck-at faults (e.g., bridging faults). It can be adapted to cases where there are multiple faults in the failing chip, especially when these faults are structurally codependent. It can be adapted to partial-scan designs more easily. The only minor drawback of effect–cause analysis is that it takes longer to complete because a unique round of analysis is required for each failing chip. This 406 VLSI Test Principles and Architectures Fault ID f1 f2 f3 f4 f5 f6 f7 f8 Output Response (z1, z2) t1 t2 t3 t4 10 10 11 10 00 00 11 00 00 00 00 00 01 00 00 01 01 00 01 01 01 00 01 01 10 00 10 00 11 11 11 11 (a) Full-response table Fault ID f1 f2 f3 f4 f5 f6 f7 f8 Pass (1) or Fail (0) t1 t2 t3 t4 1 1 0 1 1 0 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 (b) Pass-fail dictionary FIGURE 7.4 Example of detection dictionary. failing output vectors Fault ID f1 f2 f3 f4 f5 f6 f7 f8 Detection information (Test ID : Output Vector) t1:10 t2:10 t4:10; t1:00 t4:00; t1:00 t3:00 t4:00; t1:01 t3:00; t1:01 t3:01; t1:01 t3:01; t1:10 t3:10 t4:00; t2:10 t4:11; (c) Detection dictionary is a more dynamic process compared to the more static fault-dictionary-based paradigm, in which certain information is reused constantly. Because logic diag- nosis is used to guide the time-consuming physical silicon inspection, the analysis time is in general not a very important factor. In the following discussion, we assume that the CUD has been implemented with full-scan and its functionality is represented as a combinational gate-level circuit. The primary output (PO) signals of the CUD and the failing chip are denoted as zC1 zC2 zCm and zF1 zF2 zFm , respectively, where m is the total number of primary outputs. We assume that the set of test vectors, denoted as TV = v1 v2 vt , has been generated in advance. Definition 7.3 (Mismatched Output) An output pair zFi zCi is said to be mismatched if there exists a test vector v such that v, when applied to both CUD and the failing chip, produces different binary values at zFi and zCi . In particular, we call the primary output zCi in the CUD a mismatched output, whereas the primary output zFi in the failing chip is called a failing output. In logic diagnosis, the failing chip is like a black box that cannot be analyzed. The best we can do is to reason upon the circuit model under diagnosis. Logic Diagnosis 407 Example 7.5 In Figure 7.5, the test vector v, when applied to both the CUD and the failing chip, produces mismatches at the first and the fifth output pairs. In the rest of this subsection we first discuss a structural pruning technique that can narrow down the potential fault candidate area in the CUD. Next, we introduce an efficient ba