CS352H: Computer Systems Architecture

Similar documents
Lecture 7: Instruction Set Architectures - IV

Outline. EEL-4713 Computer Architecture Multipliers and shifters. Deriving requirements of ALU. MIPS arithmetic instructions

Instruction Set Principles. (Appendix B)

MIPS ISA. 1. Data and Address Size 8-, 16-, 32-, 64-bit 2. Which instructions does the processor support

Lecture Topics. Announcements. Today: The MIPS ISA (P&H ) Next: continued. Milestone #1 (due 1/26) Milestone #2 (due 2/2)

MIPS Integer ALU Requirements

Reduced Instruction Set Computer (RISC)

Review of instruction set architectures

Computer Architecture. MIPS Instruction Set Architecture

Mark Redekopp, All rights reserved. EE 357 Unit 11 MIPS ISA

Lecture 4: Instruction Set Architecture

101 Assembly. ENGR 3410 Computer Architecture Mark L. Chang Fall 2009

Lecture Topics. Announcements. Today: Integer Arithmetic (P&H ) Next: continued. Consulting hours. Introduction to Sim. Milestone #1 (due 1/26)

Computer Architecture. The Language of the Machine

Reduced Instruction Set Computer (RISC)

ECE 486/586. Computer Architecture. Lecture # 7

EEM 486: Computer Architecture. Lecture 2. MIPS Instruction Set Architecture

Chapter 2A Instructions: Language of the Computer

Arithmetic for Computers

CPE 335 Computer Organization. MIPS Arithmetic Part I. Content from Chapter 3 and Appendix B

MIPS%Assembly% E155%

CS3350B Computer Architecture MIPS Instruction Representation

55:132/22C:160, HPCA Spring 2011

CS61CL Machine Structures. Lec 5 Instruction Set Architecture

Review: MIPS Organization

Part I: Translating & Starting a Program: Compiler, Linker, Assembler, Loader. Lecture 4

Mark Redekopp, All rights reserved. EE 352 Unit 3 MIPS ISA

ISA and RISCV. CASS 2018 Lavanya Ramapantulu

Number Systems and Their Representations

Q1: /30 Q2: /25 Q3: /45. Total: /100

Computer Architecture

Lecture 7: Instruction Set Architectures - IV. Last time - MIPS ISA (a visual)

COMP MIPS instructions 2 Feb. 8, f = g + h i;

Chapter 2. Instructions: Language of the Computer. HW#1: 1.3 all, 1.4 all, 1.6.1, , , , , and Due date: one week.

5/17/2012. Recap from Last Time. CSE 2021: Computer Organization. The RISC Philosophy. Levels of Programming. Stored Program Computers

Recap from Last Time. CSE 2021: Computer Organization. Levels of Programming. The RISC Philosophy 5/19/2011

The MIPS Instruction Set Architecture

Overview. Introduction to the MIPS ISA. MIPS ISA Overview. Overview (2)

ECE 2035 Programming HW/SW Systems Fall problems, 7 pages Exam Two 23 October 2013

Assembly Programming

CENG3420 Lecture 03 Review

Today s topics. MIPS operations and operands. MIPS arithmetic. CS/COE1541: Introduction to Computer Architecture. A Review of MIPS ISA.

Lecture 4: MIPS Instruction Set

RISC-V Assembly and Binary Notation

Concocting an Instruction Set

EE 109 Unit 13 MIPS Instruction Set. Instruction Set Architecture (ISA) Components of an ISA INSTRUCTION SET OVERVIEW

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA MIPS ISA. In a CPU. (vonneumann) Processor Organization

Anne Bracy CS 3410 Computer Science Cornell University. See P&H Chapter: , , Appendix B

Computer Architecture Experiment

Instructions: Language of the Computer

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA

ECE260: Fundamentals of Computer Engineering

CSCI 402: Computer Architectures

Concocting an Instruction Set

Programmable Machines

Review of Last lecture. Review ALU Design. Designing a Multiplier Shifter Design Review. Booth s algorithm. Today s Outline

Instructions: MIPS ISA. Chapter 2 Instructions: Language of the Computer 1

Instruction Set Architectures. CS301 Prof. Szajda

Programmable Machines

Instruction Set Architecture part 1 (Introduction) Mehran Rezaei

CS 61c: Great Ideas in Computer Architecture

ECE 486/586. Computer Architecture. Lecture # 8

Instructions: Language of the Computer

F. Appendix 6 MIPS Instruction Reference

ECE260: Fundamentals of Computer Engineering

ECE 2035 Programming HW/SW Systems Fall problems, 6 pages Exam One 22 September Your Name (please print clearly) Signed.

Concocting an Instruction Set

Concocting an Instruction Set

EE 109 Unit 8 MIPS Instruction Set

INSTRUCTION SET COMPARISONS

Introduction to the MIPS. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University

ECE 2035 Programming HW/SW Systems Fall problems, 6 pages Exam Two 23 October Your Name (please print clearly) Signed.

Lecture Topics. Branch Condition Options. Branch Conditions ECE 486/586. Computer Architecture. Lecture # 8. Instruction Set Principles.

ECE232: Hardware Organization and Design. Computer Organization - Previously covered

ECE 2035 Programming HW/SW Systems Spring problems, 6 pages Exam One 4 February Your Name (please print clearly)

Unsigned Binary Integers

Unsigned Binary Integers

CS654 Advanced Computer Architecture. Lec 1 - Introduction

Announcements HW1 is due on this Friday (Sept 12th) Appendix A is very helpful to HW1. Check out system calls

A General-Purpose Computer The von Neumann Model. Concocting an Instruction Set. Meaning of an Instruction. Anatomy of an Instruction

Mips Code Examples Peter Rounce

Programming the processor

Tailoring the 32-Bit ALU to MIPS

EE108B Lecture 3. MIPS Assembly Language II

CSE 141 Computer Architecture Spring Lecture 3 Instruction Set Architecute. Course Schedule. Announcements

MIPS Instruction Set

ECE 154A Introduction to. Fall 2012

Math 230 Assembly Programming (AKA Computer Organization) Spring 2008

Number Systems and Computer Arithmetic

CS 61c: Great Ideas in Computer Architecture

MIPS Instruction Reference

Lecture Topics. Announcements. Today: Integer Arithmetic (P&H ) Next: The MIPS ISA (P&H ) Consulting hours. Milestone #1 (due 1/26)

ECE 2035 Programming HW/SW Systems Spring problems, 6 pages Exam Two 11 March Your Name (please print) total

EC 413 Computer Organization

Computer Organization and Components

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

ECE 15B Computer Organization Spring 2010

Computer Organization and Components

ece4750-tinyrv-isa.txt

Assembly Language. Prof. Dr. Antônio Augusto Fröhlich. Sep 2006

Transcription:

CS352H: Computer Systems Architecture Lecture 4: Instruction Set Architectures III + MIPS ALU September 10, 2008 University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell

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 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 32 16 SE ALU 32 B 32 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 0 1 1 1 1 0 0 1 1 1 7 1 1 0 0 4 + 0 0 1 1 3 + 1 0 1 1 5 1 0 1 0 6 0 1 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 * T add 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