logical: Only do output inversion for OP_AND, OP_OR and OP_XOR

It's not needed for the other ops (popcnt, parity, etc.) and the
logical unit shows up as a critical path from time to time.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
jtag-port
Paul Mackerras 5 years ago
parent c2da82764f
commit 9b40b5a77b

@ -87,12 +87,19 @@ begin
end if; end if;


case op is case op is
when OP_AND => when OP_AND | OP_OR | OP_XOR =>
tmp := rs and rb_adj; case op is
when OP_OR => when OP_AND =>
tmp := rs or rb_adj; tmp := rs and rb_adj;
when OP_XOR => when OP_OR =>
tmp := rs xor rb_adj; tmp := rs or rb_adj;
when others =>
tmp := rs xor rb_adj;
end case;
if invert_out = '1' then
tmp := not tmp;
end if;

when OP_POPCNT => when OP_POPCNT =>
tmp := popcnt; tmp := popcnt;
when OP_PRTY => when OP_PRTY =>
@ -115,9 +122,6 @@ begin
tmp(7 downto 0) := rs(7 downto 0); tmp(7 downto 0) := rs(7 downto 0);
end case; end case;


if invert_out = '1' then
tmp := not tmp;
end if;
result <= tmp; result <= tmp;


end process; end process;

Loading…
Cancel
Save