Microprocessors The MIPS Architecture (Floating Point Instruction Set) Mar 26th, 2002.

Slides:



Advertisements
Similar presentations
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 2: Data types and addressing modes dr.ir. A.C. Verschueren.
Advertisements

Spring 2013 Advising Starts this week! CS2710 Computer Organization1.
Comp Sci Floating Point Arithmetic 1 Ch. 10 Floating Point Unit.
Computer Organization CS224 Fall 2012 Lesson 19. Floating-Point Example  What number is represented by the single-precision float …00 
05/03/2009CA&O Lecture 8,9,10 By Engr. Umbreen sabir1 Computer Arithmetic Computer Engineering Department.
Arithmetic in Computers Chapter 4 Arithmetic in Computers2 Outline Data representation integers Unsigned integers Signed integers Floating-points.
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
Lecture 16: Computer Arithmetic Today’s topic –Floating point numbers –IEEE 754 representations –FP arithmetic Reminder –HW 4 due Monday 1.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 3:
Floating Point Numbers
1 Lecture 9: Floating Point Today’s topics:  Division  IEEE 754 representations  FP arithmetic Reminder: assignment 4 will be posted later today.
Chapter 3 Arithmetic for Computers. Multiplication More complicated than addition accomplished via shifting and addition More time and more area Let's.
1 Ó1998 Morgan Kaufmann Publishers Chapter 4 計算機算數.
Microprocessors Introduction to RISC Mar 19th, 2002.
Lecture 22 Review of floating point representation from last time The IEEE floating point standard (notes) Quit early because half class still not back.
CS61C L16 Floating Point II (1)Mowery, Spring 2008 © UCB TA Oddinaire Keaton Mowery inst.eecs.berkeley.edu/~cs61c UC Berkeley.
Pentium Addressing Modes
Floating Point Numbers
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Hao Ji.
CPSC 321 Computer Architecture ALU Design – Integer Addition, Multiplication & Division Copyright 2002 David H. Albonesi and the University of Rochester.
Systems Architecture Lecture 14: Floating Point Arithmetic
1/8/ L24 IEEE Floating Point Basics Copyright Joanne DeGroat, ECE, OSU1 IEEE Floating Point The IEEE Floating Point Standard and execution.
QuadCore Team – DLX ISA David Bild Greg Bok Jake Czyz Brandon Keao.
Computer Organization and Architecture Computer Arithmetic Chapter 9.
Computer Arithmetic. Instruction Formats Layout of bits in an instruction Includes opcode Includes (implicit or explicit) operand(s) Usually more than.
CEN 316 Computer Organization and Design Computer Arithmetic Floating Point Dr. Mansour AL Zuair.
Fixed-Point Arithmetics: Part II
Computer Architecture ALU Design : Division and Floating Point
Computing Systems Basic arithmetic for computers.
ECE232: Hardware Organization and Design
1/8/ L24 IEEE Floating Point Basics Copyright Joanne DeGroat, ECE, OSU1 IEEE Floating Point The IEEE Floating Point Standard and execution.
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 10 Department of Computer Science and Software Engineering University of.
Data Representation in Computer Systems
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /14/2013 Lecture 16: Floating Point Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE.
CH09 Computer Arithmetic  CPU combines of ALU and Control Unit, this chapter discusses ALU The Arithmetic and Logic Unit (ALU) Number Systems Integer.
Floating Point Arithmetic
Lecture 9: Floating Point
CSC 221 Computer Organization and Assembly Language
Floating Point Representation for non-integral numbers – Including very small and very large numbers Like scientific notation – –2.34 × –
1 Number Systems Lecture 10 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
Computer Arithmetic Floating Point. We need a way to represent –numbers with fractions, e.g., –very small numbers, e.g., –very large.
CHAPTER 3 Floating Point.
CDA 3101 Fall 2013 Introduction to Computer Organization
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
Chapter 3 Arithmetic for Computers. Chapter 3 — Arithmetic for Computers — 2 Arithmetic for Computers Operations on integers Addition and subtraction.
Floating Point Numbers Representation, Operations, and Accuracy CS223 Digital Design.
Rounding Modes 3 Rounding: the process to obtain the best possible floating-point representation for a given real value. ANSI/IEEE standard:
Floating Point Processor Condition Bit The MIPS Floating Point Accelerator (FPA) chip (now, usually part of the processor chip) has a condition bit that.
10/7/2004Comp 120 Fall October 7 Read 5.1 through 5.3 Register! Questions? Chapter 4 – Floating Point.
King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals Computer Engineering Department Computer Engineering Department.
o History of Floating Point o Defining Floating Point Arithmetic o Floating Point Representation o Floating Point Format o Floating Point Precisions o.
Floating Points & IEEE 754.
Computer Architecture & Operations I
Floating Point Arithmetics
Chapter 6 Floating Point
Arithmetic for Computers
Lecture 10: Floating Point, Digital Design
CSCE 350 Computer Architecture
inst.eecs.berkeley.edu/~cs61c UC Berkeley CS61C : Machine Structures
EE 445S Real-Time Digital Signal Processing Lab Spring 2014
Computer Arithmetic Multiplication, Floating Point
October 17 Chapter 4 – Floating Point Read 5.1 through 5.3 1/16/2019
Morgan Kaufmann Publishers Arithmetic for Computers
Computer Organization and Assembly Language
Presentation transcript:

Microprocessors The MIPS Architecture (Floating Point Instruction Set) Mar 26th, 2002

The Notion of Coprocessor A coprocessor is a separate processor that is intimately connected to the main processor and performs separate functions A coprocessor is a separate processor that is intimately connected to the main processor and performs separate functions Originally was a real separate chip Originally was a real separate chip FPT coprocessor on MIPS FPT coprocessor on MIPS 8087 coprocessor (fpt) on original PC 8087 coprocessor (fpt) on original PC Now is usually on the same chip Now is usually on the same chip True of both the 80x86, Pentium and MIPS True of both the 80x86, Pentium and MIPS

Coprocessing on MIPS The original idea was a general one The original idea was a general one Up to three coprocessors Up to three coprocessors Specialized functions Specialized functions Well defined interface to processor Well defined interface to processor

Coprocessor Instruction Set Load word to coprocessor Load word to coprocessor Store word from coprocessor Store word from coprocessor Move to coprocessor Move to coprocessor Move from coprocessor Move from coprocessor Move control to coprocessor Move control to coprocessor Move control from coprocessor Move control from coprocessor Coprocessor operation Coprocessor operation Branch on coprocessor true Branch on coprocessor true Branch on coprocessor false Branch on coprocessor false

Coprocessors on the MIPS There are only two of them There are only two of them System coprocessor System coprocessor Specialized coprocessor instructions Specialized coprocessor instructions Floating-point coprocessor Floating-point coprocessor Floating-point instructions Floating-point instructions

Floating-Point Formats Two formats Two formats 32-bit 32-bit 64-bit 64-bit Both these are IEEE formats Both these are IEEE formats Referring to the IEEE-754 standard Referring to the IEEE-754 standard We will deal with details of these formats and the operations required by this standard later. We will deal with details of these formats and the operations required by this standard later.

Basic FPT Operations Load and/store from/to the FPA registers Load and/store from/to the FPA registers Moves between FPA and CPU registers Moves between FPA and CPU registers Computational operations Computational operations Add, subtract, multiply, divide Add, subtract, multiply, divide Convert to/from integer Convert to/from integer Floating-point comparisons Floating-point comparisons

FP Register Set 32 x 32-bit registers, FPR0-FPR31 32 x 32-bit registers, FPR0-FPR31 Each register can hold 32-bit fpt value Each register can hold 32-bit fpt value Or two adjacent registers can hold 64-bit value (pair must be even/odd, e.g. FPR4/5) Or two adjacent registers can hold 64-bit value (pair must be even/odd, e.g. FPR4/5) Control/Status register Control/Status register Implementation/Revision register Implementation/Revision register

Control/Status Register Condition bit from compare instructions Condition bit from compare instructions Exception indication bits Exception indication bits Trap enable bits Trap enable bits Sticky exception bits Sticky exception bits Rounding mode Rounding mode

Rounding Modes Round to nearest even Round to nearest even This is the normal default mode This is the normal default mode Round/truncate towards zero Round/truncate towards zero Round down towards minus infinity Round down towards minus infinity Round up towards plus infinity Round up towards plus infinity Last two can be used for interval arithmetic Last two can be used for interval arithmetic

Unbiased Rounding Round to nearest exact number Round to nearest exact number For 0.5 case, round so that result is even For 0.5 case, round so that result is even Example for integers Example for integers 2.5 rounds to rounds to rounds to rounds to 4 This avoids bias in rounding This avoids bias in rounding

Traps If traps are enabled If traps are enabled Overflow causes a system trap Overflow causes a system trap If traps are not enabled If traps are not enabled Generate infinities Generate infinities Infinities have “normal” arithmetic Infinities have “normal” arithmetic (+infinity) + (+infinity)  (+infinity) (+infinity) + (+infinity)  (+infinity) (+infinity) + (-infinity)  (not-a-number) (+infinity) + (-infinity)  (not-a-number) 1.0 / (-0.0)  (-infinity) 1.0 / (-0.0)  (-infinity)

FPT Load/Store Load/Store from memory Load/Store from memory Single precision Single precision Double precision requires two loads/stores Double precision requires two loads/stores Control word Control word Revision control register (load only) Revision control register (load only) Register moves Register moves To/from CPU registers and FP registers To/from CPU registers and FP registers To/from CPU registers and FP control reg To/from CPU registers and FP control reg

FPT Computational Instructions Floating add/subtract/multiply/divide Floating add/subtract/multiply/divide Absolute value Absolute value Register move (between fpt regs) Register move (between fpt regs) Negate Negate Convert single to double and vice versa Convert single to double and vice versa Convert to integer format Convert to integer format

FPT Comparison Instructions Compare Compare Compares 2 single or double fpt values Compares 2 single or double fpt values Possible tests are all combinations Possible tests are all combinations Normal comparisons Normal comparisons Unordered/ordered comparisons Unordered/ordered comparisons In unordered/ordered comparisons, all comparisons with NaN are false. In unordered/ordered comparisons, all comparisons with NaN are false. For example, unordered or less than or equal For example, unordered or less than or equal If either operand is NaN result is False If either operand is NaN result is False Otherwise result is normal LE Otherwise result is normal LE