Floating Point Processor Condition Bit The MIPS Floating Point Accelerator (FPA) chip (now, usually part of the processor chip) has a condition bit that.

Slides:



Advertisements
Similar presentations
Intro to the “c6x” VLIW processor
Advertisements

1/1/ / faculty of Electrical Engineering eindhoven university of technology Speeding it up Part 3: Out-Of-Order and SuperScalar execution dr.ir. A.C. Verschueren.
Pipelining and Control Hazards Oct
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.
Lecture 16: Computer Arithmetic Today’s topic –Floating point numbers –IEEE 754 representations –FP arithmetic Reminder –HW 4 due Monday 1.
Microprocessors The MIPS Architecture (Floating Point Instruction Set) Mar 26th, 2002.
1 Lecture 9: Floating Point Today’s topics:  Division  IEEE 754 representations  FP arithmetic Reminder: assignment 4 will be posted later today.
1 Ó1998 Morgan Kaufmann Publishers Chapter 4 計算機算數.
CS61C L16 Floating Point II (1) Garcia, Fall 2006 © UCB Prof Smoot given Nobel!!  Prof George Smoot joins the ranks of the most distinguished faculty.
COMP381 by M. Hamdi 1 (Recap) Control Hazards. COMP381 by M. Hamdi 2 Control (Branch) Hazard A: beqz r2, label B: label: P: Problem: The outcome.
Arithmetic-Logic Units CPSC 321 Computer Architecture Andreas Klappenecker.
1 Lecture 10: FP, Performance Metrics Today’s topics:  IEEE 754 representations  FP arithmetic  Evaluating a system Reminder: assignment 4 due in a.
Measuring Performance
Systems Architecture Lecture 14: Floating Point Arithmetic
By: Zach Droege and Mitch Goetten.  Def.- A case that contains electronic components of the computer used to process data.  Available in variety of.
Emotion Engine A look at the microprocessor at the center of the PlayStation2 gaming console Charles Aldrich.
MIPS I/O and Interrupt. SPIM I/O and MIPS Interrupts The materials of this lecture can be found in A7-A8 (3 rd Edition) and B7-B8 (4 th Edition).
Ellen Spertus MCS 111 October 11, 2001 Floating Point Arithmetic.
COSC 2021: Computer Organization Instructor: Dr. Amir Asif Department of Computer Science York University Handout # 5 Unsigned integer and floating point.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /14/2013 Lecture 16: Floating Point Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE.
COMPUTER PROGRAMMING. Control Structures A program is usually not limited to a linear sequence of instructions. During its process it may repeat code.
MIPS I/O and Interrupt. .data val1:.float 0.6 val2:.float 0.8 msg_done:.asciiz "done\n".text.globl main main: li.s $f0, mfc1 $a0, $f0 jal calsqrt.
Lecture 9: Floating Point
In Class Execise. .data A:.word 0,1,2,3,4,5,6,7,8,9.text.globl main main: la $a0,A li $a1,6 li $a2,5 jal onUpStream done: li $v0, 10# exit syscall onUpStream:
R3000/001 Assembly Programming using MIPS R3000 CPU R3000 CPU Chip Manufactured by IDT What is MIPS R3000 Processor? A 32-bit RISC CPU developed by MIPS.
CHAPTER 3 Floating Point.
MIPS I/O and Interrupt.
CDA 3101 Fall 2013 Introduction to Computer Organization
1 Lecture 10: Floating Point, Digital Design Today’s topics:  FP arithmetic  Intro to Boolean functions.
MIPS mul div, and MIPS floating point instructions.
Rounding Modes 3 Rounding: the process to obtain the best possible floating-point representation for a given real value. ANSI/IEEE standard:
Exceptions and Interrputs CS 321 – Introduction to Computer Architecture and Machine-Level Programming Barry Britt, Systems Analyst II Department of Computer.
Pseudo instructions. MIPS supports pseudo instructions. We have seen some like – li $t0, 4 which set $t0 to 4. – la $t0, A which puts the address of label.
1 Announcements  CS 296 &32 Honors Project starts next week —sign up ASAP (CRN: 31265) — Chase Geigle to plan a meeting time.
Arithmetic-Logic Units. Logic Gates AND gate OR gate NOT gate.
Lecture 9. MIPS Processor Design – Pipelined Processor Design #1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System.
Home Assignment 5 Assigned. Deadline 2016 March 2, Wednesday.
10/7/2004Comp 120 Fall October 7 Read 5.1 through 5.3 Register! Questions? Chapter 4 – Floating Point.
MIPS ALU. Exercise – Design a selector? I need a circuit that takes two input bits, a and b, and a selector bit s. The function is that if s=0, f=a. if.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
Montek Singh Apr 8, 2016 Lecture 12
Computer Organization CS345 David Monismith Based upon notes by Dr. Bill Siever and notes from the Patternson and Hennessy Text.
Morgan Kaufmann Publishers Arithmetic for Computers
Computer Architecture & Operations I
MIPS I/O and Interrupt.
Loading a Single Byte There are two instructions that load a byte from a memory address. The instructions differ in how the 8-bit byte is put into the.
MIPS floating point instructions
Conditional Branches What distinguishes a computer from a simple calculator is its ability to make decisions Decisions are made using the if statement,
Pseudo instructions.
Floating Point Arithmetics
Chapter 6 Floating Point
MIPS I/O and Interrupt.
Assembly Programming using MIPS R3000 CPU
Instructions for Making Decisions
The University of Adelaide, School of Computer Science
MIPS I/O and Interrupt.
Week 6 The darkness, the loop of negative thoughts on repeat, clamours and interferes with the music I hear in my head. Lady Gaga.
SPIM Syscalls.
inst.eecs.berkeley.edu/~cs61c UC Berkeley CS61C : Machine Structures
Pseudo instructions.
Review.
October 17 Chapter 4 – Floating Point Read 5.1 through 5.3 1/16/2019
MIPS I/O and Interrupt.
Assembly Programming using MIPS R3000 CPU
Control Flow statements
Presentation transcript:

Floating Point Processor Condition Bit The MIPS Floating Point Accelerator (FPA) chip (now, usually part of the processor chip) has a condition bit that is set to 0 or 1 to indicate if a condition is false or true. Several FPA instructions affect this bit and several CPU instructions test this bit. Early MIPS floating point was done on a separate chip. Special instructions were used to bridge the gap between the two chips (such as the two move instructions mtc1 and mfc1 we have already seen). Although these days there is usually just one processor chip, some of the instructions act as if the chips were separate.

Floating Point Comparison Instructions InstructionOperation c.eq.s fs, ftset condition bit if $fs == $ft c.lt.s fs, ftset condition bit if $fs < $ft c.le.s fs, ftset condition bit if $fs <= $ft These instructions change the value in the condition bit, a part of the processor. The condition bit is set (made equal to one) if the condition is true. Otherwise the condition bit is cleared (made equal to zero).

Floating Point Comparison Instructions InstructionOperation c.eq.s fs, ftset condition bit if $fs == $ft c.lt.s fs, ftset condition bit if $fs < $ft c.le.s fs, ftset condition bit if $fs <= $ft Testing if two floating point numbers are exactly equal is sometimes NOT a good idea. Floating point calculations are not exact. Sometimes values are not equal even though mathematically they should be. It is best to use "less than" or "less than or equal" instead of testing for exact equality.

Branch Instructions and usage InstructionOperation bc1t label branch to label if the coprocessor 1 condition bit is true ( == 1 ) bc1f label branch to label if the coprocessor 1 condition bit is false ( == 0 ) There is a branch delay slot after branch instructions. l.s $f0,A l.s $f2,B c.lt.s $f0,$f2 # is A < B? bc1t printA # yes -- print A nop c.lt.s $f2,$f0 # is B < A? bc1t printB # yes -- print B nop