FormalFixer: Intent-Aligned Automated Hardware Repair via Joint Refinement of Specifications, Assertions, and RTL Implementations
Organizations: The Hong Kong University of Science and Technology (Guangzhou)
Abstract
Functional errors in hardware designs can compromise correctness and security, and must be fixed before tape-out. Formal property verification (FPV) provides strong guarantees by proving or refuting assertions, but a failed assertion is not always evidence of an RTL defect: the failure may also come from a buggy assertion or from a specification that is semantically correct but too ambiguous or incomplete for direct formalization. This creates a practical repair problem that existing RTL-centric methods do not directly address: the repair loop must align specification intent, verification intent, and RTL behavior before deciding which artifact to change. FormalFixer addresses this problem with a multi-stage, intent-aligned repair workflow for Verilog designs with assertions. It preserves the original specification as authoritative ground truth and appends confidence-filtered refinements to clarify implicit constraints. FormalFixer uses both intent mismatch and verifier-generated counterexample cone graphs to guide iterative RTL patching. This workflow explicitly checks specification--assertion--RTL correspondence. Results support intent alignment for FPV-based hardware repair.
Figures & tables
| SA | Model | Fixer | SVA-Eval-Human (%) | SVA-Eval-Machine (%) | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Pass@1 | RTL Fixed@1 | Pass@5 | RTL Fixed@5 | Pass@1 | RTL Fixed@1 | Pass@5 | RTL Fixed@5 | |||
| Yes | Qwen3.5-Flash | Separate | 68.42 | 78.95 | 84.21 | 92.11 | 72.57 | 73.37 | 82.86 | 84.01 |
| GLM-4.7 | Separate | 78.95 | 92.11 | 89.47 | 94.74 | 76.23 | 77.14 | 84.46 | 85.14 | |
| DeepSeek V3.2 | Separate | 71.05 | 84.21 | 86.84 | 94.74 | 71.02 | 72.39 | 82.01 | 82.57 | |
| GLM-4.7 | Shared | 42.11 | 73.68 | 68.42 | 84.21 | 59.03 | 64.80 | 76.97 | 74.17 | |
| No | GLM-4.7 | Separate | 63.16 | 84.21 | 68.42 | 71.05 | 63.31 | 73.94 | 70.06 | 73.26 |
| SA | Model | Fixer | SVA-Eval-Human (%) | SVA-Eval-Machine (%) | ||||
|---|---|---|---|---|---|---|---|---|
| Pre-Fix@5 | Staged Fix@5 | False-Neg@5 | Pre-Fix@5 | Staged Fix@5 | False-Neg@5 | |||
| Yes | Qwen3.5-Flash | Separate | 50.00 | 34.21 | 2.63 | 51.20 | 34.06 | 6.47 |
| GLM-4.7 | Separate | 57.89 | 31.58 | 2.63 | 43.09 | 41.37 | 5.43 | |
| DeepSeek V3.2 | Separate | 55.26 | 31.58 | 0.00 | 46.97 | 34.74 | 5.49 | |
| GLM-4.7 | Shared | 28.95 | 39.47 | 0.00 | 49.14 | 27.83 | 10.51 | |
| No | GLM-4.7 | Separate | 31.58 | 36.84 | 2.63 | 41.71 | 28.35 | 12.34 |
Automated Program Repair
Automated program repair develops methods that locate software faults and produce validated fixes with limited human effort.
See all 177 papers