Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Reading Paths
  • Concept Map
  • Meet DCRouter
  • Glossary
  • Part 0: What Verification Is8
  • Part 1: What Can Go Wrong11
  • Part 2: Specifications as Checkable Rules8
  • Part 3: Observability and Controllability7
  • Part 4: Stimulus11
  • Part 5: Checking11
  • Part 6: Coverage10
  • Part 7: Formal and Simulation10
  • Part 8: Verification Levels and Reuse8
  • Part 9: Planning and Risk9
  • Part 10: Emulation and Prototyping8
  • Part 11: Post-Silicon Validation8
  • Part 12: Bug Economics8
  • Part 13: Debug7
  • Part 14: Sign-Off7
  • Part 15: Verification in Context8
    • Functional Safety Verification
    • Security Verification
    • Low-Power Verification Strategy
    • CDC and RDC in the Plan
    • Verifying Processors
    • Verifying AI Accelerators
    • Verifying Configurable IP
    • Drills: Verification in Context
  • Part 16: Case Studies5
  • Part 17: Capstones5
  • Part 18: Interview Preparation6
Loading lesson

‹Part 15: Verification in Context
  1. Topics
  2. First Principles of Verification Strategy
  3. Part 15: Verification in Context
  4. Functional Safety Verification

Part 15 · Verification in Context · Principal (P)

Functional Safety Verification

Functional verification asks whether the design does what it should. Functional safety adds a second question: when the hardware itself breaks in the field (a stuck bit, a flipped register), do safety mechanisms detect it in time? Standards such as ISO 26262 turn that into measured metrics, obtained by fault injection. What changes in the plan, and a runnable fault-injection model that measures diagnostic coverage.

On this page

    Note

    Level: Principal (P) · Answers: What changes for safety, security, processors and AI hardware?

    Before this: Part 15 overview, Mutation Testing

    DCRouter is going into a car. Every rule R1 to R13 is verified, every planted bug caught. Then the safety team asks something the course has not: if a transistor in DCRouter's configuration register wears out after five years and a port-enable bit sticks at 0, does anything notice before a sensor's port is silently disabled? A design can be functionally perfect and still unsafe, because safety is about how it behaves when its own hardware fails.

    How does a safety standard such as ISO 26262 change verification?

    The obvious answer, and why it breaks

    The obvious answer is "verify more thoroughly": more coverage, more proofs. All of that assumes the hardware works. Random hardware faults (stuck bits, upsets from radiation, wear-out) happen in correct designs. Safety requires mechanisms that detect them (parity, ECC, lock-step, watchdogs) and evidence that those mechanisms detect enough of them, which is a different kind of verification.

    The idea: verify the safety mechanisms, by injecting faults

    Concept

    Meaning

    Safety mechanism

    Hardware or software that detects or controls a fault: parity, ECC, duplicated logic compared in lock-step, timeouts

    Fault injection

    Deliberately introducing faults (stuck-at, transient flips) in simulation, emulation or formal, and observing the outcome

    Fault classes

    Safe (no effect on safety-relevant outputs), detected (a mechanism raised an alarm), dangerous (wrong output, no alarm)

    Diagnostic coverage

    The share of potentially dangerous faults that the mechanisms detect

    Hardware metrics

    Single-point and latent fault metrics with targets per ASIL: SPFM at least 99% and LFM at least 90% for ASIL D (fact V14)

    Fault injection is mutation testing (lesson 6.8) with a different question: not "does the testbench notice a design bug?" but "does the design notice a hardware failure?"

    Build it: measuring diagnostic coverage

    A 16-bit configuration register protected by a parity bit (illustrative). Every single stuck-at fault on the data and parity bits is injected in turn, a workload runs, and each fault is classified. Then the same faults are injected into a weaker design that protects only the upper byte.

    example.py
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    """Functional safety: measuring diagnostic coverage by fault injection.
    
    A small safety-relevant block (illustrative): a 16-bit configuration register drives a
    controller every cycle. A safety mechanism stores a parity bit with the register and checks it
    every cycle. The model injects one fault at a time, a stuck-at-0 or stuck-at-1 on each of the
    16 data bits and on the parity bit itself, runs a workload of 64 random register values, and
    classifies each fault:
      safe        never changed any output the controller used (workload never exposed it)
      detected    the parity checker raised an alarm before or when an output went wrong
      dangerous   an output went wrong and no alarm was raised
    Diagnostic coverage = detected / (detected + dangerous), over the 32 data-bit faults. The 2
    faults on the parity bit itself never corrupt the register; they are faults in the safety
    mechanism (here they raise a false alarm) and are reported separately. Then the same faults are
    injected into a version with parity on the upper byte only (a weaker mechanism).
    """
    import random
    
    rng = random.Random(3)
    WORK = [rng.randrange(1 << 16) for _ in range(64)]
    
    def parity(x):
        return bin(x).count("1") & 1
    
    def run(fault, protected_bits):
        bit, val = fault
        alarm = wrong = False
        for w in WORK:
            stored, p = w, parity(w & protected_bits)
            if bit < 16:
                stored = (stored | (1 << bit)) if val else (stored & ~(1 << bit))
            else:
                p = val
            if stored != w:
                wrong = True
            if parity(stored & protected_bits) != p:
                alarm = True
            if wrong or alarm:
                break
        if alarm:
            return "detected"
        return "dangerous" if wrong else "safe"
    
    faults = [(b, v) for b in range(16) for v in (0, 1)]          # data-bit faults
    mech = [(16, 0), (16, 1)]                                       # faults on the parity bit itself
    for name, mask in [("parity on all 16 bits", 0xFFFF), ("parity on upper 8 bits", 0xFF00)]:
        counts = {"safe": 0, "detected": 0, "dangerous": 0}
        for f in faults:
            counts[run(f, mask)] += 1
        alarms = sum(run(f, mask) == "detected" for f in mech)
        dc = counts["detected"] / (counts["detected"] + counts["dangerous"])
        print(f"{name:24s} data faults {len(faults)}: safe {counts['safe']}, detected {counts['detected']}, dangerous {counts['dangerous']}, diagnostic coverage {100 * dc:.0f}%; parity-bit faults {len(mech)}: {alarms} false alarms")
        if mask == 0xFFFF:
            full = dc
        else:
            half = dc
    assert full > 0.95 and half < 0.6
    print("PASS: full parity detects every injected data-bit fault the workload exposes; protecting half the bits leaves half the data-bit faults undetected (dangerous)")

    It prints:

    Diagram
    parity on all 16 bits    data faults 32: safe 0, detected 32, dangerous 0, diagnostic coverage 100%; parity-bit faults 2: 2 false alarms
    parity on upper 8 bits   data faults 32: safe 0, detected 16, dangerous 16, diagnostic coverage 50%; parity-bit faults 2: 2 false alarms
    PASS: full parity detects every injected data-bit fault the workload exposes; protecting half the bits leaves half the data-bit faults undetected (dangerous)

    How to read it: with parity over all 16 bits, every one of the 32 data-bit faults raises an alarm before or as it corrupts the value: 100% diagnostic coverage for single stuck-at faults. With parity over the upper byte only, the 16 faults on the lower byte corrupt the register silently: 50%, far below any ASIL target. The two faults on the parity bit itself corrupt nothing but raise false alarms; they are faults in the safety mechanism, which a real analysis tracks separately (as latent faults if they could instead hide an alarm). Real analyses weight faults by failure rate and include transient and multi-bit faults, but the method, inject, observe, classify, measure, is the same.

    What changes in the verification plan

    • Safety requirements and mechanisms become features with their own checks and coverage.

    • A fault-injection campaign is planned like a regression: fault list, workloads, classification, metrics.

    • Traceability is mandatory: requirement to evidence, reviewed by an assessor (lesson 2.6).

    • Tool confidence: tools whose failure could hide a fault are qualified or cross-checked.

    • Process evidence: reviews, change control and independence are part of what is audited.

    How real teams verify safety

    Practice

    Purpose

    FMEDA (failure modes, effects and diagnostic analysis)

    Expected fault classes and coverage per block, before injection confirms them

    Fault-injection campaigns in simulation, emulation and formal

    Measured diagnostic coverage

    Safety mechanisms verified functionally too

    A parity checker that never fires is a false pass (lesson 5.8)

    Independent safety assessment

    Evidence judged against the standard

    What breaks

    A team (illustrative) verified that its ECC corrected single-bit errors and flagged double-bit errors, at the memory's interface. Fault injection later showed that faults in the ECC encoder itself, before the check bits were written, produced consistent but wrong data and check bits: the decoder saw no error. The mechanism was verified; its own failure modes were not. Injecting faults inside the safety mechanism found it.

    Why this matters

    Principal lens. In a safety project, plan two verification efforts: the design's function, and the safety mechanisms' detection of hardware faults. Measure the second by fault injection against the standard's metrics, include faults inside the mechanisms, and keep traceability and process evidence ready for assessment.

    Interview

    Asked: "How does ISO 26262 change verification?"

    Weak answer: You need more coverage.

    Strong answer: It adds a second question beyond functional correctness: when the hardware itself fails in the field, do safety mechanisms detect it? So safety mechanisms (parity, ECC, lock-step, watchdogs) become verified features, and fault-injection campaigns measure diagnostic coverage, classifying each injected fault as safe, detected or dangerous, to meet hardware metrics such as SPFM of at least 99% and LFM of at least 90% for ASIL D. Traceability, tool confidence and process evidence are audited. In a small model, parity over all bits detected every single stuck-at fault; parity over half the bits detected 50%.

    Follow-ups: (1) What is diagnostic coverage? (2) How is fault injection related to mutation testing?

    Check yourself Why can a functionally perfect design be unsafe?

    Hardware can fail in the field (stuck bits, upsets); without mechanisms that detect those faults, a correct design can still produce wrong outputs silently.

    Check yourself Why should faults also be injected inside the safety mechanism?

    The mechanism's own failure can make it miss or hide faults; verifying only its normal function misses that.

    Key takeaways

    • Safety adds a question: are hardware faults in the field detected in time?

    • Fault injection measures diagnostic coverage: safe, detected and dangerous faults.

    • Plan safety mechanisms as features, run fault campaigns, and keep traceability for assessment.

    Keep going

    Next: Lesson 15.2, Security Verification. Verifying what must not happen.

    Related topics

    • Part 15 overview: Verification in Context

    Previous

    137 / 160

    Next: Security Verification

    Up next

    Up nextSecurity Verification

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Low-Power Verification Strategy
    • CDC and RDC in the Plan
    • Verifying Processors