CS352H: Computer Systems Architecture

Slides:



Advertisements
Similar presentations
1 Lecture 3: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation.
Advertisements

Lec 12Systems Architecture1 Systems Architecture Lecture 12: Design of the MIPS ALU Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some or all.
ELEN 468 Advanced Logic Design
Systems Architecture Lecture 5: MIPS Instruction Set
Chapter 2.
©UCB CPSC 161 Lecture 6 Prof. L.N. Bhuyan
CPE 731 Advanced Computer Architecture Instruction Set Principles Dr. Gheith Abandah Adapted from the slides of Prof. David Patterson, University of California,
1 Representing Numbers Using Bases Numbers in base 10 are called decimal numbers, they are composed of 10 numerals ( ספרות ) = 9* * *10.
Lecture 5 Sept 14 Goals: Chapter 2 continued MIPS assembly language instruction formats translating c into MIPS - examples.
Arithmetic-Logic Units CPSC 321 Computer Architecture Andreas Klappenecker.
1  1998 Morgan Kaufmann Publishers Chapter Four Arithmetic for Computers.
Chapter 3 Arithmetic for Computers. Arithmetic Where we've been: Abstractions: Instruction Set Architecture Assembly Language and Machine Language What's.
Arithmetic for Computers
CMPE 325 Computer Architecture II Cem Ergün Eastern Mediterranean University Integer Representation and the ALU.
IT253: Computer Organization Lecture 5: Assembly Language and an Introduction to MIPS Tonga Institute of Higher Education.
Csci 136 Computer Architecture II – Constructing An Arithmetic Logic Unit Xiuzhen Cheng
CSCI 136 Lab 1: 135 Review.
Chapter 10 The Assembly Process. What Assemblers Do Translates assembly language into machine code. Assigns addresses to all symbolic labels (variables.
CDA 3101 Fall 2013 Introduction to Computer Organization The Arithmetic Logic Unit (ALU) and MIPS ALU Support 20 September 2013.
Oct. 25, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 9: Alternative Instruction Sets * Jeremy R. Johnson Wed. Oct. 25, 2000.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /08/2013 Lecture 10: MIPS Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL STATE.
University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell CS352H: Computer Systems Architecture Lecture 3: Instruction.
CSCI 6307 Foundation of Systems Review: Midterm Exam Xiang Lian The University of Texas – Pan American Edinburg, TX 78539
1 Modified from  Modified from 1998 Morgan Kaufmann Publishers Chapter Three: Arithmetic for Computers Section 2 citation and following credit line is.
CPE 232 MIPS Arithmetic1 CPE 232 Computer Organization MIPS Arithmetic – Part I Dr. Gheith Abandah [Adapted from the slides of Professor Mary Irwin (
1  2004 Morgan Kaufmann Publishers Performance is specific to a particular program/s –Total execution time is a consistent summary of performance For.
1 ELEN 033 Lecture 4 Chapter 4 of Text (COD2E) Chapters 3 and 4 of Goodman and Miller book.
EI 209 Chapter 3.1CSE, 2015 EI 209 Computer Organization Fall 2015 Chapter 3: Arithmetic for Computers Haojin Zhu ( )
MIPS Instructions Instructions: Language of the Machine
Addition, Subtraction, Logic Operations and ALU Design
EEL5708/Bölöni Lec 3.1 Fall 2006 Sept 1, 2006 Lotzi Bölöni EEL 5708 High Performance Computer Architecture Lecture 3 Review: Instruction Sets.
CMPUT Computer Organization and Architecture I1 CMPUT229 - Fall 2003 Topic6: Logic, Multiply and Divide Operations José Nelson Amaral.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
Computer Arthmetic Chapter Four P&H. Data Representation Why do we not encode numbers as strings of ASCII digits inside computers? What is overflow when.
9/23/2004Comp 120 Fall September Chapter 4 – Arithmetic and its implementation Assignments 5,6 and 7 posted to the class web page.
EE204 L03-ALUHina Anwar Khan EE204 Computer Architecture Lecture 03- ALU.
Pirouz Bazargan SabetDecember 2003 Effective Implementation of a 32-bit RISC Processor Pirouz Bazargan Sabet University of Paris 6 - LIP6 - ASIM
By Wannarat Computer System Design Lecture 3 Wannarat Suntiamorntut.
1 CPTR 220 Computer Organization Computer Architecture Assembly Programming.
Instructor: Prof. Hany H Ammar, LCSEE, WVU
Computer System Design Lecture 3
Computer Architecture & Operations I
Computer Architecture & Operations I
Digital Logic Design Alex Bronstein
Computer Arthmetic Chapter Four P&H.
COMPUTER ARCHITECTURE & OPERATIONS I
ELEN 468 Advanced Logic Design
Morgan Kaufmann Publishers
CS352H: Computer Systems Architecture
Appendix A Classifying Instruction Set Architecture
Lecture 4: MIPS Instruction Set
MISP Assembly.
Systems Architecture Lecture 5: MIPS Instruction Set
Systems Architecture I
Topic 3a Two’s Complement Representation
ECE232: Hardware Organization and Design
Chapter 2 Instructions: Language of the Computer
CS/COE0447 Computer Organization & Assembly Language
CS/COE0447 Computer Organization & Assembly Language
COMS 361 Computer Organization
A 1-Bit Arithmetic Logic Unit
UCSD ECE 111 Prof. Farinaz Koushanfar Fall 2018
Computer Architecture EECS 361 Lecture 6: ALU Design
Evolution of ISA’s ISA’s have changed over computer “generations”.
MIPS Assembly.
CS352H Computer Systems Architecture
Lecture 4: Instruction Set Design/Pipelining
COMS 361 Computer Organization
MIPS Arithmetic and Logic Instructions
MIPS Arithmetic and Logic Instructions
Presentation transcript:

CS352H: Computer Systems Architecture Lecture 4: Instruction Set Architectures III + MIPS ALU September 10, 2008

ISA Example: IA-32 A 20-year old ISA! (30 years if you count earlier x86) Blend of RR & RM ISA Two-operand instructions Seven addressing modes Mode to indicate whether 8086, 286 or IA-32 (>=386) More than 630 instructions! Evolved to include multimedia, graphics Support operations on 8, 16 and 32-bit operands Variable-length instructions 1 – 15 bytes long (3 bytes on average) University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell 2

IA-32 Registers Originally 16-bit registers As of 386 eight GP 32-bit regs Segment registers encode address prefix Certain accesses particular segment registers by default Condition code register University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell 3

IA Instruction Formats University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell 4

Principles of ISA Design KISS — Keep It Simple, Stupid (Cray) Complexity increases Logic area Pipe stage duration Development time Evolution leads to kludges Orthogonality Simple rules, few exceptions All ops on all registers in all addressing modes Frequency Make the common case fast Instructions are not born equal! University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell 5

Principles of ISA Design (cont) Generality Not all problems need the same capabilities Toaster oven vs. supercomputer Performance should be easy to predict Peter Denning: Don’t build it if you can’t model it Permit efficient implementation Today 10 years from now University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell 6

CISC vs. RISC Typically includes: Examples: Advantages Complex Instruction Set Computer (CISC) Typically includes: Variable-length instructions RM instructions Many, complex addressing modes Complex instructions Examples: VAX, IBM 360/370, x86 Advantages Code density Legacy SW Reduced Instruction Set Computer (RISC) Typically includes: GP registers Fixed 3-address format Strict load/store conformance Few, simple addressing modes Simple instructions Examples: DEC Alpha, MIPS Advantages Good compiler target Easy to implement/pipeline In practice, other than a handful of ISAs, most contain elements of both. University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell 7

MIPS ALU Needs to support add, addi, sub and, andi, or, ori, xor, xori sll, srl, sra, sllv, srlv, srav slt, slti All the unsigned versions A B ALU 32 SE 16 OP University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell 8

Bit Slice Approach For subtraction: set invert & CarryIn to 1 (2’s complement arithmetic) How about SLT? University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell 9

LSB and MSB Need to Do Extra University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell 10

Overflow Detection Overflow occurs when the result is too large to represent in the number of bits allocated adding two positives yields a negative or, adding two negatives gives a positive or, subtract a negative from a positive gives a negative or, subtract a positive from a negative gives a positive On your own: Prove you can detect overflow by: Carry into MSB xor Carry out of MSB 1 1 1 1 1 1 1 + 7 3 1 + –4 – 5 – 6 1 1 7 University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell 11

Overflow Detection Logic For an N-bit ALU: Overflow = CarryIn[N-1] XOR CarryOut[N-1] University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell 12

LSB and MSB Need to Do Extra University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell 13

What About Performance? Critical path of N-bit ripple-carry adder is N * Tadd Throw hardware at it! (Next lecture) University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell 14

Next Lecture Finish MIPS ALU See Appendix C (on CD) In particular, Sections C-5 & C-6 for fast adders See Chapter 3.3 & 3.4 for Multiplication & Division See Chapter 3.5 for Floating point ops University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell 15