FPU: Relax timing around multiplier output

At present there is a state transition in the handling of the fmadd
instructions where the next state depends on the sign bit of the
multiplier result.  This creates a critical path which doesn't make
timing on the A7-100.  To fix this, we make the state transition
independent of the sign of the multiplier result, which improves
timing, but means we take one more cycle to do a fmadd-family
instruction in some cases.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
cache-tlb-parameters-2
Paul Mackerras 4 years ago
parent f14e731ec6
commit 45c5236700

@ -1704,22 +1704,19 @@ begin
opsel_r <= RES_MULT; opsel_r <= RES_MULT;
opsel_s <= S_MULT; opsel_s <= S_MULT;
set_s := '1'; set_s := '1';
v.shift := to_signed(56, EXP_BITS);
if multiply_to_f.valid = '1' then if multiply_to_f.valid = '1' then
if multiply_to_f.result(121) = '1' then
v.state := FMADD_5; v.state := FMADD_5;
else
v.state := FMADD_6;
end if;
end if; end if;


when FMADD_5 => when FMADD_5 =>
-- negate R:S:X -- negate R:S:X if negative
if r.r(63) = '1' then
v.result_sign := not r.result_sign; v.result_sign := not r.result_sign;
opsel_ainv <= '1'; opsel_ainv <= '1';
carry_in <= not (s_nz or r.x); carry_in <= not (s_nz or r.x);
opsel_s <= S_NEG; opsel_s <= S_NEG;
set_s := '1'; set_s := '1';
end if;
v.shift := to_signed(56, EXP_BITS); v.shift := to_signed(56, EXP_BITS);
v.state := FMADD_6; v.state := FMADD_6;



Loading…
Cancel
Save