Simplify fetch1

Do the +4 in a single place. This shouldn't cause any difference
in behaviour as these are sequential variable assignments.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
pull/76/head
Benjamin Herrenschmidt 5 years ago
parent 3a6fcc09d4
commit 8af2b004c3

@ -49,19 +49,18 @@ begin


if stall_in = '0' then if stall_in = '0' then
v.nia := r_int.nia_next; v.nia := r_int.nia_next;
v_int.nia_next := std_logic_vector(unsigned(r_int.nia_next) + 4);
end if; end if;


if e_in.redirect = '1' then if e_in.redirect = '1' then
v.nia := e_in.redirect_nia; v.nia := e_in.redirect_nia;
v_int.nia_next := std_logic_vector(unsigned(e_in.redirect_nia) + 4);
end if; end if;


if rst = '1' then if rst = '1' then
v.nia := RESET_ADDRESS; v.nia := RESET_ADDRESS;
v_int.nia_next := std_logic_vector(unsigned(RESET_ADDRESS) + 4);
end if; end if;


v_int.nia_next := std_logic_vector(unsigned(v.nia) + 4);

-- Update registers -- Update registers
rin <= v; rin <= v;
rin_int <= v_int; rin_int <= v_int;

Loading…
Cancel
Save