In the Beginning... 1964 -- The first ISA appears on the IBM System 360 In the good old days



Similar documents
Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek

Intel 8086 architecture

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX

Processor Architectures

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

LSN 2 Computer Processors

Instruction Set Design

CS 152 Computer Architecture and Engineering. Lecture 22: Virtual Machines

Instruction Set Architecture

Introducción. Diseño de sistemas digitales.1

İSTANBUL AYDIN UNIVERSITY

Computer Organization and Components

Computer Architectures

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

CPU Organization and Assembly Language

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-12: ARM

EC 362 Problem Set #2

Chapter 2 Logic Gates and Introduction to Computer Architecture

Property of ISA vs. Uarch?

Computer Organization and Architecture

Week 1 out-of-class notes, discussions and sample problems

A Unified View of Virtual Machines

Instruction Set Architecture (ISA)

Administration. Instruction scheduling. Modern processors. Examples. Simplified architecture model. CS 412 Introduction to Compilers

Central Processing Unit (CPU)

ARM Architecture. ARM history. Why ARM? ARM Ltd developed by Acorn computers. Computer Organization and Assembly Languages Yung-Yu Chuang

Computer Architecture Lecture 3: ISA Tradeoffs. Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 1/18/2013

CSE 141 Introduction to Computer Architecture Summer Session I, Lecture 1 Introduction. Pramod V. Argade June 27, 2005

EE282 Computer Architecture and Organization Midterm Exam February 13, (Total Time = 120 minutes, Total Points = 100)

Instruction Set Architecture

Q. Consider a dynamic instruction execution (an execution trace, in other words) that consists of repeats of code in this pattern:

Design Cycle for Microprocessors

a storage location directly on the CPU, used for temporary storage of small amounts of data during processing.

Chapter 5 Instructor's Manual

Instruction Set Architecture (ISA) Design. Classification Categories

Reduced Instruction Set Computer (RISC)

CISC, RISC, and DSP Microprocessors

Pipelining Review and Its Limitations


ELE 356 Computer Engineering II. Section 1 Foundations Class 6 Architecture

CS:APP Chapter 4 Computer Architecture. Wrap-Up. William J. Taffe Plymouth State University. using the slides of

Introduction to RISC Processor. ni logic Pvt. Ltd., Pune

CS352H: Computer Systems Architecture

An Introduction to the ARM 7 Architecture

CS:APP Chapter 4 Computer Architecture Instruction Set Architecture. CS:APP2e

ARM Microprocessor and ARM-Based Microcontrollers

Review: MIPS Addressing Modes/Instruction Formats

Microprocessor and Microcontroller Architecture

Pentium vs. Power PC Computer Architecture and PCI Bus Interface

Lecture 7: Machine-Level Programming I: Basics Mohamed Zahran (aka Z)

CHAPTER 4 MARIE: An Introduction to a Simple Computer

CHAPTER 7: The CPU and Memory

WAR: Write After Read

ASSEMBLY PROGRAMMING ON A VIRTUAL COMPUTER

Pipeline Hazards. Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. Based on the material prepared by Arvind and Krste Asanovic

MICROPROCESSOR AND MICROCOMPUTER BASICS

RISC AND CISC. Computer Architecture. Farhat Masood BE Electrical (NUST) COLLEGE OF ELECTRICAL AND MECHANICAL ENGINEERING

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

Execution Cycle. Pipelining. IF and ID Stages. Simple MIPS Instruction Formats

Addressing The problem. When & Where do we encounter Data? The concept of addressing data' in computations. The implications for our machine design(s)

Chapter 2 Topics. 2.1 Classification of Computers & Instructions 2.2 Classes of Instruction Sets 2.3 Informal Description of Simple RISC Computer, SRC

COMP 303 MIPS Processor Design Project 4: MIPS Processor Due Date: 11 December :59

Performance evaluation

More MIPS: Recursion. Computer Science 104 Lecture 9

Systems I: Computer Organization and Architecture

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

The AVR Microcontroller and C Compiler Co-Design Dr. Gaute Myklebust ATMEL Corporation ATMEL Development Center, Trondheim, Norway

COMPUTER ORGANIZATION AND ARCHITECTURE. Slides Courtesy of Carl Hamacher, Computer Organization, Fifth edition,mcgrawhill

An Overview of Stack Architecture and the PSC 1000 Microprocessor

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

Compilers I - Chapter 4: Generating Better Code

ELEC 5260/6260/6266 Embedded Computing Systems

picojava TM : A Hardware Implementation of the Java Virtual Machine

Architectures and Platforms

MACHINE ARCHITECTURE & LANGUAGE

EECS 427 RISC PROCESSOR

Computer System: User s View. Computer System Components: High Level View. Input. Output. Computer. Computer System: Motherboard Level

(Refer Slide Time: 00:01:16 min)

FLIX: Fast Relief for Performance-Hungry Embedded Applications

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals

System i Architecture Part 1. Module 2

12. Introduction to Virtual Machines

VLIW Processors. VLIW Processors

Course on Advanced Computer Architectures

Chapter 5, The Instruction Set Architecture Level

on an system with an infinite number of processors. Calculate the speedup of

Stack machines The MIPS assembly language A simple source language Stack-machine implementation of the simple language Readings:

Software Pipelining. for (i=1, i<100, i++) { x := A[i]; x := x+1; A[i] := x

l C-Programming l A real computer language l Data Representation l Everything goes down to bits and bytes l Machine representation Language

CPU Performance Equation

A SystemC Transaction Level Model for the MIPS R3000 Processor

EEM 486: Computer Architecture. Lecture 4. Performance

Computer organization

This Unit: Putting It All Together. CIS 501 Computer Architecture. Sources. What is Computer Architecture?

CSC 2405: Computer Systems II

Unit A451: Computer systems and programming. Section 2: Computing Hardware 1/5: Central Processing Unit

The Java Virtual Machine and Mobile Devices. John Buford, Ph.D. Oct 2003 Presented to Gordon College CS 311

Hardware Assisted Virtualization

Transcription:

RISC vs CISC 66

In the Beginning... 1964 -- The first ISA appears on the IBM System 360 In the good old days Initially, the focus was on usability by humans. Lots of user-friendly instructions (remember the x86 addressing modes). Memory was expensive, so code-density mattered. Many processors were microcoded -- each instruction actually triggered the execution of a builtin function in the CPU. Simple hardware to execute complex instructions (but CPIs are very, very high)...so... Many, many different instructions, lots of bells and whistles Variable-length instruction encoding to save space.... their success had some downsides... ISAs evolved organically. They got messier, and more complex. 67

Things Changed In the modern era Compilers write code, not humans. Memory is cheap. Code density is unimportant. Low CPI should be possible, but only for simple instructions We learned a lot about how to design ISAs, how to let them evolve gracefully, etc. So, architects started with with a clean slate... 68

Reduced Instruction Set Computing (RISC) Simple, regular ISAs, mean simple CPUs, and simple CPUs can go fast. Fast clocks. Low CPI. Simple ISAs will also mean more instruction (increasing IC), but the benefits should outweigh this. Compiler-friendly, not user-friendly. Simple, regular ISAs, will be easy for compilers to use A few, simple, flexible, fast operations that compiler can combine easily. Separate memory access and data manipulation Instructions access memory or manipulate register values. Not both. Load-store architectures (like MIPS) 69

Instruction Formats Arithmetic: Register[rd] = Register[rs] + Register[rt] Register indirect jumps: PC = PC + Register[rs] Arithmetic: Register[rd] = Register[rs] + Imm Branches: If Register[rs] == Register[rt], goto PC + Immediate Memory: Memory[Register[rs] + Immediate] = Register[rt] Register[rt] = Memory[Register[rs] + Immediate] Direct jumps: PC = Address Syscalls, break, etc. 70

RISC Characteristics of MIPS All instructions have <= 1 arithmetic op <= 1 memory access <= 2 register reads <= 1 register write <= 1 branch It needs a small, fixed amount of hardware. Instructions operate on memory or registers not both Load/Store Architecture Decoding is easy Uniform opcode location Uniform register location Always 4 bytes -> the location of the next PC is to know. Uniform execution algorithm Fetch Decode Execute Memory Write Back Compiling is easy No complex instructions to reason about No special registers The HW is simple A skilled undergrad can build one in 10 weeks. 33 instructions can run complex programs.

CISC: x86 x86 is the prime example of CISC (there were many others long ago) Many, many instruction formats. Variable length. Many complex rules about which register can be used when, and which addressing modes are valid where. Very complex instructions Combined memory/arithmetic. Special-purpose registers. Many, many instructions. Implementing x86 correctly is almost intractable 74

Mostly RISC: ARM ARM is somewhere in between Four instruction formats. Fixed length. General purpose registers (except the condition codes) Moderately complex instructions, but they are still regular -- all instructions look more or less the same. ARM targeted embedded systems Code density is important Performance (and clock speed) is less critical Both of these argue for more complex instructions. But they can still be regular, easy to decode, and crafted to minimize hardware complexity Implementing an ARM processor is also tractable for 141L, but it would be harder than MIPS 75

RISCing the CISC Everyone believes that RISC ISAs are better for building fast processors. So, how do Intel and AMD build fast x86 processors? Despite using a CISC ISA, these processors are actually RISC processors The preceding inside was a dramatization. MIPS Internally, instructions they convert were used x86 instructions for clarity into and MIPS-like because micro-ops I (uops), and feed them to a RISC-style processor x86 Code movb $0x05, %al movl -4(%ebp), %eax movl %eax, -4(%ebp) movl %R0, -4(%R1,%R2,4) movl %R0, %R1 had some laying around. No x86 instruction were harmed uops in the production of this slide. ori $t0, $t0, 5 lw $t0, -4($t1) sw $t0, -4($t1) slr $at, $t2, 2 add $at, $at, $t1 sw $t0, k($at) ori $t0, $t0, $zero 76

VLIWing the CISC We can also get rid of x86 in software. Transmeta did this. They built a processor that was completely hidden behind a soft implementation of the x86 instruction set. Their system would translate x86 instruction into an internal VLIW instruction set and execute that instead. Originally, their aim was high performance. That turned out to be hard, so they focused low power instead. Transmeta eventually lost to Intel Once Intel decided it cared about power (in part because Transmeta made the case for low-power x86 processors), it started producing very efficient CPUs. 77

The End