DependableSystemsLab/LLFI

Content of the "llfi.stat.fi.injectedfaults" file is wrong when both "fi_num_bits" and "window_len" are specified in the input.yaml file.

Behroosh opened this issue · 2 comments

In case both "fi_num_bits" and "window_len" are specified in the input.yaml file, except the first injection, all other injections have the same fi_cycle in the "llfi.stat.fi.injectedfaults" file, which should not be the case.
For example if fi_num_bits = 4 and window_len = 10, LLFI should perform 8 injections, four of them should be injected into the first register in a specific fi_cycle and the other four into the second register in a specific fi_cycle. However, the fi_cycles that are traced in the llfi.stat.fi.injectedfaults are all the same from the second injection onwards.

"fi_num_bits" is used to specify the number of bits to flip for one faulty register.
"window_len" is used to specify the maximum number of dynamic instances between TWO consecutive faults.

So I found a way to solve this issue. My suggestion is as follows:

1- Add "long long fi_cycle_to_print = config.fi_cycle;" to line 206 of the file "runtime_lib > FaultInjectionLib.c"
2- modify the line at line 230 of the file "runtime_lib > FaultInjectionLib.c" to "llfi_index, fi_cycle_to_print, my_reg_index, reg_pos, size, fi_bit, opcode_str);"

This problem has been resolved by Behrooz's fix.