Dynamic Hazards
In the previous article, we analyzed static-1 and static-0 hazards. A static hazard produces a brief glitch on an output that should remain constant. This article analyzes dynamic hazards. A dynamic hazard occurs when an output is intended to change states once, but transitions three or more times before stabilizing. Dynamic hazards cannot occur in two-level Sum-of-Products (SOP) or Product-of-Sums (POS) circuits. They occur exclusively in multi-level logic circuits where multiple converging paths exhibit asymmetric propagation delays.
Definition of Dynamic Timing Hazards
A dynamic hazard is defined as three or more transient voltage transitions on an output in response to a single input change, when exactly one transition was intended.
Table 1 contrasts dynamic hazards against static hazards:
| Hazard Classification | Intended Output Response | Observed Hardware Output Behavior |
|---|---|---|
| Static-1 Hazard | Remain continuously at logic 1 | $1 \to 0 \to 1$ (Negative transient pulse) |
| Static-0 Hazard | Remain continuously at logic 0 | $0 \to 1 \to 0$ (Positive transient pulse) |
| Dynamic Hazard (Rising) | Single transition from 0 to 1 | $0 \to 1 \to 0 \to 1$ (Three transitions) |
| Dynamic Hazard (Falling) | Single transition from 1 to 0 | $1 \to 0 \to 1 \to 0$ (Three transitions) |
To an edge-sensitive asynchronous input or counter clock, three transitions register as multiple spurious events.
Why Dynamic Hazards Require Three or More Logic Levels
In a two-level AND-OR (or OR-AND) circuit, every signal path from an input to the output traverses at most:
- An input inverter.
- A first-level gate (AND or OR).
- A second-level output gate (OR or AND).
Although paths may have unequal delays, all signals converge at a single final gate. The output gate can exhibit a static hesitation (static hazard) before settling, but it cannot oscillate back and forth. Once the slowest path arrives, the output settles permanently.
In a circuit with three or more logic levels:
- An input change travels along a fast path through levels 1 and 2, causing the output to switch in the correct direction.
- The same input change travels through an intermediate path with opposite polarity, reversing the output back to its initial state.
- The input change finally emerges from a slow path, forcing the output into its correct final state.
These three waves of propagation produce three output transitions. Therefore, a circuit must contain at least three logic levels and at least three distinct paths with alternating polarities to exhibit a dynamic hazard.
Timing Waveform of a Dynamic Hazard
Figure 1 illustrates an output undergoing a dynamic hazard when input $A$ transitions from 0 to 1:
- Time $t_1$ (Fast Path): Output $F$ rises to 1.
- Time $t_2$ (Middle Path): Opposing polarity arrives; output $F$ drops to 0.
- Time $t_3$ (Slow Path): Final path arrives; output $F$ settles permanently to 1.
A flip-flop sampling between $t_1$ and $t_2$ reads 1. A flip-flop sampling between $t_2$ and $t_3$ reads 0. A flip-flop sampling after $t_3$ reads 1.
Representative Multi-Level Circuit Topology
Figure 2 illustrates a 3-level NAND-NAND-NAND network implementing $F = A(B + C)$:
Under perfectly balanced gate delays, parallel paths arrive simultaneously without glitching. However, if asymmetric buffer loading or layout interconnect routing skews the propagation delays between paths, dynamic oscillations appear.
How Automated EDA Synthesis Creates Dynamic Hazards
Designers rarely construct multi-level dynamic hazards manually. They are introduced automatically by logic synthesis tools during optimization:
- Gate Decomposition: The synthesis tool decomposes wide gates into cascaded trees of 2-input and 3-input standard cells.
- Sub-Expression Factoring: The synthesizer extracts and shares intermediate logic sub-expressions across multiple functions to reduce silicon area, introducing unequal logic depths.
- FPGA Mapping: The compiler partitions logic across multiple cascaded Look-Up Tables (LUTs) and general routing matrices with unpredictable delays.
RTL zero-delay functional simulations cannot detect dynamic hazards. Designers detect them using post-layout gate-level simulations annotated with Standard Delay Format (SDF) timing files.
Engineering Methods to Eliminate Dynamic Hazards
Apply these three engineering techniques to eliminate dynamic hazards:
1. Maintain Two-Level Logic
For critical asynchronous control signals, force the implementation into a two-level Sum-of-Products (SOP) or Product-of-Sums (POS) structure.
Because two-level circuits cannot produce dynamic hazards, the hazard is structurally eliminated.
Use synthesis directives (such as (* keep = "true" *) or set_dont_touch) to prevent the synthesizer from refactoring the gates.
2. Flatten and Add Consensus Terms
Flatten the multi-level network into a two-level representation. Apply Karnaugh map analysis to identify and cover all static hazards with redundant consensus terms. A two-level circuit that is free of static hazards is completely free of dynamic hazards.
3. Register the Signal (Recommended)
Insert a D flip-flop into the signal path. In a clocked synchronous system, all internal combinational glitches and oscillations settle before the clock edge. The flip-flop samples only the stable final value, isolating downstream logic from glitches at the cost of one clock cycle of latency.
Comparative Classification Table
Table 2 summarizes the three primary logic hazard classes:
| Metric | Static-1 Hazard | Static-0 Hazard | Dynamic Hazard |
|---|---|---|---|
| Intended Behavior | Remain at 1 | Remain at 0 | Single monotonic transition |
| Observed Behavior | $1 \to 0 \to 1$ | $0 \to 1 \to 0$ | Multiple reversals ($0 \to 1 \to 0 \to 1$) |
| Minimum Gate Levels | 2 levels | 2 levels | 3 levels |
| Detection Method | K-map adjacent 1s | K-map adjacent 0s | Multi-path delay analysis |
| Circuit Correction | Redundant product term | Redundant sum term | Two-level flattening or output register |
| Occurrence Frequency | Common in minimal SOP | Common in minimal POS | Common after multi-level synthesis |
Practice Exercises
Problem 1: A 3-level combinational circuit contains three converging paths from input $A$ to output $F$. The paths exhibit propagation delays of 2 gate delays, 4 gate delays, and 6 gate delays. When input $A$ transitions from 0 to 1, the three paths attempt to drive output $F$ to high, low, and high respectively. Trace the output waveform, count the number of transitions, and classify the hazard.
View Solution
- Output Trace:
- Time $t < 2$: Output $F = 0$.
- Time $t = 2$: Path 1 arrives $\implies F$ transitions from 0 to 1 (Transition 1).
- Time $t = 4$: Path 2 arrives $\implies F$ transitions from 1 to 0 (Transition 2).
- Time $t = 6$: Path 3 arrives $\implies F$ transitions from 0 to 1 (Transition 3).
- Transition Count: The output undergoes three transitions ($0 \to 1 \to 0 \to 1$).
- Classification: Because the output was intended to make a single transition from 0 to 1, this multi-step oscillation is a dynamic hazard.
Problem 2: An EDA synthesis report shows that an asynchronous write enable signal ($\overline{WE}$) is synthesized across four levels of cascaded standard cells. Evaluate the functional risk and specify two corrective actions.
View Solution
- Functional Risk: Because the path contains four logic levels, asymmetric path skews can produce dynamic hazards. Multiple transitions on an active-low write enable line can trigger multiple spurious write cycles to memory, corrupting storage locations.
- Corrective Actions:
- Action A (Register the Signal): Route the write enable signal through a D flip-flop before driving the memory chip. Synchronous clocking suppresses all combinational oscillations.
- Action B (Enforce Two-Level Logic): Rewrite the signal logic in a flattened two-level SOP structure.
Add redundant consensus terms to eliminate static hazards, and apply synthesis constraints (
set_dont_touch) to prevent multi-level gate restructuring.
In the next article, we establish a systematic procedure to detect and eliminate all static hazards in combinational logic designs.