bitsort: Fix bperm instruction (#456)

The result byte needs to be zero when the index byte value is >= 64.

Fixes: 23ff954059 ("core: Change bperm to a simpler and slower implementation", 2025-01-07)

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
master
Paul Mackerras 1 day ago committed by GitHub
parent da695e7927
commit 0b3df8ab00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -108,7 +108,9 @@ begin
end process;

-- bit permutation
bperm_res(7) <= rb_bp(to_integer(unsigned(not rs_sr(5 downto 0)))) when not is_X(rs_sr)
bperm_res(7) <= (rb_bp(to_integer(unsigned(not rs_sr(5 downto 0))))
and not (rs_sr(6) or rs_sr(7)))
when not is_X(rs_sr)
else 'X';

bperm_r: process(clk)

Loading…
Cancel
Save