X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=cpu%2Fsrc%2Fdecode_stage_b.vhd;h=dc5e389b7527bf11aad11cbd5580728b0a08669a;hb=d1e680464f7b7147dc4b435a27973621fd69f065;hp=de4b162427b4b21122656830fb60b70644651a45;hpb=246225958048ebe8e8207bcade48e14a5fca0e79;p=calu.git diff --git a/cpu/src/decode_stage_b.vhd b/cpu/src/decode_stage_b.vhd index de4b162..dc5e389 100644 --- a/cpu/src/decode_stage_b.vhd +++ b/cpu/src/decode_stage_b.vhd @@ -66,7 +66,8 @@ begin dec_op_inst.saddr1 <= (others => '0'); dec_op_inst.saddr2 <= (others => '0'); dec_op_inst.daddr <= (others => '0'); - + dec_op_inst.displacement <= (others => '0'); + dec_op_inst.prog_cnt <= (others => '0'); elsif rising_edge(clk) then rtw_rec <= rtw_rec_nxt; @@ -92,7 +93,7 @@ end process; -- end record; -- output logic incl. bypassing reg-file -output_next_stage: process(dec_op_inst, reg1_rd_data, reg2_rd_data) +output_next_stage: process(dec_op_inst, reg1_rd_data, reg2_rd_data, nop) begin @@ -100,6 +101,10 @@ begin to_next_stage.src1 <= reg1_rd_data; to_next_stage.src2 <= reg2_rd_data; + if (nop = '1') then + to_next_stage.condition <= "1111"; + end if; + end process; @@ -116,6 +121,8 @@ begin dec_op_inst_nxt.saddr2 <= instr_spl.reg_src2_addr; dec_op_inst_nxt.daddr <= instr_spl.reg_dest_addr; --(others => '0'); dec_op_inst_nxt.op_group <= instr_spl.op_group; + dec_op_inst_nxt.displacement <= instr_spl.displacement; + dec_op_inst_nxt.prog_cnt <= prog_cnt; end process; @@ -181,7 +188,7 @@ begin branch_prediction_bit <= '0'; if ((instr_spl.opcode = "10110" or instr_spl.opcode = "10111") and instr_spl.bp = '1') then - branch_prediction_res <= instr_spl.immediate; --both 32 bit + branch_prediction_res <= std_logic_vector(unsigned(instr_spl.immediate) + unsigned(prog_cnt)); --both 32 bit branch_prediction_bit <= '1'; end if;