Lecture 1 Overview: Architecture and Instructions

Total Page:16

File Type:pdf, Size:1020Kb

Lecture 1 Overview: Architecture and Instructions Introduction to Computer Architecture Lecture 1 Overview: Architecture and Instructions Wayne Luk Department of Computing Imperial College London https://www.doc.ic.ac.uk/~wl/teachlocal/arch/ [email protected] wl 2021 1.1 Welcome to this module on Introduction to Computer Architecture. The slides are supported by notes embedded with the presentations. The teaching materials are available on the course homepage: https://www.doc.ic.ac.uk/~wl/teachlocal/arch/ They are also available from Department of Computing’s “materials” page: https://materials.doc.ic.ac.uk/manage/2021/40005 The lectures are delivered by live streaming, and recorded versions would be available in Teams soon after each lecture. 1 TPU: Tensor Processing Unit Systolic Array Source: N.P. Jouppi et al. wl 2021 1.2 Lets have a look at one of the latest computers, the TPU developed by Google to support deep neural networks for applications involving artificial intelligence. This processor, like many others, contains 4 kinds of resources: resources for computation , for data buffering (using memory to store data), for control , and for input and output ( I/O ). Interestingly, the core computational element of the TPU is a systolic array , enabling effective matrix multiplication. If you wish to find out what systolic arrays are and how to design them, come to my Custom Computing course in two years’ time… 2 What is a computer? • what makes it general purpose? • simplest description? CPU Main Memory wl 2021 1.3 So what exactly is a computer? What makes it general purpose so that it can be so useful? What is the simplest way we can describe a computer? One cannot be much simpler by having two connected blocks, so lets start from here… What is a computer? • what makes it general purpose? • simplest description? CPU CPU Main Memory Memory Registers Control P D Unit Arithmetic & Logic Unit (ALU) wl 2021 1.4 We can begin to fill in the details. The block on the left is often known as the Central Processing Unit, CPU. The CPU contains registers as fast memory for storing data, an ALU for computation , and a Control Unit for managing the operations. The block on the right is the memory, containing programs P and data D. Storing programs in memory allows the CPU to become general- purpose: by supplying different programs to the CPU, it can perform different computations. What is a computer? • what makes it general purpose? • simplest description? CPU CPU Main Memory Memory Registers Control RAM RAM Unit Arithmetic & Logic Unit (ALU) Input/Output Controllers Hard Disk Mouse, Keyboard Ethernet Cameras, Sound USB/DVD Drive Monitor, Printer Modem wl 2021 1.5 Lets add the remaining resources: those for input/output. Most computers follow this architecture, which is sometimes called the von Neumann architecture, after one of the computing pioneers, John von Neumann. But is it the most efficient? Why does the TPU adopt a systolic array rather than an ALU in the CPU? We will address these questions later… Why study architecture? The Good.. • understand: – how computers work; bridge hardware/software gap – choices and constraints for computer engineers/architects – how to manage complexity of architecture description/design • undergoing rapid development – applications: internet, medical imaging, cloud computing new – billions of gates: build your own reconfigurable processor super- customisable parallelism: trading speed, power, accuracy... computer! wl 2021 1.6 It would be unimaginable if computer scientists do not understand how computers work. And computer architecture is so exciting! It provides the foundation of modern civilization, enabling so many things that we now take for granted, from mobile phones to the internet. And architectures are evolving rapidly; there are no opportunities to, for example, build your own processor which can be reconfigured to support the best trade-off in speed, power consumption etc for particular applications. This capability comes from the technological advances allowing billions of gates , used in implementing computation , and a large amount of storage units, such as flip flops , used in implementing memory , to be placed on a chip. 6 Summary wl 2021 1.7 But this was not the case many years ago. If you go to the Science Museum, you can find the gates and flip flops in the PDP-8 computer, which was released in 1965. They have the size of a medium-sized laptop… 7 Why study architecture? The Good.. • understand: – how computers work; bridge hardware/software gap – choices and constraints for computer engineers/architects – how to manage complexity of architecture description/design • undergoing rapid development – applications: internet, medical imaging, cloud computing new – 5 billion gates: build your own reconfigurable processor super- customisable parallelism: trading speed, power, accuracy... computer! – technology: non-graphics programs on graphics processor • it has impact on almost all aspects of computing and engineering, on both theory and practice • example: accelerator architectures for data centres wl 2021 1.8 So advances in computer architecture have a significant impact on many aspects of our society. We will have a quick look at data centre acceleration. 8 Accelerate clouds: Microsoft + Amazon www.top500.org/news/microsoft-goes-all-in-for-fpgas-to-build-out-cloud-based-ai/ aws.amazon.com/ec2/instance-types/f1/ wl 2021 1.9 Many cloud computing providers, including Microsoft and Amazon, are providing resources for accelerating data centre computing for demanding applications, such as those involving artificial intelligence. Such resources are often based on FPGA (field programmable gate array) technology, which we shall mention more later. Google’s data centres are increasingly accelerated by he TPU, which is covered at the beginning of the lecture. 9 …the Bad and the Ugly 0 M u x Add ALU 1 result Add Shift RegDst left 2 4 Branch MemRead Instruction [31– 26] MemtoReg Control ALUOp MemWrite ALUSrc RegWrite Instruction [25– 21] Read Read register 1 PC address Read data 1 Instruction [20– 16] Read register 2 Zero Instruction 0 Registers Read ALU [31– 0] 0 ALU M Write data 2 result Address Read 1 Instruction register M data u u M memory x Instruction [15– 11] Write x u 1 Data x data 1 memory 0 Write data 16 32 Instruction [15– 0] Sign extend ALU control Instruction [5– 0] …and this is not the most complex! wl 2021 1.10 This shows the architecture of a simple processor. While it looks complex, we will learn the secrets of how it works. One technique is, for each moment, to focus on the elements that are active and to ignore those which are inactive. We will show how this technique will help us manage the complexity of understanding this architecture… 10 Hints for success • come to lectures • come to tutorials and ask questions • read notes and course textbook • attempt unassessed coursework without reading the solutions • discuss the material regularly with friends • explain ideas to non-specialists • follow latest industrial and research development wl 2021 1.11 How to get the most of this module? Here are some hints. If you follow some of them, you’ll have a good chance of having a good grasp of the key material, and a good reward from the assessments… 11 Module Plan: Part 1 Week Tuesday Friday Remarks (starting) 2 (18/1) Lecture 1 Ex 1 Module overview; instructions; performance; Lecture 2 evaluation 3 (25/1) Lecture 3 Ex 2 Instruction format; architecture comparison; Lecture 4 arithmetic; ALU 4 (01/2) Lecture 5 Ex 3 Multiply and divide implementation; datapath Lecture 6 and control 5 (08/2) Lecture 7 Ex 4 Single- and multi-cycle datapath; microprogram; Lecture 8 microsequencer 6 (15/2) Lecture 9 Part 2 Exceptions; pipelining; recent advances; summary wl 2021 1.12 This module has two parts. I will cover Part 1 for the first 4.5 weeks, introducing the relevant topics based on the MIPS processor. Dr Maria Valera- Espina will cover Part 2 for the remaining weeks. 12 Approach • learn Computer Organisation and Design based on must have Patterson & Hennessy, 5th edition access Morgan Kaufmann 2014 (P&H) to - chapters 1 to 4, appendices B and D wl 2021 1.13 This course is based on a well-known text book “Computer Organisation and Design“ 5 th edition. You are expected to have access to this book. We will cover chapters 1 to 4, appendices B and D. 13 ISCA, May 2002 wl 2021 1.14 Th text book are written by two renowned computer architects, Professor John Hennessy (left) of Stanford University and Professor David Patterson (right) of UC Berkeley. I took this photo of them during a boat trip in Alaska during the International Symposium on Computer Architecture in 2002, where I gave a tutorial; see https://iscaconf.org/isca2002/Tutorials.html 14 Approach • learn Computer Organisation and Design based on must have Patterson & Hennessy, 5th edition access Morgan Kaufmann 2014 (P&H) to - chapters 1 to 4, appendices B and D • the 6th edition is ready, use it for reference • compare different architectures e.g. MIPS and 68000 Tanenbaum: Structured Computer Organization; H & P: Computer Architecture: A Quantitative Approach wl 2021 1.15 The 6th edition is just becoming available; use it fer reference if you have a copy. There are other useful books on computer architecture, such as “Structured Computer Organization ” and “Computer Architecture: A Quantitative Approach”. If you do not have time, just focus on relevant chapters in “Computer Organisation and Design” 5th edition. 15 What is computer architecture? • architecture = instruction set architecture (ISA) + machine organisation • ISA examples: x86, ARM, MIPS, SPARC, RISC-V • instruction set: how abstract? how complex? support for general / special-purpose computing? Compatibility? • how to choose an implementation for a given instruction set? wl 2021 1.16 Computer architecture has two parts: instruction set architecture (ISA) and machine organisation that implements a given ISA.
Recommended publications
  • MIPS Architecture
    Introduction to the MIPS Architecture January 14–16, 2013 1 / 24 Unofficial textbook MIPS Assembly Language Programming by Robert Britton A beta version of this book (2003) is available free online 2 / 24 Exercise 1 clarification This is a question about converting between bases • bit – base-2 (states: 0 and 1) • flash cell – base-4 (states: 0–3) • hex digit – base-16 (states: 0–9, A–F) • Each hex digit represents 4 bits of information: 0xE ) 1110 • It takes two hex digits to represent one byte: 1010 0111 ) 0xA7 3 / 24 Outline Overview of the MIPS architecture What is a computer architecture? Fetch-decode-execute cycle Datapath and control unit Components of the MIPS architecture Memory Other components of the datapath Control unit 4 / 24 What is a computer architecture? One view: The machine language the CPU implements Instruction set architecture (ISA) • Built in data types (integers, floating point numbers) • Fixed set of instructions • Fixed set of on-processor variables (registers) • Interface for reading/writing memory • Mechanisms to do input/output 5 / 24 What is a computer architecture? Another view: How the ISA is implemented Microarchitecture 6 / 24 How a computer executes a program Fetch-decode-execute cycle (FDX) 1. fetch the next instruction from memory 2. decode the instruction 3. execute the instruction Decode determines: • operation to execute • arguments to use • where the result will be stored Execute: • performs the operation • determines next instruction to fetch (by default, next one) 7 / 24 Datapath and control unit
    [Show full text]
  • The Von Neumann Computer Model 5/30/17, 10:03 PM
    The von Neumann Computer Model 5/30/17, 10:03 PM CIS-77 Home http://www.c-jump.com/CIS77/CIS77syllabus.htm The von Neumann Computer Model 1. The von Neumann Computer Model 2. Components of the Von Neumann Model 3. Communication Between Memory and Processing Unit 4. CPU data-path 5. Memory Operations 6. Understanding the MAR and the MDR 7. Understanding the MAR and the MDR, Cont. 8. ALU, the Processing Unit 9. ALU and the Word Length 10. Control Unit 11. Control Unit, Cont. 12. Input/Output 13. Input/Output Ports 14. Input/Output Address Space 15. Console Input/Output in Protected Memory Mode 16. Instruction Processing 17. Instruction Components 18. Why Learn Intel x86 ISA ? 19. Design of the x86 CPU Instruction Set 20. CPU Instruction Set 21. History of IBM PC 22. Early x86 Processor Family 23. 8086 and 8088 CPU 24. 80186 CPU 25. 80286 CPU 26. 80386 CPU 27. 80386 CPU, Cont. 28. 80486 CPU 29. Pentium (Intel 80586) 30. Pentium Pro 31. Pentium II 32. Itanium processor 1. The von Neumann Computer Model Von Neumann computer systems contain three main building blocks: The following block diagram shows major relationship between CPU components: the central processing unit (CPU), memory, and input/output devices (I/O). These three components are connected together using the system bus. The most prominent items within the CPU are the registers: they can be manipulated directly by a computer program. http://www.c-jump.com/CIS77/CPU/VonNeumann/lecture.html Page 1 of 15 IPR2017-01532 FanDuel, et al.
    [Show full text]
  • MIPS IV Instruction Set
    MIPS IV Instruction Set Revision 3.2 September, 1995 Charles Price MIPS Technologies, Inc. All Right Reserved RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure of the technical data contained in this document by the Government is subject to restrictions as set forth in subdivision (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS 52.227-7013 and / or in similar or successor clauses in the FAR, or in the DOD or NASA FAR Supplement. Unpublished rights reserved under the Copyright Laws of the United States. Contractor / manufacturer is MIPS Technologies, Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. R2000, R3000, R6000, R4000, R4400, R4200, R8000, R4300 and R10000 are trademarks of MIPS Technologies, Inc. MIPS and R3000 are registered trademarks of MIPS Technologies, Inc. The information in this document is preliminary and subject to change without notice. MIPS Technologies, Inc. (MTI) reserves the right to change any portion of the product described herein to improve function or design. MTI does not assume liability arising out of the application or use of any product or circuit described herein. Information on MIPS products is available electronically: (a) Through the World Wide Web. Point your WWW client to: http://www.mips.com (b) Through ftp from the internet site “sgigate.sgi.com”. Login as “ftp” or “anonymous” and then cd to the directory “pub/doc”. (c) Through an automated FAX service: Inside the USA toll free: (800) 446-6477 (800-IGO-MIPS) Outside the USA: (415) 688-4321 (call from a FAX machine) MIPS Technologies, Inc.
    [Show full text]
  • Design and VHDL Implementation of an Application-Specific Instruction Set Processor
    Design and VHDL Implementation of an Application-Specific Instruction Set Processor Lauri Isola School of Electrical Engineering Thesis submitted for examination for the degree of Master of Science in Technology. Espoo 19.12.2019 Supervisor Prof. Jussi Ryynänen Advisor D.Sc. (Tech.) Marko Kosunen Copyright © 2019 Lauri Isola Aalto University, P.O. BOX 11000, 00076 AALTO www.aalto.fi Abstract of the master’s thesis Author Lauri Isola Title Design and VHDL Implementation of an Application-Specific Instruction Set Processor Degree programme Computer, Communication and Information Sciences Major Signal, Speech and Language Processing Code of major ELEC3031 Supervisor Prof. Jussi Ryynänen Advisor D.Sc. (Tech.) Marko Kosunen Date 19.12.2019 Number of pages 66+45 Language English Abstract Open source processors are becoming more popular. They are a cost-effective option in hardware designs, because using the processor does not require an expensive license. However, a limited number of open source processors are still available. This is especially true for Application-Specific Instruction Set Processors (ASIPs). In this work, an ASIP processor was designed and implemented in VHDL hardware description language. The design was based on goals that make the processor easily customizable, and to have a low resource consumption in a System- on-Chip (SoC) design. Finally, the processor was implemented on an FPGA circuit, where it was tested with a specially designed VGA graphics controller. Necessary software tools, such as an assembler were also implemented for the processor. The assembler was used to write comprehensive test programs for testing and verifying the functionality of the processor. This work also examined some future upgrades of the designed processor.
    [Show full text]
  • Demystifying Internet of Things Security Successful Iot Device/Edge and Platform Security Deployment — Sunil Cheruvu Anil Kumar Ned Smith David M
    Demystifying Internet of Things Security Successful IoT Device/Edge and Platform Security Deployment — Sunil Cheruvu Anil Kumar Ned Smith David M. Wheeler Demystifying Internet of Things Security Successful IoT Device/Edge and Platform Security Deployment Sunil Cheruvu Anil Kumar Ned Smith David M. Wheeler Demystifying Internet of Things Security: Successful IoT Device/Edge and Platform Security Deployment Sunil Cheruvu Anil Kumar Chandler, AZ, USA Chandler, AZ, USA Ned Smith David M. Wheeler Beaverton, OR, USA Gilbert, AZ, USA ISBN-13 (pbk): 978-1-4842-2895-1 ISBN-13 (electronic): 978-1-4842-2896-8 https://doi.org/10.1007/978-1-4842-2896-8 Copyright © 2020 by The Editor(s) (if applicable) and The Author(s) This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Open Access This book is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made. The images or other third party material in this book are included in the book’s Creative Commons license, unless indicated otherwise in a credit line to the material.
    [Show full text]
  • Overview of the MIPS Architecture: Part I
    Overview of the MIPS Architecture: Part I CS 161: Lecture 0 1/24/17 Looking Behind the Curtain of Software • The OS sits between hardware and user-level software, providing: • Isolation (e.g., to give each process a separate memory region) • Fairness (e.g., via CPU scheduling) • Higher-level abstractions for low-level resources like IO devices • To really understand how software works, you have to understand how the hardware works! • Despite OS abstractions, low-level hardware behavior is often still visible to user-level applications • Ex: Disk thrashing Processors: From the View of a Terrible Programmer Letter “m” Drawing of bird ANSWERS Source code Compilation add t0, t1, t2 lw t3, 16(t0) slt t0, t1, 0x6eb21 Machine instructions A HARDWARE MAGIC OCCURS Processors: From the View of a Mediocre Programmer • Program instructions live Registers in RAM • PC register points to the memory address of the instruction to fetch and execute next • Arithmetic logic unit (ALU) performs operations on PC registers, writes new RAM values to registers or Instruction memory, generates ALU to execute outputs which determine whether to branches should be taken • Some instructions cause Devices devices to perform actions Processors: From the View of a Mediocre Programmer • Registers versus RAM Registers • Registers are orders of magnitude faster for ALU to access (0.3ns versus 120ns) • RAM is orders of magnitude larger (a PC few dozen 32-bit or RAM 64-bit registers versus Instruction GBs of RAM) ALU to execute Devices Instruction Set Architectures (ISAs)
    [Show full text]
  • Reverse Engineering X86 Processor Microcode
    Reverse Engineering x86 Processor Microcode Philipp Koppe, Benjamin Kollenda, Marc Fyrbiak, Christian Kison, Robert Gawlik, Christof Paar, and Thorsten Holz, Ruhr-University Bochum https://www.usenix.org/conference/usenixsecurity17/technical-sessions/presentation/koppe This paper is included in the Proceedings of the 26th USENIX Security Symposium August 16–18, 2017 • Vancouver, BC, Canada ISBN 978-1-931971-40-9 Open access to the Proceedings of the 26th USENIX Security Symposium is sponsored by USENIX Reverse Engineering x86 Processor Microcode Philipp Koppe, Benjamin Kollenda, Marc Fyrbiak, Christian Kison, Robert Gawlik, Christof Paar, and Thorsten Holz Ruhr-Universitat¨ Bochum Abstract hardware modifications [48]. Dedicated hardware units to counter bugs are imperfect [36, 49] and involve non- Microcode is an abstraction layer on top of the phys- negligible hardware costs [8]. The infamous Pentium fdiv ical components of a CPU and present in most general- bug [62] illustrated a clear economic need for field up- purpose CPUs today. In addition to facilitate complex and dates after deployment in order to turn off defective parts vast instruction sets, it also provides an update mechanism and patch erroneous behavior. Note that the implementa- that allows CPUs to be patched in-place without requiring tion of a modern processor involves millions of lines of any special hardware. While it is well-known that CPUs HDL code [55] and verification of functional correctness are regularly updated with this mechanism, very little is for such processors is still an unsolved problem [4, 29]. known about its inner workings given that microcode and the update mechanism are proprietary and have not been Since the 1970s, x86 processor manufacturers have throughly analyzed yet.
    [Show full text]
  • Control Unit Operation
    PART SIX: THE CONTROL UNIT CHAPTER 19 CONTROL UNIT OPERATION 19.1 MICRO-OPERATIONS ............................................................... 3 The Fetch Cycle ...................................................................... 5 The Indirect Cycle................................................................... 8 The Interrupt Cycle ................................................................. 9 The Execute Cycle................................................................... 9 The Instruction Cycle............................................................. 12 19.2 CONTROL OF THE PROCESSOR ............................................... 13 Functional Requirements........................................................ 13 Control Signals ..................................................................... 16 A Control Signals Example ..................................................... 19 Internal Processor Organization .............................................. 23 The Intel 8085...................................................................... 24 19.3 HARDWIRED IMPLEMENTATION .............................................. 30 Control Unit Inputs ............................................................... 30 Control Unit Logic ................................................................. 33 19.4 RECOMMENDED READING ...................................................... 35 19.5 KEY TERMS, REVIEW QUESTIONS, AND PROBLEMS ................... 35 Key Terms ..........................................................................
    [Show full text]
  • In More Depth: the IBM/Motorola Powerpc Indexed Addressing
    In More Depth IMD 2.20-11 In More Depth: The IBM/Motorola PowerPC The PowerPC, made by IBM and Motorola and used in the Apple Macin- tosh, shares many similarities to MIPS: both have 32 integer registers, instructions are all 32 bits long, and data transfer is possible only with loads and stores. The primary difference is two more addressing modes plus a few operations. Indexed Addressing In the examples above we saw cases where we needed one register to hold the base of the array and the other to hold the index of the array. PowerPC provides an addressing mode, often called indexed addressing, that allows two registers to be added together. The MIPS code add $t0,$a0,$s3 # $a0 = base of array, $s3 = index lw $t1,0($t0) # reg $t1 gets Memory[$a0+$s3] could be replaced by the following single instruction in PowerPC: lw $t1,$a0+$s3 # reg $t1 gets Memory[$a0+$s3] Using the same notation as Figure 2.24 on page 101, Figure 2.1.1 shows indexed addressing. It is available with both loads and stores. Update Addressing Imagine the case of a code sequence marching through an array of words in memory, such as in the array version of clear1 on page 130. A frequent pair of operations would be loading a word and then incrementing the base reg- ister to point to the next word. The idea of update addressing is to have a new version of data transfer instructions that will automatically increment the base register to point to the next word each time data is transferred.
    [Show full text]
  • IBM Z Connectivity Handbook
    Front cover IBM Z Connectivity Handbook Octavian Lascu John Troy Anna Shugol Frank Packheiser Kazuhiro Nakajima Paul Schouten Hervey Kamga Jannie Houlbjerg Bo XU Redbooks IBM Redbooks IBM Z Connectivity Handbook August 2020 SG24-5444-20 Note: Before using this information and the product it supports, read the information in “Notices” on page vii. Twentyfirst Edition (August 2020) This edition applies to connectivity options available on the IBM z15 (M/T 8561), IBM z15 (M/T 8562), IBM z14 (M/T 3906), IBM z14 Model ZR1 (M/T 3907), IBM z13, and IBM z13s. © Copyright International Business Machines Corporation 2020. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Notices . vii Trademarks . viii Preface . ix Authors. ix Now you can become a published author, too! . xi Comments welcome. xi Stay connected to IBM Redbooks . xi Chapter 1. Introduction. 1 1.1 I/O channel overview. 2 1.1.1 I/O hardware infrastructure . 2 1.1.2 I/O connectivity features . 3 1.2 FICON Express . 4 1.3 zHyperLink Express . 5 1.4 Open Systems Adapter-Express. 6 1.5 HiperSockets. 7 1.6 Parallel Sysplex and coupling links . 8 1.7 Shared Memory Communications. 9 1.8 I/O feature support . 10 1.9 Special-purpose feature support . 12 1.9.1 Crypto Express features . 12 1.9.2 Flash Express feature . 12 1.9.3 zEDC Express feature . 13 Chapter 2. Channel subsystem overview . 15 2.1 CSS description . 16 2.1.1 CSS elements .
    [Show full text]
  • The Microprogrammed Control Unit
    The Microprogrammed Control Unit Up to this point, we have studied: 1. The microoperation sequence associated with each assembly language instruction 2. The control signals associated with those microoperations. 3. The use of combinational logic in the form of a signal generation tree to generate these control signals. We now consider another option for generating the control signals. This is the microprogramming option, in which representations of the control signals are stored in a micro–memory and read into a MBR (micro–memory buffer register) from whence they are issued. Consider the control signal PC B1. When this is asserted, the contents of the Program Counter are copied onto bus B1. The method of generating this signal has no effect on the action it takes. We have two options for generating each control signal: Hardwired: The signal is output from an AND gate Microprogrammed: The signal is output from a D flip–flop. Survey of Bus Usage and Other Control Signals In order to structure the micro–memory properly, we must tabulate the control signals used and arrange them by use: bus transfer, ALU operation, memory operation, etc. Option Bus 1 Bus 2 Bus 3 ALU Other 0 1 PC B1 1 B2 B3 PC tra1 L / R’ 2 MAR B1 – 1 B2 B3 MAR tra2 A 3 R B1 R B2 B3 R shift C 4 IR B1 MBR B2 B3 IR not READ 5 SP B1 IOD B2 B3 SP add WRITE 6 B3 MBR sub extend 7 B3 IOD and 0 RUN 8 B3 IOA or 9 xor Note the important option 0.
    [Show full text]
  • Microprogramming: Basic Idea
    5-45 Chapter 5—Processor Design—Advanced Topics Microprogramming: Basic Idea • Recall control sequence for 1-bus SRC Step Concrete RTN Control Sequence T0 MA ← PC: C ← PC + 4; PCout, MAin, INC4, Cin, Read ← ← T1 MD M[MA]: PC C; Cout, PCin, Wait T2 IR ← MD; MDout, IRin ← T3 A R[rb]; Grb, Rout, Ain ← T4 C A + R[rc]; Grc, Rout, ADD, Cin ← T5 R[ra] C; Cout, Gra, Rin, End • Control unit job is to generate the sequence of control signals • How about building a computer to do this? Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan 5-46 Chapter 5—Processor Design—Advanced Topics The Microcode Engine • A computer to generate control signals is much simpler than an ordinary computer • At the simplest, it just reads the control signals in order from a read-only memory • The memory is called the control store • A control store word, or microinstruction, contains a bit pattern telling which control signals are true in a specific step • The major issue is determining the order in which microinstructions are read Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan 5-47 Chapter 5—Processor Design—Advanced Topics Fig 5.16 Block Diagram of Microcoded Control Unit Ck CCs Other IR Opcode PLA • Microinstruction has Sequencer (computes branch control, 2 start addr) External source n branch address, and control signal fields Increment 4–1 Mux n • Microprogram µPC counter can be set n from several sources to do the required Control sequencing store k n m µBranch µIR control Branch Control signals address PCout, etc.
    [Show full text]