[BUG] Infinite loop in std_cache_pkg::one_hot_to_bin()
Created by: maxbjurling
Is there an existing CVA6 bug for this?
-
I have searched the existing bug issues
Bug Description
If the in
input to the std_cache_pkg::one_hot_to_bin() function is 0 and ariane_pkg::DCACHE_SET_ASSOC
is a power of 2 then this function enters an infinite loop since the loop variablei
wraps from DCACHE_SET_ASSOC-1 to 0 and the loop condition is always true.
Changing the type of i
to int unsigned
resolves this issue.