Lecture 3. Combinational Logic #2 Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Logic Design.

Slides:



Advertisements
Similar presentations
Techniques for Combinational Logic Optimization
Advertisements

Functions and Functional Blocks
Prof. Sin-Min Lee Department of Computer Science
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 9 Programmable Configurations Read Only Memory (ROM) – –a fixed array of AND gates.
K-Maps, Timing Sequential Circuits: Latches & Flip-Flops Lecture 4 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier,
Combinational Logic Circuits Is the logic circuit where the output always depends on the inputs irrespective of the previous state with out the feed back.
ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Give qualifications of instructors: DAP
CHAPTER 3 Digital Logic Structures
Give qualifications of instructors: DAP

1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 2 Combinational Logic Design.
Hamming Code, K-maps-Multiplexer Midterm 1 Revision
CS 151 Digital Systems Design Lecture 32 Hazards
بهينه سازي با نقشة کارنو Karnaugh Map. 2  Method of graphically representing the truth table that helps visualize adjacencies 2-variable K-map 3-variable.
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
Lecture 3: Incompletely Specified Functions and K Maps CSE 140: Components and Design Techniques for Digital Systems Fall 2014 CK Cheng Dept. of Computer.
Introduction to Digital Logic Design Appendix A of CO&A Dr. Farag
Digital Logic Design Lecture # 7 University of Tehran.
1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)
Dr. Ahmed El-Bialy, Dr. Sahar Fawzy Combinational Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
B-1 Appendix B - Reduction of Digital Logic Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles.
EECS 465: Digital Systems Lecture Notes # 2
1 Chapter 5 Karnaugh Maps Mei Yang ECG Logic Design 1.
Department of Computer Engineering
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC. K-Map (1)  Karnaugh Mapping is used to minimize the number of logic gates that are required in a digital circuit.
Digital Circuits Design Chin-Sung Lin Eleanor Roosevelt High School.
1 COMP541 Combinational Logic - 3 Montek Singh Jan 21, 2010.
1 © 2015 B. Wilkinson Modification date: January 1, 2015 Designing combinational circuits Logic circuits whose outputs are dependent upon the values placed.
Optimization Algorithm
1 COMP541 Combinational Logic - 4 Montek Singh Jan 30, 2012.
Digital Electronics Lecture 6 Combinational Logic Circuit Design.
Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and.
Lecture 3. Combinational Logic 1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
Chapter 2 Digital Design and Computer Architecture, 2 nd Edition Chapter 2 David Money Harris and Sarah L. Harris.
Boolean Algebra and Reduction Techniques
Boolean Algebra & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
Lecture 3. Combinational Logic 2 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
1 CS 151: Digital Design Chapter 3: Combinational Logic Design 3-1Design Procedure CS 151: Digital Design.
Boolean Expressions Lecture 3 Digital Design and Computer Architecture Harris & Harris Morgan Kaufmann / Elsevier, 2007.
COMP541 Combinational Logic - 4
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
THE K-MAP.
C.S.Choy39 TERMINOLOGY Minterm –product term containing all input variables of a function in either true or complementary form Maxterm – sum term containing.
CSE 140: Components and Design Techniques for Digital Systems Lecture 3: Incompletely Specified Functions and K Maps CK Cheng Dept. of Computer Science.
1 Gate Level Minimization EE 208 – Logic Design Chapter 3 Sohaib Majzoub.
Karnaugh Maps (K maps).
Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals.
ECE 171 Digital Circuits Chapter 9 Hazards Herbert G. Mayer, PSU Status 2/21/2016 Copied with Permission from prof. Mark PSU ECE.
©2010 Cengage Learning SLIDES FOR CHAPTER 8 COMBINATIONAL CIRCUIT DESIGN AND SIMULATION USING GATES Click the mouse to move to the next page. Use the ESC.
K-maps and Decoders Prof. Sin-Min Lee Department of Computer Science.
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC:K-Map. K-Map (1)  Karnaugh Map provides a systematic method for simplifying Boolean expressions and may produce.
Digital Circuits Design Chin-Sung Lin Eleanor Roosevelt High School.
COSC3330 Computer Architecture Lecture 2. Combinational Logic
Lecture 9 Logistics Last lecture Today HW3 due Wednesday
COMP211 Computer Logic Design Lecture 3. Combinational Logic 2
CPE/EE 422/522 Advanced Logic Design
Basics Combinational Circuits Sequential Circuits
Basics Combinational Circuits Sequential Circuits Ahmad Jawdat
Overview Last Lecture Conversion of two-level logic to NAND or NOR forms Multilevel logic AOI and OAI gates Today Timing and hazards Multiplexers and demultiplexers.
Digital Logic & Design Dr. Waseem Ikram Lecture 12.
Digital Logic & Design Dr. Waseem Ikram Lecture 13.
Programmable Configurations
Dr. Clincy Professor of CS
Chapter 10.3 and 10.4: Combinatorial Circuits
Overview Part 2 – Circuit Optimization
Karnaugh Maps (K maps).
Chapter 2 Digital Design and Computer Architecture, 2nd Edition
Lecture 3: Incompletely Specified Functions and K Maps
Lecture 2: Combinational Logic Design
Presentation transcript:

Lecture 3. Combinational Logic #2 Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Logic Design

Korea Univ Karnaugh Maps (K-Maps) When using Boolean algebra with axioms and theorems, you sometimes end up with a more complex equation instead of a simplified equation K-map is a graphical method of simplifying Boolean equations  It was invented by Maurice Karnaugh in 1953  K-map works well for problems up to 4 input variables 2

Korea Univ Gray Code Gray code is a binary numeral system where two successive values differ in only one bit  Patented by Frank Gray, a Bell Labs researcher in 1953  Adjacent entries differ only in a single variable  Gray codes generalize to any number of bits 3 ABC bit Gray code 000 → 001 → 011 → 010 → 110 → 111 → 101 → → 010 → 011 → 001 → 101 → 111 → 110 → 100 AB bit Gray code 00 → 01 → 11 → 10

Korea Univ Karnaugh Maps (K-Maps) Arrange input combinations in gray code Circle 1’s in adjacent squares  Each circle must span a power of 2 (i.e. 1, 2, 4) squares in each direction 4 Y = AB

Korea Univ K-map Example 5 Y = AB + ABC

Korea Univ K-map Rules Y =ABD + ABC +BD AC + Each circle must span a power of 2 (i.e. 1, 2, 4) squares in each direction  Each circle must be as large as possible A circle may wrap around the edges of the K-map A one in a K-map may be circled multiple times A “don't care” (X) is circled only if it helps minimize the equation

Korea Univ K-Maps with Don’t Cares X Y = C +A +BD 1 X X X X X X

Korea Univ Prime Implicants Prime implicant  Prime implicant is an implicant corresponding to the largest circle in a K-map  It can not be combined with any other implicants to form a new implicant with fewer literals 8 Y = C +A +BD Prime Implicants X 1 X X X X X X

Korea Univ 7 Segments 9 Have you seen this?

Korea Univ Digital Logic for 7 Segment 10 D3 D2 D1 D0 Sa Sb Sc Sd Se Sf Sg Let’s design this chip

Korea Univ Truth Table for 7 Segment Logic 11 SaSa SbSb ScSc SdSd SeSe SfSf SgSg D3 D2 D1 D0SaSa SbSb ScSc SdSd SeSe SfSf SgSg 0000 (0) 0001 (1) 0010 (2) 0011 (3) 0100 (4) 0101 (5) 0110 (6) 0111 (7) 1000 (8) 1001 (9) others

Korea Univ S a Logic 12 D3 D2 D1 D0SaSa SbSb ScSc SdSd SeSe SfSf SgSg 0000 (0) (1) (2) (3) (4) (5) (6) (7) (8) (9) others SaSa D3D2 D1D0 S a = D3D1 + D3D2D0 + D2D1D0 D3D2D1 +

Korea Univ S b Logic 13 D3 D2 D1 D0SaSa SbSb ScSc SdSd SeSe SfSf SgSg 0000 (0) (1) (2) (3) (4) (5) (6) (7) (8) (9) others SbSb D3D2 D1D0 S b = D3D1D0 + D2D1 0 D3D2 + D3D1D0 +

Korea Univ Quad 2-input AND Gate (74LS08) Real Logic Gates 14 Quad 2-input NAND Gate (74LS01) Quad 2-input NOR Gate (74LS02) Quad 2-input XOR Gate (74LS136)

Korea Univ Combinational Building Blocks Combinational logic is often grouped into larger building blocks to build more complex systems We already studied some of building blocks  Priority logic, full adder (?), 7 segment display decoder 2 other very commonly used digital components  Multiplexers  Decoders 15

Korea Univ Multiplexer (Mux) Multiplexer selects an output from inputs based on the value of a select signal Multiplexer is called mux in short 16 Example: 2:1 Mux SD1D1 D0D0 Y S D1D Y = S D 1 S D 0 + SY 0 D0D0 1D1D1

Korea Univ Wider Muxes 4:1 Mux  4 inputs, 1 output, and 2 select signals 8:1 Mux  8 inputs, 1 output, and 3 select signals 16:1 Mux  16 inputs, 1 output, and 4 select signal N:1 Mux  N inputs, 1 output, and log 2 N select signals 17

Korea Univ Logic using Multiplexers Using the mux as a lookup table to perform logic functions A B Y Y = AB A B Y Y = A + B Y = AB + AB = A + B AB Y  2 N -input multiplexer can be programmed to perform any N-input logic function by applying 0’s and 1’s to the appropriate data inputs

Korea Univ Logic using Multiplexers With a little cleverness, we can cut the multiplexer size in half, using only a 2 N-1 input multiplexer to perform any N-input logic function 19 How to implement 2-input OR or XOR gates?

Korea Univ A Real Multiplexer Chip 20

Korea Univ Decoders Decoder asserts only one of outputs depending on the input combination  N inputs, 2 N outputs  One-hot because only one output is “hot” (HIGH) at a given time 21

Korea Univ Logic using Decoders Decoders can be combined with OR gates to build logic functions  SOP form (ORing minterms) 22

Korea Univ Decoder in Computer Systems 23 Address 32-bit CPU ALU EAX R31 …. R1 R0 Keyboard Mouse USB Controller Timer Dec oder

Korea Univ A Real Decoder Chip 74LS138  3 inputs, 8 outputs 24 inputs outputs

Korea Univ Timing There is always delay from input change to output change in real world One of the biggest challenges in circuit design is to make the circuit fast 25

Korea Univ Propagation & Contamination Delay Propagation delay  t pd = max delay from input to output Contamination delay  t cd = min delay from input to output 26

Korea Univ Propagation & Contamination Delay Delay is caused by  Transistor capacitance and resistance in a circuit  Interconnection capacitance and resistance Reasons why t pd and t cd may be different  Different rising and falling delays  Multiple inputs and outputs, some of which are faster than others  Circuits speeds are different depending on temperature Circuit slows down when hot Circuit speeds up when cold 27

Korea Univ Critical and Short Paths 28 Critical (Longest) Path: t pd = 2t pd_AND + t pd_OR Short Path: t cd = t cd_AND

Korea Univ Glitches So far, we have discussed the case where a single input transition causes a single output transition However, it is possible that a single input transition can cause multiple output transitions  These are called glitches 29

Korea Univ Glitch Example Initially, (A, B, C) = (0, 1, 1) What happens when B changes from 1 to 0? 30 time B n1 n → 0 n2 n1 Y Glitch

Korea Univ How to Eliminate Glitch? A glitch can occur when a change in a single variable crosses the boundary between 2 prime implicants in a K- map  We can remove the glitch by adding redundant implicants to cover these boundaries  Is it the consensus theorem? 31 + AC

Korea Univ Glitches Glitch removal comes at the cost of extra hardware Simultaneous transitions on multiple variables can also cause glitches  These glitches can not be fixed by adding extra hardware  The vast majority of interesting systems have simultaneous (or near-simultaneous) transitions on multiple variables  So, glitches are a fact of life in most circuits The point of discussing glitches is not to eliminate them all, but to be aware that they exist  It is especially important when looking at timing diagrams 32