
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.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages26 Page
-
File Size-