Module 2: Combinational Circuit Design · 2.4 Hazards in Combinational Logic

Static Hazards

In Module 1, we minimized logic circuits to reduce gate counts and literal numbers. This article demonstrates that a mathematically minimal circuit can produce physical timing glitches. To eliminate transient glitches, designers deliberately insert logically redundant gates into combinational circuits. These redundant gates act as bridge terms that maintain a stable output level while other internal paths transition.

Theoretical Mechanism of Static-1 Hazards

Consider the two-level Sum-of-Products (SOP) circuit for $F = AC + B\overline{C}$ (Figure 1):

The circuit
Figure 1: Gate-level schematic of F = AC + BC' showing asymmetric inverter path

Set constant inputs $A = 1$ and $B = 1$. When input $C$ transitions from 1 to 0:

  • The path from $C$ to the first AND gate contains zero inverters.
  • The path from $C$ to the second AND gate traverses an inverter.
  • When $C$ drops to 0, the first AND gate turns off immediately ($t_{\text{AND}}$).
  • The second AND gate cannot turn on until inverted signal $\overline{C}$ emerges from the inverter ($t_{\text{INV}} + t_{\text{AND}}$).

During the inverter delay window $t_{\text{INV}}$, both AND gate outputs are 0. The OR gate output momentarily dips from 1 to 0. This negative pulse represents a static-1 hazard.

Detection of Static Hazards on Karnaugh Maps

You can identify static hazards graphically on a Karnaugh map. Figure 2 displays the Karnaugh map for $F(A, B, C) = AC + B\overline{C} = \sum m(2, 5, 6, 7)$:

K-map with the hazard
Figure 2: Karnaugh map showing adjacent 1-cells 6 and 7 in separate prime implicants

  • Cell 7 ($ABC = 111_2$) is covered by product term $AC$.
  • Cell 6 ($ABC = 110_2$) is covered by product term $B\overline{C}$.
  • Cells 6 and 7 are logically and geometrically adjacent.
  • However, no single product term in the minimal cover encloses both cells simultaneously.

The Karnaugh Map Hazard Rule

A static-1 hazard exists in a two-level SOP circuit if and only if two adjacent 1-cells on a Karnaugh map are not covered by a common product term. The hazardous transition corresponds to the single input variable that changes between those two adjacent cells.

Hazard Elimination Using Redundant Consensus Implicants

To eliminate the static-1 hazard between cells 6 and 7, add an implicant that groups both cells together. Cells 6 and 7 share the common literals $A = 1$ and $B = 1$. Adding the grouping term $AB$ yields:

$$F = AC + B\overline{C} + AB$$

Figure 4 illustrates the updated Karnaugh map with the consensus bridge term:

K-map with the bridge
Figure 4: Karnaugh map with redundant consensus group AB bridging cells 6 and 7

Product term $AB$ is the consensus term of $AC$ and $B\overline{C}$. Algebraically, term $AB$ is redundant because $AC + B\overline{C}$ already implies it. Physically, term $AB$ does not depend on variable $C$. When $A = 1$ and $B = 1$, the $AB$ gate output remains continuously asserted at logic 1 during the transition of $C$. The OR gate output remains high without glitching (Figure 3):

Timing with the bridge term
Figure 3: Timing diagram showing glitch elimination after adding redundant consensus term AB

Eliminating the hazard requires only one additional 2-input AND gate.

Static-0 Hazards in Product-of-Sums (POS) Logic

A static-0 hazard is the dual of a static-1 hazard:

  • Occurs in Product-of-Sums (POS) logic networks.
  • An output that should remain at 0 momentarily spikes to logic 1.
  • Occurs when two adjacent 0-cells on a Karnaugh map are not covered by a common sum term.
  • Fix: Add an algebraically redundant sum term covering both adjacent 0-cells.

Comprehensive Example: Bridging Adjacent Minterms

Consider the function:

$$F(A, B, C) = \sum m(0, 1, 2, 6)$$

The minimal cover consists of two prime implicants:

  • Group 1 (cells 0, 1): $\overline{A},\overline{B}$
  • Group 2 (cells 2, 6): $B\overline{C}$

Examine all adjacent 1-cells:

  • Cells 0 and 1 share group $\overline{A},\overline{B}$ (Glitch-free).
  • Cells 2 and 6 share group $B\overline{C}$ (Glitch-free).
  • Cells 0 ($000_2$) and 2 ($010_2$) are adjacent (differ only in $B$), but belong to separate groups.

Transitioning between cell 0 and cell 2 ($A = 0, C = 0$, $B$ changing) produces a static-1 hazard. Cells 0 and 2 share literals $A = 0$ and $C = 0$. Add the consensus bridge term $\overline{A},\overline{C}$ (Figure 5):

$$F = \overline{A},\overline{B} + B\overline{C} + \overline{A},\overline{C}$$

Second example
Figure 5: Karnaugh map for F = Σm(0,1,2,6) with consensus bridge A'C'

The modified circuit is completely free of static hazards.

Engineering Decision Criteria for Redundant Gates

Logic synthesis tools routinely remove redundant gates to reduce silicon area. Table 1 outlines when to retain or remove consensus terms:

Circuit Destination Engineering Recommendation Rationale
Synchronous Flip-Flop $D$ Inputs Remove consensus terms Glitches settle before the clock sampling edge; extra gates waste area and power.
Asynchronous Clear / Preset Inputs Retain consensus terms Any transient glitch falsely triggers register resets.
Transparent Latch Enable Inputs Retain consensus terms A glitch falsely opens the latch, corrupting stored data.
SRAM Write Enable ($\overline{WE}$) Retain consensus terms Glitches trigger spurious write operations, destroying memory contents.
ASIC Output Pads Retain consensus terms Prevents high-frequency transient noise injection onto PCB traces.

Practice Exercises

Problem 1: Identify and eliminate the static-1 hazard in $F = AB + \overline{B}C$.

View Solution
  1. Map Representation: $F(A, B, C) = \sum m(1, 5, 6, 7)$.
    • Group $\overline{B}C$ covers minterms 1 and 5.
    • Group $AB$ covers minterms 6 and 7.
  2. Hazard Identification: Minterm 5 ($101_2$) and minterm 7 ($111_2$) are adjacent (differ only in variable $B$). Because they are covered by separate groups, switching $B$ when $A = 1$ and $C = 1$ creates a static-1 hazard.
  3. Consensus Term Generation: Minterms 5 and 7 share common literals $A = 1$ and $C = 1$. The consensus bridge term is $AC$.
  4. Hazard-Free Expression: $$F = AB + \overline{B}C + AC$$

Figure 6 shows the Karnaugh map with consensus term $AC$:

Problem 1
Figure 6: Solution map for F = AB + B'C with bridging consensus term AC

Problem 2: A digital design includes the function $F = AC + B\overline{C} + AB$. A synthesis optimization script removes term $AB$ to minimize gate count. Under what conditions must you instruct the synthesizer to preserve term $AB$?

View Solution

Term $AB$ is the consensus term that prevents static-1 glitches during transitions on signal $C$. You must preserve term $AB$ (using attributes such as (* keep = "true" *) or set_dont_touch) if signal $F$ drives:

  1. An asynchronous set or reset input of a flip-flop.
  2. A transparent latch gate enable pin.
  3. A memory write strobe or bus handshake line.
  4. A chip output pin connecting to external asynchronous circuitry.

If signal $F$ drives a synchronous flip-flop data input where setup timing constraints are verified, the redundant term can be safely removed.

In the next article, we examine dynamic hazards that cause multiple output oscillations in multi-level logic circuits.

← What a Hazard Is Dynamic Hazards →