CSE 141 Introduction to Computer Architecture Summer Session I, 2005

Total Page:16

File Type:pdf, Size:1020Kb

CSE 141 Introduction to Computer Architecture Summer Session I, 2005 CSE 141 Introduction to Computer Architecture Summer Session I, 2005 Lecture 1 Introduction Pramod V. Argade June 27, 2005 CSE141: Introduction to Computer Architecture Instructor: Pramod V. Argade ([email protected]) Office Hour: Mon. 4:30 - 5:30 PM (AP&M 4218) TAs: Chengmo Yang: [email protected] Wenjing Rao: [email protected] Lecture: Mon/Wed. 6:00 - 8:50 PM, HSS 1330 Textbook: Computer Organization & Design The Hardware Software Interface, 3nd Edition. Authors: Patterson and Hennessy Web-page: http://www.cse.ucsd.edu/classes/su05/cse141 Pramod Argade CSE 141, Summer Session I, 2005 1-2 What is a Computer? z Components: – Input (mouse, keyboard) – Output (display, printer) – Memory (disk drives, DRAM, SRAM, CD) –Network z Our primary focus: the processor (datapath and control) – Implemented using millions of transistors – Impossible to understand by looking at each transistor z Rapidly changing field: – Vacuum tube Î Transistor Î IC Î VLSI Î SoC z Interesting history: – http://www.islandnet.com/~kpolsson/comphist/ Pramod Argade CSE 141, Summer Session I, 2005 1-3 Architecture: Dictionary Definition z The art and science of designing and erecting buildings. z A style and method of design and construction. z Orderly arrangement of parts; structure. z ... Pramod Argade CSE 141, Summer Session I, 2005 1-4 What is Computer Architecture? z Hardware Designer z Computer Architect – Thinks about circuits, – Thinks about high-level components, timing, functionality, components, how they fit ease of debugging together, how they work together to deliver performance. “construction engineer” “building architect” Pramod Argade CSE 141, Summer Session I, 2005 1-5 The Challenge of Computer Architecture z The industry changes faster than any other. – design assuming processor technology trends z The ground rules change every year. – new problems – new opportunities – different tradeoffs z It’s all about making programs run faster than the current generation of processors Pramod Argade CSE 141, Summer Session I, 2005 1-6 Forces on Computer Architecture Hardware Programming Technology Languages Applications Compiler Computer Technology Architecture Operating Systems Compatibility Pramod Argade CSE 141, Summer Session I, 2005 1-7 Evolution of Intel Processors* Year of # Processor Introduction Transistors 4004 1971 2,250 8008 1972 2,500 8080 1974 5,000 8086 1978 29,000 286 1982 120,000 Intel I386 1985 275,000 Intel I486 1989 1,180,000 Intel Pentium 1993 3,100,000 Intel Pentium II 1997 7,500,000 Intel Pentium III 1999 24,000,000 Intel Pentium 4 2000 42,000,000 Intel Itanium 2002 220,000,000 Intel Itanium 2 2003 410,000,000 *http://www.intel.com/research/silicon/mooreslaw.htm Pramod Argade CSE 141, Summer Session I, 2005 1-8 Pentium 2 Photomicrograph* *http://microscope.fsu.edu/chipshots/pentium/pent2large.html Pramod Argade CSE 141, Summer Session I, 2005 1-9 Moore’s Law* • Gordon Moore made the observation in 1965, four years after planar integrated circuit was discovered. • The “law” states that transistor density doubles every ~18 months *http://www.intel.com/research/silicon/mooreslaw.htm Pramod Argade CSE 141, Summer Session I, 2005 1-10 Processor Performance 1200 DEC Alpha 21264/600 1000 800 600 DEC Alpha 5/500 Performance 400 DEC DEC Alpha 5/300 IBM HP AXP/ Sun MIPS MIPS 200 RS/ 9000/ 500 -4/ M M/ DEC Alpha 4/266 6000 750 260 2000 120 IBM POWER 100 0 87 88 89 90 91 92 93 94 95 96 97 Year Pramod Argade CSE 141, Summer Session I, 2005 1-11 Computer Architecture’s Changing Definition z 1950s to 1960s Computer Architecture – Computer Arithmetic z 1970s to mid 1980s Computer Architecture – Instruction Set Design, especially ISA appropriate for compilers z 1990s Computer Architecture – Design of CPU, memory system, I/O system, Multiprocessors – Instruction level Parallelism z 2000s Computer Architecture – System-on-a-chip (SoC) Pramod Argade CSE 141, Summer Session I, 2005 1-12 Processors are everywhere! z PC, Workstation z Cell Phone z DVD Player z Digital Camera z Car z Watch z Pacemaker z “Pill Camera” z ... Pramod Argade CSE 141, Summer Session I, 2005 1-13 Commercial Processor Architectures z Embedded Processors – ARM, MIPS, PowerPC, ARC, … z PC/Workstation Processors – Intel x86, Sun SPARC, IBM/Motorola PowerPC, … z Super Computer – IBM PowerPC, Intel Itanium, NEC, Pramod Argade CSE 141, Summer Session I, 2005 1-14 Why do you care about architecture? z If you become a SW designer – Understand architecture to better utilize it – What are performance bottlenecks & who will fix them? z If you become a HW designer – You may implement a processor architecture in your career z If you become a System designer – You may make HW and SW partition decision z You may have to make purchasing decisions – Buy from vendor A or B? Why? z Everything amounts to cost/benefit tradeoff! – What are the techniques for making such tradeoffs? Pramod Argade CSE 141, Summer Session I, 2005 1-15 Which is faster? for (i=0; i<N; i=i+1) for (jj=0; jj<N; jj=jj+B) for (j=0; j<N; j=j+1) { for (kk=0; kk<N; kk=kk+B) r = 0; for (i=0; i<N; i=i+1) { for (k=0; k<N; k=k+1) for (j=jj; j<min(jj+B-1,N); j=j+1) r = r + y[i][k] * z[k][j]; r = 0; x[i][j] = r; for (k=kk; k<min(kk+B-1,N); k=k+1) } r = r + y[i][k] * z[k][j]; x[i][j] = x[i][j] + r; } Pramod Argade CSE 141, Summer Session I, 2005 1-16 Which is faster? load R1, addr1 load R1, addr1 store R1, addr2 add R0, R2 -> R3 add R0, R2 -> R3 add R0, R6 -> R7 subtract R4, R3 -> R5 store R1, addr2 add R0, R6 ->R7 subtract R4, R3 -> R5 store R7, addr3 store R7, addr3 Pramod Argade CSE 141, Summer Session I, 2005 1-17 Levels of Abstraction z Delving into the depths reveals more information z An abstraction omits unneeded detail, helps us cope with complexity High Level Language temp = v[k]; Program v[k] = v[k+1]; v[k+1] = temp; Compiler SW $15, 0($2) Assembly Language LW $16, 4($2) Program SW $16, 0($2) SW $15, 4($2) Assembler 1000110001100010000000000000000 Machine Language 1000110011110010000000000000100 Program 1010110011110010000000000000000 1010110001100010000000000000100 Machine Interpretation Control Signal Spec ALUOP[0:3] <= InstReg[9:11] & MASK Pramod Argade CSE 141, Summer Session I, 2005 1-18 The five classic components of computers Computer Control Input Memory Datapath Output Pramod Argade CSE 141, Summer Session I, 2005 1-19 Computer Architecture Topics Input/Output and Storage Disks, WORM, Tape RAID Emerging Technologies DRAM Interleaving Bus protocols Coherence, Memory L2 Cache Bandwidth, Hierarchy Latency L1 Cache Addressing, VLSI Protection, Instruction Set Architecture Exception Handling Pipelining, Hazard Resolution, Pipelining and Instruction Superscalar, Reordering, Level Parallelism Prediction, Speculation, Vector, DSP Pramod Argade CSE 141, Summer Session I, 2005 1-20 MIPS R10000 CPU What you can expect to get out of this class z Understand fundamental concepts in computer architecture z Understand impact on application performance z Evaluate architectural descriptions of processors z Gain experience designing a working CPU completely from scratch z Learn techniques used to evaluate advanced architecture design Pramod Argade CSE 141, Summer Session I, 2005 1-22 Course Outline z Instruction Set Architecture z Computer System Performance and Performance Metrics z Computer Arithmetic and Number System z CPU Architecture z Pipelining z Memory Hierarchy and Caches z Virtual Memory Pramod Argade CSE 141, Summer Session I, 2005 1-23 Summer Session I, 2005 CSE141 Course Schedule Homework Lecture # Date Time Room Topic Quiz topic Due Introduction, Ch. 1 1 Mon. 6/27 6 - 8:50 PM HSS 1330 -- ISA, Ch. 2 ISA 2 Wed. 6/29 6 - 8:50 PM HSS 1330 Arithmetic, Ch. 3 #1 Ch. 2 - Mon. 7/4No Class July 4th Holiday - - Performance, Ch. 4 Arithmetic 3 Wed. 7/6 6 - 8:50 PM HSS 1330 #2 Single-cycle CPU Ch. 5 Ch. 3 Single-cycle CPU Ch. 5 Cont. Performance 4 Mon. 7/11 6 - 8:50 PM HSS 1330 #3 Multi-cycle CPU Ch. 5 Ch. 4 Multi-cycle CPU Ch. 5 Cont. 5 Tue. 7/12 7:30 - 8:50 PM HSS 1330 -- (July 4th make up class) Single and Multicycle CPU Examples and Single-cycle CPU 6 Wed. 7/13 6 - 8:50 PM HSS 1330 - Review for Midterm Ch. 5 Mid-term Exam 7 Mon. 7/18 6 - 8:50 PM HSS 1330 -#4 Exceptions Pipelining Ch. 6 8 Tue. 7/19 7:30 - 8:50 PM HSS 1330 -- (July 4th make up class) 9 Wed. 7/20 6 - 8:50 PM HSS 1330 Hazards, Ch. 6 - - Hazards 10 Mon. 7/25 6 - 8:50 PM HSS 1330 Memory Hierarchy & Caches Ch. 7 #5 Ch. 6 Virtual Memory, Ch. 7 Cache 11 Wed. 7/27 6 - 8:50 PM HSS 1330 #6 Course Review Ch. 7 12 Sat. 7/30 TBD TBD Final Exam - - Pramod Argade CSE 141, Summer Session I, 2005 1-24 Course Work and Grading z Course Work – Weekly homework assignments ¾ No late assignments accepted ¾ No re-grading of homework or quizzes z Grading – 10% homework ¾ Lowest homework score will be dropped – 25% weekly quizzes (10 minutes, every Monday) ¾ Lowest quiz score will be dropped – 25% midterm – 40% final (which will cover the whole quarter) – Tests & Quizzes ¾ Closed books and no notes Pramod Argade CSE 141, Summer Session I, 2005 1-25 Quiz, Tests: What to expect? z Material covered during lectures z Material covered by homework assignments Pramod Argade CSE 141, Summer Session I, 2005 1-26 CSE 141 – Computer Architecture Spring 2005 Lecture 2 Instruction Set Architecute Pramod V.
Recommended publications
  • Pdp11-40.Pdf
    processor handbook digital equipment corporation Copyright© 1972, by Digital Equipment Corporation DEC, PDP, UNIBUS are registered trademarks of Digital Equipment Corporation. ii TABLE OF CONTENTS CHAPTER 1 INTRODUCTION 1·1 1.1 GENERAL ............................................. 1·1 1.2 GENERAL CHARACTERISTICS . 1·2 1.2.1 The UNIBUS ..... 1·2 1.2.2 Central Processor 1·3 1.2.3 Memories ........... 1·5 1.2.4 Floating Point ... 1·5 1.2.5 Memory Management .............................. .. 1·5 1.3 PERIPHERALS/OPTIONS ......................................... 1·5 1.3.1 1/0 Devices .......... .................................. 1·6 1.3.2 Storage Devices ...................................... .. 1·6 1.3.3 Bus Options .............................................. 1·6 1.4 SOFTWARE ..... .... ........................................... ............. 1·6 1.4.1 Paper Tape Software .......................................... 1·7 1.4.2 Disk Operating System Software ........................ 1·7 1.4.3 Higher Level Languages ................................... .. 1·7 1.5 NUMBER SYSTEMS ..................................... 1-7 CHAPTER 2 SYSTEM ARCHITECTURE. 2-1 2.1 SYSTEM DEFINITION .............. 2·1 2.2 UNIBUS ......................................... 2-1 2.2.1 Bidirectional Lines ...... 2-1 2.2.2 Master-Slave Relation .. 2-2 2.2.3 Interlocked Communication 2-2 2.3 CENTRAL PROCESSOR .......... 2-2 2.3.1 General Registers ... 2-3 2.3.2 Processor Status Word ....... 2-4 2.3.3 Stack Limit Register 2-5 2.4 EXTENDED INSTRUCTION SET & FLOATING POINT .. 2-5 2.5 CORE MEMORY . .... 2-6 2.6 AUTOMATIC PRIORITY INTERRUPTS .... 2-7 2.6.1 Using the Interrupts . 2-9 2.6.2 Interrupt Procedure 2-9 2.6.3 Interrupt Servicing ............ .. 2-10 2.7 PROCESSOR TRAPS ............ 2-10 2.7.1 Power Failure ..............
    [Show full text]
  • CS61C : Machine Structures •Remember: “Load from Memory”
    inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Review Lecture 9 – Introduction to MIPS • In MIPS Assembly Language: Data Transfer & Decisions I • Registers replace C variables • One Instruction (simple operation) per line • Simpler is Better, Smaller is Faster Lecturer PSOE Dan Garcia • New Instructions: www.cs.berkeley.edu/~ddgarcia add, addi, sub Future HVD 1 TB disks! ⇒ The future of digital storage • New Registers: (past the DVD, Blu-Ray and HD DVD) C Variables: $s0 - $s7 may be the Holographic Versatile Disc. Temporary Variables: $t0 - $t7 A massive 1 TB on each (200 DVDs)! 1TB www.zdnet.com.au/news/hardware/0,2000061702,39180148,00.htm Zero: $zero CS61C L09 Introduction to MIPS: Data Transfer & Decisions I (1) Garcia © UCB CS61C L09 Introduction to MIPS: Data Transfer & Decisions I (2) Garcia © UCB Assembly Operands: Memory Anatomy: 5 components of any Computer Registers are in the datapath of the • C variables map onto registers; what processor; if operands are in memory, about large data structures like arrays? Personal Computer we must transfer them to the processor to operate on them, and • 1 of 5 components of a computer: then transfer back to memory when done. memory contains such data structures Computer Processor Memory Devices • But MIPS arithmetic instructions only operate on registers, never directly on Control Input (“brain”) memory. Store (to) Datapath • Data transfer instructions transfer data Registers Output between registers and memory: Load (from) • Memory to register • Register to memory These are “data
    [Show full text]
  • Computer Architectures an Overview
    Computer Architectures An Overview PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Sat, 25 Feb 2012 22:35:32 UTC Contents Articles Microarchitecture 1 x86 7 PowerPC 23 IBM POWER 33 MIPS architecture 39 SPARC 57 ARM architecture 65 DEC Alpha 80 AlphaStation 92 AlphaServer 95 Very long instruction word 103 Instruction-level parallelism 107 Explicitly parallel instruction computing 108 References Article Sources and Contributors 111 Image Sources, Licenses and Contributors 113 Article Licenses License 114 Microarchitecture 1 Microarchitecture In computer engineering, microarchitecture (sometimes abbreviated to µarch or uarch), also called computer organization, is the way a given instruction set architecture (ISA) is implemented on a processor. A given ISA may be implemented with different microarchitectures.[1] Implementations might vary due to different goals of a given design or due to shifts in technology.[2] Computer architecture is the combination of microarchitecture and instruction set design. Relation to instruction set architecture The ISA is roughly the same as the programming model of a processor as seen by an assembly language programmer or compiler writer. The ISA includes the execution model, processor registers, address and data formats among other things. The Intel Core microarchitecture microarchitecture includes the constituent parts of the processor and how these interconnect and interoperate to implement the ISA. The microarchitecture of a machine is usually represented as (more or less detailed) diagrams that describe the interconnections of the various microarchitectural elements of the machine, which may be everything from single gates and registers, to complete arithmetic logic units (ALU)s and even larger elements.
    [Show full text]
  • PA-RISC 1.1 Architecture and Instruction Set Reference Manual
    PA-RISC 1.1 Architecture and Instruction Set Reference Manual HP Part Number: 09740-90039 Printed in U.S.A. February 1994 Third Edition Notice The information contained in this document is subject to change without notice. HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with furnishing, performance, or use of this material. Hewlett-Packard assumes no responsibility for the use or reliability of its software on equipment that is not furnished by Hewlett-Packard. This document contains proprietary information which is protected by copyright. All rights are reserved. No part of this document may be photocopied, reproduced, or translated to another language without the prior written consent of Hewlett-Packard Company. Copyright © 1986 – 1994 by HEWLETT-PACKARD COMPANY Printing History The printing date will change when a new edition is printed. The manual part number will change when extensive changes are made. First Edition . November 1990 Second Edition. September 1992 Third Edition . February 1994 Contents Contents . iii Preface. ix 1 Overview . 1-1 Introduction. 1-1 System Features . 1-2 PA-RISC 1.1 Enhancements . 1-2 System Organization . 1-4 2 System Organization . 2-1 Introduction. 2-1 Memory and I/O Addressing . 2-2 Byte Ordering (Big Endian/Little Endian) . 2-3 Levels of PA-RISC. 2-5 Data Types . 2-5 Processing Resources. 2-7 3 Addressing and Access Control.
    [Show full text]
  • Instruction Set Architecture
    Instruction Set Architecture EE3376 1 –Adapted from notes from BYU ECE124 Topics to Cover… l MSP430 ISA l MSP430 Registers, ALU, Memory l Instruction Formats l Addressing Modes l Double Operand Instructions l Single Operand Instructions l Jump Instructions l Emulated Instructions – http://en.wikipedia.org/wiki/TI_MSP430 2 –Adapted from notes from BYU ECE124 Levels of Transformation –Problems –Algorithms – C Instructions –Language (Program) –Programmable –Assembly Language – MSP 430 ISA –Machine (ISA) Architecture –Computer Specific –Microarchitecture –Manufacturer Specific –Circuits –Devices 3 –Adapted from notes from BYU ECE124 Instruction Set Architecture l The computer ISA defines all of the programmer-visible components and operations of the computer – memory organization l address space -- how may locations can be addressed? l addressibility -- how many bits per location? – register set (a place to store a collection of bits) l how many? what size? how are they used? – instruction set l Opcodes (operation selection codes) l data types (data types: byte or word) l addressing modes (coding schemes to access data) l ISA provides all information needed for someone that wants to write a program in machine language (or translate 4 from a high-level language to machine language). –Adapted from notes from BYU ECE124 MSP430 Instruction Set Architecture l MSP430 CPU specifically designed to allow the use of modern programming techniques, such as: – the computation of jump addresses – data processing in tables – use of high-level languages such as C. l 64KB memory space with 16 16-bit registers that reduce fetches to memory. l Implements RISC architecture with 27 instructions and 7 addressing modes.
    [Show full text]
  • Intel Architecture Software Developer's Manual
    Intel Architecture Software Developer’s Manual Volume 2: Instruction Set Reference NOTE: The Intel Architecture Software Developer’s Manual consists of three volumes: Basic Architecture, Order Number 243190; Instruction Set Reference, Order Number 243191; and the System Programming Guide, Order Number 243192. Please refer to all three volumes when evaluating your design needs. 1999 Information in this document is provided in connection with Intel products. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. Except as provided in Intel's Terms and Conditions of Sale for such products, Intel assumes no liability whatsoever, and Intel disclaims any express or implied warranty, relating to sale and/or use of Intel products including liability or warranties relating to fitness for a particular purpose, merchantability, or infringement of any patent, copyright or other intellectual property right. Intel products are not intended for use in medical, life saving, or life sustaining applications. Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked “reserved” or “undefined.” Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. Intel’s Intel Architecture processors (e.g., Pentium®, Pentium® II, Pentium® III, and Pentium® Pro processors) may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request. Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order.
    [Show full text]
  • Assembly Operands: Memory • Scalar Variables Map Onto Registers; What About Large Data Structures Like Arrays?
    • So far, we have learnt – R-type and I-type arithmetic instructions add addi sub mul div – Some conditional and unconditional jumps for decisions • bne, beq •b, jal • loops • Conditional jumps • What we are going to learn – Memory-register transfers 31 Assembly Operands: Memory • Scalar variables map onto registers; what about large data structures like arrays? • Memory contains such data structures • But MIPS arithmetic instructions only operate on registers, never directly on memory. ° Data transfer instructions transfer data between registers and memory: – Memory to register – Register to memory 32 1 Data Transfer: Memory to Reg (1/4) • To transfer a word of data, we need to specify two things: – Register: specify this by number (0 - 31) – Memory address: more difficult - Think of memory as a single one-dimensional array, so we can address it simply by supplying a pointer to a memory address. - Other times, we want to be able to offset from this pointer. 33 Data Transfer: Memory to Reg (2/4) • To specify a memory address to copy from, specify two things: – A register which contains a pointer to memory – A numerical offset (in bytes) • The desired memory address is the sum of these two values. • Example: 8(t0) – specifies the memory address pointed to by the value in $t0, plus 8 bytes 34 2 Data Transfer: Memory to Reg (3/4) • Load Instruction Syntax: 1 2, 3(4) – where 1) operation (instruction) name 2) register that will receive value 3) numerical offset in bytes 4) register containing pointer to memory • Instruction Name: –lw (meaning
    [Show full text]
  • CS/COE1541: Introduction to Computer Architecture
    CS/COE1541: Introduction to Computer Architecture Dept. of Computer Science University of Pittsburgh http://www.cs.pitt.edu/~melhem/courses/1541p/index.html 1 Computer Architecture? Other Compiler Operating applications, systems e.g., games “Application pull” Software layers Instruction Set Architecture architect Processor Organization VLSI Implementations “Physical hardware” “Technology push” Semiconductor technologies 2 High level system architecture Input/output CPU(s) control Interconnection cache ALU memory registers Memory stores: • Program code Important registers: • Data (static or dynamic) • Program counter (PC) • Execution stack • Instruction register (IR) • General purpose registers 3 Chapter 1 Review: Computer Performance • Response Time (latency) — How long does it take for “a task” to be done? • Throughput — Rate of completing the “tasks” • CPU execution time (our focus) – doesn't count I/O or time spent running other programs • Performance = 1 / Execution time • Important architecture evaluation metrics • Traditional metrics: TIME and COST • More recent metrics: POWER and TEMPERATURE • In this course, we will mainly talk about time 4 Clock Cycles (from Section 1.6) • Instead of using execution time in seconds, we can use number of cycles – Clock “ticks” separate different activities: time • cycle time = time between ticks = seconds per cycle • clock rate (frequency) = cycles per second (1 Hz. = 1 cycle/sec) 1 EX: A 2 GHz. clock has a cycle time of 0.5 10 9 seconds. 2 109 • Time per program = cycles per program x time per
    [Show full text]
  • MARIE: an Introduction to a Simple Computer
    00068_CH04_Null.qxd 10/18/10 12:03 PM Page 195 “When you wish to produce a result by means of an instrument, do not allow yourself to complicate it.” —Leonardo da Vinci CHAPTER MARIE: An Introduction 4 to a Simple Computer 4.1 INTRODUCTION esigning a computer nowadays is a job for a computer engineer with plenty of Dtraining. It is impossible in an introductory textbook such as this (and in an introductory course in computer organization and architecture) to present every- thing necessary to design and build a working computer such as those we can buy today. However, in this chapter, we first look at a very simple computer called MARIE: a Machine Architecture that is Really Intuitive and Easy. We then pro- vide brief overviews of Intel and MIPs machines, two popular architectures reflecting the CISC and RISC design philosophies. The objective of this chapter is to give you an understanding of how a computer functions. We have, therefore, kept the architecture as uncomplicated as possible, following the advice in the opening quote by Leonardo da Vinci. 4.2 CPU BASICS AND ORGANIZATION From our studies in Chapter 2 (data representation) we know that a computer must manipulate binary-coded data. We also know from Chapter 3 that memory is used to store both data and program instructions (also in binary). Somehow, the program must be executed and the data must be processed correctly. The central processing unit (CPU) is responsible for fetching program instructions, decod- ing each instruction that is fetched, and performing the indicated sequence of operations on the correct data.
    [Show full text]
  • Instruction Set Architecture (I)
    Instruction Set Architecture (I) 1 Today’s Menu: ISA & Assembly Language Instruction Set Definition Registers and Memory Arithmetic Instructions Load/store Instructions Control Instructions Instruction Formats Example ISA: MIPS Summary 2 Instruction Set Architecture (ISA) Application Operating System Assembly Language ||| Compiler Instruction Set Architecture Microarchitecture I/O System ||| Digital Logic Design Machine Language Circuit Design 3 The Big Picture assembly language program Assembly Language Interface the architecture presents to user, compiler, & operating system Register File Program Counter “Low-level” instructions that use the datapath & memory to perform basic types of operations Instruction register arithmetic: add, sub, mul, div logical: and, or, shift data transfer: load, store ALU Contr ol Lo gic (un)conditional branch: jump, branch on condition Memory Address Register from memory 4 Software Layers High-level languages such as C, C++, FORTRAN, JAVA are translated into assembly code by a compiler Assembly language translated to machine language by assembler Executable for (j = 1; j < 10; j++){ (binary) a = a + b Compiler Register File Program Counter } Instruction register ADD R1, R2, R3 SUB R3, R2, R1 0010100101 ALU Contr ol Lo gic Assembler 0101010101 Memory Address Register Memory Data Register 5 Basic ISA Classes Memory to Memory Machines Can access memory directly in instructions: e.g., Mem[0] = Mem[1] + 1 But we need storage for temporaries Memory is slow (hard to optimize code) Memory
    [Show full text]
  • Topic 8: Data Transfer Instructions
    Topic 8: Data Transfer Instructions CSE 30: Computer Organization and Systems Programming Summer Session II Dr. Ali Irturk Dept. of Computer Science and Engineering University of California, San Diego Assembly Operands: Memory C variables map onto registers; what about large data structures like arrays? 1 of 5 components of a computer: memory contains such data structures But ARM arithmetic instructions only operate on registers, never directly on memory. Data transfer instructions transfer data between registers and memory: Memory to register Register to memory Load/Store Instructions The ARM is a Load/Store Architecture: Does not support memory to memory data processing operations. Must move data values into registers before using them. This might sound inefficient, but in practice isn’t: Load data values from memory into registers. Process data in registers using a number of data processing instructions which are not slowed down by memory access. Store results from registers out to memory. Load/Store Instructions The ARM has three sets of instructions which interact with main memory. These are: Single register data transfer (LDR/STR) Block data transfer (LDM/STM) Single Data Swap (SWP) The basic load and store instructions are: Load and Store Word or Byte or Halfword LDR / STR / LDRB / STRB / LDRH / STRH Syntax: <LDR|STR>{<cond>}{<size>} Rd, <address> Single register data transfer LDR STR Word LDRB STRB Byte LDRH STRH Halfword LDRSB Signed byte load LDRSH Signed halfword load Memory system must support all access sizes Syntax: LDR{<cond>}{<size>} Rd, <address> STR{<cond>}{<size>} Rd, <address> e.g. LDREQB Anatomy: 5 components of any Computer Registers are in the datapath of the processor; if operands are in memory, we must transfer them to the processor to operate on them, and then transfer back to memory when done.
    [Show full text]
  • Pentium ® Pro Family Developer's Manual
    Pentium Pro Family Developer’s Manual Volume 3: Operating System Writer’s Guide NOTE: The Pentium Pro Family Developer’s Manual consists of three books: Pentium Pro Family Developer’s Manual, Volume 1: Specifications (Order Number 242690); Pentium Pro Family Developer’s Manual, Volume 2: Programmer’s Reference Manual (Order Number 242691); and the Pentium Pro Family Developer’s Manual, Volume 3: Operating System Writer’s Guide (Order Number 242692). Please refer to all three volumes when evaluating your design needs. December 1995 Information in this document is provided in connection with Intel products. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. Except as provided in Intel’s Terms and Conditions of Sale for such products, Intel assumes no liability whatsoever, and Intel disclaims any express or implied warranty, relating to sale and/or use of Intel products including liability or warranties relating to fitness for a particular purpose, merchantability, or infringement of any patent, copyright or other intellectual property right. Intel products are not intended for use in medical, life saving, or life sustaining applications. Intel may make changes to specifications and product descriptions at any time, without notice. The Pentium® Pro processor may contain design defects or errors known as errata. Current characterized errata are available on request. *Third-party brands and names are the property of their respective owners. Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order. Copies of documents which have an ordering number and are referenced in this document, or other Intel literature, may be obtained from: Intel Corporation P.O.
    [Show full text]