static branch incl prediction rc1
[calu.git] / cpu / src / execute_stage_b.vhd
index 79a36614762a2e5286f35e7be6c25ec683753c22..a7809e51786d9deb457f0458de37d3c2b74e1448 100644 (file)
@@ -5,6 +5,7 @@ use IEEE.numeric_std.all;
 use work.common_pkg.all;
 use work.alu_pkg.all;
 use work.gpm_pkg.all;
+use work.extension_pkg.all;
 
 architecture behav of execute_stage is
 
@@ -14,6 +15,11 @@ signal op_detail : op_opt_t;
 signal left_operand, right_operand : gp_register_t;
 signal alu_state, alu_nxt : alu_result_rec;
 signal psw : status_rec;
+               -- extension signals
+               signal ext_gpmp :  extmod_rec;
+               signal data_out    : gp_register_t;
+
+
 
 type exec_internal is record
         result : gp_register_t;
@@ -29,11 +35,23 @@ begin
 
 alu_inst : alu
 port map(clk, reset, condition, op_group, 
-         left_operand, right_operand, dec_instr.displacement, op_detail, alu_state, alu_nxt);
+         left_operand, right_operand, dec_instr.displacement, dec_instr.prog_cnt, dec_instr.brpr, op_detail, alu_state, alu_nxt,addr,data);
+
+
+
+       gpmp_inst :  extension_gpm
+               generic map (RESET_VALUE)
+               port map (
+                       clk,
+                       reset,
+                       ext_gpmp,
+                       data_out,
+                       alu_nxt,
+                       psw
+                       
+               );
+
 
-gpm_inst : gpm
-        generic map(RESET_VALUE)
-        port map(clk,reset,alu_nxt,psw);
 
 syn: process(clk, reset)
 
@@ -60,7 +78,7 @@ begin
         
 
 
-        alu_state <= (reg.result,dec_instr.daddr,psw,'0',dec_instr.brpr,'0','0','0','0','0','0'); 
+        alu_state <= (reg.result,dec_instr.daddr,psw,reg.alu_jump,reg.brpr,'0','0','0','0','0','0'); 
         
 
         if reset = RESET_VALUE then
@@ -106,8 +124,8 @@ hword <= alu_nxt.hw_op;
 --hword <= reg.result(1);
 byte_s <= alu_nxt.byte_op;
 
-addr <= alu_nxt.result;
-data <= right_operand;
+--addr <= alu_nxt.result;
+--data <= right_operand;
 --byte_s <= reg.result(2);
 end behav;