Skip to content

Commit

Permalink
BUGFIX: Fix a/val lib consistency error in the nearest power 2 function
Browse files Browse the repository at this point in the history
  • Loading branch information
BenoitStef committed Aug 7, 2024
1 parent 2c6e2dc commit bf3c80b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hdl/psi_common_math_pkg.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ package body psi_common_math_pkg is
power_of_two := (others => '0');

for i in 0 to num_bits-1 loop
if (2**i >= val) then
if (2**i >= a) then
power_of_two := (others => '0');
power_of_two(i) := '1';
exit;
Expand Down

0 comments on commit bf3c80b

Please sign in to comment.