3 use IEEE.std_logic_1164.all;
4 use IEEE.numeric_std.all;
6 use work.common_pkg.all;
10 component fetch_stage is
13 RESET_VALUE : std_logic;
24 jump_result : in instruction_addr_t;
25 prediction_result : in instruction_addr_t;
26 branch_prediction_bit : in std_logic;
27 alu_jump_bit : in std_logic;
30 instruction : out instruction_word_t;
31 prog_cnt : out instruction_addr_t
33 end component fetch_stage;
37 component decode_stage is
40 RESET_VALUE : std_logic;
51 instruction : in instruction_word_t;
52 prog_cnt : in instruction_addr_t;
53 reg_w_addr : in std_logic_vector(REG_ADDR_WIDTH-1 downto 0);
54 reg_wr_data : in gp_register_t;
55 reg_we : in std_logic;
59 -- reg1_rd_data : out gp_register_t;
60 -- reg2_rd_data : out gp_register_t;
61 branch_prediction_res : out instruction_word_t;
62 branch_prediction_bit : out std_logic;
64 to_next_stage : out dec_op
66 end component decode_stage;
72 instruction : in instruction_word_t;
73 instr_spl : out instruction_rec
77 end component decoder;
79 component execute_stage is
83 RESET_VALUE : std_logic
85 --LOGIC_ACT : std_logic;
92 dec_instr : in dec_op;
93 regfile_val : in gp_register_t;
94 reg_we : in std_logic;
95 reg_addr : in gp_addr_t;
96 ext_reg : in extmod_rec;
98 result : out gp_register_t;--reg
99 result_addr : out gp_addr_t;--reg
100 addr : out word_t; --memaddr
101 data : out gp_register_t; --mem data --ureg
102 alu_jump : out std_logic;--reg
103 brpr : out std_logic; --reg
104 wr_en : out std_logic;--regop --reg
105 dmem : out std_logic;--memop
106 dmem_write_en : out std_logic;
107 hword : out std_logic;
108 byte_s : out std_logic;
110 ext_data_out : out gp_register_t
112 end component execute_stage;
116 component writeback_stage is
118 -- active reset value
119 RESET_VALUE : std_logic;
120 -- active logic value
121 LOGIC_ACT : std_logic
127 reset : in std_logic;
129 result : in gp_register_t; --reg (alu result or jumpaddr)
130 result_addr : in gp_addr_t; --reg
131 address : in word_t; --ureg
132 ram_data : in word_t; --ureg
133 alu_jmp : in std_logic; --reg
134 br_pred : in std_logic; --reg
135 write_en : in std_logic; --reg (register file)
136 dmem_en : in std_logic; --ureg (jump addr in mem or in address)
137 dmem_write_en : in std_logic; --ureg
138 hword : in std_logic; --ureg
139 byte_s : in std_logic; --ureg
141 regfile_val : out gp_register_t;
142 reg_we : out std_logic;
143 reg_addr : out gp_addr_t;
144 jump_addr : out instruction_addr_t;
147 end component writeback_stage;
151 end package core_pkg;