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

What a Hazard Is

In previous sections, we analyzed combinational circuits using ideal Boolean algebra. Ideal Boolean algebra assumes that logic gates switch instantaneously. In physical silicon, every logic gate exhibits a finite propagation delay. When signals travel along paths of unequal delay, the output can produce an unintended transient pulse called a glitch. The circuit condition that permits a glitch is a hazard. This article analyzes the causes of timing hazards, defines the three primary hazard types, and explains synchronous design protection methods.

Asymmetric Propagation Delay and Path Skew

Logic gates in modern CMOS processes exhibit propagation delays ranging from 10 to 50 picoseconds. Inverters, AND gates, and XOR gates possess different internal transistor switching speeds. When an input signal switches, the transition propagates through the circuit across multiple parallel paths. Each path has a distinct physical delay.

If two converging paths experience asymmetric delay, a temporal window exists where one gate input reflects the new signal while another gate input retains the old signal. During this skew window, the circuit enters a transient inconsistent state. The output may produce an incorrect logic level before settling to its steady-state value.

Circuit Example: Analysis of a Static-1 Glitch

Consider the Boolean function:

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

Set static inputs $A = 1$ and $B = 1$. The equation simplifies to:

$$F = (1)C + (1)\overline{C} = C + \overline{C} = 1$$

Under ideal Boolean evaluation, output $F$ must remain constant at logic 1 for all states of $C$.

Now evaluate the physical circuit when input $C$ transitions from 1 to 0 (Figure 1):

  1. Input $C$ connects directly to the upper AND gate.
  2. Input $C$ connects to the lower AND gate through an inverter.
  3. When $C$ transitions from 1 to 0, the upper AND gate turns off after one AND gate delay ($t_{\text{AND}}$).
  4. The lower AND gate cannot turn on until signal $\overline{C}$ traverses the inverter ($t_{\text{INV}} + t_{\text{AND}}$).

Static-1 hazard
Figure 1: Transient negative glitch (static-1 hazard) in F = AC + BC' caused by inverter delay

During the temporal interval $t_{\text{INV}}$, both AND gate outputs are 0. The OR gate output momentarily drops to logic 0 before returning to logic 1. This transient pulse is a static-1 hazard. The width of the glitch corresponds to the propagation delay of the inverter.

Classification of Hazards

Digital circuits exhibit three classes of timing hazards:

  1. Static-1 Hazard: The output should remain at logic 1 during an input transition, but momentarily dips to logic 0 (a negative pulse). Common in Sum-of-Products (SOP) circuits.
  2. Static-0 Hazard: The output should remain at logic 0 during an input transition, but momentarily spikes to logic 1 (a positive pulse). Common in Product-of-Sums (POS) circuits.
  3. Dynamic Hazard: The output is intended to change states once (0 to 1 or 1 to 0), but transitions three or more times before stabilizing. Occurs in circuits with three or more logic levels containing multiple converging paths with different delay characteristics.

Circuit Contexts: Dangerous Versus Tolerant Downstream Logic

A combinational glitch causes system failure only when downstream logic samples the signal during the glitch window. Table 1 classifies downstream sensitivity:

Downstream Circuit Type Vulnerability Level Failure Mechanism
Asynchronous Set / Reset Lines Critical Hazard A spurious glitch triggers an unintended register reset.
Transparent Latches Critical Hazard A glitch on the data input passes directly through an open latch into storage.
Clock Enable / Gated Clocks Critical Hazard A glitch produces a spurious clock edge, corrupting downstream state registers.
External Memory Write Enables Critical Hazard A transient pulse asserts write strobe $\overline{WE}$, corrupting SRAM memory cells.
Chip Output Pins High Vulnerability Glitches radiate electromagnetic noise and trigger external asynchronous receivers.
Synchronous Flip-Flop Data Inputs ($D$) Tolerant / Safe Glitches die out harmlessly before the clock sampling edge, provided setup timing is met.

Ideal zero-delay logic simulators do not display hazards. Engineers detect glitches using gate-level simulation with Standard Delay Format (SDF) timing annotations or physical hardware logic analyzers.

The Synchronous Design Paradigm as Primary Protection

Synchronous digital design provides the primary defense against combinational hazards. In a synchronous register-to-register path:

  1. Flip-flops sample stable input data only on active clock edges.
  2. Between clock edges, combinational logic outputs toggle and glitch freely.
  3. Static Timing Analysis (STA) guarantees that all logic settles before the next clock edge:

$$T_{\text{clk}} \ge t_{\text{CQ}} + t_{\text{comb, worst}} + t_{\text{setup}}$$

If the clock period $T_{\text{clk}}$ satisfies this constraint, internal combinational glitches settle completely before the flip-flop samples the data. The glitch remains invisible to system state registers.

Asynchronous Boundaries Requiring Manual Hazard Analysis

Synchronous discipline does not protect asynchronous signals. Designers must eliminate hazards manually in the following regions:

  • Asynchronous resets and clear lines.
  • Clock-gating enable circuits (must use specialized, glitch-free Integrated Clock Gating cells).
  • Handshake request and acknowledge signals in asynchronous communication protocols.
  • External peripheral buses and memory control interfaces.

Table 2 summarizes timing hazard properties:

Hazard Characteristic Technical Description
Root Cause Asymmetric path propagation delays through converging logic gates
Static-1 Output dips momentarily to 0 when it should remain 1
Static-0 Output spikes momentarily to 1 when it should remain 0
Dynamic Output oscillates through multiple transitions before settling
Primary Remedy Synchronous clocking discipline and consensus term inclusion

Practice Exercises

Problem 1: Consider the function $F = \overline{A}B + A\overline{B}$ (XOR).

  1. Explain whether a logic hazard occurs when input $A$ transitions from 0 to 1 while $B = 0$.
  2. Analyze what happens if inputs $A$ and $B$ transition simultaneously from $00_2$ to $11_2$.
View Solution
  1. Single-Variable Transition ($B = 0$, $A: 0 \to 1$):
    • Initial state ($A=0, B=0$): $F = 0$.
    • Final state ($A=1, B=0$): $F = 1$. The output is intended to transition from 0 to 1. Because the circuit has only two logic levels, no dynamic hazard can exist. The output makes a clean, single transition.
  2. Simultaneous Multi-Variable Transition ($00_2 \to 11_2$):
    • Initial state ($00_2$): $F = 0$.
    • Final state ($11_2$): $F = 0$. In physical silicon, signals $A$ and $B$ never switch at the exact same picosecond. The circuit temporarily traverses an intermediate state:
    • If $A$ switches first: passes through $10_2$, where $F = 1$.
    • If $B$ switches first: passes through $01_2$, where $F = 1$. The circuit outputs a transient positive pulse. This pulse is a function hazard, which is inherent to the truth table specification. Function hazards cannot be eliminated by adding redundant logic gates; the system must prevent multi-variable simultaneous switching.

Problem 2: A combinational decoder circuit generates the active-low write enable signal ($\overline{WE}$) for an external SRAM memory chip. The designer confirms that the Boolean expression is logically correct. Explain why the circuit may still corrupt memory data and specify the required engineering solution.

View Solution

Although the Boolean expression is logically correct, asymmetric gate delays can produce transient negative glitches on $\overline{WE}$. Because the SRAM write enable input is an asynchronous, level-sensitive line, any transient pulse below threshold voltage $V_{IL}$ initiates an unintended write cycle. This corrupts data stored at the current address bus location.

Engineering solutions:

  1. Add Consensus Terms: Modify the combinational logic to eliminate static hazards.
  2. Register the Output: Pass the write enable signal through a D flip-flop before driving the chip output pin. The flip-flop isolates the asynchronous memory from combinational switching glitches.

In the next article, we analyze static hazards in detail and use Karnaugh maps to identify and eliminate them.

← The Barrel Shifter Static Hazards →