lowRISC / opentitan

OpenTitan: Open source silicon root of trust
https://www.opentitan.org
Apache License 2.0
2.58k stars 776 forks source link

[hmac,dv] Rare flakiness in hmac_stress_all #23930

Open gdessouky opened 4 months ago

gdessouky commented 4 months ago

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

Looking into it and testing out a fix now.

@martin-velay

gdessouky commented 4 months ago

This is a minor DV issue, and no RTL is implicated :)