Hazard and Glitches

download Hazard and Glitches

of 22

Transcript of Hazard and Glitches

  • 8/2/2019 Hazard and Glitches

    1/22

  • 8/2/2019 Hazard and Glitches

    2/22

    HAZARD & GLITCHES

    The time it takes for a gates outputs tochange in response to an input change isthe propagation delay. The time is mainlyrequired to apply or drain voltages in the

    lower-level transistors.Timing diagrams are used to show delays.

  • 8/2/2019 Hazard and Glitches

    3/22

    This example, for an inverter, shows howsignal values, on the vertical axis, changewith time on the horizontal axis.

    When the input becomes 1, the output becomes 0, and vice versa.

    There is a slight delay before the outputschanges

    Contd.

  • 8/2/2019 Hazard and Glitches

    4/22

    Example : HAZARD & GLITCHES

    In the circuit below, the output f shouldremain 1 if the inputs change from xyz =111 to xyz = 110.

    But what really happens? There is a falseerror , and f becomes 0 temporarily!

    z and yz change right after z changes.

    But xz has not changed yet, so f then(incorrectly) changes to 0.Only after xz changes does f go back to

    1.

  • 8/2/2019 Hazard and Glitches

    5/22

    Contd.

  • 8/2/2019 Hazard and Glitches

    6/22

    Part of the problem here is that there aremultiple paths from the inputs (z) to the

    outputs, and some paths are longer thanothers.It is called Hazard.

    Hazards can be very difficult to detect and prevent in general.

    Contd.

  • 8/2/2019 Hazard and Glitches

    7/22

    Contd.

  • 8/2/2019 Hazard and Glitches

    8/22

    GLITCHES

    A GLITCH is the fast and small unwanted spike in the output signals of digitalcircuit.

  • 8/2/2019 Hazard and Glitches

    9/22

    The glitch may occurs because the delay paths through the circuit experiencedifferent propagation delays.The glitch may provides erroneous

    behavior of logic which has anasynchronous inputs.Usual solution to avoid any glitches is touse synchronous digital circuits and/or combinational hazard-free circuits.

    Contd.

  • 8/2/2019 Hazard and Glitches

    10/22

    GLITCHESA HAZARD is a circuit (sub-circuit) which may

    produce a glitch . Usually it happens when circuithas unbalanced propagation delay paths. There arefour types of hazards:

    Static-zero hazard : outgoing signal is static 0and glitch 0>1>0 rises.Static-one hazard : outgoing signal is static 1and glitch 1>0>1 falls.Dynamic hazard : double changing of signal,when it comes up.Dynamic hazard : double changing if signal,when it comes down.

  • 8/2/2019 Hazard and Glitches

    11/22

    HAZARD & GLITCHES

  • 8/2/2019 Hazard and Glitches

    12/22

    Why do hazards matter?

    The output of a hazard-prone circuit or program depends on conditions other than

    the inputs and the stateIn edge-triggered logic circuits, amomentary glitch resulting from a hazard

    can be converted into an erroneous output

  • 8/2/2019 Hazard and Glitches

    13/22

    Static 1 hazard detection using a

    Karnaugh mapReduce the logic function to a minimal sum of

    prime implicantsA Karnaugh map that contains adjacent, disjoint

    prime implicants is subject to a static 1 hazardAdjacent prime implicants: Only one variableneeds to change value to move from one primeimplicant to the other

  • 8/2/2019 Hazard and Glitches

    14/22

    Disjoint prime implicants No prime implicant covers cells of

    both of the disjoint prime implicantsCorrespond to AND gates that must both change their outputs when a particular input is changed

    Contd.

  • 8/2/2019 Hazard and Glitches

    15/22

    A

    SB

    A

    B

    A

    B

    Y X1

    Y X2

    A

    BY Y

    2:1 Mux implemented by minimized Sum-of-Products

  • 8/2/2019 Hazard and Glitches

    16/22

    Static-1 Hazard

    A

    SB

    AB

    AB

    Y X1

    Y X2

    AB

    Y Y

    A Y S DBUFF

    AND 2

    AND 2 A

    OR 2

  • 8/2/2019 Hazard and Glitches

    17/22

    Glitch

    We now have a "glitch."

  • 8/2/2019 Hazard and Glitches

    18/22

    Static 1 hazard detection using a

    Karnaugh map0 0 0 1 1 1 1 0

    0 0 1 1

    0 1 1 0S=0

    S=1

    A B

  • 8/2/2019 Hazard and Glitches

    19/22

    0 0 0 1 1 1 1 0

    A B

    0 0 1 1

    0 1 1 0S=0

    S=1

    The blue oval shows the redundant term used tocover the transition between product terms.

    Contd.

  • 8/2/2019 Hazard and Glitches

    20/22

    Circuit diagram after detection

    Y S D

    AB

    AB

    A

    B

    AB

    C

    Y X1

    Y X2

    Y X3

    A

    SB

    Y Y

    A BUFF

    AND 2

    AND 2 A

    OR 3

    AND 2

  • 8/2/2019 Hazard and Glitches

    21/22

    Waveform after detection

  • 8/2/2019 Hazard and Glitches

    22/22