ARM processors, like all microprocessors, are susceptible to faults during operation. These faults can occur due to issues in the hardware, software, or environment. Understanding the different types of faults in ARM and their causes can help developers build more robust and fault-tolerant systems.
Hardware faults occur due to issues with the physical microarchitecture of the ARM processor. Some common hardware faults include:
These faults occur when a signal line in the processor gets stuck at either logic 0 or logic 1. This can happen due to manufacturing defects or electrical issues. Stuck-at faults can cause instructions to be incorrectly executed or data to be corrupted.
Bridging faults occur when two signal lines in the processor inadvertently get connected. This leads to crosstalk and interference between the two signals. Bridging faults can alter signal values and lead to faulty processor behavior.
Delay faults happen when a signal takes longer than expected to propagate through a circuit. This can be caused by slow transistors, resistive interconnects, or voltage drops. Delay faults may cause race conditions, timing failures, and synchronization issues.
These are temporary or intermittent faults caused by external effects like radiation, power supply noise, or electromagnetic interference. They cause sporadic bit flips in processors. Transient faults are difficult to detect and isolate.
Software faults arise due to bugs in code, compiler issues, errors in firmware or device drivers. Some examples include:
Memory Access Errors
Invalid memory accesses, buffer overflows, accesses to uninitialized or deallocated memory can corrupt data and crash programs. Memory access errors are a common source of software faults.
Race conditions occur when the timing or ordering of events affects the program’s correctness. Concurrent code paths accessing shared resources without synchronization are prone to race conditions.
Deadlock happens when processes or threads get stuck waiting for resources held by each other. This leads to a permanent blocking of those processes. Deadlocks render ARM cores unusable.
A livelock is similar to deadlock, except processes are not blocked but keep retrying their requests in a loop unsuccessfully. This consumes CPU cycles wastefully.
Infinite loops occur when the loop condition never evaluates to false. The program gets stuck in the loop indefinitely, unable to exit. Infinite loops lock up the ARM core.
These faults arise from issues with the environment in which the ARM processor operates. Some examples are:
Power Supply Noise
Fluctuations in power supply voltage and ripples in power lines can cause bit flips or timing violations in processors. This leads to incorrect operation.
Due to high CPU utilization or inadequate cooling, ARM cores can overheat. High temperatures affect transistor switching speeds and may damage processors permanently.
External sources of magnetic or electromagnetic radiation like motors, relays can induce currents and voltages in processors. This causes signal interference and functional errors.
High energy particles from space or radioactive materials can strike the semiconductor substrate of processors. This flips bits in memory cells and registers, causing program crashes.
Handling Faults in ARM
To build reliable ARM-based systems, faults need to be handled effectively. Some techniques include:
Error Detection and Correction
ECC memory and parity checks can detect and even correct some data errors caused by faults.
Hardware and software should be designed to fail safely, without catastrophic consequences, when faults inevitably occur.
Hardware redundancy via extra cores or duplicate units improves tolerance to faults. Software redundancy via N-version programming also helps.
Faulty units can be isolated by microarchitecture techniques like Razor to avoid corrupting other blocks.
Rollback and Recovery
Checkpointing and roll back of program state after faults enables software to recover and continue execution.
Fault Injection Testing
Injecting faults at development time finds weaknesses and improves the robustness of ARM systems.
Built-In Self Test
BIST units integrated into ARM cores can detect faults like stuck-at faults during power-on self tests.
Common ARM Fault Handling Features
Some fault handling features built into ARM processors include:
The ARM Embedded Trace Macrocell has parity protection on trace data to detect transmission errors.
The ARM AMBA AXI bus protocol supports optional ECC protection on transactions to correct data faults.
Memory Tagged Pointers
Tagged pointers in ARMv8-A catch invalid memory accesses that could potentially cause crashes.
External Abort Handling
External aborts triggered by parity errors are handled gracefully by saving state and jumping to an abort handler.
ARM CoreLink NMMU links two cores lockstep for fault detection by comparing outputs clock-by-clock.
From hardware issues like stuck-at faults to software bugs like deadlock, ARM cores are vulnerable to various faults. By understanding fault classes, applying fault tolerance techniques, and leveraging built-in ARM safeguards, robust ARM systems can be designed.