Choices in Designing an ISA

Slides:



Advertisements
Similar presentations
ISA Issues; Performance Considerations. Testing / System Verilog: ECE385.
Advertisements

EECC551 - Shaaban #1 Lec # 2 Fall Instruction Set Architecture (ISA) “... the attributes of a [computing] system as seen by the programmer,
RISC / CISC Architecture By: Ramtin Raji Kermani Ramtin Raji Kermani Rayan Arasteh Rayan Arasteh An Introduction to Professor: Mr. Khayami Mr. Khayami.
ELEN 468 Advanced Logic Design
Computer Architecture and Data Manipulation Chapter 3.
CBP Comp 1017 Digital Technologies1 Let’s make a Computer … at least the CPU … Pentium 4 Pentium 3 Opteron Ultra Sparc Itanium 2 McKinley.
CBP Comp 1017 Digital Technologies1 Let’s make a Computer.
CSE378 ISA evolution1 Evolution of ISA’s ISA’s have changed over computer “generations”. A traditional way to look at ISA complexity encompasses: –Number.
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
MIPS Architecture CPSC 321 Computer Architecture Andreas Klappenecker.
ENEE350 Spring07 1 Ankur Srivastava University of Maryland, College Park Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005.”
Recap.
Choice for the rest of the semester New Plan –assembler and machine language –Operating systems Process scheduling Memory management File system Optimization.
Chapter 2.2 Machine Language.
Microprocessors Introduction to RISC Mar 19th, 2002.
CSE378 MIPS ISA1 MIPS History MIPS is a computer family –R2000/R3000 (32-bit); R4000/4400 (64-bit); R8000; R10000 (64-bit) etc. MIPS originated as a Stanford.
Cisc Complex Instruction Set Computing By Christopher Wong 1.
RISC and CISC. Dec. 2008/Dec. and RISC versus CISC The world of microprocessors and CPUs can be divided into two parts:
Instruction Set Architecture
ITEC 352 Lecture 20 JVM Intro. Functions + Assembly Review Questions? Project due today Activation record –How is it used?
Computer architecture Lecture 11: Reduced Instruction Set Computers Piotr Bilski.
CBP 2009Comp 3014 The Nature of Computing 1 Choices in Designing an ISA Uniformity. Should each instruction –Be the same length (in bits or bytes?) –Take.
Oct. 25, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Alternative Instruction Sets * Jeremy R. Johnson Wed. Oct. 25, 2000.
MIPS Processor Chapter 12 S. Dandamudi To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
CBP Comp 1017 Digital Technologies1 Let’s make a Computer … at least the CPU … Pentium 4 Pentium 3 Opteron Ultra Sparc Itanium 2 McKinley.
CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!
Our programmer needs to do this !
Computer = ALU + Memory Registers ALU Let’s try to compute = 5 32 Go to jail and do not collect £200.
CS61C L20 Datapath © UC Regents 1 Microprocessor James Tan Adapted from D. Patterson’s CS61C Copyright 2000.
8086/8088 Instruction Set, Machine Codes and Addressing Modes.
COMP 1321 Digital Infrastructure Richard Henson University of Worcester October 2012.
CBP 2002ITY 270 Computer Architecture1 Module Structure Whirlwind Review – Fetch-Execute Simulation Instruction Set Architectures RISC vs x86 How to build.
CBP 2005Comp 3070 Computer Architecture1 Last Time … All instructions the same length We learned to program MIPS And a bit about Intel’s x86 Instructions.
The Processor & its components. The CPU The brain. Performs all major calculations. Controls and manages the operations of other components of the computer.
Electrical and Computer Engineering University of Cyprus
CS161 – Design and Architecture of Computer Systems
Instruction Set Architecture
ELEN 468 Advanced Logic Design
Prof. Sirer CS 316 Cornell University
Computer Architecture and Organization Miles Murdocca and Vincent Heuring Chapter 4 – The Instruction Set Architecture.
Digital Logic Last Time … This Time … Control Path, Arithmetic Ops a
CS/COE0447 Computer Organization & Assembly Language
Central Processing Unit
CS170 Computer Organization and Architecture I
Introduction to Assembly Chapter 2
CSCI206 - Computer Organization & Programming
ECE/CS 552: Instruction Sets – x86
Computer Architecture and the Fetch-Execute Cycle
MIPS History MIPS is a computer family
Introduction to Assembly Chapter 2
Unit 12 CPU Design & Programming
MIPS History MIPS is a computer family
Evolution of ISA’s ISA’s have changed over computer “generations”.
Prof. Sirer CS 316 Cornell University
What is Computer Architecture?
What is Computer Architecture?
What is Computer Architecture?
Evolution of ISA’s ISA’s have changed over computer “generations”.
MIPS History MIPS is a computer family
Execution time Execution Time (processor-related) = IC x CPI x T
COMP 1321 Digital Infrastructure
Evolution of ISA’s ISA’s have changed over computer “generations”.
CPU Structure CPU must:
Introduction to Assembly Chapter 2
Evolution of ISA’s ISA’s have changed over computer “generations”.
Computer Organization
CSE378 Introduction to Machine Organization
Presentation transcript:

Choices in Designing an ISA Uniformity. Should each instruction Be the same length (in bits or bytes?) Take the same time to execute? Complexity. How many different instructions? How closely linked to High Level languages? Tradeoffs – Complex Instructions Take up less code memory to store them Need a rather complex CPU design CBP 2009 Comp 3014 The Nature of Computing

Instruction Encoding Example destination All Sam’s instructions take up 32 bits. opcode Source regs add rd rs rt unused Sam’s instructions start with the opcode then the destination reg- ister then the source register rd <- rs + rt e.g. add r3, r1, r2 means r3 = r1 + r2 First 6 bits for the opcode. 010110 00011 00010 00001 unused 3 2 1 CBP 2009 Comp 3014 The Nature of Computing

Intel 80x86 ISA The most popular of all 1971: Intel invents microprocessor 4004/8008, 8080, 8085 1975: Major design effort for new 16-bit ISA, (iAPX432) but … 1978: 8086 dedicated registers, segmented address, 16-bit 8088; 8-bit version of 8086 added as after thought 1980: IBM selects 8088 as basis for IBM PC 1980: Intel 432 finally ready but… 1980: 8087 floating point coprocessor: 1982: 80286 24-bit address, protection, memory mapping 1985: 80386 32-bit address, 32-bit GP registers, paging 1989: 80486 1992 Pentium 1995 Pentium Pro 1997 Pentium Pro with MMX multimedia acceleration CBP 2009 Comp 3014 The Nature of Computing

Some x86 instructions These look rather like Sam’s RISC ops mov ax , [bx + c] mov [ax] , bx add ax , bx add [bx] , ax These look rather like Sam’s RISC ops Let’s compare the RR and RM ISA’s. Clearly RR needs more memory while the RM uses stronger operations But this is not. Here the contents of ax is being added straight into memory ! The x86 is a register – memory ISA and Sam is a register – register ISA ldi r1 , a ldi r2 , b add r3,r1,r2 st r3 , b mov ax, a add b,ax Sam Intel x86 CBP 2009 Comp 3014 The Nature of Computing

Variable Length Instructions 0% 10% 20% 30% 1 2 3 4 5 6 7 8 9 10 All Sam’s instructions had the same length, 32 bits. This is also true for other RISC ISA’s such as SPARC and MIPS. Compare this with the x86 instruction vary from 1 to 17 bytes. Here’s some stats. Clearly long complex instructions are used infrequently Instruction Length (bytes) But the use does depend on the app. Expresso Gcc Spice Nasa Frequency of use CBP 2009 Comp 3014 The Nature of Computing

Variable Time Instructions Here’s a timing diagram for an Intel add add ax , [bx + c] T1 T2 T3 T4 T5 Fetch Decode, Reg Op ALU Mem Access Reg Write [bx + c] ax = ax + mem[..] … and the second to actually add memory to register ax We need two adds. The first to get the address summed up … CBP 2009 Comp 3014 The Nature of Computing

Potent x86 Instructions 1.Application 2.High-Level Language (‘C’) Greenspan strcmp(str, Greenspan); 2.High-Level Language (‘C’) mov x,2 Immediate to memory 6 xlat x Translate al via table 1 imul x Multiply memory with ax 4 inc x Increment memory by 1 Repne scasb Scan string for match ! various 3.Intel ISA code CBP 2009 Comp 3014 The Nature of Computing

Top 10 Intel x86 Instructions Rank Instruction Usage 1 load 22% 2 conditional branch 20% 3 arithmetic / logic 19% 4 compare 16% 5 store 12 % 6 move reg - reg 4% 7 call - return 2% We see that most instructions are Simple load, store, calculate, branch. None of Intel’s potent stuff figures here. So why did Intel design instructions no-one uses ? CBP 2009 Comp 3014 The Nature of Computing

Semantic Gap Twixt HLL and ML In the 1970’s Hardware costs decreased. So we got faster CPUs but Memory was expensive. ld r1,B ld r2,0 ld r3,[r1 + r2] add r4,r4,r3 addi r2,r2,1 str r4,[r2+5] … … add r4,r3,r2 Bigger programs means more expensive programs Shortage of Good Programmers Unreliable Software Response : Reduce programming Costs Develop powerful HLL easy to learn so no mistakes But is Semantic Gap between HLL and ML Software runs inefficiently - Poor Performance Compilers become Complex So Close the Semantic Gap Machine executes HLL constructs in hardware Lots of addressing Modes Add the column of sales figures But this potent stuff is not being used ! CBP 2009 Comp 3014 The Nature of Computing

1980 Berkeley Patterson RISC (SPARC) 1981 Stanford Hennessy MIPS ISA R&D into the 80’s Let’s downshift and make things simpler … Use simple instructions, load, store, add Many of these will do one x86 potent op Need more memory, but memory is becoming cheap More CPU cycles, but can still be faster 1980 Berkeley Patterson RISC (SPARC) 1981 Stanford Hennessy MIPS - Easy to Decode Ops - Fast Issue Rate - Only load and Store references memory - Lots of registers Emerging Design Guidelines CBP 2009 Comp 3014 The Nature of Computing