2 use IEEE.std_logic_1164.all;
3 use IEEE.numeric_std.all;
5 use work.common_pkg.all;
8 architecture behav of execute_stage is
10 signal condition : condition_t;
11 signal op_group : op_info_t;
12 signal op_detail : op_opt_t;
13 signal left_operand, right_operand : gp_register_t;
14 signal alu_state, alu_nxt : alu_result_rec;
16 signal psw : status_rec;
21 port map(clk, reset, condition, op_group,
22 op_detail, left_operand, right_operand, alu_state, alu_nxt);
24 syn: process(sys_clk, reset)
28 if (reset = RESET_VALUE) then
30 elsif rising_edge(sys_clk) then
36 asyn: process(reset,condition)
39 condition <= dec_instr.condition;
40 op_group <= dec_instr.op_group;
41 op_detail <= dec_instr.op_detail;
42 left_operand <= dec_instr.src1;
43 right_operand <= dec_instr.src2;
45 alu_state.status <= psw;
46 alu_state.result_addr <= dec_instr.daddr;
47 alu_state.brpr <= brpr;
48 alu_state.reg_op <= '0';
49 alu_state.mem_op <= '0';
52 if reset = RESET_VALUE then
53 condition <= COND_NEVER;