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

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

Adders, subtractors comparators, multipliers and other ALU elements

Adders, subtractors comparators, multipliers and other ALU elements

Karnaugh Maps (K-Maps)

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

Logic Design Combinational Circuits. Digital Computer Design

COSC3330 Computer Architecture Lecture 2. Combinational Logic

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

Floating Point Representation and Digital Logic. Lecture 11 CS301

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

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

211: Computer Architecture Summer 2016

Carry Look Ahead Adders

CSE 140 Lecture 11 Standard Combinational Modules. CK Cheng and Diba Mirza CSE Dept. UC San Diego

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

Hardware Design I Chap. 4 Representative combinational logic

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

Digital System Design Combinational Logic. Assoc. Prof. Pradondet Nilagupta

Ch 2. Combinational Logic. II - Combinational Logic Contemporary Logic Design 1

Digital Logic & Computer Design CS Professor Dan Moldovan Spring Copyright 2007 Elsevier 2-<101>

CHAPTER1: Digital Logic Circuits Combination Circuits

CSEE 3827: Fundamentals of Computer Systems. Combinational Circuits

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

Digital Logic & Computer Design CS Professor Dan Moldovan Spring 2010

CPE100: Digital Logic Design I

Class Website:

IT T35 Digital system desigm y - ii /s - iii

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

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

EECS Variable Logic Functions

for Digital Systems Simplification of logic functions Tajana Simunic Rosing Sources: TSR, Katz, Boriello & Vahid

PG - TRB UNIT-X- DIGITAL ELECTRONICS. POLYTECHNIC-TRB MATERIALS

Working with Combinational Logic. Design example: 2x2-bit multiplier

Combinational Logic. By : Ali Mustafa

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

CS 140 Lecture 14 Standard Combinational Modules

14:332:231 DIGITAL LOGIC DESIGN

CMSC 313 Lecture 19 Combinational Logic Components Programmable Logic Arrays Karnaugh Maps

Systems I: Computer Organization and Architecture

UNIT II COMBINATIONAL CIRCUITS:

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

CMSC 313 Lecture 19 Homework 4 Questions Combinational Logic Components Programmable Logic Arrays Introduction to Circuit Simplification

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

Arithmetic Building Blocks

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

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

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

Design of Combinational Logic

Review for Test 1 : Ch1 5

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

CprE 281: Digital Logic

T02 Tutorial Slides for Week 6

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

Minimization techniques

MODULAR CIRCUITS CHAPTER 7

2009 Spring CS211 Digital Systems & Lab CHAPTER 2: INTRODUCTION TO LOGIC CIRCUITS

Simplification of Boolean Functions. Dept. of CSE, IEM, Kolkata

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

CMPUT 329. Circuits for binary addition

Chapter 2. Digital Logic Basics

Unit 3 Session - 9 Data-Processing Circuits

ECE 2300 Digital Logic & Computer Organization

3. Combinational Circuit Design

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

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

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

L2: Combinational Logic Design (Construction and Boolean Algebra)

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

Arithmetic Circuits-2

Chap 2. Combinational Logic Circuits

Where are we? Data Path Design

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

Chapter 4: Designing Combinational Systems Uchechukwu Ofoegbu

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

Review. EECS Components and Design Techniques for Digital Systems. Lec 06 Minimizing Boolean Logic 9/ Review: Canonical Forms

Chapter 5 Arithmetic Circuits

Combinational Logic Design Combinational Functions and Circuits

ELCT201: DIGITAL LOGIC DESIGN

Digital Logic. CS211 Computer Architecture. l Topics. l Transistors (Design & Types) l Logic Gates. l Combinational Circuits.

CSE140: Components and Design Techniques for Digital Systems. Introduction. Instructor: Mohsen Imani

ARITHMETIC COMBINATIONAL MODULES AND NETWORKS

MC9211 Computer Organization

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

CPE100: Digital Logic Design I

UNIT III Design of Combinational Logic Circuits. Department of Computer Science SRM UNIVERSITY

KUMARAGURU COLLEGE OF TECHNOLOGY COIMBATORE

Chapter 2 Combinational Logic Circuits

Section 3: Combinational Logic Design. Department of Electrical Engineering, University of Waterloo. Combinational Logic

Combinational Logic. Course Instructor Mohammed Abdul kader

Ch 4. Combinational Logic Technologies. IV - Combinational Logic Technologies Contemporary Logic Design 1

Chapter 7 Logic Circuits

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

Binary addition by hand. Adding two bits

Where are we? Data Path Design. Bit Slice Design. Bit Slice Design. Bit Slice Plan

VLSI Design I; A. Milenkovic 1

L2: Combinational Logic Design (Construction and Boolean Algebra)

CSE 140 Spring 2017: Final Solutions (Total 50 Points)

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

Transcription:

CSE4: Components and Design Techniques for Digital Systems Logic minimization algorithm summary Instructor: Mohsen Imani UC San Diego Slides from: Prof.Tajana Simunic Rosing & Dr.Pietro Mercati

Definition of terms for two-level simplification ON-set: the set of all s in the result of a logic function (i.e. all boxes of a Kmap where the value is ) OFF-set: the set of all s in the result of a logic function (i.e. all boxes of a Kmap where the value is ) SOP: Sum of Products Canonical SOP = minterms expansion Minimal SOP = resulting from 2-level minimization (i.e. Kmaps) by covering s Similar definitions for POS 2

Definition of terms for two-level simplification Implicant single element of ON-set or DC-set or any group of these elements that can be combined to form a subcube Prime implicant implicant that can't be combined with another to form a larger subcube Essential prime implicant prime implicant is essential if it alone covers an element of ON-set will participate in LL possible covers of the ON-set DC-set used to form prime implicants but not to make implicant essential Cover: a subset of implicants that covers all s in the Kmap Objective: grow implicant into prime implicants (minimize literals per term) cover the ON-set with as few prime implicants as possible (minimize number of product terms) 3

Examples to illustrate terms X D C B D C B 4

Examples to illustrate terms X D 6 prime implicants: 'B'D, BC', C, 'C'D, B, B'CD essential C minimum cover: C + BC' + 'B'D B 5 prime implicants: BD, BC', CD, 'BC, 'C'D D essential minimum cover: 4 essential implicants C B 5

C B D C X B X D How many essential Prime implicants?. B. C. 2 D. 3 6

lgorithm for two-level simplification (example) X X X C X B X D D X X C B 2 primes around 'BC'D' D X X C B 2 primes around BC'D X X X D D D X X C B 3 primes around B'C'D' C X X B 2 essential primes X X C B minimum cover (3 primes) 7

Essential primes How many essential Prime implicant?. B. C. 2 D. 3 E. None of the above C X X X B X X D For more practice: think about essential prime implicates! 8

CSE4: Components and Design Techniques for Digital Systems Muxes and demuxes 9

Multiplexer (Example) Four possible display items Temperature (T), verage miles-per-gallon (), Instantaneous mpg (I), and Miles remaining (M) -- each is 8-bits wide Choose which to display using two inputs x and y Use 8-bit 4x mux

Multiplexer (Example) You are not sure whether an input of the MUX would have a or a You should build the MUX with a component that is good at passing both s and s

Transmission Gate: Mux/Tristate building block nmos are on when gate= good at passing s from source to drain pass s poorly from source to drain pmos are on when gate= - good at passing s from source to drain pass s poorly from source to drain Transmission gate is a better switch passes both and well When EN =, the switch is ON: EN = and is connected to B When EN =, the switch is OFF: is not connected to B The pass transistor acts as a tristate buffer EN B EN

Floating: Z, Tristate Buffer and Tristate Busses Floating, high impedance, open, high Z Disconnected Floating nodes are used in tristate busses many different drivers, but only one is active at once Tristate Bus processor to bus from bus en Tristate Buffer video en2 E Y to bus from bus Ethernet to bus en3 shared bus E Y Z Z Note: do not confuse this with the inverter symbol! from bus memory to bus from bus en4

2: Multiplexer or Mux Selects between one of N inputs to connect to output log 2 N-bit select input control input Example: 2: Mux Pass gates Tristates S S D D S Y Logic gates Y D D S S D D S D D Y S D D Y S Y D D D S D Y = D S + D S Y

Multiplexers/selectors 2: mux: Z = 'I + I 4: mux: Z = 'B'I + 'BI + B'I 2 + BI 3 8: mux: Z = 'B'C'I + 'B'CI + 'BC'I 2 + 'BCI 3 + B'C'I 4 + B'CI 5 + BC'I 6 + BCI 7 In general: shorthand form for a 2 n : Mux I I 2: mux Z I I I2 I3 For example 4: mux B Z I I I2 I3 I4 I5 I6 I7 8: mux B C Z 5

Logic using Multiplexers Example of 2: mux implementation Y = B B Y Y B B Y You can implement a 2-variables logic function using a 2: multiplexer: - Use one variable for the selection input - Connect the MUX inputs to either - The second variable (in true or complemented form) - GND - VDD - You can also use larger MUXs (see next slide)

Logic using Multiplexers This multiplexer implements the same functionality for Y as the truth table. Yes B. No B Y Y = B GND Vdd B Y

Mux as general-purpose logic Example: Z(,B,C) = C + BC' + 'B C I I I2 I3 2 3 4: mux Z B 8

Cascading muxes I I C 2: mux I Z I C 2: mux Z B Function Z(,B,C) implemented by 2: Muxes above is:. B C +BC+BC B. ( +C)B+B C C. B +B C+BC D. ( +C)B +BC E. None of the above

Mux example: Logical function unit C C C2 Function Comments always + B logical OR ( B)' logical NND xor B logical xor xnor B logical xnor B logical ND ( + B)' logical NOR always 2 3 8: MUX 4 5 6 7 S2 S S F C C C2 2

Demux or Decoder N inputs, 2 N outputs One-hot outputs: only one output HIGH at a time when enable signal is (EN=) EN 2:4 Decoder Y 3 Y 2 Y Y For the moment, we call it decoder or demuxer with no distinction. We ll see the (slight) difference later Y 3 Y 2 Y Y

Decoder: logic equations & implementation Decoders/demultiplexers control inputs (called selects (S)) represent binary index of output to which the input is connected data input usually called enable or G in equations-> :2 Decoder: O = G S O = G S EN 2:4 Decoder: O = G S S O = G S S O2 = G S S O3 = G S S Y 3 Y 2 Y Y 3:8 Decoder: O = G S2 S S O = G S2 S S O2 = G S2 S S O3 = G S2 S S O4 = G S2 S S O5 = G S2 S S O6 = G S2 S S O7 = G S2 S S

Function using Decoder EN 2 3 3:8 DEC 4 5 6 7 S2 S S 'B'C' 'B'C 'BC' 'BC B'C' B'C BC' BC B C Example: = (3,4,7) 23

Logic Using Decoders OR minterms EN B 2:4 Decoder Minterm B B B B EN 2 3 3:8 DEC 4 5 6 7 S2 S S 'B'C' 'B'C 'BC' 'BC B'C' B'C BC' BC Y = B + B = B Y B C

Example of demux as general-purpose logic F = 'BC'D + 'B'CD + BCD F2 = BC'D' + BC F3 = (' + B' + C' + D') Enable 4:6 DEC 'B'C'D' 'B'C'D 2 'B'CD' 3 'B'CD 4 'BC'D' 5 'BC'D 6 'BCD' 7 'BCD 8 B'C'D' 9 B'C'D B'CD' B'CD 2 BC'D' 3 BC'D 4 BCD' 5 BCD F F2 F3 B C D

F(,B,C) = M(,2,4) nother example 26

nother example Implement this function using -2 and 2-4 decoders. F(,B,C) = M(,2,4) 27

Tree of Decoders En Implement a 6-2 6 decoder with 3-2 3 decoders. En y I 2, I, I D y 7 I 5, I 4, I 3 I 2, I, I D y 8 y 5 y 56 You can use smaller decoders to build a larger one I 2, I, I D7 y 63 28

Multi-level logic x = D F + E F + B D F + B E F + C D F + C E F + G reduced sum-of-products form already simplified 6 x 3-input ND gates + x 7-input OR gate (that may not even exist!) 25 wires (9 literals plus 6 internal wires) x = ( + B + C) (D + E) F + G factored form not written as two-level S-o-P x 3-input OR gate, 2 x 2-input OR gates, x 3-input ND gate wires (7 literals plus 3 internal wires) B C X D E F G

Multi-level logic No global definition of optimal multilevel circuit Optimality depends on user-defined goals Synthesize an implementation that meets design goals Synthesis requires CD-tool help No simple hand methods like K-maps CD tools manipulate Boolean expressions Factoring, decomposition, etc dvantages over 2-level logic Smaller circuits Reduced fan-in Less wires Disadvantages w.r.t 2-level logic More difficult design Less powerful optimizing tools Dynamic hazards

Demultiplexer and Decoder - Demultiplexer: has a data input and it reports it on the output line specified by the selection - Decoder: takes an input address and switches to the corresponding output line - Note: the behavior of a decoder with enable would be the same of a demultiplexer, but we give different names to the inputs Enable inputs Decoder outputs input Demultiplexer outputs Selection 3

CSE4: Components and Design Techniques for Digital Systems dders, subtractors comparators, multipliers and other LU elements 32

dders 33

Circuit Delay Transistors have instrinsic resistance and capacitance Signals take time to propagate from the input to the output of a gate Sometimes delays are labeled as @<delay_value> in circuit drawings 34

-Bit & Multi-bit dders Half dder C out + S B C out Full dder + S B C in Types of multi-bit adders Ripple-carry (slow) Carry-lookahead (faster) Two-level logic adder (even faster) B C out S = B C out = B S C in B C out S C out Symbol B N N + S N C in S = B C in C out = B + C in + BC in

Ripple-Carry dder Chain -bit adders together Carry ripples through entire chain Disadvantage: slow 3 B 3 3 B 3 B B C out + C + 3 C 29 C + C + C in S 3 S 3 S S Ripple-carry adder delay t ripple = Nt F where t F is the delay of a full adder

Two-level Logic dder No matter how many inputs you have, look at the truth table, convert to Kmap, apply the algorithm for two-level logic minimization Very fast adder, but. Beyond 8 inputs, a shockingly large amount of gates! Number of gates increases exponentially Ripple carry adder Carry-lookahead adder (next slide) FST Two-level logic adder COMPLEX

Carry-lookahead adders c4 c3 c2 c c a3 a2 a a b3 b2 b b s3 s2 s s Carries First operand Second operand From the very beginning I can look ahead into the value of carries

Full dder Ci+ = i Bi + Ci (i xor Bi) Generate Propagate Ci+ = Gi + Ci Pi 39

Carry-lookahead adders dder with propagate (P) and generate (G) outputs: Ci+ = i Bi + Ci (i xor Bi) Generate Propagate Ci+ = Gi + Ci Pi The carry at some level is equal to if either the generate signal is equal to one or if the propagate and the previous carry are both

Carry-lookahead adders Example: 4-bit CL adder c = G + P c c2 = G + P c c3 = G2 + P2 c2 c4 = G3 + P3 c3 Gi = ai bi Pi = ai xor bi generate propagate ll G and P are immediately available, but c are not (except the c). So you need to make substitutions: c = G + P c c2 = G + P (G + P c) c3 = G2 + P2 c2 c4 = G3 + P3 c3 = G + PG + PPc = (derive at home) = (derive at home) 4

Carry-lookahead adders Propagate/Generate circuit (one per each input bit) i Bi Ci Pi @ gate delay Si @ 2 gate delays Gi @ gate delay Carry circuits (implement the equations derived in the previous slide) C P G C P P G P G C @ 3 C2 @ 3 C P P P2 G P P2 G P2 G2 C3 @ 3 Note: this approach of looking ahead for building multi-bit operations is not limited to adders! C P P P2 P3 G P P2 P3 G P2 P3 G2 P3 G3 C4 @ 3 42

Combining dders Example: connect CLs in a ripple-carry style (6-bit adder) 4-bit 4-bit 4-bit 4-bit CL CL CL cout CL Example: connect ripple-carry in CL style (4-bit adder) B[3:2] [3:2] S[5:2] S[:8] S[7:4] S[3:] CL logic B[:] [:] c2 Ripplecarry 2-bit S[3:2] Ripplecarry 2-bit S[:] c Connect carries in a chain cin c2 = G + PG + PPc Where: G = B G = B P = xor B P = xor B 43