B1000 ALU ENGR xD52 Eric VanWyk Fall 2012. Today Review Timing with Adders Construct Adder/Subtractor Construct ALU.

Slides:



Advertisements
Similar presentations
Part 4: combinational devices
Advertisements

Kuliah Rangkaian Digital Kuliah 7: Unit Aritmatika
ECE2030 Introduction to Computer Engineering Lecture 13: Building Blocks for Combinational Logic (4) Shifters, Multipliers Prof. Hsien-Hsin Sean Lee School.
1 Lecture 12: Hardware for Arithmetic Today’s topics:  Designing an ALU  Carry-lookahead adder Reminder: Assignment 5 will be posted in a couple of days.
L10 – Transistors Logic Math 1 Comp 411 – Spring /22/07 Arithmetic Circuits Didn’t I learn how to do addition in the second grade?
Datorteknik ArithmeticCircuits bild 1 Computer arithmetic Somet things you should know about digital arithmetic: Principles Architecture Design.
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University Arithmetic See: P&H Chapter 3.1-3, C.5-6.
Arithmetic II CPSC 321 E. J. Kim. Today’s Menu Arithmetic-Logic Units Logic Design Revisited Faster Addition Multiplication (if time permits)
Fall 2005 L15: Combinational Circuits Lecture 15: Combinational Circuits Complete logic functions Some combinational logic functions –Half adders –Adders.
1 Lecture 4: Arithmetic for Computers (Part 3) CS 447 Jason Bakos.
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.
IMPLEMENTATION OF µ - PROCESSOR DATA PATH
ECE C03 Lecture 61 Lecture 6 Arithmetic Logic Circuits Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Lecture 8 Arithmetic Logic Circuits
Arithmetic-Logic Units CPSC 321 Computer Architecture Andreas Klappenecker.
Chapter 5 Arithmetic Logic Functions. Page 2 This Chapter..  We will be looking at multi-valued arithmetic and logic functions  Bitwise AND, OR, EXOR,
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
L23 – Arithmetic Logic Units. Arithmetic Logic Units (ALU)  Modern ALU design  ALU is heart of datapath  Ref: text Unit 15 9/2/2012 – ECE 3561 Lect.
Adders, subtractors, ALUs
Binary Numbers.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Using building blocks to make bigger circuits
Computer Organization & Programming Chapter4 Combinatorial Components.
The Digital Logic Level
Chapter 6-1 ALU, Adder and Subtractor
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
ECE 3110: Introduction to Digital Systems Chapter 6 Combinational Logic Design Practices Adders, subtractors, ALUs.
Advanced VLSI Design Unit 05: Datapath Units. Slide 2 Outline  Adders  Comparators  Shifters  Multi-input Adders  Multipliers.
1/8/ L3 Data Path DesignCopyright Joanne DeGroat, ECE, OSU1 ALUs and Data Paths Subtitle: How to design the data path of a processor.
Computing Systems Designing a basic ALU.
ECE 3110: Introduction to Digital Systems Chapter 5 Combinational Logic Design Practices X-OR gates and Parity circuits Comparators Adders, subtractors,
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
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.
Lecture 18: Hardware for Arithmetic Today’s topic –Intro to Boolean functions (Continued) –Designing an ALU 1.
Half Adder & Full Adder Patrick Marshall. Intro Adding binary digits Half adder Full adder Parallel adder (ripple carry) Arithmetic overflow.
1 Lecture 12 Time/space trade offs Adders. 2 Time vs. speed: Linear chain 8-input OR function with 2-input gates Gates: 7 Max delay: 7.
BR 8/991 Combinational Building Blocks 2/1 Multiplexor (MUX) I0 I1 Y S if S = 0, then Y = I0 if S = 1, then Y = I1 Y = I0 S’ + I1 S I0 I1 Y S A[3:0] B[3:0]
Computer Science 101 More Devices: Arithmetic. From 1-Bit Equality to N-Bit Equality = A B A = B Two bit strings.
Cpu control.1 2/14 Datapath Components for Lab The Processor! ( th ed)
Gates AND, OR, NOT NAND, NOR Combinational logic No memory A set of inputs uniquely and unambiguously specifies.
1 Lecture 11: Hardware for Arithmetic Today’s topics:  Logic for common operations  Designing an ALU  Carry-lookahead adder.
Lecture #23: Arithmetic Circuits-1 Arithmetic Circuits (Part I) Randy H. Katz University of California, Berkeley Fall 2005.
ECE 3110: Introduction to Digital Systems Chapter 5 Combinational Logic Design Practices Adders,subtractors, ALUs.
Discrete Systems I Lecture 10 Adder and ALU Profs. Koike and Yukita.
1 The ALU l ALU includes combinational logic. –Combinational logic  a change in inputs directly causes a change in output, after a characteristic delay.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
B0110 Fabric and Trust ENGR xD52 Eric VanWyk Fall 2013.
B0111 ALU ENGR xD52 Eric VanWyk Fall Today Review Timing with Adders Construct Adder/Subtractor Compare Growth Characteristics Construct ALU.
B0110 ALU ENGR xD52 Eric VanWyk Fall Today Back to Gates! Review Timing with Adders Compare Growth Characteristics Construct Adder/Subtractor Construct.
PICo Arithmetic and Logic Unit The Need for Speed (with minimal area and power)
Computer Arthmetic Chapter Four P&H.
Combinational Circuits
ECE 3130 Digital Electronics and Design
Somet things you should know about digital arithmetic:
Subtitle: How to design the data path of a processor.
Lecture 11: Hardware for Arithmetic
Swamynathan.S.M AP/ECE/SNSCT
Homework Reading Machine Projects Labs
Summary Half-Adder Basic rules of binary addition are performed by a half adder, which has two binary inputs (A and B) and two binary outputs (Carry out.
ECE/CS 552: Arithmetic and Logic
CSE Winter 2001 – Arithmetic Unit - 1
Lecture 11: Hardware for Arithmetic
By: A. H. Abdul Hafez CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU
Homework Reading Machine Projects Labs
COMS 361 Computer Organization
Instructor: Mozafar Bag-Mohammadi University of Ilam
Logic Circuits I Lecture 3.
Combinational Circuits
Instruction execution and ALU
Presentation transcript:

b1000 ALU ENGR xD52 Eric VanWyk Fall 2012

Today Review Timing with Adders Construct Adder/Subtractor Construct ALU

3 Full Adder A B CI CO S ABCin Sum Cout Calculate Propogation Delays Multiple Paths? Choose Worst Discrete Math!!

4 Full Adder A B CI CO S ABCin Sum663 Cout552 Calculate Propogation Delays Multiple Paths? Choose Worst Discrete Math!!

Multi-Bit Addition ABCin Sum663 Cout552 AB0AB1AB2 S0 C1 S1 C2 S2 C3 Using previous slides’ design, find worst prop delay

Multi-Bit Addition ABCin Sum663 Cout552 AB0AB1AB2 S06-- C15-- S C S C Using previous slides’ design, find worst prop delay

Full Adder as a LUT in Gates ABCin Sum Cout A B Cin Only half, slide too small to show Sum Area Cost? Speed?

Full Adder as a LUT in Gates ABCin Sum333 Cout333 A B Cin Only half, slide too small to show Sum Area Cost? Speed?

Timing with Alternate Topology ABCin Sum333 Cout333 AB0AB1AB2 S0 C1 S1 C2 S2 C3 Using new prop delays, find total delay

Timing with Alternate Topology ABCin Sum333 Cout333 AB0AB1AB2 S03-- C13-- S C S C Using new prop delays, find total delay

As a GIANT LUT? How do we construct 3-bit addition as one unified LUT? – Width? – Depth?

As a GIANT LUT? How do we construct 3-bit addition as one unified LUT? – Width? 4 (3 Sum Bits, 1 final carry out bit) – Depth? 2^(3+3) = 64 Index into table = {b2,b1,b0,a2,a1,a0} – Rows in table = {b2,b1,b0}+{a2,a1,a0} – Example: M= stores = 0011

As a GIANT LUT! How expensive is a Depth by Width LUT? – 2^M = Depth Decoder (M->D) – M inverters – D M-input AND gates – 2 Units of Delay – M+MD space Decoder -> Bussed Mux – D*W 2 input AND gates – W D-input OR gates – 2 Units of Delay – 3DW Space Bussed Mux -> LUT – Tie inputs to Constants – Free! Total: – 4 Units Delay – M+MD+3DW Space – 2N+(5N+3)(2^2N) Space

Adder/Subtractor A - B = A + (-B) = A + B + 1 AB CO S +CI AB CO S +CI AB CO S +CI AB CO S +CI A 3 B 3 A 2 B 2 A 1 B 1 A 0 B 0 S 3 S 2 S 1 S 0 Subtract Add Control Line for Subtraction

ALU: Arithmetic Logic Unit Computes arithmetic & logic functions based on controls – Add, subtract – AND, NAND, OR, NOR, XOR, ==, <, overflow, … AB R Function Select Controls Zero Negative Overflow

Bit Slice ALU Design 00: OR 10: Add 01: AND 11: Subtract 4:1 Mux S1 S0 AiAi BiBi ALU Output Bus

Bit Slice ALU Design (cont.) Route Carries Overflow, zero, negative 1-bit Slice 1-bit Slice 1-bit Slice 1-bit Slice ALU 3 ALU 2 ALU 1 ALU 0 ALU[3:0]

SLT Set less than: if (A<B) then R = 1, else R = 0 – How do we know if (A<B) – Interaction w/overflow? At your Desk: – Try 2 random examples – Try 2 corner cases – Do they all work?

Shifter Support shift operations: (A << 01101) Optional shift by one: (A << b 0 ) Optional shift by two: (A << b 1 )

More Shiftings Chain optional power-of-two shifts – Sometimes called a logarithmic shifter (gross) Requires log R (N) layers – N=32, R=2

Boardel Shifter Type(s) of Shift: – Logical? Arithmetic? Rotate? Size of Shift: – 1 only? All N? Placement of Shift: – As a separate instruction? As an instruction “add-on”? Size vs Speed? – Radix? Start with a “Shift arithmetic left 1 as separate instruction”

ALU Construction Summary Brute force approach is full parallel with muxes as wide as the number of operations Re-use resources for space efficiency – Slower, Smaller, Narrower Make a SMALL ALU bit slice that does: – AND, OR, NAND, NOR, XOR, Add, Subtract