Skip to main content

Module fault

Module fault 

Source
Expand description

Hardware fault injection for robustness testing.

Functionsยง

inject_bitflip_u8
BIT_FLIP: each input bit flips with probability ber. Returns number of bits flipped.
inject_bitflips
Flip random bits in packed u64 words with given probability per bit.
inject_dropout_u8
DROPOUT: equivalent to STUCK_AT_0 in this fault model.
inject_gaussian_u8
GAUSSIAN_NOISE: add N(0, ber) noise to bitstream cast to f64, clip to [0,1], then threshold at 0.5. Returns count of flipped bits.
inject_stuck_at
Force bits to a fixed value with given probability per bit.
inject_stuck_at_0_u8
STUCK_AT_0: each bit forced to 0 with probability ber. Returns number of 1-bits actually changed (i.e., mask AND original).
inject_stuck_at_1_u8
STUCK_AT_1: each bit forced to 1 with probability ber. Returns number of 0-bits actually changed (i.e., mask AND NOT original).