execute1: simplify flush_out
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 25 Sep 2019 06:42:44 +0000 (16:42 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 30 Sep 2019 01:34:33 +0000 (11:34 +1000)
It's always set when f_out.redirect is set, so may as well set it once
at the end. It's all combo from the register.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
execute1.vhdl

index 436b782fe29c37af356cc1f5e4f0cc3fbdb5f0aa..cec431faab35cfc752e91c594e0c98eb12a8f263 100644 (file)
@@ -70,7 +70,6 @@ begin
                ctrl_tmp.tb <= std_ulogic_vector(unsigned(ctrl.tb) + 1);
 
                terminate_out <= '0';
-               flush_out <= '0';
                f_out <= Execute1ToFetch1TypeInit;
 
                if e_in.valid = '1' then
@@ -100,7 +99,6 @@ begin
                                        result := ppc_andc(e_in.read_data1, e_in.read_data2);
                                        result_en := 1;
                                when OP_B =>
-                                       flush_out <= '1';
                                        f_out.redirect <= '1';
                                        f_out.redirect_nia <= std_ulogic_vector(signed(e_in.nia) + signed(e_in.read_data2));
                                when OP_BC =>
@@ -108,7 +106,6 @@ begin
                                                ctrl_tmp.ctr <= std_ulogic_vector(unsigned(ctrl.ctr) - 1);
                                        end if;
                                        if ppc_bc_taken(e_in.const1(4 downto 0), e_in.const2(4 downto 0), e_in.cr, ctrl.ctr) = 1 then
-                                               flush_out <= '1';
                                                f_out.redirect <= '1';
                                                f_out.redirect_nia <= std_ulogic_vector(signed(e_in.nia) + signed(e_in.read_data2));
                                        end if;
@@ -117,13 +114,11 @@ begin
                                                ctrl_tmp.ctr <= std_ulogic_vector(unsigned(ctrl.ctr) - 1);
                                        end if;
                                        if ppc_bc_taken(e_in.const1(4 downto 0), e_in.const2(4 downto 0), e_in.cr, ctrl.ctr) = 1 then
-                                               flush_out <= '1';
                                                f_out.redirect <= '1';
                                                f_out.redirect_nia <= ctrl.lr(63 downto 2) & "00";
                                        end if;
                                when OP_BCCTR =>
                                        if ppc_bcctr_taken(e_in.const1(4 downto 0), e_in.const2(4 downto 0), e_in.cr) = 1 then
-                                               flush_out <= '1';
                                                f_out.redirect <= '1';
                                                f_out.redirect_nia <= ctrl.ctr(63 downto 2) & "00";
                                        end if;
@@ -354,5 +349,6 @@ begin
                -- update outputs
                --f_out <= r.f;
                e_out <= r.e;
+               flush_out <= f_out.redirect;
        end process;
 end architecture behaviour;