mirror of
https://github.com/antonblanchard/microwatt.git
synced 2026-04-12 22:56:59 +00:00
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user