34,79 €
Modern digital devices used in homes, cars, and wearables contain highly sophisticated computing capabilities composed of embedded systems that generate, receive, and process digital data streams at rates up to multiple gigabits per second. This book will show you how to use Field Programmable Gate Arrays (FPGAs) and high-speed digital circuit design to create your own cutting-edge digital systems.
Architecting High-Performance Embedded Systems takes you through the fundamental concepts of embedded systems, including real-time operation and the Internet of Things (IoT), and the architecture and capabilities of the latest generation of FPGAs. Using powerful free tools for FPGA design and electronic circuit design, you’ll learn how to design, build, test, and debug high-performance FPGA-based IoT devices. The book will also help you get up to speed with embedded system design, circuit design, hardware construction, firmware development, and debugging to produce a high-performance embedded device – a network-based digital oscilloscope. You’ll explore techniques such as designing four-layer printed circuit boards with high-speed differential signal pairs and assembling the board using surface-mount components.
By the end of the book, you’ll have a solid understanding of the concepts underlying embedded systems and FPGAs and will be able to design and construct your own sophisticated digital devices.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 481
Veröffentlichungsjahr: 2021
Design and build high-performance real-time digital systems based on FPGAs and custom circuits
Jim Ledin
BIRMINGHAM—MUMBAI
Copyright © 2021 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or revfile:///C:/Users/josephr/OneDrive - Packt/1. Distribution Team - Kindle etc/Distribution checks/08-01-21/9781789955965.epubiews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Group Product Manager: Wilson D'souza
Associate Publishing Product Manager: Sankalp Khattri
Senior Editor: Rahul Dsouza
Content Development Editor: Nihar Kapadia
Technical Editor: Nithik Cheruvakodan
Copy Editor: Safis Editing
Project Coordinator: Neil D'mello
Proofreader: Safis Editing
Indexer: Priyanka Dhadke
Production Designer: Joshua Misquitta
First published: January 2021
Production reference: 1060121
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78995-596-5
www.packt.com
Packt.com
Subscribe to our online digital library for full access to over 7,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at packt.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.packt.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Jim Ledin is the CEO of Ledin Engineering, Inc. Jim is an expert in embedded software and hardware design, development, and testing. He is also accomplished in embedded system cybersecurity assessment and penetration testing. He has a B.S. degree in aerospace engineering from Iowa State University and an M.S. degree in electrical and computer engineering from the Georgia Institute of Technology. Jim is a registered professional electrical engineer in California, a Certified Information System Security Professional (CISSP), a Certified Ethical Hacker (CEH), and a Certified Penetration Tester (CPT).
I would like to thank Mike Anderson for his thoughtful technical review of this book. I would also like to thank Nihar Kapadia and all of the staff at Packt for their competent assistance in completing this book during a very challenging year.
Mike Anderson is currently a senior project lead and embedded systems architect for The Aerospace Corporation, based in Chantilly, VA. With over 40 years in the embedded and real-time computing industry, Mike works with a number of Real-Time Operating System (RTOS) offerings for Internet of Things (IoT) devices. However, his focus over the past decade is primarily embedded Linux on a number of CPU architectures. Mike is a regular speaker at the Embedded Linux Conference, Sensors Expo, and other Linux-, embedded systems-, and IoT-oriented conferences. His ongoing projects include work with mesh wireless topologies, AI/ML on satellites, 6LoWPAN, and working as a mentor for multiple high school robotics with the FIRST Robotics Program.
I'd like to thank my family for their infinite patience with my taking the time to review this book. I feel that it's time well spent for the future of the industry.
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Modern digital devices used in homes, in cars, and on our persons contain increasingly sophisticated computing capabilities. These embedded systems generate, receive, and process digital data streams at rates of up to multiple gigabits per second. This book teaches you how to use field-programmable gate arrays (FPGAs) and high-speed digital circuit design techniques to create your own cutting-edge digital device designs.
This book is intended for software developers, hardware engineers, Internet of Things (IoT) developers, and anyone else seeking to understand the process of developing high-performance embedded systems. The potential audience includes anyone with an interest in learning about the fundamentals of FPGA development and all aspects of firmware development in C and C++. Readers should have a basic level of familiarity with the C language, digital circuits, and soldering electronic components.
Chapter 1, Architecting High-Performance Embedded Systems, introduces the elements of embedded system architectures and discusses some key system features that are common across a wide variety of embedded applications. An embedded system generally includes at least one microcontroller or microprocessor, sensors, actuators, a power source, and, in many cases, one or more network interfaces. The chapter continues with an exploration of the relationship between embedded systems and the IoT.
Chapter 2, Sensing the World, introduces the principles and implementations of sensors used in a wide variety of embedded applications. Passive sensors measure attributes of the world such as temperature, pressure, humidity, light intensity, and atmospheric composition. Active sensors use energy-emitting technologies such as radar and lidar to detect objects and measure their position and velocity.
Chapter 3, Operating in Real Time, addresses the need for embedded systems to generate real-time responses to inputs measured from sensors and other sources. The concepts of Real-Time Operating Systems (RTOSes) and their key features are introduced, as well as some challenges that commonly occur when implementing multitasking in real-time applications. The chapter concludes with a presentation of the important characteristics of some popular open source and commercial RTOS implementations.
Chapter 4, Developing Your First FPGA Program, begins with a discussion on the effective use of FPGA devices in real-time embedded systems and continues with a description of the functional elements contained within standard FPGAs. The range of FPGA design languages, including Hardware Description Languages (HDLs), block diagram methods, and popular software programming languages including C and C++, is introduced. The chapter continues with an overview of the FPGA development process and concludes with a complete example of an FPGA development cycle, starting with a statement of system requirements and ending with a functional system implemented in a low-cost FPGA development board.
Chapter 5, Implementing Systems with FPGAs, dives into the process of designing and implementing embedded devices with FPGAs. It begins with a description of the FPGA compilation software tools that convert a description of a logic design in a programming language into an executable FPGA configuration. We will discuss the types of algorithms best suited to FPGA implementation and suggest a decision-making approach for determining whether a particular embedded system algorithm is more appropriately implemented using a traditional processor or with an FPGA. The chapter ends with the step-by-step development of a baseline FPGA-based processor project that will be expanded to implement a high-speed digital oscilloscope using circuitry and software developed in later chapters.
Chapter 6, Designing Circuits with KiCad, introduces the excellent open source KiCad electronics design and automation suite. Working in KiCad, you will design a circuit using schematic diagrams and develop a corresponding printed circuit board layout. You'll learn how to turn a circuit board design into a prototype at a very reasonable cost. This chapter includes example schematics for the oscilloscope circuit project you will assemble in the next chapter.
Chapter 7, Building High-Performance Digital Circuits, presents the processes and techniques involved in assembling prototype high-performance digital circuits using surface-mount and through-hole electronic components. A recommended set of tools is identified, including a soldering station, a magnifier or microscope, and tweezers for handling tiny parts. The reflow soldering process is introduced, along with descriptions of some low-cost options for implementing a small-scale reflow capability.
Chapter 8, Bringing Up the Board for the First Time, covers how, having designed, constructed, cleaned, and inspected the printed circuit board, it is now time to apply power – in other words, perform the infamous smoke test. This chapter leads you through the process of carefully providing first-time power to the board and checking basic circuit-level functionality. If you discover any problems, the chapter contains suggested approaches for addressing them. After passing these tests, it is time to add to the FPGA logic and test the digital interface to the oscilloscope board.
Chapter 9, The Firmware Development Process, shows how, now that we have a functioning circuit board, to flesh out the remaining key portions of the FPGA algorithm, including communication with the Analog to Digital Converter (ADC), and continue development of the MicroBlaze processor firmware. When developing firmware, it is important to subject the code to static analysis where possible, which can head off many errors that are otherwise difficult to debug. It is also important to implement a version control system to track the evolution of the code over the project life cycle. We will discuss the importance of developing a comprehensive, at least partially automated test suite to maintain code quality as changes are made. The chapter recommends some free and commercial tools for performing each of these functions.
Chapter 10, Testing and Debugging the Embedded System, discusses how, as the development of our embedded system nears completion, the time arrives to conduct thorough testing in the context in which it will operate. This testing must address the entire expected range of environmental conditions and user inputs, including invalid inputs, to ensure proper operation under all conditions. The chapter concludes with a discussion of recommended debugging procedures and a summary of best practices for high-performance embedded system development.
This book takes full advantage of powerful free commercial and open source software tool suites to develop FPGA algorithms and to design sophisticated printed circuit boards. To follow along with the example project, you will need a specific FPGA development board, the Digilent Arty A7-100. To construct the digital circuits to implement your designs, you will need a set of tools for soldering and desoldering surface mount components. You will also need tools to assist in working with fine-scale parts, such as precision tweezers and a magnifier or microscope.
If you are using the digital version of this book, we advise you to access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.
The code bundle for the book is hosted on GitHub at https://github.com/PacktPublishing/Architecting-High-Performance-Embedded-Systems. In case there's an update to the code, it will be updated at this GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: http://www.packtpub.com/sites/default/files/downloads/9781789955965_ColorImages.pdf.
There are a number of text conventions used throughout this book.
Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "The term std_logic refers to a single-bit binary data type."
A block of code is set as follows:
architecture BEHAVIORAL of FULL_ADDER is
begin
S <= (A XOR B) XOR C_IN;
C_OUT <= (A AND B) OR ((A XOR B) AND C_IN);
end architecture BEHAVIORAL;
Any command-line input or output is written as follows:
dism /online /Enable-Feature /FeatureName:TelnetClient
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Leave the selections at their default values and click Next."
Tips or important notes
Appear like this.
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected].
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!
For more information about Packt, please visit packt.com.
This part introduces the basic concepts of embedded systems, real-time computing, and Field Programmable Gate Array (FPGA) devices. It provides a high-level overview of topics that will be covered in detail in later chapters.
This part of the book comprises the following chapters:
Chapter 1, Architecting High-Performance Embedded SystemsChapter 2, Sensing the WorldChapter 3, Operating in Real Time