# 故障仿真

故障仿真是一种数字电路测试方法，它向电路设计中注入建模的故障，并仿真其行为，以衡量一组测试向量检测这些故障的效果。其输入是电路描述、测试向量序列和故障模型；其输出是故障覆盖率数值（故障评级）、标识低覆盖区域的一组未检测故障、用于测试后诊断的故障字典，以及用于测试集压缩的信息。<sup>[1](https://cdnc.itec.kit.edu/downloads/06_Fault_Simulation.pdf)</sup><sup> • </sup><sup>[2](https://www.lirmm.fr/~virazel/COURS/M2%20-%20HAE926E/Lecture/CH3%20Fault%20Simulation.pdf)</sup> 它介于仅对无故障电路建模的逻辑仿真与计算代价高得多的自动测试向量生成（ATPG）之间；故障仿真还用于对功能向量进行评级，以及找出被某个向量偶然检测到的故障。<sup>[3](https://www.ee.nthu.edu.tw/~syhuang/testing/ch3.fault_simulation.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 输出 | 故障覆盖率、未检测故障集、故障字典、测试压缩信息<sup>[1](https://cdnc.itec.kit.edu/downloads/06_Fault_Simulation.pdf)</sup> |
| 主流故障模型 | 固定型故障，覆盖近64%的CMOS缺陷<sup>[4](https://pld.ttu.ee/~raiub/BOOK/Ch_3/papers/Ch31_Fault%20simulation%20and%20fault%20injection%20technology%20based%20on%20SystemC_r.pdf)</sup> |
| 经典算法 | 串行、并行、演绎、并发、差分、PPSFP |
| 复杂度 | 对于 \( G \) 个门、\( F \) 个故障、\( P \) 个向量，约为 \( F \cdot P \cdot G \sim O(G^{3}) \)；通过故障丢弃降低<sup>[1](https://cdnc.itec.kit.edu/downloads/06_Fault_Simulation.pdf)</sup> |
| 标准基准 | ISCAS'85：C432（160个门，524个故障）至C7552（3512个门，7550个故障）<sup>[5](https://ddd.fit.cvut.cz/www/prj/Benchmarks/iscas85.pdf)</sup> |
| 已知偏差 | X态悲观性可使覆盖率被低估多达14.2%（c7552）<sup>[6](https://www.iti.uni-stuttgart.de/fileadmin/rami/files/publications/2012/ETS_HilleKWB2012.pdf)</sup> |
| 近期加速 | GPU（7–80倍）、机器学习预测（EPICS较商用工具快5.94倍）<sup>[7](https://www.iti.uni-stuttgart.de/fileadmin/rami/files/publications/2018/TCAD_SchneW2018.pdf)</sup><sup> • </sup><sup>[8](https://dl.acm.org/doi/10.1109/DAC63849.2025.11132928)</sup> |

## 工作原理

故障仿真器实际上对电路运行两次：一次按设计运行（无故障机器），一次在存在建模故障的情况下运行，然后比较输出。当施加某个测试向量时，故障响应在某个可观测的主输出上与无故障响应不同，该故障即被检测到。故障模型定义了注入什么：固定型模型将一条线固定为逻辑0或1，不论其驱动源为何；桥接模型将两条网络短路；跳变和延迟故障对时序行为建模；单粒子翻转（SEU）和单粒子瞬态（SET）模型捕捉软错误。<sup>[9](https://arxiv.org/pdf/2204.13183)</sup>

仿真前通过等价合并缩短故障列表：对于具有控制值c的n输入门，所有输入端的s-a-c故障与相应的输出故障在功能上等价，因此每个门只需考虑 \( n+2 \) 个单固定故障。<sup>[10](https://pld.ttu.ee/diagnostika/theory/fault.html)</sup> 故障仿真代价大约与 \( F \cdot P \cdot G \) 成正比，其中 \( G \) 为门数、\( F \) 为故障数、\( P \) 为向量数，比逻辑仿真高出一个因子 \( F \)（故障数量），但远低于ATPG。<sup>[1](https://cdnc.itec.kit.edu/downloads/06_Fault_Simulation.pdf)</sup>

## 操作流程

从业者的流程是：建立电路模型（采用2/3/4值逻辑编码，如0、1、X、Z，以及零延迟或单位延迟时序），导出合并后的故障列表，施加测试向量，运行仿真，并报告覆盖率。<sup>[2](https://www.lirmm.fr/~virazel/COURS/M2%20-%20HAE926E/Lecture/CH3%20Fault%20Simulation.pdf)</sup> 故障丢弃在故障被检测到后停止对该故障的仿真；它用于故障评级，但在需要完整故障字典进行诊断时应避免使用。<sup>[1](https://cdnc.itec.kit.edu/downloads/06_Fault_Simulation.pdf)</sup> 输出响应变为X或从X变化的故障被报告为可能检测到，因为它们在实践中可能不可观测。<sup>[11](http://opencircuitdesign.com/irsim/archive/fsim.pdf)</sup>

## 起源

桑达拉姆·塞舒（Sundaram Seshu）于1965年在《IEEE电子计算机汇刊》上描述了一种改进的诊断程序。<sup>[12](https://doi.org/10.1109/pgec.1965.264063)</sup> 弗雷德·H·哈迪（Fred H. Hardie）和罗伯特·J·苏霍基（Robert J. Suhocki）于1967年报告了故障仿真在Saturn计算机上的设计与使用。<sup>[13](https://doi.org/10.1109/pgec.1967.264644)</sup> D.B.阿姆斯特朗（D.B. Armstrong）于1972年在《IEEE计算机汇刊》上发表了演绎方法，<sup>[14](https://doi.org/10.1109/t-c.1972.223542)</sup> E.G.乌尔里希（E. G. Ulrich）和T.贝克（T. Baker）于1974年在《Computer》上发表了近乎相同数字网络的并发仿真。<sup>[15](https://doi.org/10.1109/mc.1974.6323496)</sup>

## 变体

**串行**仿真执行一次无故障仿真加上针对 \( n \) 个故障的 \( n \) 次独立故障仿真；它非常慢（连续 \( n+1 \) 次运行），但简单、占用内存少，且能处理底层逻辑仿真器支持的任何故障模型，包括延迟和桥接模型。<sup>[2](https://www.lirmm.fr/~virazel/COURS/M2%20-%20HAE926E/Lecture/CH3%20Fault%20Simulation.pdf)</sup><sup> • </sup><sup>[16](http://digimat.in/nptel/courses/video/117105137/lec14.pdf)</sup>

**并行**仿真是一种利用位并行性的编译码方法：每个字的第0位保存无故障值，其余位保存故障值，因此每次遍历对字长 \( w \) 仿真 \( w-1 \) 个故障，相对串行约加速 \( w-1 \) 倍。它仅适用于单位延迟或零延迟模型，且在一个字中的所有 \( w-1 \) 个故障被检测到之前，该字中的故障不能被丢弃。<sup>[1](https://cdnc.itec.kit.edu/downloads/06_Fault_Simulation.pdf)</sup><sup> • </sup><sup>[2](https://www.lirmm.fr/~virazel/COURS/M2%20-%20HAE926E/Lecture/CH3%20Fault%20Simulation.pdf)</sup>

**演绎**仿真仅显式仿真无故障电路，并使用集合论规则在每条线上传播故障列表Lᵢ，例如对于输入为0、0、输出为0的与门，为[Lₐ∩L_b]∪c；主输出处列表的并集包含被该向量检测到的故障。列表大小可能动态增长并导致内存爆炸。<sup>[1](https://cdnc.itec.kit.edu/downloads/06_Fault_Simulation.pdf)</sup><sup> • </sup><sup>[3](https://www.ee.nthu.edu.tw/~syhuang/testing/ch3.fault_simulation.pdf)</sup>

**并发**仿真为每个门维护一个坏门列表，仅存储与无故障电路不同的输入/输出值，并可在单次运行中处理多个向量。它比演绎仿真快，但运行时内存问题更严重。<sup>[1](https://cdnc.itec.kit.edu/downloads/06_Fault_Simulation.pdf)</sup><sup> • </sup><sup>[3](https://www.ee.nthu.edu.tw/~syhuang/testing/ch3.fault_simulation.pdf)</sup>

**差分**故障仿真（DSIM）分别仿真无故障机器和每个故障机器，一个接一个，仅重新处理每个机器与前一仿真机器的差异，这显著降低了内存需求；它比已有的并发故障仿真器快3至12倍。<sup>[17](https://link.springer.com/article/10.1007/BF00134011)</sup>

**PPSFP**（并行向量单故障传播）将w个测试向量打包成一个w位字，一次仿真一个故障，同时处理无故障和故障电路，从合并后的故障列表开始，一旦字中任一向量检测到某故障就将其删除。它曾在[国际测试会议](https://www.edgepedia.org/zh/international-test-conference)上被应用于跳变故障仿真。<sup>[16](http://digimat.in/nptel/courses/video/117105137/lec14.pdf)</sup><sup> • </sup><sup>[18](https://doi.org/10.1109/tcad.1987.1270316)</sup>

## 应用

基于FPGA的故障仿真（硬件仿真）加速了时序电路的故障评级，使用静态故障注入（直接修改配置）或动态故障注入（在网络表中构建控制硬件）。<sup>[1](https://cdnc.itec.kit.edu/downloads/06_Fault_Simulation.pdf)</sup> 动机是速度：仿真RTL描述比实际电路运行慢多个数量级，因此即使小型处理器也只能在非常短的时间间隔内评估。<sup>[19](https://inria.hal.science/hal-01950931/file/fps18.pdf)</sup> 硬件仿真缩短了故障测试所需的时间，但需要完全可综合的描述和附加控制电路，其复杂度随可注入存储元件数量增长。<sup>[19](https://inria.hal.science/hal-01950931/file/fps18.pdf)</sup> 在硬件方面，基于GPU的SWIFT开关级故障仿真器可处理数百万门的设计，最坏情况下比未并行化的逻辑级事件驱动仿真加速7至80倍。<sup>[7](https://www.iti.uni-stuttgart.de/fileadmin/rami/files/publications/2018/TCAD_SchneW2018.pdf)</sup> EPICS将循环融合与事件遍历以及针对大型工业时序电路的强连通分量专用算法相结合，在相同故障覆盖率下较最先进的商用工具实现5.94倍加速；其动机是[ISO 26262](https://www.edgepedia.org/zh/iso-26262)要求高诊断覆盖率，需要大量的门级故障仿真。<sup>[8](https://dl.acm.org/doi/10.1109/DAC63849.2025.11132928)</sup>

## 局限与替代方案

**故障模型失配。** 固定型模型覆盖近64%的CMOS缺陷，因此100%的固定型覆盖率数值对其余缺陷说明不了什么。<sup>[4](https://pld.ttu.ee/~raiub/BOOK/Ch_3/papers/Ch31_Fault%20simulation%20and%20fault%20injection%20technology%20based%20on%20SystemC_r.pdf)</sup>

**X态悲观性。** 经典n值算法如PPSFP和并发仿真在未知量传播时会悲观地低估覆盖率。一种基于SAT的精确算法在c7552上将计算覆盖率较3值仿真提高了多达14.2%，与近似混合仿真相比，实际可检测的故障多出多达30%。<sup>[6](https://www.iti.uni-stuttgart.de/fileadmin/rami/files/publications/2012/ETS_HilleKWB2012.pdf)</sup>

**冗余。** 不可检测的固定故障使组合电路冗余，允许门简化，且多个故障可以相互掩盖，包括循环掩盖。<sup>[10](https://pld.ttu.ee/diagnostika/theory/fault.html)</sup> 处理IDDQ、路径延迟或串扰故障模型的高效故障仿真器仍是一个公认的空白。<sup>[20](https://s2.smu.edu/~mitch/ftp_dir/pubs/mwscas05.pdf)</sup>

近似方法以精度换取速度：关键路径追踪标记敏感输入并通过后向遍历识别关键线，对于无扇出电路运行时间为 \( O(G) \)，但存在主干关键性异常和多路径敏化问题；它由米龙·阿布拉莫维奇（Miron Abramovici）、P.R.梅农（P. R. Menon）和大卫·T·米勒（David T. Miller）发表，作为故障仿真的替代方案。<sup>[1](https://cdnc.itec.kit.edu/downloads/06_Fault_Simulation.pdf)</sup><sup> • </sup><sup>[21](https://doi.org/10.1109/mdt.1984.5005582)</sup> STAFAN（统计故障分析）由苏尼尔·贾因（Sunil Jain）和维什瓦尼·阿格拉瓦尔（Vishwani Agrawal）提出，仅从逻辑仿真计算检测概率，例如对于线 \( l \) 上的固定0故障，\( d_{l} = C_{1}(l) \cdot O(l) \)，可观测性从主输出向后计算。<sup>[22](https://doi.org/10.1109/mdt.1985.294683)</sup><sup> • </sup><sup>[1](https://cdnc.itec.kit.edu/downloads/06_Fault_Simulation.pdf)</sup>

## References

1. [Testing Digital Systems I, Fault Simulation (lecture notes, M. Tahoori, KIT)](https://cdnc.itec.kit.edu/downloads/06_Fault_Simulation.pdf)
2. [CH3 Fault Simulation (Arnaud Virazel, LIRMM)](https://www.lirmm.fr/~virazel/COURS/M2%20-%20HAE926E/Lecture/CH3%20Fault%20Simulation.pdf)
3. [Ch3 Fault Simulation (S.-Y. Huang, NTHU)](https://www.ee.nthu.edu.tw/~syhuang/testing/ch3.fault_simulation.pdf)
4. [Fault simulation and fault injection technology based on SystemC (book chapter)](https://pld.ttu.ee/~raiub/BOOK/Ch_3/papers/Ch31_Fault%20simulation%20and%20fault%20injection%20technology%20based%20on%20SystemC_r.pdf)
5. [The ISCAS '85 benchmark circuits and netlist format (David Bryan, MCNC, 1988)](https://ddd.fit.cvut.cz/www/prj/Benchmarks/iscas85.pdf)
6. [Exact Stuck-at Fault Classification in the Presence of Unknowns (Hillebrecht et al., ETS 2012)](https://www.iti.uni-stuttgart.de/fileadmin/rami/files/publications/2012/ETS_HilleKWB2012.pdf)
7. [SWIFT: Switch Level Fault Simulation on GPUs (IEEE TCAD 2018)](https://www.iti.uni-stuttgart.de/fileadmin/rami/files/publications/2018/TCAD_SchneW2018.pdf)
8. [EPICS: Efficient Parallel Pattern Fault Simulation for Sequential Circuits via Strongly Connected Components (DAC 2025)](https://dl.acm.org/doi/10.1109/DAC63849.2025.11132928)
9. [MetaFI: model-driven simulator-independent fault simulation framework (arXiv 2022)](https://arxiv.org/pdf/2204.13183)
10. [Fault Modeling and Simulation (Tallinn University of Technology theory text)](https://pld.ttu.ee/diagnostika/theory/fault.html)
11. [Fault Simulation Using Irsim (Arturo Salz, Stanford, 1993)](http://opencircuitdesign.com/irsim/archive/fsim.pdf)
12. [Sundaram Seshu (1965). On an Improved Diagnosis Program. IEEE Transactions on Electronic Computers.](https://doi.org/10.1109/pgec.1965.264063)
13. [Fred H. Hardie, Robert J. Suhocki (1967). Design and Use of Fault Simulation for Saturn Computer Design. IEEE Transactions on Electronic Computers.](https://doi.org/10.1109/pgec.1967.264644)
14. [D.B. Armstrong (1972). A Deductive Method for Simulating Faults in Logic Circuits. IEEE Transactions on Computers.](https://doi.org/10.1109/t-c.1972.223542)
15. [E. G. Ulrich, T. Baker (1974). Concurrent simulation of nearly identical digital networks. Computer.](https://doi.org/10.1109/mc.1974.6323496)
16. [Digital VLSI Testing, Lecture 14: Logic and Fault Simulation (S. Chattopadhyay, IIT Kharagpur, NPTEL)](http://digimat.in/nptel/courses/video/117105137/lec14.pdf)
17. [Differential fault simulation for sequential circuits (Cheng & Yu, Journal of Electronic Testing 1:7-13, 1990)](https://link.springer.com/article/10.1007/BF00134011)
18. [Accelerated Fault Simulation and Fault Grading in Combinational Circuits (Antreich & Schulz, IEEE TCAD 1987), record page](https://doi.org/10.1109/tcad.1987.1270316)
19. [Fault Injection survey (FPS 2018, INRIA HAL)](https://inria.hal.science/hal-01950931/file/fps18.pdf)
20. [A Survey and Comparison of Digital Logic Simulators (MWSCAS 2005)](https://s2.smu.edu/~mitch/ftp_dir/pubs/mwscas05.pdf)
21. [Miron Abramovici, P. R. Menon, David T. Miller (1984). Critical Path Tracing: An Alternative to Fault Simulation. IEEE Design & Test of Computers.](https://doi.org/10.1109/mdt.1984.5005582)
22. [Sunil Jain, Vishwani Agrawal (1985). Statistical Fault Analysis. IEEE Design & Test of Computers.](https://doi.org/10.1109/mdt.1985.294683)

---
*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Sep 30, 2026 · Last review: Sep 30, 2026*

Topic: 技术与人造世界 › 工程与制造 › 计算机辅助工程与电子设计自动化

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/fault-simulation

English original: https://www.edgepedia.org/fault-simulation
