EECS150 - Digital Design Lecture 10 - Combinational Logic Circuits Part 1

Similar documents
EECS150 - Digital Design Lecture 22 - Arithmetic Blocks, Part 1

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined

COE 202: Digital Logic Design Combinational Circuits Part 2. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

14:332:231 DIGITAL LOGIC DESIGN

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits)

Chapter 03: Computer Arithmetic. Lesson 03: Arithmetic Operations Adder and Subtractor circuits Design

1 Short adders. t total_ripple8 = t first + 6*t middle + t last = 4t p + 6*2t p + 2t p = 18t p

Carry Look-ahead Adders. EECS150 - Digital Design Lecture 12 - Combinational Logic & Arithmetic Circuits Part 2. Carry Look-ahead Adders

Review. EECS Components and Design Techniques for Digital Systems. Lec 18 Arithmetic II (Multiplication) Computer Number Systems

CSEE 3827: Fundamentals of Computer Systems. Combinational Circuits

Chapter 5 Arithmetic Circuits

Midterm Exam Two is scheduled on April 8 in class. On March 27 I will help you prepare Midterm Exam Two.

CS 140 Lecture 14 Standard Combinational Modules

Carry Look Ahead Adders

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

CMPUT 329. Circuits for binary addition

Combinational Logic Design Arithmetic Functions and Circuits

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

CMPEN 411 VLSI Digital Circuits Spring Lecture 19: Adder Design

Chapter 4. Combinational: Circuits with logic gates whose outputs depend on the present combination of the inputs. elements. Dr.

Adders, subtractors comparators, multipliers and other ALU elements

CSE140: Components and Design Techniques for Digital Systems. Decoders, adders, comparators, multipliers and other ALU elements. Tajana Simunic Rosing

EECS150 - Digital Design Lecture 24 - Arithmetic Blocks, Part 2 + Shifters

ECE 2300 Digital Logic & Computer Organization

Binary addition by hand. Adding two bits

Combinational Logic. By : Ali Mustafa

Adders - Subtractors

Combina-onal Logic Chapter 4. Topics. Combina-on Circuit 10/13/10. EECE 256 Dr. Sidney Fels Steven Oldridge

ARITHMETIC COMBINATIONAL MODULES AND NETWORKS

Overview. Arithmetic circuits. Binary half adder. Binary full adder. Last lecture PLDs ROMs Tristates Design examples

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Digital Logic

ISSN (PRINT): , (ONLINE): , VOLUME-4, ISSUE-10,

EECS150 - Digital Design Lecture 21 - Design Blocks

Adders, subtractors comparators, multipliers and other ALU elements

3. Combinational Circuit Design

CSE140: Components and Design Techniques for Digital Systems. Logic minimization algorithm summary. Instructor: Mohsen Imani UC San Diego

Module 2. Basic Digital Building Blocks. Binary Arithmetic & Arithmetic Circuits Comparators, Decoders, Encoders, Multiplexors Flip-Flops

EECS 427 Lecture 8: Adders Readings: EECS 427 F09 Lecture 8 1. Reminders. HW3 project initial proposal: due Wednesday 10/7

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part A Combinational Logic Building Blocks

UNIT II COMBINATIONAL CIRCUITS:

UNSIGNED BINARY NUMBERS DIGITAL ELECTRONICS SYSTEM DESIGN WHAT ABOUT NEGATIVE NUMBERS? BINARY ADDITION 11/9/2018

Fundamentals of Digital Design

Bit-Sliced Design. EECS 141 F01 Arithmetic Circuits. A Generic Digital Processor. Full-Adder. The Binary Adder

Number representation

Menu. Binary Adder EEL3701 EEL3701. Add, Subtract, Compare, ALU

DIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

Lecture 12: Adders, Sequential Circuits

CMSC 313 Lecture 18 Midterm Exam returned Assign Homework 3 Circuits for Addition Digital Logic Components Programmable Logic Arrays

CprE 281: Digital Logic

Hardware Design I Chap. 4 Representative combinational logic

Logic. Combinational. inputs. outputs. the result. system can

Lecture 4. Adders. Computer Systems Laboratory Stanford University

EECS150. Arithmetic Circuits

CprE 281: Digital Logic

Floating Point Representation and Digital Logic. Lecture 11 CS301

EECS150 - Digital Design Lecture 25 Shifters and Counters. Recap

Building a Computer Adder

Looking at a two binary digit sum shows what we need to extend addition to multiple binary digits.

CS221: Digital Design. Dr. A. Sahu. Indian Institute of Technology Guwahati

9/29/2016. Task: Checking for a Lower-Case Letter. ECE 120: Introduction to Computing. Change C 5 to C 5 to Obtain L(C) from U(C)

VLSI Design. [Adapted from Rabaey s Digital Integrated Circuits, 2002, J. Rabaey et al.] ECE 4121 VLSI DEsign.1

Logic and Computer Design Fundamentals. Chapter 5 Arithmetic Functions and Circuits

Hw 6 due Thursday, Nov 3, 5pm No lab this week

EECS150 - Digital Design Lecture 11 - Shifters & Counters. Register Summary

EFFICIENT MULTIOUTPUT CARRY LOOK-AHEAD ADDERS

Class Website:

What s the Deal? MULTIPLICATION. Time to multiply

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

ELCT201: DIGITAL LOGIC DESIGN

The logic is straightforward. Adding two 0s will result in 0. Adding two 1s results in 10 where 1 is the carry bit and 0 is the sum bit.

EECS150 - Digital Design Lecture 23 - FSMs & Counters

Low Latency Architectures of a Comparator for Binary Signed Digits in a 28-nm CMOS Technology

Lecture 12: Adders, Sequential Circuits

CSE477 VLSI Digital Circuits Fall Lecture 20: Adder Design

ALUs and Data Paths. Subtitle: How to design the data path of a processor. 1/8/ L3 Data Path Design Copyright Joanne DeGroat, ECE, OSU 1

CMSC 313 Lecture 17. Focus Groups. Announcement: in-class lab Thu 10/30 Homework 3 Questions Circuits for Addition Midterm Exam returned

CMSC 313 Lecture 18 Midterm Exam returned Assign Homework 3 Circuits for Addition Digital Logic Components Programmable Logic Arrays

EECS150 - Digital Design Lecture 17 - Sequential Circuits 3 (Counters)

Chapter 5. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 5 <1>

Combinational Logic. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C.

L8/9: Arithmetic Structures

Total Time = 90 Minutes, Total Marks = 100. Total /10 /25 /20 /10 /15 /20

Lecture 13: Sequential Circuits

Digital Integrated Circuits A Design Perspective. Arithmetic Circuits. Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic.

ECE380 Digital Logic. Positional representation

Combinational Logic. Mantıksal Tasarım BBM231. section instructor: Ufuk Çelikcan

mith College Computer Science CSC270 Spring 16 Circuits and Systems Lecture Notes Week 2 Dominique Thiébaut

CSE370 HW3 Solutions (Winter 2010)

Parity Checker Example. EECS150 - Digital Design Lecture 9 - Finite State Machines 1. Formal Design Process. Formal Design Process

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 3 - ARITMETHIC-LOGIC UNIT JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ

Review for Final Exam

Arithmetic Circuits Didn t I learn how to do addition in the second grade? UNC courses aren t what they used to be...

Combinational logic. Possible logic functions of two variables. Minimal set of functions. Cost of different logic functions.

EECS150 - Digital Design Lecture 18 - Counters

EECS150 - Digital Design Lecture 18 - Counters

CSE 140L Spring 2010 Lab 1 Assignment Due beginning of the class on 14 th April

Arithmetic Building Blocks

Computer Architecture. ESE 345 Computer Architecture. Design Process. CA: Design process

Design of Sequential Circuits

RAO PAHALD SINGH GROUP OF INSTITUTIONS BALANA(MOHINDER GARH)123029

Transcription:

EECS5 - Digital Design Lecture - Combinational Logic Circuits Part Feburary 26, 22 John Wawrzynek Spring 22 EECS5 - Lec-cl Page

Combinational Logic (CL) Defined y i = f i (x,...., xn-), where x, y are {,}. Y is a function of only X. If we change X, Y will change immediately (well almost!). There is an implementation dependent delay from X to Y. Spring 22 EECS5 - Lec-cl Page 2

Full-adder cell (FA) revisited: Adders a bcin FA cout s a b cin cout s cin ab ab cin cout s Spring 22 EECS5 - Lec-cl Page 3

Carry-ripple Adder Each cell: ri = ai XOR bi XOR cin cout = aicin + aibi + bicin = cin(ai + bi) + aibi 4-bit adder: Full adder cell What about subtraction? Spring 22 EECS5 - Lec-cl Page 4

A - B = A + (-B) Subtractors How do we form -B?. complement B 2. add bn- b b an- a a SUB cout n-bit adder cin sn- s s Spring 22 EECS5 - Lec-cl Page 5

Adders (cont.) Ripple Adder c7 c6 c5 c4 c3 c2 b a c FA s7 s6 Ripple adder is inherently slow because, in general s7 must wait for c7 which must wait for c6 T α n, Cost α n How do we make it faster, perhaps with more cost? c s Spring 22 EECS5 - Lec-cl Page 6

Carry Select Adder b7 a7 b6 a6 b5 a5 b4 a4 b3 a3 b2 a2 b a b a c FA c8 b7 a7 b6 a6 b5 a5 b4 a4 s3 s2 s s FA s7 s6 s5 s4 T = T ripple_adder / 2 + T MUX COST =.5 * COST ripple_adder + (n+) * COST MUX Spring 22 EECS5 - Lec-cl Page 7

Carry Select Adder Extending Carry-select to multiple blocks b5-b2 a5-a2 b-b8 a-a8 b7-b4 a7-a4 b3-b a3-a 4-bit Adder 4-bit Adder 4-bit Adder cout 4-bit Adder 4-bit Adder 4-bit Adder 4-bit Adder cin What is the optimal # of blocks and # of bits/block? If # blocks too large delay dominated by total mux delay If # blocks too small delay dominated by adder delay N stages of N bits T α sqrt(n), Cost 2*ripple + muxes Spring 22 EECS5 - Lec-cl Page 8

Carry Select Adder b5-b2 a5-a2 b-b8 a-a8 b7-b4 a7-a4 b3-b a3-a 4-bit Adder 4-bit Adder 4-bit Adder cout 4-bit Adder 4-bit Adder 4-bit Adder 4-bit Adder cin T total = sqrt(n) T FA assuming T FA = T MUX For ripple adder T total = N T FA Is sqrt(n) really the optimum? From right to left increase size of each block to better match delays Ex: 64-bit adder, use block sizes [3 2 9 8 7] How about recursively defined carry select? Spring 22 EECS5 - Lec-cl Page 9

Carry Look-ahead Adders In general, for n-bit addition best we can achieve is delay α log(n) How do we arrange this? (think trees) First, reformulate basic adder stage: a b c i c i+ s carry kill k i = a i b i carry propagate p i = a i b i carry generate g i = a i b i c i+ = g i + p i c i s i = p i c i Spring 22 EECS5 - Lec-cl Page

Carry Look-ahead Adders Ripple adder using p and g signals: c a b p g s = p c c = g + p c s a b p g s = p c c 2 = g + p c s a 2 b 2 p 2 g 2 s 2 = p 2 c 2 c 3 = g 2 + p 2 c 2 s 2 a 3 b 3 p 3 g 3 s 3 = p 3 c 3 c 4 = g 3 + p 3 c 3 s 3 c 4 So far, no advantage over ripple adder: T α N Spring 22 EECS5 - Lec-cl Page

Expand carries: c c = g + p c Carry Look-ahead Adders c 2 = g + p c = g + p g + p p c c 3 = g 2 + p 2 c 2 = g 2 + p 2 g + p p 2 g + p 2 p p c c 4 = g 3 + p 3 c 3 = g 3 + p 3 g 2 + p 3 p 2 g +...... Why not implement these equations directly to avoid ripple delay? Lots of gates. Redundancies (full tree for each). Gate with high # of inputs. Let s reorganize the equations. Spring 22 EECS5 - Lec-cl Page 2

Carry Look-ahead Adders Group propagate and generate signals: p i c in g i p i+ g i+ P = p i p i+ p i+k G = g i+k + p i+k g i+k- + + (p i+ p i+2 p i+k )g i p i+k g i+k c out P true if the group as a whole propagates a carry to c out G true if the group as a whole generates a carry C out = G + PC in Group P and G can be generated hierarchically. Spring 22 EECS5 - Lec-cl Page 3

a b a b a 2 b 2 a 3 b 3 a 4 b 4 a 5 b 5 c a b Carry Look-ahead Adders P a G a c 3 = G a + P a c P b G b c 6 = G b + P b c 3 9-bit Example of hierarchically generated P and G signals: P = P a P b P c a 6 b 6 a 7 b 7 a 8 b 8 c P c G c c 9 = G + Pc G = G c + P c G b + P b P c G a Spring 22 EECS5 - Lec-cl Page 4

c p g s p g c = g +p c c P 8 =p p G 8 =g +p g 8-bit Carry Look-ahead Adder with 2-input gates. P c =P 8 P 9 s c 2 p g2 c 2 =G 8 +P 8 c P 9 =p 2 p 3 G c =G 9 +P 9 G 8 s 2 p 3 g3 c 3 = g 2 +p 2 c 2 G 9 =g 3 +p 3 g 2 c 4 =G c +P c c P e =P c P d s 3 c 4 p 4 g4 c 4 P a =p 4 p 5 c 8 =G e +P e c G e =G d +P d G c s 4 p 5 g5 s 5 c 5 = g 4 +p 4 c 4 G a =g 5 +p 5 g 4 c 6 =G a +P a c 4 P d =P a P b c p 6 6 g6 P b =p 6 p 7 G d =G b +P b G a s 6 p 7 g7 c 7 = g 6 +p 6 c 6 G b =g 7 +p 7 g 6 s 7 c 8 Spring 22 EECS5 - Lec-cl Page 5

Adders in FPGAs Spring 22 EECS5 - Lec-cl Page 6