15-740/18-740 Computer Architecture Lecture 2: ISA, Tradeoffs, Performance Prof. Onur Mutlu Carnegie Mellon University.

Slides:



Advertisements
Similar presentations
Instruction Set Design
Advertisements

Chapter 3 Instruction Set Architecture Advanced Computer Architecture COE 501.
1 Lecture 3: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation.
RISC / CISC Architecture By: Ramtin Raji Kermani Ramtin Raji Kermani Rayan Arasteh Rayan Arasteh An Introduction to Professor: Mr. Khayami Mr. Khayami.
INSTRUCTION SET ARCHITECTURES
INTRODUCTION TO THE ARM PROCESSOR – Microprocessor Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.
Microprocessors General Features To be Examined For Each Chip Jan 24 th, 2002.
PART 4: (2/2) Central Processing Unit (CPU) Basics CHAPTER 13: REDUCED INSTRUCTION SET COMPUTERS (RISC) 1.
Computer Architecture Lecture 2: Fundamental Concepts and ISA Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 1/16/2013.
RISC vs CISC CS 3339 Lecture 3.2 Apan Qasem Texas State University Spring 2015 Some slides adopted from Milo Martin at UPenn.
More ISA. Property of ISA vs. Uarch? ADD instruction’s opcode Number of general purpose registers Number of cycles to execute the MUL instruction Whether.
Chapter XI Reduced Instruction Set Computing (RISC) CS 147 Li-Chuan Fang.
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
11/11/05ELEC CISC (Complex Instruction Set Computer) Veeraraghavan Ramamurthy ELEC 6200 Computer Architecture and Design Fall 2005.
Seqeuential Logic State Machines Memory
Reduced Instruction Set Computers (RISC) Computer Organization and Architecture.
Processor Organization and Architecture
COMPUTER ORGANIZATIONS CSNB123 May 2014Systems and Networking1.
RISC and CISC. Dec. 2008/Dec. and RISC versus CISC The world of microprocessors and CPUs can be divided into two parts:
CH13 Reduced Instruction Set Computers {Make hardware Simpler, but quicker} Key features  Large number of general purpose registers  Use of compiler.
Linked Lists in MIPS Let’s see how singly linked lists are implemented in MIPS on MP2, we have a special type of doubly linked list Each node consists.
Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
Classifying GPR Machines TypeNumber of Operands Memory Operands Examples Register- Register 30 SPARC, MIPS, etc. Register- Memory 21 Intel 80x86, Motorola.
VAX. Agenda VAX and its History VAX ISA VAX Virtual Address Microcode.
10/27: Lecture Topics Survey results Current Architectural Trends Operating Systems Intro –What is an OS? –Issues in operating systems.
RISC By Ryan Aldana. Agenda Brief Overview of RISC and CISC Features of RISC Instruction Pipeline Register Windowing and renaming Data Conflicts Branch.
Spring 2003CSE P5481 VLIW Processors VLIW (“very long instruction word”) processors instructions are scheduled by the compiler a fixed number of operations.
Chapter 8 CPU and Memory: Design, Implementation, and Enhancement The Architecture of Computer Hardware and Systems Software: An Information Technology.
Super computers Parallel Processing By Lecturer: Aisha Dawood.
Computer Architecture Lecture 2: Fundamental Concepts and ISA
Ted Pedersen – CS 3011 – Chapter 10 1 A brief history of computer architectures CISC – complex instruction set computing –Intel x86, VAX –Evolved from.
ECEG-3202 Computer Architecture and Organization Chapter 7 Reduced Instruction Set Computers.
COMPUTER ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1.
ISA's, Compilers, and Assembly
CISC. What is it?  CISC - Complex Instruction Set Computer  CISC is a design philosophy that:  1) uses microcode instruction sets  2) uses larger.
15-740/ Computer Architecture Lecture 12: Issues in OoO Execution Prof. Onur Mutlu Carnegie Mellon University Fall 2011, 10/7/2011.
Computer Architecture Lecture 3: ISA Tradeoffs Prof. Onur Mutlu Carnegie Mellon University Spring 2015, 1/16/2015.
Samira Khan University of Virginia Feb 2, 2016 COMPUTER ARCHITECTURE CS 6354 Fundamental Concepts: ISA Tradeoffs The content and concept of this course.
Computer Architecture Lecture 4: ISA Tradeoffs (Continued) and Single-Cycle Microarchitectures Prof. Onur Mutlu Carnegie Mellon University Spring.
Computer Architecture Lecture 3: ISA Tradeoffs Prof. Onur Mutlu Carnegie Mellon University Spring 2014, 1/17/2014.
Fall 2012 Parallel Computer Architecture Lecture 4: Multi-Core Processors Prof. Onur Mutlu Carnegie Mellon University 9/14/2012.
Computer Architecture & Operations I
Computer Architecture & Operations I
CIS-550 Advanced Computer Architecture Lecture 3: ISA Tradeoffs
Topics to be covered Instruction Execution Characteristics
Computer Architecture Lecture 2: Fundamental Concepts and ISA
15-740/ Computer Architecture Lecture 3: Performance
15-740/ Computer Architecture Lecture 4: ISA Tradeoffs
Computer Architecture Lecture 4: More ISA Tradeoffs
Samira Khan University of Virginia Sep 6, 2017
CS161 – Design and Architecture of Computer Systems
Samira Khan University of Virginia Sep 4, 2017
Computer Architecture Lecture 3: ISA Tradeoffs
Prof. Onur Mutlu Carnegie Mellon University Fall 2011, 9/14/2011
Prof. Onur Mutlu Carnegie Mellon University Spring 2014, 1/14/2013
Central Processing Unit
Samira Khan University of Virginia Sep 10, 2018
Samira Khan University of Virginia Sep 12, 2018
What is Computer Architecture?
What is Computer Architecture?
Chapter 12 Pipelining and RISC
CPU Structure CPU must:
Design of Digital Circuits Lecture 19a: VLIW
Lecture 4: Instruction Set Design/Pipelining
CSE378 Introduction to Machine Organization
Prof. Onur Mutlu Carnegie Mellon University Spring 2012, 1/25/2012
Presentation transcript:

15-740/ Computer Architecture Lecture 2: ISA, Tradeoffs, Performance Prof. Onur Mutlu Carnegie Mellon University

Last Time … Brief intro to  On-chip networks  Memory controllers, DRAM bank organization  Static vs. dynamic scheduling  Cache coherence Moore’s Law Levels of Transformation ISA vs. microarchitecture distinction 2

Required Readings Colwell et al., “Instruction Sets and Beyond: Computers, Complexity, and Controversy,” IEEE Computer Wulf, “Compilers and Computer Architecture,” IEEE Computer

Papers for Review Colwell et al., “Instruction Sets and Beyond: Computers, Complexity, and Controversy,” IEEE Computer Due September 17 4

Levels of Transformation ISA  Agreed upon interface between software and hardware SW/compiler assumes, HW promises  What the software writer needs to know to write system/user programs Microarchitecture  Specific implementation of an ISA  Not visible to the software Microprocessor  ISA, uarch, circuits  “Architecture” = ISA + microarchitecture 5 Microarchitecture ISA Program Algorithm Problem Circuits Electrons

ISA vs. Microarchitecture What is part of ISA vs. Uarch?  Gas pedal: interface for “acceleration”  Internals of the engine: implements “acceleration”  Add instruction vs. Adder implementation Implementation (uarch) can be various as long as it satisfies the specification (ISA)  Bit serial, ripple carry, carry lookahead adders  x86 ISA has many implementations: 286, 386, 486, Pentium, Pentium Pro, … Uarch usually changes faster than ISA  Few ISAs (x86, SPARC, MIPS, Alpha) but many uarchs  Why? 6

ISA Instructions  Opcodes, Addressing Modes, Data Types  Instruction Types and Formats  Registers, Condition Codes Memory  Address space, Addressability, Alignment  Virtual memory management Call, Interrupt/Exception Handling Access Control, Priority/Privilege I/O Task Management Power and Thermal Management Multi-threading support, Multiprocessor support 7

Microarchitecture Implementation of the ISA under specific design constraints and goals Anything done in hardware without exposure to software  Pipelining  In-order versus out-of-order instruction execution  Memory access scheduling policy  Speculative execution  Superscalar processing (multiple instruction issue?)  Clock gating  Caching? Levels, size, associativity, replacement policy  Prefetching?  Voltage/frequency scaling?  Error correction? 8

Design Point A set of design considerations and their importance  leads to tradeoffs in both ISA and uarch Considerations  Cost  Performance  Maximum power consumption  Energy consumption (battery life)  Availability  Reliability and Correctness (or is it?)  Time to Market Design point determined by the “Problem” space (application space) 9 Microarchitecture ISA Program Algorithm Problem Circuits Electrons

Tradeoffs: Soul of Computer Architecture ISA-level tradeoffs Uarch-level tradeoffs System and Task-level tradeoffs  How to divide the labor between hardware and software 10

ISA-level Tradeoffs: Semantic Gap Where to place the ISA? Semantic gap  Closer to high-level language (HLL) or closer to hardware control signals?  Complex vs. simple instructions  RISC vs. CISC vs. HLL machines FFT, QUICKSORT, POLY, FP instructions? VAX INDEX instruction (array access with bounds checking)  Tradeoffs: Simple compiler, complex hardware vs. complex compiler, simple hardware  Caveat: Translation (indirection) can change the tradeoff! Burden of backward compatibility Performance?  Optimization opportunity: Example of VAX INDEX instruction: who (compiler vs. hardware) puts more effort into optimization?  Instruction size, code size 11

X86: Small Semantic Gap: String Operations 12 REP MOVS DEST SRC How many instructions does this take in Alpha?

Small Semantic Gap Examples in VAX FIND FIRST  Find the first set bit in a bit field  Helps OS resource allocation operations SAVE CONTEXT, LOAD CONTEXT  Special context switching instructions INSQUEUE, REMQUEUE  Operations on doubly linked list INDEX  Array access with bounds checking STRING Operations  Compare strings, find substrings, … Cyclic Redundancy Check Instruction EDITPC  Implements editing functions to display fixed format output Digital Equipment Corp., “VAX Architecture Handbook,”

Small versus Large Semantic Gap CISC vs. RISC  Complex instruction set computer  complex instructions Initially motivated by “not good enough” code generation  Reduced instruction set computer  simple instructions John Cocke, mid 1970s, IBM 801  Goal: enable better compiler control and optimization RISC motivated by  Memory stalls (no work done in a complex instruction when there is a memory stall?) When is this correct?  Simplifying the hardware  lower cost, higher frequency  Enabling the compiler to optimize the code better Find fine-grained parallelism to reduce stalls 14

Small versus Large Semantic Gap John Cocke’s RISC (large semantic gap) concept:  Compiler generates control signals: open microcode Advantages of Small Semantic Gap (Complex instructions) + Denser encoding  smaller code size  saves off-chip bandwidth, better cache hit rate (better packing of instructions) + Simpler compiler Disadvantages - Larger chunks of work  compiler has less opportunity to optimize - More complex hardware  translation to control signals and optimization needs to be done by hardware Read Colwell et al., “Instruction Sets and Beyond: Computers, Complexity, and Controversy,” IEEE Computer

ISA-level Tradeoffs: Instruction Length Fixed length: Length of all instructions the same + Easier to decode single instruction in hardware + Easier to decode multiple instructions concurrently -- Wasted bits in instructions (Why is this bad?) -- Harder-to-extend ISA (how to add new instructions?) Variable length: Length of instructions different (determined by opcode and sub-opcode) + Compact encoding (Why is this good?) Intel 432: Huffman encoding (sort of). 6 to 321 bit instructions. How? -- More logic to decode a single instruction -- Harder to decode multiple instructions concurrently Tradeoffs  Code size (memory space, bandwidth, latency) vs. hardware complexity  ISA extensibility and expressiveness  Performance? Smaller code vs. imperfect decode 16

ISA-level Tradeoffs: Uniform Decode Uniform decode: Same bits in each instruction correspond to the same meaning  Opcode is always in the same location  Ditto operand specifiers, immediate values, …  Many “RISC” ISAs: Alpha, MIPS, SPARC + Easier decode, simpler hardware + Enables parallelism: generate target address before knowing the instruction is a branch -- Restricts instruction format (fewer instructions?) or wastes space Non-uniform decode  E.g., opcode can be the 1st-7th byte in x86 + More compact and powerful instruction format -- More complex decode logic (e.g., more adders to speculatively generate branch target) 17

x86 vs. Alpha Instruction Formats x86: Alpha: 18

ISA-level Tradeoffs: Number of Registers Affects:  Number of bits used for encoding register address  Number of values kept in fast storage (register file)  (uarch) Size, access time, power consumption of register file Large number of registers: + Enables better register allocation (and optimizations) by compiler  fewer saves/restores -- Larger instruction size -- Larger register file size -- (Superscalar processors) More complex dependency check logic 19