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
33 end component fetch_stage;
37 component decode_stage is
40 RESET_VALUE : std_logic;
51 instruction : in instruction_word_t;
52 reg_w_addr : in std_logic_vector(REG_ADDR_WIDTH-1 downto 0);
53 reg_wr_data : in gp_register_t;
54 reg_we : in std_logic;
58 -- reg1_rd_data : out gp_register_t;
59 -- reg2_rd_data : out gp_register_t;
60 branch_prediction_res : out instruction_word_t;
61 branch_prediction_bit : out std_logic;
62 to_next_stage : out dec_op
64 end component decode_stage;
70 instruction : in instruction_word_t;
71 instr_spl : out instruction_rec
75 end component decoder;
77 component execute_stage is
81 RESET_VALUE : std_logic
83 --LOGIC_ACT : std_logic;
90 dec_instr : in dec_op;
91 regfile_val : in gp_register_t;
92 reg_we : in std_logic;
93 reg_addr : in gp_addr_t;
95 result : out gp_register_t;--reg
96 result_addr : out gp_addr_t;--reg
97 addr : out word_t; --memaddr
98 data : out gp_register_t; --mem data --ureg
99 alu_jump : out std_logic;--reg
100 brpr : out std_logic; --reg
101 wr_en : out std_logic;--regop --reg
102 dmem : out std_logic;--memop
103 dmem_write_en : out std_logic;
104 hword : out std_logic;
105 byte_s : out std_logic
107 end component execute_stage;
111 component writeback_stage is
113 -- active reset value
114 RESET_VALUE : std_logic;
115 -- active logic value
116 LOGIC_ACT : std_logic
122 reset : in std_logic;
124 result : in gp_register_t; --reg (alu result or jumpaddr)
125 result_addr : in gp_addr_t; --reg
126 address : in word_t; --ureg
127 ram_data : in word_t; --ureg
128 alu_jmp : in std_logic; --reg
129 br_pred : in std_logic; --reg
130 write_en : in std_logic; --reg (register file)
131 dmem_en : in std_logic; --ureg (jump addr in mem or in address)
132 dmem_write_en : in std_logic; --ureg
133 hword : in std_logic; --ureg
134 byte_s : in std_logic; --ureg
136 regfile_val : out gp_register_t;
137 reg_we : out std_logic;
138 reg_addr : out gp_addr_t;
139 jump_addr : out instruction_addr_t;
142 end component writeback_stage;
146 end package core_pkg;