Rede
Volnei A. Pedroni
TLFeBOOK
Circuit Design with VHDL
TLFeBOOK
TLFeBOOK
Circuit Design with VHDL
Volnei A. Pedroni
MIT Press Cambridge, Massachusetts London, England
TLFeBOOK
6 2004 Massachusetts Institute of Technology All rights reserved. No part of this book may be reproduced in any form by any electronic or mechanical means (including photocopying, recording, or information storage and retrieval) without permission in writing from the publisher. This book was set in Times New Roman on 3B2 by Asco Typesetters, Hong Kong and was printed and bound in the United States of America. Library of Congress Cataloging-in-Publication Data Pedroni, Volnei A. Circuit design with VHDL/Volnei A. Pedroni. p. cm. Includes bibliographical references and index. ISBN 0-262-16224-5 (alk. paper) 1. VHDL (Computer hardware description language) 2. Electronic circuit design. 3. System design. I. Title. TK7885.7.P43 2004 621.39 0 5—dc22 2004040174 10 9 8 7 6 5 4 3 2 1
TLFeBOOK
To Claudia, Patricia, Bruno, and Ricardo
TLFeBOOK
TLFeBOOK
Contents
Preface I 1 CIRCUIT DESIGN Introduction 1.1 About VHDL 1.2 Design Flow 1.3 EDA Tools 1.4 Translation of VHDL Code into a Circuit 1.5 Design Examples Code 2.1 2.2 2.3 2.4 2.5 2.6 Data 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 Structure Fundamental VHDL Units LIBRARY Declarations ENTITY ARCHITECTURE Introductory Examples Problems Types Pre-Defined Data Types User-Defined Data Types Subtypes Arrays Port Array Records Signed and Unsigned Data Types Data Conversion Summary Additional Examples Problems
xi 1 3 3 3 4 5 8 13 13 13 15 17 17 22 25 25 28 29 30 33 35 35 37 38 38 43 47 47 50 52 53
2
3
4
Operators and Attributes 4.1 Operators 4.2 Attributes 4.3 User-Defined Attributes 4.4 Operator Overloading
TLFeBOOK
viii
Contents
4.5 4.6 4.7 4.8 5
GENERIC Examples Summary Problems
54 55 60 61 65 65 67 69 78 81 84 91 91 93 94 97 100 105 112 113 114 118