Our ultimate goal: building the datapath

Slides:



Advertisements
Similar presentations
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /15/2013 Lecture 11: MIPS-Conditional Instructions Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.
Advertisements

CIS 314 Fall 2005 MIPS Datapath (Single Cycle and Multi-Cycle)
1 CONSTRUCTING AN ARITHMETIC LOGIC UNIT CHAPTER 4: PART II.
CML CML CS 230: Computer Organization and Assembly Language Aviral Shrivastava Department of Computer Science and Engineering School of Computing and Informatics.
Arithmetic CPSC 321 Computer Architecture Andreas Klappenecker.
Arithmetic II CPSC 321 E. J. Kim. Today’s Menu Arithmetic-Logic Units Logic Design Revisited Faster Addition Multiplication (if time permits)
Computer Structure - The ALU Goal: Build an ALU  The Arithmetic Logic Unit or ALU is the device that performs arithmetic and logical operations in the.
Arithmetic II CPSC 321 Andreas Klappenecker. Any Questions?
Chap 3.3~3.5 Construction an Arithmetic Logic Unit (ALU) Jen-Chang Liu, Spring 2006.
1 Chapter 4: Arithmetic Where we've been: –Performance (seconds, cycles, instructions) –Abstractions: Instruction Set Architecture Assembly Language and.
Arithmetic-Logic Units CPSC 321 Computer Architecture Andreas Klappenecker.
Arithmetic III CPSC 321 Andreas Klappenecker. Any Questions?
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.
1 Bits are just bits (no inherent meaning) — conventions define relationship between bits and numbers Binary numbers (base 2)
1 EGRE 426 Fall 08 Chapter Three. 2 Arithmetic What's up ahead: –Implementing the Architecture 32 operation result a b ALU.
1  1998 Morgan Kaufmann Publishers Arithmetic Where we've been: –Performance (seconds, cycles, instructions) –Abstractions: Instruction Set Architecture.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /19/2013 Lecture 7: 32-bit ALU, Fast Carry Lookahead Instructor: Ashraf Yaseen DEPARTMENT OF MATH &
Computing Systems Designing a basic ALU.
1 Lecture 6 BOOLEAN ALGEBRA and GATES Building a 32 bit processor PH 3: B.1-B.5.
CDA 3101 Fall 2013 Introduction to Computer Organization The Arithmetic Logic Unit (ALU) and MIPS ALU Support 20 September 2013.
Ch3b- 2 EE/CS/CPE Computer Organization  Seattle Pacific University There is logic to it andRd, Rs, RtRd
Computer Architecture CSE 3322 Lecture 3 Assignment: 2.4.1, 2.4.4, 2.6.1, , Due 2/3/09 Read 2.8.
MIPS ALU. Building from the adder to ALU ALU – Arithmetic Logic Unit, does the major calculations in the computer, including – Add – And – Or – Sub –
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.
1  2004 Morgan Kaufmann Publishers Lets Build a Processor Almost ready to move into chapter 5 and start building a processor First, let’s review Boolean.
Branch Addressing op rs rt address address beq $s1, $s2, Label if ($s1 = =$s2) go to Label 6 bits 5 bits 5 bits 16 bits effective 32 bit address.
1  1998 Morgan Kaufmann Publishers Simple Implementation Include the functional units we need for each instruction Why do we need this stuff?
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO Session 11 Conditional Operations.
1 Arithmetic Where we've been: –Abstractions: Instruction Set Architecture Assembly Language and Machine Language What's up ahead: –Implementing the Architecture.
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.
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.
9/23/2004Comp 120 Fall September Chapter 4 – Arithmetic and its implementation Assignments 5,6 and 7 posted to the class web page.
MIPS Processor.
1 CPTR 220 Computer Organization Computer Architecture Assembly Programming.
(a)add Rd, Rs, RtReg[Rd]=Reg[Rs]+Reg[Rt] (b) lw Rt, offs(Rs)Reg[Rt]=MEM[Reg[Rs]+offs] Instruction (a), all blocks except data memory are used for this.
Access the Instruction from Memory
EE204 Computer Architecture
MIPS Microarchitecture Single-Cycle Processor Control
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
Computer Arthmetic Chapter Four P&H.
CDA 3101 Spring 2016 Introduction to Computer Organization
MIPS ALU.
The University of Adelaide, School of Computer Science
Test 1 Review Lectures 1-5.
Arithmetic Where we've been:
MIPS ALU.
Computer Architecture
MIPS Processor.
Datapath & Control MIPS
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
COMS 361 Computer Organization
A 1-Bit Arithmetic Logic Unit
Basic Building Blocks Multiplexer Demultiplexer Adder +
Simple Implementation
Access the Instruction from Memory
COMP541 Datapaths I Montek Singh Mar 18, 2010.
October 8 Rules for Programming Assignments ASK QUESTIONS!
Basic MIPS Implementation
Review Fig 4.15 page 320 / Fig page 322
Basic Building Blocks Multiplexer Demultiplexer Adder +
Data Path Diagrams.
The Processor: Datapath & Control.
MIPS ALU.
MIPS ALU.
MIPS Processor.
Presentation transcript:

Our ultimate goal: building the datapath

Arithmetic Logic Unit (ALU) ALU operation: 000 = and 001 = or 010 = add 110 = subtract 111 = slt

What about subtraction (a – b) ? Two's complement approach: just negate b and add. How do we negate? The solution:

Tailoring the ALU to the MIPS datapath Need to support the set-on-less-than instruction slt rd, rs, rt slt is an arithmetic instruction produces a 1 if rs < rt and 0 otherwise use subtraction: (a-b) < 0 implies a < b Need to support test for equality (beq $t5, $t6, label) use subtraction: (a-b) = 0 implies a = b

Supporting slt

Test for equality and complete ALU ALU operation: 000 = and 001 = or 010 = add 110 = subtract 111 = slt Control lines Bnegate Operation Insturction 0 00 and 0 01 or 0 10 add 1 10 sub 1 11 slt Note: zero is a 1 when the result is zero!