About the Authors
Cem nsalan, Ph.D., established the DSP Laboratory at Yeditepe University in Istanbul, Turkey, and is a microprocessor and digital signal processing professor there. He is the coauthor of Programmable Microcontrollers with Applications: MSP430 LaunchPad with CCS and Grace.
Bora Tar, Ph.D., is a postdoctoral researcher at The Ohio State University. His main research interests include analog and mixed-signal integrated-circuit design and energy harvesting and sensor networking applications.
Copyright 2017 by McGraw-Hill Education. All rights reserved. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher.
ISBN: 978-1-25-983791-3
MHID: 1-25-983791-2.
The material in this eBook also appears in the print version of this title: ISBN: 978-1-25-983790-6, MHID: 1-25-983790-4.
eBook conversion by codeMantra
Version 1.0
All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps.
McGraw-Hill Education eBooks are available at special quantity discounts to use as premiums and sales promotions or for use in corporate training programs. To contact a representative, please visit the Contact Us page at www.mhprofessional.com.
Information contained in this work has been obtained by McGraw-Hill Education from sources believed to be reliable. However, neither McGraw-Hill Education nor its authors guarantee the accuracy or completeness of any information published herein, and neither McGraw-Hill Education nor its authors shall be responsible for any errors, omissions, or damages arising out of use of this information. This work is published with the understanding that McGraw-Hill Education and its authors are supplying information but are not attempting to render engineering or other professional services. If such services are required, the assistance of an appropriate professional should be sought.
TERMS OF USE
This is a copyrighted work and McGraw-Hill Education and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill Educations prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms.
THE WORK IS PROVIDED AS IS. McGRAW-HILL EDUCATION AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill Education and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill Education nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill Education has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill Education and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise.
Contents
Preface
T he world around us has become digital. Personal devices we use, houses we live in, and cars we drive contain digital systems to simplify life for us. Moreover, all these systems have started communicating with each other. Since digital systems have become one of the most important tools of our daily lives, besides engineers hobbyists have also started learning and using them.
There are four ways to realize a digital system. The first one is using discrete logicgates. This approach has become obsolete due to implementation issues. The secon dway is using a microcontroller, which has very desirable properties such as ease of programming and price. However, a microcontroller is static in terms of its configuration. The third one is using an application-specific integrated circuit (ASIC). For mass production, using ASICs is the solution. However, producing and testing an ASIC chip needs time, which limits its modification after it is designed. The fourth way is using a field-programmable gate array (FPGA). An FPGA can be configured easily such that it can be tailored for a specific application.
Managing an FPGA and getting the best out of it are slightly harder than for a microcontroller. However, if done appropriately the benefit will be enormous. Therefore, this book aims to guide the reader to mastering FPGAs through digital system design. While doing this, the main focus will be on implementation. Hence, the reader will grasp theoretical digital design concepts via implementing real-life applications. For this purpose, we pick two recent boards: Basys3 and Arty. Both boards have a Xilinx Artix-7 FPGA on them. Baysy3 has most of the required peripherals onboard. Hence, it is an excellent candidate for being used in digital design education. Arty has Arduino-compatible pins. Since Arduino is widely accepted as a microcontroller platform by hobbyists, it has a wide range of peripheral devices as shields. Arty allows us to benefit from these. Moreover, the hobbyist can switch from Arduino to Arty when a custom-made digital design is required. Throughout the book, we will provide practical application examples mostly on the Basys3 board due to its available resources onboard. However, these applications can be modified to work on the Arty board as well. Besides, we will use simulation for almost all applications. Hence, buying Basy3 or Arty is not a must to follow the book.
There are two popular hardware description languages (HDLs) used to implement a digital system on an FPGA. These are Verilog and VHDL. Each HDL has its advantages and disadvantages. Throughout the book, we will cover both HDLs in parallel. This will allow readers to choose the HDL he or she likes. Note that this is not a book on advanced Verilog or VHDL. We will focus only on important and necessary topics. This way, we expect the beginner or hobbyist to benefit from the book.
Before diving into the fascinating world of digital systems, we would like to remind the reader of one or two things. We did not intend to write a standard textbook for a digital design course. Therefore, we did not cover theoretical concepts in depth. Instead, we tried to explain all these concepts using real-life applications. This way, we hope the reader will grasp digital design concepts better. Moreover, we do not believe digital design is just a mandatory engineering course to be attended. It is a talent every engineering student should gain for the job market. Besides, it is fun to play with, as done by most hobbyists. So, lets enjoy digital design with the FPGA while mastering it.
Next page