TL;DR
Traditional spectrum-based bug localization methods fail on sequential hardware designs because a bug's activation and its visible failure are often separated by multiple clock cycles. Pecker solves this by calculating the minimum propagation delay to backtrack to the exact cycle of bug activation and pruning subsequent "polluted" traces. This approach reconstructs the true causal chain of a hardware fault, localizing 85% of bugs within the top 5 ranks and significantly outperforming state-of-the-art baselines.
What Problem Does This Paper Address?
When debugging software or simple combinational hardware circuits, developers often rely on Spectrum-Based Fault Localization (SBFL). SBFL analyzes which lines of code execute during passing versus failing tests to calculate a "suspiciousness" score for each statement. This works because the cause and effect usually happen in tandem.
However, in sequential hardware circuits (circuits with memory elements like registers), this assumption completely breaks down. The authors identify two fundamental challenges:
- Timing Misalignment: A buggy statement might corrupt an internal state register in Cycle 1, but that error might not propagate to an observable output until Cycle 2 or later. Standard SBFL tools mistakenly blame the code executed in the cycle where the failure was observed, completely missing the root cause.
- State Pollution: Once an internal state is corrupted, it continues to contaminate all downstream computations in subsequent cycles. This creates massive noise in the execution trace, making it unclear whether a later failure is due to a new bug activation or just the lingering effect of the original fault.
Methods
Pecker introduces a novel framework designed to reconstruct the broken causal chain through three main steps:
- Hardware-Aware Program Dependency Graph (PDG): Pecker adapts traditional software PDGs to hardware description languages (HDLs) by treating registers as explicit nodes. This allows the graph to capture how data flows across clock boundaries over multiple cycles.
- Temporal Backtracking via EMPC: The framework introduces Estimated Minimal Propagation Cycles (EMPC)—the minimum number of clock cycles required for a fault at a specific statement to reach an observable output. By subtracting the EMPC from the cycle where the failure was first observed ($C_{obs}$), Pecker pinpoints the exact candidate cycle where the bug must have been activated ($C_{act}$).
- Strategic Trace Pruning: To combat state pollution, Pecker cuts off and discards all execution trace data after the calculated activation cycle ($C_{act}$). This isolates the initial fault manifestation and provides a clean, noise-free context for scoring.
- Dual Suspiciousness Scoring: Instead of a single statistical formula, Pecker ranks statements using two metrics: Activation-Execution-Failure (how often a statement executed in its activation cycle across failing tests) and Inverse Activation-Execution-Pass (prioritizing statements that rarely execute during passing cycles).
Datasets
The authors evaluated Pecker using a benchmark set compiled from prior prominent hardware debugging works (Tarsel and Wit-HW). The dataset consists of 12 hardware designs containing 41 bugs, each paired with a bug-triggering test case written by verification engineers. The benchmarks are divided into three difficulty tiers:
- Easy (Combinational):
decoder,alu - Medium (Small Sequential):
counter,lshift,led_controller,arbiter,fsm_full,fsm_16 - Hard (Industrial Sequential):
sdram_controller,sha3,i2c,reed_decoder
Key Insights and Ideas
- More Data Isn't Always Better: In sequential debugging, long execution traces after a failure are actually harmful. Treating the post-failure trace as "state pollution" and aggressively pruning it yields a much cleaner signal for localization algorithms.
- The Power of the Lower Bound: While the maximum propagation delay of a hardware bug can be infinite due to sequential loops, the minimum propagation cycle (EMPC) is finite and structurally deterministic. This makes it a highly reliable mathematical anchor for backtracking.
- Time is the Missing Dimension: Software SBFL treats execution as a flat set of frequencies. Hardware debugging requires treating execution as a time-series graph where the distance between nodes is measured in clock cycles.
Key Results
Pecker significantly outperformed existing state-of-the-art hardware debugging tools (Tarsel, Detraque, and Wit-HW) across the board:
- Localization Accuracy: Pecker successfully localized 51% of bugs in the Top-1 rank, 80% in the Top-3, and 85% in the Top-5.
- Mean First Rank (MFR): Pecker achieved an average bug rank of 9.0, notably lower (better) than Tarsel (12.2), Detraque (12.9), and Wit-HW (14.8).
- Sequential Robustness: On medium-difficulty sequential circuits, where other tools suffered a "sharp decline" in accuracy (e.g., Tarsel's Top-5 accuracy dropped from 92% to 56%), Pecker maintained a robust 94% accuracy.
- EMPC Precision: The calculated activation cycles matched the true, human-verified bug activation cycles with an average accuracy of 88%.
Limitations and Future Work
While full trace truncation successfully eliminates state pollution noise, the authors note a slight trade-off: completely discarding the later trace might occasionally throw away minor, non-noisy informative segments that could help differentiate between highly correlated statements.
As a next step, the researchers plan to evolve the blunt "full truncation" strategy into a more selective extraction method that can filter out state pollution while preserving subtle, useful downstream clues.
Summary updated