Datapath Functional Units Adapted from David Harris of Harvey Mudd College.

Slides:



Advertisements
Similar presentations
Multiplication and Shift Circuits Dec 2012 Shmuel Wimer Bar Ilan University, Engineering Faculty Technion, EE Faculty 1.
Advertisements

ECE2030 Introduction to Computer Engineering Lecture 13: Building Blocks for Combinational Logic (4) Shifters, Multipliers Prof. Hsien-Hsin Sean Lee School.
Datapath Functional Units. Outline  Comparators  Shifters  Multi-input Adders  Multipliers.
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University Arithmetic See: P&H Chapter 3.1-3, C.5-6.
Parallel Adder Recap To add two n-bit numbers together, n full-adders should be cascaded. Each full-adder represents a column in the long addition. The.
Design and Implementation of VLSI Systems (EN1600) Lecture 27: Datapath Subsystems 3/4 Prof. Sherief Reda Division of Engineering, Brown University Spring.
1 CS 140 Lecture 14 Standard Combinational Modules Professor CK Cheng CSE Dept. UC San Diego Some slides from Harris and Harris.
S. Reda EN160 SP’07 Design and Implementation of VLSI Systems (EN0160) Lecture 29: Datapath Subsystems 3/3 Prof. Sherief Reda Division of Engineering,
EECS Components and Design Techniques for Digital Systems Lec 18 – Arithmetic II (Multiplication) David Culler Electrical Engineering and Computer.
Fixed-Point Arithmetics: Part I
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.
Combinatorial Logic Design Process. Example: Three 1s pattern detector Detect whether a pattern of at least three adjacent 1s occurs anywhere in an 8-bit.
Combinational Comparators
EE466: VLSI Design Lecture 14: Datapath Functional Units.
1 EE365 Three-state Outputs Encoders Multiplexers XOR gates.
Overview Iterative combinational circuits Binary adders
Introduction to CMOS VLSI Design Datapath Functional Units
ECE 301 – Digital Electronics
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
+ CS 325: CS Hardware and Software Organization and Architecture Exam 1: Study Guide.
CS 105 Digital Logic Design
Lecture 18: Datapath Functional Units
ECE 4110– Sequential Logic Design
Aug Shift Operations Source: David Harris. Aug Shifter Implementation Regular layout, can be compact, use transmission gates to avoid threshold.
Chapter 6-2 Multiplier Multiplier Next Lecture Divider
Programmable Logic Architecture Verilog HDL FPGA Design Jason Tseng Week 5.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Chapter 4 – Arithmetic Functions and HDLs Logic and Computer Design Fundamentals.
Computer Organization & Programming Chapter4 Combinatorial Components.
Introduction to Computer Organization and Architecture Lecture 10 By Juthawut Chantharamalee wut_cha/home.htm.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Arithmetic Building Blocks
Spring 2002EECS150 - Lec12-cl3 Page 1 EECS150 - Digital Design Lecture 12 - Combinational Logic Circuits Part 3 March 4, 2002 John Wawrzynek.
55:035 Computer Architecture and Organization Lecture 5.
Advanced VLSI Design Unit 05: Datapath Units. Slide 2 Outline  Adders  Comparators  Shifters  Multi-input Adders  Multipliers.
EECS Components and Design Techniques for Digital Systems Lec 16 – Arithmetic II (Multiplication) David Culler Electrical Engineering and Computer.
1 Using 2-opr adder Carry-save adder Wallace Tree Dadda Tree Parallel Counters Multi-Operand Addition.
1 EE121 John Wakerly Lecture #6 Three-state Outputs Encoders Multiplexers XOR gates.
1 Tutorial: ITI1100 Dewan Tanvir Ahmed SITE, UofO.
FPGA-Based System Design: Chapter 4 Copyright  2003 Prentice Hall PTR Topics n Number representation. n Shifters. n Adders and ALUs.
Lecture 4 Chap 5 Types Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
1 Arithmetic and Logic Operations Patt and Patel Ch. 2 & 3.
1 Arithmetic I Instructor: Mozafar Bag-Mohammadi Ilam University.
Combinational Circuits
Digital Logic Design (CSNB163)
CSE 140 Lecture 12 Combinational Standard Modules CK Cheng CSE Dept. UC San Diego 1.
CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits
1 ECE 545—Digital System Design with VHDL Lecture 1 Digital Logic Refresher Part A – Combinational Logic Building Blocks.
Lecture # 10 University of Tehran
ECE/CS 552: Arithmetic I Instructor:Mikko H Lipasti Fall 2010 University of Wisconsin-Madison Lecture notes partially based on set created by Mark Hill.
Computer Organization and Design Arithmetic & Logic Circuits Montek Singh Nov 2, 2015 Lecture 11.
Integer Multiplication and Division COE 301 Computer Organization Dr. Muhamed Mudawar College of Computer Sciences and Engineering King Fahd University.
CSE 140 Lecture 12 Combinational Standard Modules CK Cheng CSE Dept. UC San Diego 1.
Integer Multiplication and Division ICS 233 Computer Architecture & Assembly Language Prof. Muhamed Mudawar College of Computer Sciences and Engineering.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
Lecture 18: Datapath Functional Units
Introduction to VLSI Design Datapath
B0110 ALU ENGR xD52 Eric VanWyk Fall Today Back to Gates! Review Timing with Adders Compare Growth Characteristics Construct Adder/Subtractor Construct.
Lecture 18: Datapath Functional Units. CMOS VLSI DesignCMOS VLSI Design 4th Ed. 18: Datapath Functional Units2 Outline  Multipliers.
Combinational Circuits
Chapter 4 Register Transfer and Microoperations
Homework Reading Machine Projects Labs
ALU Design: Shifter Details
ECE/CS 552: Arithmetic and Logic
CS 140 Lecture 14 Standard Combinational Modules
Homework Reading Machine Projects Labs
CSE 140 Lecture 14 Standard Combinational Modules
Instructor: Mozafar Bag-Mohammadi University of Ilam
Combinational Circuits
Introduction to VLSI Design Datapath
Presentation transcript:

Datapath Functional Units Adapted from David Harris of Harvey Mudd College

2 Outline  Comparators  Shifters  Multi-input Adders  Multipliers

3 Comparators  0’s detector:A = 00…000  1’s detector: A = 11…111  Equality comparator:A = B  Magnitude comparator:A < B

4 1’s & 0’s Detectors  1’s detector: N-input AND gate  0’s detector: NOTs + 1’s detector (N-input NOR)

5 Equality Comparator  Check if each bit is equal (XNOR, aka equality gate)  1’s detect on bitwise equality

6 Magnitude Comparator  Compute B-A and look at sign  B-A = B + ~A + 1  For unsigned numbers, carry out is sign bit

7 Signed vs. Unsigned  For signed numbers, comparison is harder –C: carry out –Z: zero (all bits of A-B are 0) –N: negative (MSB of result) –V: overflow (inputs had different signs, output sign  B)

8 Shifters  Logical Shift: –Shifts number left or right and fills with 0’s 1011 LSR 1 = ____1011 LSL1 = ____  Arithmetic Shift: –Shifts number left or right. Rt shift sign extends 1011 ASR1 = ____ 1011 ASL1 = ____  Rotate: –Shifts number left or right and fills with lost bits 1011 ROR1 = ____ 1011 ROL1 = ____

9 Shifters  Logical Shift: –Shifts number left or right and fills with 0’s 1011 LSR 1 = LSL1 = 0110  Arithmetic Shift: –Shifts number left or right. Rt shift sign extends 1011 ASR1 = ASL1 = 0110  Rotate: –Shifts number left or right and fills with lost bits 1011 ROR1 = ROL1 = 0111

10 Funnel Shifter  A funnel shifter can do all six types of shifts  Selects N-bit field Y from 2N-bit input –Shift by k bits (0  k < N)

11 Funnel Shifter Operation  Computing N-k requires an adder

12 Funnel Shifter Operation  Computing N-k requires an adder

13 Funnel Shifter Operation  Computing N-k requires an adder

14 Funnel Shifter Operation  Computing N-k requires an adder

15 Funnel Shifter Operation  Computing N-k requires an adder

16 Simplified Funnel Shifter  Optimize down to 2N-1 bit input

17 Simplified Funnel Shifter  Optimize down to 2N-1 bit input

18 Simplified Funnel Shifter  Optimize down to 2N-1 bit input

19 Simplified Funnel Shifter  Optimize down to 2N-1 bit input

20 Simplified Funnel Shifter  Optimize down to 2N-1 bit input

21 Funnel Shifter Design 1  N N-input multiplexers –Use 1-of-N hot select signals for shift amount –nMOS pass transistor design (V t drops!)

22 Funnel Shifter Design 2  Log N stages of 2-input muxes –No select decoding needed

23 Multi-input Adders  Suppose we want to add k N-bit words –Ex: = _____

24 Multi-input Adders  Suppose we want to add k N-bit words –Ex: = 10111

25 Multi-input Adders  Suppose we want to add k N-bit words –Ex: =  Straightforward solution: k-1 N-input CPAs –Large and slow

26 Carry Save Addition  A full adder sums 3 inputs and produces 2 outputs –Carry output has twice weight of sum output  N full adders in parallel are called carry save adder –Produce N sums and N carry outs

27 CSA Application  Use k-2 stages of CSAs –Keep result in carry-save redundant form  Final CPA computes actual result

28 CSA Application  Use k-2 stages of CSAs –Keep result in carry-save redundant form  Final CPA computes actual result

29 CSA Application  Use k-2 stages of CSAs –Keep result in carry-save redundant form  Final CPA computes actual result

30 Multiplication  Example:

31 Multiplication  Example:

32 Multiplication  Example:

33 Multiplication  Example:

34 Multiplication  Example:

35 Multiplication  Example:

36 Multiplication  Example:  M x N-bit multiplication –Produce N M-bit partial products –Sum these to produce M+N-bit product

37 General Form  Multiplicand: Y = (y M-1, y M-2, …, y 1, y 0 )  Multiplier: X = (x N-1, x N-2, …, x 1, x 0 )  Product:

38 Dot Diagram  Each dot represents a bit

39 Array Multiplier

40 Rectangular Array  Squash array to fit rectangular floorplan