Modern Computer Architecture and Organization
Total Page:16
File Type:pdf, Size:1020Kb
Modern Computer Architecture Ledin Jim Organization and Architecture Computer Modern and Organization Modern Computer Are you a software developer, systems designer, The book will teach you the fundamentals or computer architecture student looking for of computer systems including transistors, a methodical introduction to digital device logic gates, sequential logic, and instruction Architecture and architectures but overwhelmed by their operations. You will learn details of modern complexity? This book will help you to learn processor architectures and instruction sets how modern computer systems work, from the including x86, x64, ARM, and RISC-V. You will lowest level of transistor switching to the macro see how to implement a RISC-V processor in view of collaborating multiprocessor servers. a low-cost FPGA board and how to write a Organization You'll gain unique insights into the internal quantum computing program and run it on an behavior of processors that execute the code actual quantum computer. By the end of this developed in high-level languages and enable book, you will have a thorough understanding you to design more effi cient and scalable of modern processor and computer software systems. architectures and the future directions these architectures are likely to take. Learn x86, ARM, and RISC-V architectures and the design of smartphones, PCs, and cloud servers Things you will learn: • Get to grips with transistor technology • Understand the purpose and operation and digital circuit principles of the supervisor mode • Discover the functional elements of • Implement a complete RISC-V processor computer processors in a low-cost FPGA • Understand pipelining and superscalar • Explore the techniques used in virtual execution machine implementation • Work with fl oating-point data formats • Write a quantum computing program and run it on a quantum computer www.packt.com www.packt.com Jim Ledin Modern Computer Architecture and Organization Learn x86, ARM, and RISC-V architectures and the design of smartphones, PCs, and cloud servers Jim Ledin BIRMINGHAM—MUMBAI Modern Computer Architecture and Organization Copyright © 2020 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 reviews. 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. Commissioning Editor: Kunal Chaudhari Acquisition Editor: Denim Pinto Senior Editor: Afshaan Khan Content Development Editor: Tiksha Lad Technical Editor: Gaurav Gala Copy Editor: Safis Editing Project Coordinator: Francy Puthiry Proofreader: Safis Editing Indexer: Pratik Shirodkar Production Designer: Aparna Bhagat First published: April 2020 Production reference: 1290420 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-83898-439-7 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. Why subscribe? • Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals • Improve your learning with Skill Plans built especially for you • Get a free eBook or video every month • Fully searchable for easy access to vital information • Copy and paste, print, and bookmark content 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. Contributors About the author 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 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). About the reviewer Roger Spears has over 15 years' experience in the academic field and over 20 years' experience in IT. He has a B.S. in technology from Bowling Green State University and an M.S. in information assurance, specializing in network defense, from Capella University. He has developed and facilitated individual courses for networking, programming, and databases. He was a member of the Protect and Detect working group on the National Cyberwatch Center Curriculum Standards Panel for the Cybersecurity Foundation Series. Roger has been awarded over $750,000 in cybersecurity grants from the government for various academic and industrial customers. He holds certificates from Microsoft and Oracle. He also holds a CCNA and CySA+ certification. I would like to acknowledge my wife (Leann) and children (Maverick and Sierra) for providing me the opportunity to grow with them and for the freedom to pursue various academic and vocational endeavors. Your understanding and tolerance meant more than I can say with words. Packt is searching for authors like you 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. Table of Contents Preface Section 1: Fundamentals of Computer Architecture 1 Introducing Computer Architecture The evolution of automated Computer architecture 16 computing devices 4 Binary and hexadecimal numbers 16 Charles Babbage's Analytical Engine 4 The 6502 microprocessor 20 ENIAC 6 The 6502 instruction set 23 IBM PC 7 The iPhone 11 Summary 25 Exercises 26 Moore's law 12 2 Digital Logic Electrical circuits 30 Clocking 46 The transistor 31 Sequential logic 47 Logic gates 33 Hardware description languages 48 Latches 37 VHDL 49 Flip-flops 40 Summary 53 Registers 42 Exercises 54 Adders 43 Propagation delay 44 ii Table of Contents 3 Processor Elements A simple processor 56 Logical instructions 76 Control unit 57 Branching instructions 76 Arithmetic logic unit 60 Subroutine call and return instructions 77 Registers 65 Processorflaginstructions 77 Interrupt-related instructions 77 The instruction set 67 No operation instruction 78 Addressing modes 68 Interrupt processing 78 Immediate addressing mode 68 IRQ processing 78 Absolute addressing mode 69 NMI processing 79 Absolute indexed addressing mode 70 BRK instruction processing 80 Indirect indexed addressing mode 72 Instruction categories 74 Input/output operations 82 Programmed I/O 84 Memory load and store instructions 74 Interrupt-driven I/O 84 Register-to-register data transfer instructions 74 Direct memory access 85 Stack instructions 74 Summary 86 Arithmetic instructions 75 Exercises 86 4 Computer System Components Technical requirements 90 Prefetching 100 Memory subsystem 90 I/O subsystem 101 Introducing the MOSFET 91 Parallel and serial data buses 101 Constructing DRAM circuits PCI Express 104 with MOSFETs 94 SATA 105 The capacitor 94 M.2 106 The DRAM bit cell 95 USB 106 DDR4 SDRAM 97 Thunderbolt 107 Graphics DDR 100 Table of Contents iii Graphics displays 108 Keyboard and mouse 113 VGA 109 Keyboard 113 DVI 109 Mouse 114 HDMI 110 Modern computer system DisplayPort 110 specifications 115 Network interface 111 Summary 117 Ethernet 111 Exercises 117 Wi-Fi 112 5 Hardware-Software Interface Device drivers 120 Embedded devices 132 The parallel port 121 Operating systems 132 PCIe device drivers 123 Processes and threads 134 Device driver structure 124 Scheduling algorithms and process BIOS 126 priority 137 UEFI 128 Multiprocessing 141 The boot process 129 Summary 142 BIOS boot 130 Exercises 142 UEFI boot 130 6 Specialized Computing Domains Real-time computing 144 GPU processing 159 Real-time operating systems 145 GPUs as data processors 161 Digital signal processing 149 Examples of specialized ADCs and DACs 149 architectures 164 DSP hardware features 152 Summary 166 Signal processing algorithms 154 Exercises 167 iv Table of Contents Section 2: Processor Architectures and Instruction Sets 7 Processor and Memory Architectures Technical Requirements