6/9/2015TUC-N dr. Emil CEBUC Math Coprocessor Also called Floating Point Unit FPU.

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

Fixed Point Numbers The binary integer arithmetic you are used to is known by the more general term of Fixed Point arithmetic. Fixed Point means that we.
CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (2)
Arithmetic & Logic Unit Does the calculations Everything else in the computer is there to service this unit Handles integers May handle floating point.
Computer ArchitectureFall 2007 © August 29, 2007 Karem Sakallah CS 447 – Computer Architecture.
Computer Architecture and Organization
The 80x87 Math Coprocessor.
Assembly Language for x86 Processors 6th Edition
Computer Organization and Architecture Computer Arithmetic Chapter 9.
Computer Arithmetic Nizamettin AYDIN
Computer Arithmetic. Instruction Formats Layout of bits in an instruction Includes opcode Includes (implicit or explicit) operand(s) Usually more than.
Computer Arithmetic.
CEN 316 Computer Organization and Design Computer Arithmetic Floating Point Dr. Mansour AL Zuair.
Machine Instruction Characteristics
Computer Architecture and Operating Systems CS 3230 :Assembly Section Lecture 10 Department of Computer Science and Software Engineering University of.
Computer Systems Organization CS 1428 Foundations of 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.
Oct. 18, 2007SYSC 2001* - Fall SYSC2001-Ch9.ppt1 See Stallings Chapter 9 Computer Arithmetic.
Floating Point Arithmetic
ECE 456 Computer Architecture
1 Number Systems Lecture 10 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
The 80x87 Math Coprocessor. Why we need a math coprocessor? Using a general-purpose microprocessor such as the 8088/86 to perform mathematical functions.
1 COMS 161 Introduction to Computing Title: Numeric Processing Date: November 08, 2004 Lecture Number: 30.
IEEE Arithmetic UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under the Creative.
Computer Arithmetic See Stallings Chapter 9 Sep 10, 2009
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
Data Representation: Floating Point for Real Numbers Computer Organization and Assembly Language: Module 11.
Microprocessors used in Personal Computers. The Memory Map of a Personal Computers Transient Program Area (TPA): Holds the operating system (interrupt.
What is a program? A sequence of steps
Real Numbers SignExponentMantissa.
10/7/2004Comp 120 Fall October 7 Read 5.1 through 5.3 Register! Questions? Chapter 4 – Floating Point.
Fixed-point and floating-point numbers Ellen Spertus MCS 111 October 4, 2001.
ECE291 Computer Engineering II Lecture 11 Dr. Zbigniew Kalbarczyk University of Illinois at Urbana- Champaign.
Chapter 9 Computer Arithmetic
FLOATING-POINT NUMBER REPRESENTATION
William Stallings Computer Organization and Architecture 8th Edition
Floating Points & IEEE 754.
Introduction to Numerical Analysis I
Presented by, C.Balasubramaniam, Lect / CSE ESEC
Integer Division.
CS/COE0447 Computer Organization & Assembly Language
William Stallings Computer Organization and Architecture 7th Edition
Chapter 6 Floating Point
MMX Multi Media eXtensions
Floating Point Representation
Subject Name: Microprocessors Subject Code:10EC46 Department: Electronics and Communication Date: /21/2018.
Using the 80x87 Math Chip in Assembly
ECEG-3202 Computer Architecture and Organization
FIGURE 9-1 Graph for Example of Conversion from Infix to RPN
Computer Architecture
Faculty of Cybernetics, Statistics and Economic Informatics –
October 17 Chapter 4 – Floating Point Read 5.1 through 5.3 1/16/2019
Chapter 8 Computer Arithmetic
Floating Point Numbers
COMS 161 Introduction to Computing
Computer Organization and Assembly Language
Computer Architecture and System Programming Laboratory
Presentation transcript:

6/9/2015TUC-N dr. Emil CEBUC Math Coprocessor Also called Floating Point Unit FPU

6/9/2015TUC-N dr. Emil CEBUC Outline Math Coprocessor Operation Math Coprocessor Structure Data Types Representation error Instructions

6/9/2015TUC-N dr. Emil CEBUC Math Coprocessor Operation Shares the same Data, Address and Control BUS as the main processor Two different chips for old processors On the same silicon die starting with 486DX Instructions preceded by an ESC sequence Operates in parallel with main processor Coprocessor may overtake BUS for longer periods if more data is needed

6/9/2015TUC-N dr. Emil CEBUC Math Coprocessor Operation Coprocessor has no access to registers But can use registers for addressing All addressing modes are available except immediate addressing Uses special synchronization signals to cooperate Instructions take tens to hundreds of cycles to complete

6/9/2015TUC-N dr. Emil CEBUC Math Coprocessor Structure Register Stack Control Register Status Register Tag Register Instruction Pointer Data Pointer Execution Unit EU Control Register STACK 8x80 bit registers Execution Unit

6/9/2015TUC-N dr. Emil CEBUC FPU Register Stack

6/9/2015TUC-N dr. Emil CEBUC FPU Control Register

6/9/2015TUC-N dr. Emil CEBUC FPU Status Register

6/9/2015TUC-N dr. Emil CEBUC Meaning of C 3 C 2 C 1 C 0 bits after compare instructions No Conditional Jumps to test FPU compare results Must copy Status Register in to Main Proc registers and examine with x86 instructions

6/9/2015TUC-N dr. Emil CEBUC FPU Tag Register TAG7TAG6TAG5TAG4TAG3TAG2TAG1TAG0 TAG Valuesmeaning 00Valid 01Zero 10Special, NAN,∞ 11Empty

6/9/2015TUC-N dr. Emil CEBUC FPU Pointers Instruction Pointer a pointer to the instruction that caused an exception Data Pointer a pointer to the data used by the instruction that caused an exception

6/9/2015TUC-N dr. Emil CEBUC Number Representation Integer numbers in C 2 Integer numbers in Packed Decimal Real Numbers in IEEE 754/854 standard format All these representations are ONLY in memory Internally ALL numbers are represented on 80 bits as temporary real’s

6/9/2015TUC-N dr. Emil CEBUC Integer Data Types Word Integer DW 16 bit C 2 representation Short Integer DD 32 bit C 2 representation Long Integer DQ 64 bit C 2 representation Packed Decimal DT 80 bit Value & Sign

6/9/2015TUC-N dr. Emil CEBUC Real Number Representation Normalized Form (-1) S * 1.mantissa *2 (exponent- Bias) Bias = 07FH for short real;127d Bias = 03FFH for long real;1023d Bias = 03FFFh for temp real; 16383d

6/9/2015TUC-N dr. Emil CEBUC Short Real 32 bits Double Word DD

6/9/2015TUC-N dr. Emil CEBUC Long Real 64 bits Quad Word DQ

6/9/2015TUC-N dr. Emil CEBUC Temporary Real 80 bits Ten word DT

6/9/2015TUC-N dr. Emil CEBUC Example of real number representation fl1dd F Fl2dd fl1_3 dd -1.3; actually -1, BFA

6/9/2015TUC-N dr. Emil CEBUC Representation error Unavoidable May be very small Must take account when designing numerical algorithm for complex computation Can be controlled with rounding policy from Control Word

6/9/2015TUC-N dr. Emil CEBUC FPU Instructions Data movement Data conversions Arithmetic Instructions Compare Instructions Constant Instructions Transcendental Instructions Miscellaneous Instructions