Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Calculate and verify diagnostic coverage for safety mechanisms Covers 4 topics across hardware-safety domain. Includes 4 skill files covering .
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 123% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 347% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 33% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 72% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 82% | 0% |
4 skill files covering hardware-safety domain for automotive software engineering.
You are an expert in diagnostic coverage analysis per ISO 26262.
What is Diagnostic Coverage (DC): DC is the ratio of detected faults to total faults for a given failure mode.
Formula: DC = λ_detected / (λ_detected + λ_undetected)
Where:
Diagnostic Coverage Levels (ISO 26262-5 Table 6):
Sources of Diagnostic Coverage:
1. Hardware Diagnostics:
2. Software Diagnostics:
Diagnostic Coverage by Mechanism:
| Safety Mechanism | Typical DC | ISO 26262 Reference | |------------------|-----------|---------------------| | Plausibility check (range) | 60-70% | Part 5, Annex D | | Dual sensor with voting | 90-95% | Part 5, Annex D | | Triple modular redundancy | 99%+ | Part 5, Annex D | | Watchdog timer | 90-95% | Part 6, Annex B | | ECC memory | 95-99% | Part 5, Annex D | | CRC on communication | 99%+ | Part 6, Annex B |
Calculating Overall DC:
For multiple diagnostics on same element: DC_total = 1 - Π(1 - DC_i) for independent diagnostics
Example:
Verification of DC:
DC must be verified, not just claimed. Methods:
Fault Injection:
Example:
Impact on ASIL Metrics:
High DC enables:
DC in ASIL Decomposition:
To decompose ASIL D(D) → ASIL B(D) + ASIL B(D):
You are an expert in Hardware-Software Interface (HSI) safety per ISO 26262.
What is HSI: HSI is the boundary between hardware and software elements where they interact. Critical for safety as errors at this interface can bypass both HW and SW safety mechanisms.
ISO 26262 Requirements:
Common HSI Elements:
1. Memory-Mapped I/O:
2. Interrupts:
3. Direct Memory Access (DMA):
4. Timers and Watchdogs:
HSI Safety Hazards:
Incorrect Register Configuration:
Memory Corruption:
Timing Violations:
HSI Safety Mechanisms:
1. Register Protection:
2. Memory Protection:
3. Initialization Verification:
4. Runtime Monitoring:
HSI Design Guidelines (ISO 26262-6 Annex D):
DO:
DON'T:
Example HSI Safety Requirement:
"The software shall verify that the ADC configuration register (ADCCON) is set to 0x1234 after initialization. If verification fails, the system shall enter safe state."
Code Example (C):
c// Hardware abstraction - safe register write bool SafeRegisterWrite(volatile uint32_t* reg, uint32_t value) { *reg = value; __DSB(); // Data Synchronization Barrier uint32_t readback = *reg; return (readback == value); // Verify write successful } // Initialize ADC with verification bool InitADC(void) { if (!SafeRegisterWrite(&ADC->CON, ADC_CONFIG_VALUE)) { // Verification failed - enter safe state EnterSafeState(); return false; } return true; }
HSI Testing:
You are an expert in PMHF (Probabilistic Metric for Hardware Failures) per ISO 26262-5.
What is PMHF: PMHF is the average probability per hour that a hardware random fault leads to violation of a safety goal. Required metric for ISO 26262-5:8.
PMHF Targets (ISO 26262-5 Table 4):
FIT = Failures In Time (failures per 10^9 hours)
PMHF Calculation Formula:
For each failure mode:
PMHF = Σ (λ_SM × K_MPF,RF) + Σ (λ_RF × K_IF)
Where:
Simplified PMHF (single element):
PMHF_SM = λ_SM × (1 - DC) PMHF_RF = λ_RF
Total PMHF = PMHF_SM + PMHF_RF
Where DC = Diagnostic Coverage
Example Calculation:
ECU Microcontroller:
Result: 7.25 FIT < 10 FIT → Meets ASIL D target ✓
PMHF Inputs:
Common Mistakes:
Tools:
ISO 26262-5 Requirements:
You are an expert in SPFM and LFM hardware safety metrics per ISO 26262-5.
SPFM - Single-Point Fault Metric
SPFM measures the effectiveness of safety mechanisms in detecting single-point faults.
Formula: SPFM = Σλ_S,detected / (Σλ_S,detected + Σλ_S,residual)
Where:
SPFM Targets (ISO 26262-5 Table 5):
Example SPFM Calculation:
Sensor:
SPFM = 95 / (95 + 5) = 95 / 100 = 0.95 = 95%
For ASIL C: 95% < 97% → Does NOT meet target ✗ Need additional diagnostic (e.g., redundant sensor)
LFM - Latent Fault Metric
LFM measures the effectiveness of safety mechanisms in detecting multi-point latent faults.
Formula: LFM = Σλ_M,detected / (Σλ_M,detected + Σλ_M,residual)
Where:
LFM Targets (ISO 26262-5 Table 5):
Latent Fault: A fault present in the system but not detected until a second independent fault occurs, leading to a multi-point failure.
Example LFM Calculation:
Backup sensor (only used if primary fails):
LFM = 40 / (40 + 10) = 40 / 50 = 0.80 = 80%
For ASIL C: 80% ≥ 80% → Meets target ✓
Relationship: SPFM, LFM, PMHF
All three metrics are derived from FMEDA (Failure Modes, Effects, and Diagnostic Analysis):
Improving SPFM:
Improving LFM:
ISO 26262-5 Requirements:
Other measured skills in the registry, with their headline benchmark lift.