# 双模块冗余

双模块冗余（DMR）是一种容错技术：它复制一个硬件或软件模块，让两个副本在相同输入上运行，并比较它们的输出以检测错误。它提供错误检测，但不提供内在纠正：没有第三个副本，标准DMR无法在线掩蔽错误，因此任何检测到的故障都必须由外部机制处理，例如系统复位或监控控制。<sup>[1](https://arxiv.org/pdf/2603.14411)</sup> 纠正则需要恢复过程，例如从检查点重新执行或回滚，这会增加延迟和设计复杂度。<sup>[2](https://trea.com/information/reducing-the-uncorrectable-error-rate-in-a-lockstepped-dual-modular-redundancy-s/patentgrant/2162af3e-ac06-47b1-aaca-5c0c133c6eb4)</sup> 相对于这一代价，DMR的硬件开销低于三模块冗余（TMR）；TMR可立即纠正错误，但会使资源或执行时间增至三倍。<sup>[3](https://iris.uniroma1.it/bitstream/11573/1722549/1/Barbirotta_Dynamic_2024.pdf)</sup> 复制并比较可以检测故障，但无法诊断哪个副本有故障。<sup>[4](https://cdnc.itec.kit.edu/downloads/lecture4-reliable-computing-1-2016-2017.pdf)</sup>

| 关键事实 | 细节 |
|---|---|
| DMR 能提供什么 | 仅错误检测；纠正需要外部恢复（复位、回滚或切换备用）<sup>[1](https://arxiv.org/pdf/2603.14411)</sup><sup> • </sup><sup>[2](https://trea.com/information/reducing-the-uncorrectable-error-rate-in-a-lockstepped-dual-modular-redundancy-s/patentgrant/2162af3e-ac06-47b1-aaca-5c0c133c6eb4)</sup> |
| 检测机制 | 两个相同副本以已知时间延迟锁步运行；比较器逐周期标记任何输出不匹配<sup>[5](https://ww1.microchip.com/downloads/aemDocuments/documents/FPGA/ApplicationNotes/ApplicationNotes/Microchip_RT_PolarFire_FPGA_Lockstep_Processor_AN4228.pdf)</sup> |
| 典型时间延迟 | 两个处理器之间0.5至2个时钟周期，足以检测大多数常见错误<sup>[5](https://ww1.microchip.com/downloads/aemDocuments/documents/FPGA/ApplicationNotes/ApplicationNotes/Microchip_RT_PolarFire_FPGA_Lockstep_Processor_AN4228.pdf)</sup> |
| 成本 | 一旦计入检查点和回滚，传统DMR实现的总体成本超过非冗余系统的两倍<sup>[3](https://iris.uniroma1.it/bitstream/11573/1722549/1/Barbirotta_Dynamic_2024.pdf)</sup> |
| 主要失效模式 | 以相同方式影响两个副本的共模故障，以及作为单点故障的比较器<sup>[4](https://cdnc.itec.kit.edu/downloads/lecture4-reliable-computing-1-2016-2017.pdf)</sup> |
| 主要用途 | 航空电子、航天器、ISO 26262下的汽车ASIL-D锁步核心，以及抗辐射信任根设计<sup>[6](https://code.garrettmills.dev/Archives/papers-we-love_papers-we-love/raw/commit/5e2c7f7e4d349c5b218f6d99b051335d82b5b27a/distributed_systems/sift-design-and-analysis-of-a-fault-tolerant-computer-for-aircraft-contro.pdf)</sup><sup> • </sup><sup>[7](https://www.chipsalliance.org/news/implementing-dual-core-lockstep-in-the-veer-el2-risc-v-core/)</sup> |

## 工作原理

在锁步DMR系统中，两个相同的处理器核心执行相同的指令流，彼此错开几个周期以引入时间多样性，并定期比较它们的结果。<sup>[3](https://iris.uniroma1.it/bitstream/11573/1722549/1/Barbirotta_Dynamic_2024.pdf)</sup> 比较器逐周期将两个处理器输出之间的任何差异标记为错误。<sup>[5](https://ww1.microchip.com/downloads/aemDocuments/documents/FPGA/ApplicationNotes/ApplicationNotes/Microchip_RT_PolarFire_FPGA_Lockstep_Processor_AN4228.pdf)</sup> 因为两个核心运行同一程序，任一核心出错都会使结果不同，这正是故障可被检测的原因。<sup>[2](https://trea.com/information/reducing-the-uncorrectable-error-rate-in-a-lockstepped-dual-modular-redundancy-s/patentgrant/2162af3e-ac06-47b1-aaca-5c0c133c6eb4)</sup>

比较器依赖两个假设。第一，两个副本不会在同一时间以同一方式失效；若故障以相同方式破坏两个副本，就会产生相同的错误输出而不被检测到。第二，副本保持足够紧密的同步，使对应输出可以配对比较。副本之间的延迟用于这种配对：时间偏移为0.5至2个时钟周期时，大多数常见错误可被检测到。<sup>[5](https://ww1.microchip.com/downloads/aemDocuments/documents/FPGA/ApplicationNotes/ApplicationNotes/Microchip_RT_PolarFire_FPGA_Lockstep_Processor_AN4228.pdf)</sup> 同样的“不匹配即错误”原则出现在早期航空电子设计中：SIFT飞机控制计算机（SIFT aircraft-control computer）将输出的非相同副本视为错误，并记录在处理器存储器中，供执行系统分析。<sup>[6](https://code.garrettmills.dev/Archives/papers-we-love_papers-we-love/raw/commit/5e2c7f7e4d349c5b218f6d99b051335d82b5b27a/distributed_systems/sift-design-and-analysis-of-a-fault-tolerant-computer-for-aircraft-contro.pdf)</sup>

## 如何实现

在处理器上实现DMR涉及三个实际要素：核心同步、额外延迟组件，以及用于比较和检查点的数据存储。<sup>[3](https://iris.uniroma1.it/bitstream/11573/1722549/1/Barbirotta_Dynamic_2024.pdf)</sup> 工程师以固定延迟错开两个副本，将延迟后的输入馈送给第二个副本，并构建比较器逻辑，在每个周期检查对应输出。微检查器可以比较核心之间各结构的值，例如缓存内容；发生锁步故障时，故障逻辑随后将一个核心重新同步到另一个核心，从而减少误报的不可纠正错误。<sup>[2](https://trea.com/information/reducing-the-uncorrectable-error-rate-in-a-lockstepped-dual-modular-redundancy-s/patentgrant/2162af3e-ac06-47b1-aaca-5c0c133c6eb4)</sup>

处理不一致是区分DMR变体的设计决策。选项包括停止并等待系统复位，如CHIPS Alliance VeeR EL2双核锁步模块，将任何检测到的错误交由外部控制器处理并等待复位<sup>[7](https://www.chipsalliance.org/news/implementing-dual-core-lockstep-in-the-veer-el2-risc-v-core/)</sup>；回滚到已存储的检查点并重新执行；或通过重配置机制切换到备用单元。<sup>[4](https://cdnc.itec.kit.edu/downloads/lecture4-reliable-computing-1-2016-2017.pdf)</sup> [ISO 26262](https://www.edgepedia.org/zh/iso-26262)实践通过错开两个副本的运行时序来提升时间多样性，使错误串行化，从而作为两个可检测事件到达检查器，这减轻共模故障但不完全消除。<sup>[21](https://www.mdpi.com/2079-9292/12/2/464)</sup><sup> • </sup><sup>[8](https://upcommons.upc.edu/bitstreams/ff036a58-dce3-4e1e-9f72-aea2ed913121/download)</sup>

## 起源

思想基础是J. 冯·诺伊曼（J. von Neumann）1956年的讲义材料《概率逻辑与由不可靠元件合成可靠有机体》（Probabilistic Logics and the Synthesis of Reliable Organisms From Unreliable Components），由[普林斯顿大学出版社](https://www.edgepedia.org/zh/princeton-university-press)（Princeton University Press）出版；其中引入了通过多路复用控制错误的一般过程，并奠定了由不可靠元件构建可靠系统的理论。<sup>[9](https://doi.org/10.1515/9781400882618-003)</sup> 带不一致检测器和多数表决器的复制与比较，自第一代计算机起就被使用，同时还有错误检测码和自检逻辑。<sup>[10](https://ntrs.nasa.gov/api/citations/19810010149/downloads/19810010149.pdf)</sup> 早期航空电子应用是[土星五号](https://www.edgepedia.org/zh/saturn-v)（Saturn V）制导与控制计算机，1961年开始设计；其逻辑元件采用三重复制并表决，而磁芯存储器则通过带奇偶校验的复制来保护以进行错误检测。<sup>[11](https://ntrs.nasa.gov/api/citations/19690031505/downloads/19690031505.pdf)</sup> SIFT飞机控制计算机后来使用“三取二”表决选择输出值，记录不匹配供执行系统诊断。<sup>[6](https://code.garrettmills.dev/Archives/papers-we-love_papers-we-love/raw/commit/5e2c7f7e4d349c5b218f6d99b051335d82b5b27a/distributed_systems/sift-design-and-analysis-of-a-fault-tolerant-computer-for-aircraft-contro.pdf)</sup>

## 变体

带恢复方案的DMR应用于可靠处理器，以检测故障并从故障状态恢复，即使故障发生在处理器内部。<sup>[12](https://www28.cs.kobe-u.ac.jp/wp-content/uploads/2017/03/A-Low-Latency-DMR-Architecture-with-Fast-Checkpoint-Recovery-Scheme.pdf)</sup> 混合方案将复制并比较与备用冗余结合：一对复制单元比较输出，并向重配置单元发出错误信号，由后者切换到备用单元；备用单元可以是冷备用（不活动，需要预热）或热备用（与系统处于相同状态，启动迅速）。<sup>[4](https://cdnc.itec.kit.edu/downloads/lecture4-reliable-computing-1-2016-2017.pdf)</sup> 采用选择性擦洗的DMR+与完整TMR相比，将查找表开销降低50%，触发器开销降低16.7%，但若不反复擦洗，无法容忍永久性硬件故障。<sup>[1](https://arxiv.org/pdf/2603.14411)</sup> 自表决电路使DMR逻辑以更小面积达到与TMR相同的单事件瞬态保护。<sup>[13](https://www.osti.gov/servlets/purl/1142901)</sup> 采样DMR仅在约1%的时间运行于DMR模式，以低开销检测永久性故障。<sup>[14](https://research.cs.wisc.edu/vertical/papers/2011/isca11-sdmr.pdf)</sup> 双2取2使用子系统的两个副本以提高可用性，每个子系统内部采用2取2进行故障检测。<sup>[15](https://course.ece.cmu.edu/~ece642/lectures/33_RedundancyManagement.pdf)</sup> 双核锁步（DCLS）是DMR的处理器形式，具有延迟影子副本，如VeeR EL2实现中那样。<sup>[7](https://www.chipsalliance.org/news/implementing-dual-core-lockstep-in-the-veer-el2-risc-v-core/)</sup>

## 应用

凡需要以低于三重化的成本检测计算故障之处，都会出现DMR。在航天器和运载火箭中，土星五号计算机复制其磁芯存储器，并采用奇偶校验<sup>[11](https://ntrs.nasa.gov/api/citations/19690031505/downloads/19690031505.pdf)</sup>，SIFT将不匹配记录应用于飞机控制。<sup>[6](https://code.garrettmills.dev/Archives/papers-we-love_papers-we-love/raw/commit/5e2c7f7e4d349c5b218f6d99b051335d82b5b27a/distributed_systems/sift-design-and-analysis-of-a-fault-tolerant-computer-for-aircraft-contro.pdf)</sup> 在汽车设计中，ISO 26262要求：当对最高完整性等级ASIL-D的项应用ASIL分解时，冗余安全要求须由足够独立的元素实现；对于计算核心，这通过双核锁步实现<sup>[16](https://upcommons.upc.edu/server/api/core/bitstreams/def43000-8180-41c6-8ef6-a67e0ec5954b/content)</sup>；近期一项综述指出，DCLS仍是主流的ASIL-D安全机制，并引用了Andes D45-SE，该产品将DCLS与实时诊断电路集成。<sup>[17](https://arxiv.org/abs/2604.17391)</sup><sup> • </sup><sup>[22](https://standards.iteh.ai/catalog/standards/iso/2ac3ad99-7439-4817-a402-74543eb2965b/iso-26262-9-2018)</sup> 在开放硬件中，CHIPS Alliance为VeeR EL2 RISC-V核心提供的DCLS模块面向抗辐射加固和侧信道缓解，包括Caliptra信任根（Caliptra Root of Trust）项目。<sup>[7](https://www.chipsalliance.org/news/implementing-dual-core-lockstep-in-the-veer-el2-risc-v-core/)</sup> 锁步DMR系统还可将资源专用于安全关键任务，使不匹配能被快速识别，而不受非关键任务干扰。<sup>[18](https://www.cs.virginia.edu/~skadron/Papers/cases11.pdf)</sup>

## 局限与替代方案

核心失效模式是共模故障：如果两个副本以完全相同的方式失效，它们产生相同的错误输出，比较器看不到不一致，DMR就无法检测故障。<sup>[19](https://opencw.aprende.org/resources/res-6-004-principles-of-computer-system-design-an-introduction-spring-2009/online-textbook/faults_open_5_0.pdf)</sup> 当负载或故障是共同的时，相同的冗余部件也共有这一局限；而且基于同一设计的副本仍有成本，即使低于开发第一个副本的成本。<sup>[20](https://onlinelibrary.wiley.com/doi/10.1111/j.0272-4332.2004.00539.x)</sup> 复制并比较只能检测而无法诊断哪个副本有故障，且比较器本身是单点故障。<sup>[4](https://cdnc.itec.kit.edu/downloads/lecture4-reliable-computing-1-2016-2017.pdf)</sup> DMR还可能因检测出不会导致系统故障的错误而提高错误率。<sup>[2](https://trea.com/information/reducing-the-uncorrectable-error-rate-in-a-lockstepped-dual-modular-redundancy-s/patentgrant/2162af3e-ac06-47b1-aaca-5c0c133c6eb4)</sup>

与TMR相比，权衡在于检测与掩蔽：TMR几乎立即纠正错误，但硬件资源或执行时间增至三倍，无法容忍多重故障或潜伏硬故障之后的故障，硬件和功耗成本约为3倍，并且共有其相同副本的设计故障。<sup>[3](https://iris.uniroma1.it/bitstream/11573/1722549/1/Barbirotta_Dynamic_2024.pdf)</sup><sup> • </sup><sup>[4](https://cdnc.itec.kit.edu/downloads/lecture4-reliable-computing-1-2016-2017.pdf)</sup> 其超模块可靠性组合为 \( R_{\mathrm{supermodule}} = 3R^{2} - 2R^{3} \)，包括表决器、输入和输出在内的一切都应复制。<sup>[19](https://opencw.aprende.org/resources/res-6-004-principles-of-computer-system-design-an-introduction-spring-2009/online-textbook/faults_open_5_0.pdf)</sup> 高阶多模块冗余（如五模块冗余或四重冗余）随着保护逻辑、面积和表决器复杂度增长，实际收益递减<sup>[1](https://arxiv.org/pdf/2603.14411)</sup>；在任何基于表决器的方案中，表决器都可能成为单点故障。<sup>[15](https://course.ece.cmu.edu/~ece642/lectures/33_RedundancyManagement.pdf)</sup> 时间冗余在面积开销上优于DMR和TMR，但会带来较大的周期代价，因而难以应用。<sup>[12](https://www28.cs.kobe-u.ac.jp/wp-content/uploads/2017/03/A-Low-Latency-DMR-Architecture-with-Fast-Checkpoint-Recovery-Scheme.pdf)</sup>

## References

1. [Survey on modular redundancy strategies (TMR vs DMR/NMR)](https://arxiv.org/pdf/2603.14411)
2. [Reducing the uncorrectable error rate in a lockstepped dual-modular redundancy system (patent)](https://trea.com/information/reducing-the-uncorrectable-error-rate-in-a-lockstepped-dual-modular-redundancy-s/patentgrant/2162af3e-ac06-47b1-aaca-5c0c133c6eb4)
3. [Dynamic Triple Modular Redundancy in Interleaved-Multi Threading microprocessor cores (Barbirotta et al., 2024)](https://iris.uniroma1.it/bitstream/11573/1722549/1/Barbirotta_Dynamic_2024.pdf)
4. [Reliable Computing I (KIT lecture notes, 2016/2017)](https://cdnc.itec.kit.edu/downloads/lecture4-reliable-computing-1-2016-2017.pdf)
5. [RT PolarFire Lockstep Processor Application Note (AN4228)](https://ww1.microchip.com/downloads/aemDocuments/documents/FPGA/ApplicationNotes/ApplicationNotes/Microchip_RT_PolarFire_FPGA_Lockstep_Processor_AN4228.pdf)
6. [SIFT: Design and Analysis of a Fault-Tolerant Computer for Aircraft Control](https://code.garrettmills.dev/Archives/papers-we-love_papers-we-love/raw/commit/5e2c7f7e4d349c5b218f6d99b051335d82b5b27a/distributed_systems/sift-design-and-analysis-of-a-fault-tolerant-computer-for-aircraft-contro.pdf)
7. [Dual-core Lockstep in the VeeR EL2 RISC-V core for safety-critical applications and side-channel access mitigation in Caliptra RoT](https://www.chipsalliance.org/news/implementing-dual-core-lockstep-in-the-veer-el2-risc-v-core/)
8. [UPC document on lockstep per ISO 26262](https://upcommons.upc.edu/bitstreams/ff036a58-dce3-4e1e-9f72-aea2ed913121/download)
9. [J. von Neumann (1956). Probabilistic Logics and the Synthesis of Reliable Organisms From Unreliable Components. Princeton University Press eBooks.](https://doi.org/10.1515/9781400882618-003)
10. [NASA NTRS fault-tolerance survey (1981)](https://ntrs.nasa.gov/api/citations/19810010149/downloads/19810010149.pdf)
11. [Design Methods for Fault-Tolerant electronics (NASA, 1969)](https://ntrs.nasa.gov/api/citations/19690031505/downloads/19690031505.pdf)
12. [A Low-Latency DMR Architecture with Fast Checkpoint Recovery Scheme (IEICE Trans. E98-C, April 2015)](https://www28.cs.kobe-u.ac.jp/wp-content/uploads/2017/03/A-Low-Latency-DMR-Architecture-with-Fast-Checkpoint-Recovery-Scheme.pdf)
13. [Self-voting circuits enable DMR logic to achieve the same level of SET protection as TMR logic (OSTI)](https://www.osti.gov/servlets/purl/1142901)
14. [Sampling + DMR: Practical and Low-overhead Permanent Fault Detection (ISCA 2011)](https://research.cs.wisc.edu/vertical/papers/2011/isca11-sdmr.pdf)
15. [18-642/ECE 642 Redundancy Management lecture notes (CMU, Koopman)](https://course.ece.cmu.edu/~ece642/lectures/33_RedundancyManagement.pdf)
16. [UPC thesis/paper on automotive safety redundancy](https://upcommons.upc.edu/server/api/core/bitstreams/def43000-8180-41c6-8ef6-a67e0ec5954b/content)
17. [RISC-V Functional Safety for Autonomous Automotive Systems: An Analytical Framework and Research Roadmap for ML-Assisted Certification](https://arxiv.org/abs/2604.17391)
18. [Cost-effective Safety and Fault Localization using DMR (CASES 2011)](https://www.cs.virginia.edu/~skadron/Papers/cases11.pdf)
19. [Principles of Computer System Design (Saltzer & Kaashoek), fault tolerance chapter](https://opencw.aprende.org/resources/res-6-004-principles-of-computer-system-design-an-introduction-spring-2009/online-textbook/faults_open_5_0.pdf)
20. [On the Limitations of Redundancies in the Improvement of System Reliability](https://onlinelibrary.wiley.com/doi/10.1111/j.0272-4332.2004.00539.x)
21. [mdpi.com](https://www.mdpi.com/2079-9292/12/2/464)
22. [European, American and International Standards online - iTeh Standards](https://standards.iteh.ai/catalog/standards/iso/2ac3ad99-7439-4817-a402-74543eb2965b/iso-26262-9-2018)

---
*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/dual-modular-redundancy

English original: https://www.edgepedia.org/dual-modular-redundancy
