hmac_stress_all test fails very rarely for some seeds in a non-reproducible way. It is root-caused to probably be due to when the cfg.wipe_secret_triggered is cleared in https://github.com/lowRISC/opentitan/blob/master/hw/ip/hmac/dv/env/seq_lib/hmac_base_vseq.sv#L211 and how the read digest CSRs are read and compared afterwards. Race conditions may sometimes be occurring between the clearing and reading of the digest CSRs which is the only explanation for the discrepancy between 2 exact logs for 2 exact seeds, where 1 fails and the other passes.
Description
hmac_stress_all
test fails very rarely for some seeds in a non-reproducible way. It is root-caused to probably be due to when thecfg.wipe_secret_triggered
is cleared in https://github.com/lowRISC/opentitan/blob/master/hw/ip/hmac/dv/env/seq_lib/hmac_base_vseq.sv#L211 and how the read digest CSRs are read and compared afterwards. Race conditions may sometimes be occurring between the clearing and reading of the digest CSRs which is the only explanation for the discrepancy between 2 exact logs for 2 exact seeds, where 1 fails and the other passes.Looking into it and testing out a fix now.
@martin-velay