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).