Glitches & Hazards.

Slides:



Advertisements
Similar presentations
Minimization of Circuits
Advertisements

FUNCTION OPTIMIZATION Switching Function Representations can be Classified in Terms of Levels Number of Levels, k, is Number of Unique Boolean (binary)
CS370 – Spring 2003 Hazards/Glitches. Time Response in Combinational Networks Gate Delays and Timing Waveforms Hazards/Glitches and How To Avoid Them.
Digital Circuits.
CSEE 4823 Advanced Logic Design Handout: Lecture #2 1/22/15
ECE 3110: Introduction to Digital Systems
Based on slides by: Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 8 – Systematic Simplification.
1 Combinational Logic Network design Chapter 4 (continued ….)
Quine-McCluskey (Tabular) Minimization  Two step process utilizing tabular listings to:  Identify prime implicants (implicant tables)  Identify minimal.
EECC341 - Shaaban #1 Lec # 8 Winter Combinational Logic Circuit Transient Vs. Steady-state Output Gate propagation delay: The time between.
Give qualifications of instructors: DAP
EDA (CS286.5b) Day 15 Logic Synthesis: Two-Level.
Chapter 3 Simplification of Switching Functions
Give qualifications of instructors: DAP
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 4-1 Chapter #2: Two-Level Combinational Logic Section 2.3, Switches and Tools.


CS 151 Digital Systems Design Lecture 32 Hazards
Logic gate level Part 3: minimizing circuits. Improving circuit efficiency Efficiency of combinatorial circuit depends on number & arrangement of its.
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
Digital Logic Design Lecture # 7 University of Tehran.
2-Level Minimization Classic Problem in Switching Theory
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
Department of Computer Engineering
The covering procedure. Remove rows with essential PI’s and any columns with x’s in those rows.
1 © 2015 B. Wilkinson Modification date: January 1, 2015 Designing combinational circuits Logic circuits whose outputs are dependent upon the values placed.
Quine-McCluskey (Tabular) Minimization Two step process utilizing tabular listings to: Identify prime implicants (implicant tables) Identify minimal PI.
Optimization Algorithm
2-Level Minimization Classic Problem in Switching Theory Tabulation Method Transformed to “Set Covering Problem” “Set Covering Problem” is Intractable.
Two-Level Simplification Approaches Algebraic Simplification: - algorithm/systematic procedure is not always possible - No method for knowing when the.
UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Logic Synthesis: From Specs to Circuits Implementation Styles –Random –Regular Optimization Criteria.
Two Level Networks. Two-Level Networks Slide 2 SOPs A function has, in general many SOPs Functions can be simplified using Boolean algebra Compare the.
ECE2030 Introduction to Computer Engineering Lecture 8: Quine-McCluskey Method Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 5: Quine-McCluskey Method José Nelson Amaral.
1 ECE2030 Introduction to Computer Engineering Lecture 8: Quine-McCluskey Method Prof. Hsien-Hsin Sean Lee School of ECE Georgia Institute of Technology.
1 Quine-McCluskey Method. 2 Motivation Karnaugh maps are very effective for the minimization of expressions with up to 5 or 6 inputs. However they are.
Computer Engineering (Logic Circuits) (Karnaugh Map)
07 KM Page 1 ECEn/CS 224 Karnaugh Maps. 07 KM Page 2 ECEn/CS 224 What are Karnaugh Maps? A simpler way to handle most (but not all) jobs of manipulating.
Lecture 11 Timing diagrams Hazards.
1 Example: Groupings on 3-Variable K-Maps BC F(A,B,C) = A ’ B ’ A BC F(A,B,C) = B ’ A
1 Gate Level Minimization EE 208 – Logic Design Chapter 3 Sohaib Majzoub.
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
Karnaugh Maps (K maps).
EECS 270 Lecture 10. K-map “rules” – Only circle adjacent cells (remember edges are adjacent!) – Only circle groups that are powers of 2 (1, 2,
ECE 171 Digital Circuits Chapter 9 Hazards Herbert G. Mayer, PSU Status 2/21/2016 Copied with Permission from prof. Mark PSU ECE.
ECE 301 – Digital Electronics Minimizing Boolean Expressions using K-maps, The Minimal Cover, and Incompletely Specified Boolean Functions (Lecture #6)
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
CHAPTER 6 Quine-McCluskey Method
Chapter 4. Combinational Logic Design Principles
Plotting functions not in canonical form
K-map: Product-of-Sums Minimization
Lecture 8 Combinational Network Design and Issues
CS 352 Introduction to Logic Design
Digital Logic and Design
Optimized Implementation of Logic Function
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.
ECE 331 – Digital System Design
Digital Logic & Design Dr. Waseem Ikram Lecture 12.
Digital Logic & Design Dr. Waseem Ikram Lecture 13.
CHAPTER 5 KARNAUGH MAPS 5.1 Minimum Forms of Switching Functions
Optimization Algorithm
Chapter 3 Gate-level Minimization.
Function Minimization Algorithms
SYEN 3330 Digital Systems Chapter 2 – Part 6 SYEN 3330 Digital Systems.
Hazard-free Karnaugh Map Minimisation
Overview Part 2 – Circuit Optimization
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
Hazard-free Karnaugh Map Minimisation
ECE 331 – Digital System Design
Presentation transcript:

Glitches & Hazards

Glitches / Hazards Gates have an inherent delay We have been ignoring this  but delays do exist A glitch is an unwanted pulse at the output of a combinational circuit Glitches can result from gate delays Glitches depend on the input patterns  glitches may not occur if the input pattern that would cause the glitch never occurs A circuit with the potential for a glitch has a hazard A circuit with a hazard may or may not glitch

Glitch Example F = AB + A'C: assume all gate delays = 10ns An input change from ABC = 111 to 011 results in a glitch  output changes from 1  0  1 again A static hazard: result should have stayed statically at 1

Static & Dynamic Hazards Static hazards: Dynamic hazards: 1 ® 1 ® 1 1 1 ® ® 1

Removing Static Hazards Glitch occurs in moving from one implicant to another within a cover When two adjacent 1's are not covered by a single implicant Solution: add an extra implicant to provide that coverage F = AB + A'C + BC No longer minimum form  but no hazard now B C A 00 01 11 10 1

Hazard Removal: Example F(A,B,C,D) = m(6,7,8,9,12,13,14,15) The red prime implicant removes the static-1 hazard C D A B 00 01 11 10 1

Dynamic Hazards Dynamic hazards do not occur in two-level combinational circuits  only in multi-level circuits One gate delay x 1 x , x , x b 2 3 4 x 1 a a f x 2 c d b x 3 x c 4 d f

Causes of Dynamic Hazards For an output to change 0101 (i.e. 3 times) in response to a single input change, there must be at least 3 paths of different length in the circuit 2 gate delays: x1  b  f 3 gate delays: x1  a  b  f 4 gate delays: x1  a  c  d  f b x 1 a f x 2 c x d 3 x 4

Removing Dynamic Hazards Removing dynamic hazards is very difficult Even detecting dynamic hazards is very difficult Stick to two level designs to ensure combinational circuits do not have dynamic hazards Sequential circuits do not have this problem

Quine-McClusky Method

Quine-McClusky Method An algorithm that CAD tools can and do use Uses tables to: Compute all prime implicants Identify essential prime implicants Select the minimum number of prime implicants for a cover Is based on the combining property again x y + x y' = x (y + y') = x

Grouping the Minterms f(A,B,C,D) = m(0,4,8,10,11,12,13,15) Arrange all minterms according to the number of 1’s in the binary representation Sort and group them These are called 0-cubes Like vertices of a 4D cube 0000 4 0100 8 1000 10 1010 12 1100 11 1011 13 1101 15 1111

Forming 1-cubes Compare each 0-cube in one group with each 0-cube in an adjacent group Use combining property to form 1-cubes 1 cubes 0,4 0x00 0,8 x000 8,10 10x0 4,12 x100 8,12 1x00 10,11 101x 12,13 110x 11,15 1x11 13,15 11x1 0 cubes 0000 X 4 0100 8 1000 10 1010 12 1100 11 1011 13 1101 15 1111

Forming 2-cubes Compare each 1-cube in one group with each 1-cube in an adjacent group Use combining property to form 2-cubes 1 cubes 0,4 0x00 X 0,8 x000 8,10 10x0 4,12 x100 8,12 1x00 10,11 101x 12,13 110x 11,15 1x11 13,15 11x1 2 cubes 0,8,4,12 xx00 mark each 1-cube that contributes to a 2-cube

The Prime Implicants All “unchecked” cubes are prime implicants They did not get combined into a larger cube 0 cubes 0000 X 4 0100 8 1000 10 1010 12 1100 11 1011 13 1101 15 1111 1 cubes 0,4 0x00 X 0,8 x000 8,10 10x0 4,12 x100 8,12 1x00 10,11 101x 12,13 110x 11,15 1x11 13,15 11x1 2 cubes 0,8,4,12 xx00 All prime implicants are: P = { 10x0, 101x, 110x, 1x11, 11x1, xx00 }

Prime Implicant Cover Table For each prime implicant, mark all minterms covered by that implicant prime minterms implicants 4 8 10 11 12 13 15 p1 10x0 X p2 101x p3 110x p4 1x11 p5 11x1 p6 xx00

Find Essential Prime Implicants p6 is an essential prime implicant  minterms 0 and 4 must be covered by p6 Minimum cover C = { p6 } at the moment prime minterms implicants 4 8 10 11 12 13 15 p1 10x0 X p2 101x p3 110x p4 1x11 p5 11x1 p6 xx00

Row Dominance p2 row dominates p1 since p2 covers everything that p1 covers p1 can be eliminated Note: we remove the dominated row prime minterms implicants 10 11 13 15 p1 10x0 X p2 101x p3 110x p4 1x11 p5 11x1 p5 row dominates p3

Column Dominance Column 11 column dominates column 10 since everything that covers column 10 also covers column 11 Column 11 can be eliminated Note: we remove the dominating column We could also have considered p2 and p5 as essential at this point prime minterms implicants 10 11 13 15 p2 101x X p4 1x11 p5 11x1 column 15 dominates column 13

Final Cover The final cover is C = { p6, p2, p5 } f = xx00 + 101x + 11x1 = C'D' + AB'C + ABD prime minterms implicants 10 13 p2 101x X p4 1x11 p5 11x1

Another Example f(A,B,C,D) = m(0,2,4,5,6,7,8,10,11,12,15) 0 cubes 0000 2 0010 4 0100 8 1000 5 0101 6 0110 10 1010 12 1100 7 0111 11 1011 15 1111

Cubes All prime implicants are: 0,2 00x0 X 0,4 0x00 0,8 x000 2,6 0x10 2,10 x010 4,5 010x 4,6 01x0 4,12 x100 8,10 10x0 8,12 1x00 5,7 01x1 6,7 011x 10,11 101x 7,15 x111 11,15 1x11 0 cubes 0000 X 2 0010 4 0100 8 1000 5 0101 6 0110 10 1010 12 1100 7 0111 11 1011 15 1111 2 cubes 0,2,4,6 0xx0 0,2,8,10 x0x0 0,4,8,12 xx00 4,5,6,7 01xx All prime implicants are: P = { 101x, x111, 1x11, 0xx0, x0x0, xx00, 01xx }

Cover Table C = { p6, p7 } since p6 and p7 are essential prime minterms implicants 2 4 5 6 7 8 10 11 12 15 p1 101x X p2 x111 p3 1x11 p4 0xx0 p5 x0x0 p6 xx00 p7 01xx

Row Dominance Row p5 dominates row p4 Row p3 dominates row p2 prime minterms implicants 2 10 11 15 p1 101x X p2 x111 p3 1x11 p4 0xx0 p5 x0x0

Column Domination Column 10 dominates column 2 Final min cover is C = { p6, p7, p3, p5 } f = xx00 + 01xx + 1x11 + x0x0 = C'D' + A'B + ACD + B'D' prime minterms implicants 2 10 11 15 p1 101x X p3 1x11 p5 x0x0

Handling Don't Cares f(A,B,C,D) = m(0,3,10,15) + d(1,2,7,8,11,14) Don't care conditions are used for creating the prime implicants Don't care conditions are not used for computing the minimum cover 0 cubes 0000 1 0001 2 0010 8 1000 3 0011 10 1010 7 0111 11 1011 14 1110 15 1111

Cubes All prime implicants are: P = { 00xx, x0x0, x01x, xx11, 1x1x } 0,1 000x X 0,2 00x0 0,8 x000 1,3 00x1 2,3 001x 2,10 x010 8,10 10x0 3,7 0x11 3,11 x011 10,11 101x 10,14 1x10 7,15 x111 11,15 1x11 14,15 111x 0 cubes 0000 X 1 0001 2 0010 8 1000 3 0011 10 1010 7 0111 11 1011 14 1110 15 1111 2 cubes 0,1,2,3 00xx 0,2,8,10 x0x0 2,3,10,11 x01x 3,7,11,15 xx11 10,11,14,15 1x1x All prime implicants are: P = { 00xx, x0x0, x01x, xx11, 1x1x }

Cover Table Include only required minterms in the initial cover table There are no essential prime implicants prime minterms implicants 3 10 15 p1 00xx X p2 x0x0 p3 x01x p4 xx11 p5 1x1x

Branching There are no dominant rows and no dominant columns Require a branching strategy Backtracking type algorithm Select C = { p1 } prime minterms implicants 3 10 15 p1 00xx X p2 x0x0 p3 x01x p4 xx11 p5 1x1x

Min Cover That Includes p1 Row p5 dominates rows p2, p3, and p4 Min cover C = { p1, p5 } f = 00xx + 1x1x = A'B' + AC Cost = 3 + 6 = 9 prime minterms implicants 10 15 p2 x0x0 X p3 x01x p4 xx11 p5 1x1x

Backtrack Now backtrack and eliminate p1 to find covers prime minterms implicants 3 10 15 p1 00xx X p2 x0x0 p3 x01x p4 xx11 p5 1x1x prime minterms implicants 3 10 15 p2 x0x0 X p3 x01x p4 xx11 p5 1x1x Column 10 dominates column 0

Min Cover That Excludes p1 Row p4 dominates rows p3 and p5 Min cover C = { p2, p4 } f = x0x0 + xx11 = B'D' + CD Cost = 3 + 6 = 9 Same cost as other solution! prime minterms implicants 3 15 p2 x0x0 X p3 x01x p4 xx11 p5 1x1x

Factoring and Decomposition

Factoring Two level logic is good for problems with only a few variables and/or limited fan-in to all gates Factoring can be used to reduce fan-in, but results in > 2 level logic Ex: f(A,B,C,D,E,F) = AB'CD'EF + ABC'D'E'F Requires two 6 input ANDs, one 2 input OR If only 4 input AND gates are available then we can factor f into f(A,B,C,D,E,F) = AD'F(B'CE + BC'E') Requires one 4 input AND, two 3 input ANDs, one 2 input OR Requires 3 level logic  multi-level synthesis

Multi-level Synthesis If fan-in is limited to at most 4, then the original two level circuit could be done as …. The factored circuit could be done as … cost = 5 + 16 = 21 cascading ANDs cost = 4 + 12 = 16

Functional Decomposition Multi-level circuits may sometimes be preferred over two-level circuits due to reduced cost Done at the expense of longer delays Decompose circuits into subcircuits with shared functionality Shared subcircuits provide reduced total cost

Example Functional Decomposition SOP form: f = A'BC + AB'C + ABD + A'B'D cost = 5 + 16 = 21 + 2 inverters + 2 fan-in = 25 factoring … f = (A'B + AB') C + (AB + A'B') D = g C + g' D where g = A'B + AB' since g' = (A'B + AB')' = (A'B)'(AB')' = (A+B')(A'+B) = AA' + B'A' + AB + B'B = AB + A'B'

Implemented Decomposition cost = 6 + 12 + 3 inverters + 3 fan-in = 24

Another Example The shaded region is g(X,W) = XW' + X'W f(V,W,X,Y,Z) = g (V+Y+Z) + g' (V+Y+Z)' = g h + g' h' Y Z W X 00 01 11 10 1 Y Z W X 00 01 11 10 1 V = 0 V = 1

Implementation cost = 11 + 19 = 30 minimal SOP cost = 55 (includes inverters)