SafeLS: Toward Building a Lockstep NOEL-V Core

Marcel Sarraseca, Sergi Alcaide, Francisco Fuentes, Juan Carlos Rodriguez, Feng Chang, Ilham Lasfar, Ramon Canal, Francisco J. Cazorla, Jaume AbellaarXiv 2023 · DOI · arXiv

Abstract

SafeLS introduces an open-source lockstep implementation for the RISC-V NOEL-V core, specifically designed to protect safety-critical systems against random hardware errors. By using time-staggered execution between two redundant cores, it detects faults that would otherwise bypass standard redundancy, providing a transparent safety layer for automotive and aerospace applications. This work fills a critical gap in the open-source hardware ecosystem, offering a blueprint for high-integrity RISC-V designs.

Introduction

In safety-critical domains such as automotive (ISO 26262), avionics, and space, "silent data corruption" is a primary concern. Random hardware faults—often caused by radiation-induced bit flips or electromagnetic interference—can lead to catastrophic system failures. While spatial redundancy, such as Dual Modular Redundancy (DMR), is a common mitigation strategy, it remains vulnerable to Common Cause Failures (CCFs). If two identical cores are in the exact same electrical state and a fault (like a power spike or clock glitch) hits both, they may produce identical errors that bypass simple comparison logic.

The SafeLS Architecture

The SafeLS approach relies on two main pillars to ensure robust fault detection while maintaining design simplicity:

  1. Core-Level Replication: The researchers chose to set the "sphere of replication" at the core level rather than the pipeline stage level. Replicating at the pipeline level allows for immediate error detection but is highly intrusive, requiring a total redesign of the core's internals. By wrapping an existing, validated core (NOEL-V) with safety logic, SafeLS significantly reduces the engineering and re-verification burden.
  2. Time Staggering: Instead of running two cores in perfect synchronization, SafeLS introduces a programmable delay (typically 2 or 3 cycles) between them. The "leading" core receives inputs immediately, while the "trailing" core receives them after the delay. This ensures the cores are never in the same electrical state at the same time, making it nearly impossible for a single transient fault to cause identical errors in both.
The SafeLS lockstep mechanism featuring time-staggered execution and output comparison.

As shown in the architecture diagram above, all input signals (data, interrupts) are replicated. The leading core's outcomes (output data, exceptions) are buffered to align with the trailing core. A comparator then checks the results; if a discrepancy is found, a system-level interrupt is raised.

SoC Integration and Results

The SafeLS architecture has been fully integrated into the open-source SELENE SoC. This integration demonstrates the practical feasibility of the design in a complex system environment. To user-level software, the two redundant cores appear as a single, highly reliable core, ensuring software transparency.

The SELENE SoC architecture featuring integrated SafeLS lockstep core pairs.

Key results from the implementation include:

  • Functional Reliability: The system successfully identifies discrepancies between cores and raises interrupts, preventing erroneous data from propagating to the rest of the SoC.
  • Design Efficiency: By using a coarse-grained replication strategy, the authors were able to provide safety features without the massive overhead of a full core redesign.

Limitations and Future Work

While SafeLS provides a robust detection mechanism, current iterations have areas for optimization. The design currently includes L1 caches within the sphere of replication, which is area-inefficient. Future work aims to move the replication boundary to exclude L1 caches, relying instead on parity or ECC for cache protection to reduce power and area overhead. Additionally, while SafeLS detects errors, the current focus is on detection rather than automated hardware-level recovery (e.g., checkpointing and rollback), leaving error management primarily to system-level software interrupts.

Summary updated

Abstract

Safety-critical systems such as those in automotive, avionics and space, require appropriate safety measures to avoid silent data corruption upon random hardware errors such as those caused by radiation and other types of electromagnetic interference. Those safety measures must be able to prevent faults from causing the so-called common cause failures (CCFs), which occur when a fault produces identical errors in redundant elements so that comparison fails to detect the errors and a failure arises. The usual solution to avoid CCFs in CPU cores is using lockstep cores, so that two cores execute the same flow of instructions, but with some time staggering so that their state is never identical and faults can only lead to different errors, which are then detectable by means of comparison. This paper extends Gaisler's RISC-V NOEL-V core with lockstep; and presents future prospects for its use and distribution.
BibTeX
@misc{sarraseca2023safels,
  author = {Marcel Sarraseca and Sergi Alcaide and Francisco Fuentes and Juan Carlos Rodriguez and Feng Chang and Ilham Lasfar and Ramon Canal and Francisco J. Cazorla and Jaume Abella},
  title = {{SafeLS: Toward Building a Lockstep NOEL-V Core}},
  year = {2023},
  eprint = {2307.15436},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.15436},
}
Figure