---
title: Software-Based Self-Testing Approach
url: https://www.emergentmind.com/topics/software-based-self-testing-approach
type: topic
---

# Software-Based Self-Testing Approach

Software-Based Self-Testing Approach

Software-Based Self-Testing (SBST) comprises a collection of methodologies for verifying correct operation and detecting faults in processor-based or system-on-chip (SoC) devices by executing software test routines directly on the hardware under test. These approaches play a central role in automotive, aerospace, medical, and security-sensitive embedded systems, as they enable in-field, at-speed validation under real operational conditions with minimal hardware overhead. SBST methodology encompasses the generation, execution, and assessment of structured test programs (or self-test libraries), which may be fully software-driven or leverage hybrid software/hardware mechanisms for fault activation, propagation, and observability.

## 1. Principles and Architectures of SBST

SBST is characterized by leveraging the native programmable resources of a device to perform in-field self-testing, typically by running sequences of carefully designed instructions (test programs, TPs) that stimulate various hardware modules. Each instruction of a TP activates and propagates internal faults to externally observable points, thus mapping software operation onto underlying fault models such as stuck-at or delay defects [2109.00958].

Architecturally, SBST can be realized as:
- Purely software test libraries (STLs) executing as application-like routines.
- Software/hardware hybrid approaches coupling software scheduling and hardware-based pattern generation or response compaction units for enhanced coverage and observability [2410.05109].
- Integrated online and in-field test frameworks utilizing multi-threaded architectures, such as System Hyper Pipelining (SHP), to facilitate non-interfering, periodic self-test within normal SoC operation [2412.19924].

## 2. Test Program Construction and Compaction

Test program construction generally involves deterministic, ATPG-derived routines targeting combinational logic, pseudorandom-coded sequences for sequential logic, and specialized algorithms for memories and register files. Modern STLs, provided by major semiconductor vendors, are tailored to the underlying microarchitecture and operational constraints (e.g., downtime, memory footprint).

Minimizing the size and execution time of SBST routines without degrading fault coverage is critical for in-field deployment. Formalizing the compaction problem:
- Given an original test sequence $T = \langle i_1, \dots, i_n \rangle$ achieving fault coverage $C(T)$ over fault set $F$, the objective is
  \[
  \min |T_{\mathrm{compact}}| \quad \text{s.t.} \quad C(T_{\mathrm{compact}}) \geq C(T) - \Delta
  \]
A microarchitectural tracing and single-fault simulation-based compaction algorithm can identify and eliminate non-essential basic blocks with a single simulation run, yielding size reductions up to 93.9% and time reductions up to 95% with a maximum fault coverage degradation $\Delta_C$ < 0.4% [2109.00958].

## 3. Automation, Workflow, and Framework Instantiations

SBST approaches may be realized by integrating several automation components:
- Test-vector and golden-reference generators, typically driven by random or systematic parameter sweeps with Python or C-based application code [2504.07555].
- Configurable CLIs and orchestration tools for full-system integration testing, supporting both simulation and FPGA execution targets.
- In complex SoC or self-organizing algorithms, model-based testing frameworks utilize probabilistic environment profiles (Markov processes) to systematically generate representative scenarios while maintaining state-space tractability [1606.02442].

A representative SBST workflow, such as in the TestIt package, consists of:
1. Setup and parameter configuration.
2. Automated test-vector and golden-reference generation.
3. Building and deploying the self-test application.
4. Execution on the target hardware (simulation or FPGA).
5. Output parsing, pass/fail assessment, and metric aggregation [2504.07555].

## 4. Fault Activation, Propagation, and Observability

Proper SBST efficacy requires not only activating latent faults but ensuring their manifestation at observable device interfaces. Fault models include gate-level stuck-at, delay, and bridging faults. Activation coverage is maximized via ATPG-compliant routines; propagation is evaluated via per-instruction tracing and statistical metrics such as propagation probability $P_\mathrm{prop}(i)$.

Observability is fundamentally augmented in hybrid schemes. For example, the use of hardware test pattern generators (TPG) and keyed-hash message authentication code (KMAC) engines achieves both high fault coverage and resistance to signature attacks, with zero observed aliasing for 256-bit digests and compaction rates exceeding 99.6% for long responses [2410.05109].

## 5. In-Field Integration and Non-Interfering Execution

Cutting-edge SBST architectures integrate self-testing seamlessly with normal system operation:
- Thread-controlled scheduling (SHP) time-slices test routines with application threads, transparently utilizing idle or micro-cycles, ensuring zero interference with real-time operation [2412.19924].
- Redundant thread execution enables ultra-fast single event upset (SEU) detection and recovery within bounded micro-cycle latencies.
- Software-based test scheduling on embedded CPUs enables opportunistic or on-demand health checks, with hybrid approaches allowing both on-chip and remote attestation without exposing internal response data [2410.05109].

## 6. Evaluation, Metrics, and Experimental Results

SBST effectiveness is commonly evaluated via metrics including:
- Fault coverage $C(T)$ achieved for a given fault set.
- Compaction ratio $R_\mathrm{compact}$ and execution-time reduction $R_\mathrm{time}$.
- Test-cycles-per-net (TCPN) and performance-per-area (PpA) in SoC deployments.
- Area overhead due to test-specific hardware (e.g., KMAC, TPG, thread registers).

Experimental evaluations have demonstrated:
- 100% stuck-at fault coverage on gate-level nets in GIF-based RTL-ATPG flows [2412.19924].
- 11x speedup for system-level test campaigns using automated SBST on FPGA relative to simulation [2504.07555].
- KMAC-based signature compaction with hardware overhead <8% LUTs and zero observable aliasing at practical lengths [2410.05109].

Illustrative table summarizing SBST experimental effects (from [2109.00958], [2410.05109], [2412.19924]):

| Metric                                  | Value/Range                       | Context                              |
|------------------------------------------|-----------------------------------|--------------------------------------|
| Max. TP compaction ratio                 | 93.9%                             | RISC-V execute unit TPs [2109.00958] |
| Max. execution-time reduction            | 95%                               | SBST programs [2109.00958]           |
| Stuck-at fault coverage (SBST hybrid)    | 100%                              | Gate-level nets [2412.19924]         |
| KMAC hardware overhead                   | <8% LUTs                          | PULPissimo SoC [2410.05109]          |
| KMAC aliasing rate                       | $\leq 1/2^{128}$                  | 256-bit digest [2410.05109]          |
| FPGA SBST speedup                        | 11x over simulation               | X-HEEP case [2504.07555]             |

## 7. Limitations, Extensions, and Future Directions

Current SBST methodologies present several boundaries:
- Limited coverage of analog or non-stuck-at fault models without integration of complementary test techniques.
- Complexity of RTL ATPG and interactive coverage refinement as SoC scale increases [2412.19924].
- Restrictions on conditional or heavily branched software constructs in compaction algorithms [2109.00958].
- Requirement for establishing and securing device-specific keys and remote dictionaries in cryptographically protected schemes [2410.05109].

Potential extensions include:
- Generalization to conditional program flows via dynamic analysis.
- Automated partitioning and parallelization for large-scale distributed systems and mixed-signal blocks.
- Dynamic, priority-driven scheduling that adapts to real-time safety requirements.
- Continuous-integration pipelines to provide perpetual, automated in-field self-test and validation for future safety-critical embedded deployments [2109.00958] [2412.19924] [2410.05109].

SBST continues to evolve as a foundational methodology in the assurance of digital system correctness across domains that demand high reliability, runtime safety, and, increasingly, security against disclosure-oriented adversaries.

Source: https://www.emergentmind.com/topics/software-based-self-testing-approach