lowRISC / opentitan

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

[hmac,dv] Rare flakiness in hmac_stress_all #23930

Open gdessouky opened 1 week ago

gdessouky commented 1 week 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 1 week ago

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