Caltech CS184 Spring2005 -- DeHon 1 CS184b: Computer Architecture (Abstractions and Optimizations) Day 2: March 30, 2005 Instruction Set Architecture.

Slides:



Advertisements
Similar presentations
CPU Structure and Function
Advertisements

Instruction Set Design
Chapter 8: Central Processing Unit
Chapter 3 Instruction Set Architecture Advanced Computer Architecture COE 501.
ISA Issues; Performance Considerations. Testing / System Verilog: ECE385.
1 Lecture 3: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation.
Lecture 3: Instruction Set Principles Kai Bu
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
1 ECE462/562 ISA and Datapath Review Ali Akoglu. 2 Instruction Set Architecture A very important abstraction –interface between hardware and low-level.
1 Advanced Computer Architecture Limits to ILP Lecture 3.
10/9: Lecture Topics Starting a Program Exercise 3.2 from H+P Review of Assembly Language RISC vs. CISC.
Computer Organization and Architecture
Tuan Tran. What is CISC? CISC stands for Complex Instruction Set Computer. CISC are chips that are easy to program and which make efficient use of memory.
PART 4: (2/2) Central Processing Unit (CPU) Basics CHAPTER 13: REDUCED INSTRUCTION SET COMPUTERS (RISC) 1.
Computer Organization and Architecture
Computer Organization and Architecture
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
Chapter XI Reduced Instruction Set Computing (RISC) CS 147 Li-Chuan Fang.
Choice for the rest of the semester New Plan –assembler and machine language –Operating systems Process scheduling Memory management File system Optimization.
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
A Characterization of Processor Performance in the VAX-11/780 From the ISCA Proceedings 1984 Emer & Clark.
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
CH12 CPU Structure and Function
Instruction Set Architecture
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Caltech CS184b Winter DeHon 1 CS184b: Computer Architecture [Single Threaded Architecture: abstractions, quantification, and optimizations] Day3:
Edited By Miss Sarwat Iqbal (FUUAST) Last updated:21/1/13
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Computer architecture Lecture 11: Reduced Instruction Set Computers Piotr Bilski.
RISC architecture and instruction Level Parallelism (ILP) based on “Computer Architecture: a Quantitative Approach” by Hennessy and Patterson, Morgan Kaufmann.
1 Instruction Set Architecture (ISA) Alexander Titov 10/20/2012.
Caltech CS184 Spring DeHon 1 CS184b: Computer Architecture (Abstractions and Optimizations) Day 2: April 2, 2003 Instruction Set Architecture.
Chapter 2 Instructions: Language of the Computer Part I.
Ted Pedersen – CS 3011 – Chapter 10 1 A brief history of computer architectures CISC – complex instruction set computing –Intel x86, VAX –Evolved from.
Small constants are used quite frequently (50% of operands) e.g., A = A + 5; B = B + 1; C = C - 18; Solutions? Why not? put 'typical constants' in memory.
M. Mateen Yaqoob The University of Lahore Spring 2014.
ECEG-3202 Computer Architecture and Organization Chapter 7 Reduced Instruction Set Computers.
Lecture 04: Instruction Set Principles Kai Bu
COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE Lecture 21 & 22 Processor Organization Register Organization Course Instructor: Engr. Aisha Danish.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
ISA's, Compilers, and Assembly
Caltech CS184 Winter DeHon 1 CS184a: Computer Architecture (Structure and Organization) Day 5: January 17, 2003 What is required for Computation?
Caltech CS184 Spring DeHon 1 CS184b: Computer Architecture (Abstractions and Optimizations) Day 3: April 4, 2003 Pipelined ISA.
Topics to be covered Instruction Execution Characteristics
15-740/ Computer Architecture Lecture 3: Performance
William Stallings Computer Organization and Architecture 8th Edition
ELEN 468 Advanced Logic Design
Overview Introduction General Register Organization Stack Organization
William Stallings Computer Organization and Architecture 8th Edition
Lecture 4: MIPS Instruction Set
CS170 Computer Organization and Architecture I
Classification of instructions
Computer Instructions
Evolution of ISA’s ISA’s have changed over computer “generations”.
Introduction to Microprocessor Programming
COMS 361 Computer Organization
What is Computer Architecture?
Evolution of ISA’s ISA’s have changed over computer “generations”.
CPU Structure CPU must:
Lecture 4: Instruction Set Design/Pipelining
Chapter 11 Processor Structure and function
Presentation transcript:

Caltech CS184 Spring DeHon 1 CS184b: Computer Architecture (Abstractions and Optimizations) Day 2: March 30, 2005 Instruction Set Architecture

Caltech CS184 Spring DeHon 2 Today Datapath review H&P view on ISA RISC Themes

Caltech CS184 Spring DeHon 3 RISC? What does RISC mean?

Caltech CS184 Spring DeHon 4 With Branch and Indirect Instr: ALUOP Bsel Write Bsrc Asrc DST Baddr CS184a Day 5

Caltech CS184 Spring DeHon 5 ISA Model based around Sequential Instruction Execution Visible-Machine-State  Instruction  New Visible-Machine-State New Visible-Machine-State identifies next instruction –PC  PC+1 or PC  branch-target

Caltech CS184 Spring DeHon 6 ISA Visible Machine State –Registers (including PC) –Memory Instructions –ADD R1, R2, R3 –LD R3, R4 –BNE R4, R2, loop

Caltech CS184 Spring DeHon 7 Datapath [Datapath from PH (Fig. 5.1)]

Caltech CS184 Spring DeHon 8 Instructions Primitive operations for constructing (describing) a computation Need to do? –Interconnect (space and time) –Compute (intersect bits) –Control (select operations to run)

Caltech CS184 Spring DeHon 9 Detail Datapath [Datapath from PH (Fig. 5.13)]

Caltech CS184 Spring DeHon 10 H&P View ISA design done? Not many opportunities to completely redefine Many things mostly settled –at least until big technology perturbations arrive Implementation (uArch) is where most of the action is Andre: maybe we’ve found a nice local minima...

Caltech CS184 Spring DeHon 11 H&P Issues Registers/stack/accumulator –# operands, memory ops in instruction Addressing Modes Operations Control flow Procedure calls Primitive Data types Encoding

Caltech CS184 Spring DeHon 12 Addressing Modes Minimal: –Immediate #3 –Register R1 –Register Indirect (R1) Others: –displacement –indirect (double derefrence) –auto increment/decrement ( p[x++]=y) –scaled

Caltech CS184 Spring DeHon 13 Addressing Modes More capable –less instructions –potentially longer instructions bits and cycle time –many operations (complicate atomicity of instructions) Add (R2)+,(R3)+,(R4)+

Caltech CS184 Spring DeHon 14 Address Space Quote The Virtual Address eXtension of the PDP-11 architecture... provides a virtual address of about 4.3 gigabytes which, even given the rapid improvement of memory technology, should be adequate far into the future. William Strecker, “VAX-11/780—A Virtual address Extension to the PDP-11 Family,” AFIPS Proc., National Computer Conference, 1978

Caltech CS184 Spring DeHon 15 Operations: Procedure call/return ? Save registers? Update PC –call target –return address Change stack and frame pointers –store old –install new

Caltech CS184 Spring DeHon 16 Operations: Procedure call/return Question: How much should instruction do? Lesson: High variance in work needs to be done –which registers need to save –best way to transfer arguments to procedures –better to expose primitives to the compiler and let it specialize the set of operations to the particular call

Caltech CS184 Spring DeHon 17 Data Types Powers of two from bytes to double words? –8, 16, 32, 64 –(very implementation driven decision) Floating Point types Are pointers integers? Alignment requirements

Caltech CS184 Spring DeHon 18 Detail Datapath [Datapath from PH (Fig. 5.13)]

Caltech CS184 Spring DeHon 19 Encoding: RISC/Modern [DLX Instruction Format from HP2nd ed. (Fig. 2.21)]

Caltech CS184 Spring DeHon 20 Operation Complexity Contradiction? –Providing primitives –Including floating point ops

Caltech CS184 Spring DeHon 21 Local Minima? Self-Fulfilling? –How would we quantitatively validate need for a new operation? –[cue: bridge story] –This is what we use as primitives –Funny, we don’t find a need for other primitives…

Caltech CS184 Spring DeHon 22 RISC Themes Common case fast Provide primitives (building blocks) Let compiler specialize to particular operation Make decode/operation simple so implementation is fast

Caltech CS184 Spring DeHon 23 Compilers 1960  1990 shift –increasing capability and sophistication of compilers –e.g. inter-procedural optimization register assignment (register usage) strength reduction dataflow analysis and instruction reordering (some progress) alias analysis

Caltech CS184 Spring DeHon 24 Compilers Gap between programmer and Architecture Increasingly bridged by compiler Less need to make assembly language human programmable More opportunity for compiler to specialize, partial evaluate –(do stuff at compile time to reduce runtime) RISC: “Relegate Interesting Stuff to Compiler”

Caltech CS184 Spring DeHon 25 ISA Driven by 1.Implementation costs 2.Compiler technology 3.Application structure Can’t do good architecture in isolation from any of these issues.

Caltech CS184 Spring DeHon 26 RISC?

Caltech CS184 Spring DeHon 27 VAX Instructions Vary in length 1 to 53 bytes Some very complex –Powerful call routines –Polynomial evaluate (polyf) –Calculate CRC (crc)

Caltech CS184 Spring DeHon 28 VAX / MIPS procedure

Caltech CS184 Spring DeHon 29 RISC Reduced Instruction Set Computers Idea: –Provide/expose minimal primitives –Make sure primitives fast –Compose primitives to build functionality –Provide orthogonal instructions

Caltech CS184 Spring DeHon 30 RISC Equation Time= CPI  Instructions  CycleTime CISC: –Minimize: Instructions –Result in High CPI –Maybe High CycleTime RISC: –Target single-cycle primitives (CPI~1) –Instruction Count increases –Simple encoding, ops  reduced Cycle Time

Caltech CS184 Spring DeHon 31 Cycle Time How many gate delays in 300ps? [Agarwal et al./ISCA 2000]

Caltech CS184 Spring DeHon 32 VAX Data [Emer/Clark, ISCA 1984]

Caltech CS184 Spring DeHon 33 RISC Enabler 1 “large”, fast On-Chip SRAM –Large enough to hold kernel exploded in RISC Ops ~ 1--10K 32b words? Previous machines: –Off-chip memory bandwidth bottleneck –Fetch single instruction from off chip –Execute large number of microinstructions from on- chip ROM ROM smaller than SRAM Small/minimal machine  make room for cache

Caltech CS184 Spring DeHon 34 RISC Enable 2 High Level Programming –Bridge semantic gap by compiler –As opposed to providing powerful building blocks to assembly language programmer

Caltech CS184 Spring DeHon 35 Fit Problem “A great deal depends on being able to fit an entire CPU design on a single chip." "RISC computers benefit from being realizable at an earlier date."

Caltech CS184 Spring DeHon 36 Common Case "wherever there is a system function that is expensive or slow in all its generality, but where software can recognize a frequently occurring degenerate case (or can move the entire function from runtime to compile time) that function is moved from hardware to software, resulting in lower cost and improved performance." – 801 paper

Caltech CS184 Spring DeHon 37 Measurement Good Don’t assume you know what’s going on – measure Tune your intuition "Boy, you ruin all our fun -- you have data.” – DEC designers in response to a detailed quantitative study [Emer/Clark Retrospective on 11/780 performance characterization]

Caltech CS184 Spring DeHon 38 VAX/RISC Compare [Bhandarkar/Clark ASPLOS 1991]

Caltech CS184 Spring DeHon 39 VAX/RISC Compare [Bhandarkar/Clark ASPLOS 1991]

Caltech CS184 Spring DeHon 40 VAX Smoking gun?: –3-operand instructions –One cycle per operand field –If field a mem-op, wash with ld/st in RISC –If register-op, costs more …long way to supporting gap…

Caltech CS184 Spring DeHon 41 ISA Growth Can add instructions (upward compatibility) Do we ever get to remove any?

Caltech CS184 Spring DeHon 42 RISC Everyone believe RISC –X86 only one left –...and it’s a RISC core… …but do they understand it? –Today’s processors pretty complicated –Who’s managing instruction scheduling? –What mean to FPGAs?

Caltech CS184 Spring DeHon 43 Big Ideas Common Case –Measure to verify/know what it is! Primitives Highly specialized instructions brittle Design pulls –simplify processor implementation –simplify coding Orthogonallity (limit special cases) Compiler: fill in gap between user and hardware architecture