end record alu_result_rec;
- constant SHIFT_WIDTH : integer := 4; --log2c(gp_register_t'length);
+ constant SHIFT_WIDTH : integer := 1; --log2c(gp_register_t'length);
constant COND_ZERO : condition_t := "0001";
constant COND_NZERO : condition_t := "0000";
--System input pins
sys_clk : in std_logic;
sys_res : in std_logic;
- result : out gp_register_t
+ result : out gp_register_t;
+ jump_result : out instruction_addr_t;
+ reg_wr_data : out gp_register_t
);
result <= result_pin;
nop_pin <= (alu_jump_bit_pin xor brpr_pin);
+ jump_result <= jump_result_pin;
+
+ reg_wr_data <= reg_wr_data_pin;
end behav;
rtw_rec_nxt.rtw_reg1 <= ('1' and reg_we);
end if;
- if (reg_w_addr = instr_spl.reg_src1_addr) then
+ if (reg_w_addr = instr_spl.reg_src2_addr) then
rtw_rec_nxt.rtw_reg2 <= ('1' and reg_we);
end if;
end process asyn;
-forward: process(regfile_val, reg_we, reg_addr, dec_instr.src1,dec_instr.src2)
+forward: process(regfile_val, reg_we, reg_addr, dec_instr)
begin
left_operand <= dec_instr.src1;
right_operand <= dec_instr.src2;
brpr <= reg.brpr;
wr_en <= reg.wr_en;
dmem <= alu_nxt.mem_op;
+--dmem <= reg.result(4);
dmem_write_en <= alu_nxt.mem_en;
+--dmem_write_en <= reg.result(0);
+--dmem_write_en <= '1';
hword <= alu_nxt.hw_op;
+--hword <= reg.result(1);
byte_s <= alu_nxt.byte_op;
-
+--byte_s <= reg.result(2);
end behav;
-out_logic: process(write_en, result_addr)
+out_logic: process(write_en, result_addr, wb_reg, alu_jmp)
begin
reg_we <= (write_en or (wb_reg.dmem_en and not(wb_reg.dmem_write_en))) and not(alu_jmp);