3 use IEEE.std_logic_1164.all;
4 use IEEE.numeric_std.all;
6 use work.common_pkg.all;
7 use work.extension_pkg.all;
11 component fetch_stage is
14 RESET_VALUE : std_logic;
23 s_reset : in std_logic;
26 jump_result : in instruction_addr_t;
27 prediction_result : in instruction_addr_t;
28 branch_prediction_bit : in std_logic;
29 alu_jump_bit : in std_logic;
30 int_req : in interrupt_t;
31 new_im_data_in : in std_logic;
32 im_addr : in gp_register_t;
33 im_data : in gp_register_t;
36 instruction : out instruction_word_t;
37 prog_cnt : out instruction_addr_t;
41 end component fetch_stage;
45 component decode_stage is
48 RESET_VALUE : std_logic;
59 instruction : in instruction_word_t;
60 prog_cnt : in instruction_addr_t;
61 reg_w_addr : in std_logic_vector(REG_ADDR_WIDTH-1 downto 0);
62 reg_wr_data : in gp_register_t;
63 reg_we : in std_logic;
67 -- reg1_rd_data : out gp_register_t;
68 -- reg2_rd_data : out gp_register_t;
69 branch_prediction_res : out instruction_word_t;
70 branch_prediction_bit : out std_logic;
72 to_next_stage : out dec_op
74 end component decode_stage;
80 instruction : in instruction_word_t;
81 instr_spl : out instruction_rec
85 end component decoder;
87 component execute_stage is
91 RESET_VALUE : std_logic
93 --LOGIC_ACT : std_logic;
100 dec_instr : in dec_op;
101 regfile_val : in gp_register_t;
102 reg_we : in std_logic;
103 reg_addr : in gp_addr_t;
104 ext_reg : in extmod_rec;
106 result : out gp_register_t;--reg
107 result_addr : out gp_addr_t;--reg
108 addr : out word_t; --memaddr
109 data : out gp_register_t; --mem data --ureg
110 alu_jump : out std_logic;--reg
111 brpr : out std_logic; --reg
112 wr_en : out std_logic;--regop --reg
113 dmem : out std_logic;--memop
114 dmem_write_en : out std_logic;
115 hword : out std_logic;
116 byte_s : out std_logic;
118 ext_data_out : out gp_register_t
120 end component execute_stage;
124 component writeback_stage is
126 -- active reset value
127 RESET_VALUE : std_logic;
128 -- active logic value
129 LOGIC_ACT : std_logic;
136 reset : in std_logic;
138 result : in gp_register_t; --reg (alu result or jumpaddr)
139 result_addr : in gp_addr_t; --reg
140 address : in word_t; --ureg
141 ram_data : in word_t; --ureg
142 alu_jmp : in std_logic; --reg
143 br_pred : in std_logic; --reg
144 write_en : in std_logic; --reg (register file)
145 dmem_en : in std_logic; --ureg (jump addr in mem or in address)
146 dmem_write_en : in std_logic; --ureg
147 hword : in std_logic; --ureg
148 byte_s : in std_logic; --ureg
150 regfile_val : out gp_register_t;
151 reg_we : out std_logic;
152 reg_addr : out gp_addr_t;
153 jump_addr : out instruction_addr_t;
154 jump : out std_logic;
156 bus_tx : out std_logic;
157 bus_rx : in std_logic;
158 new_im_data_out : out std_logic;
159 im_addr : out gp_register_t;
160 im_data : out gp_register_t;
162 sseg0 : out std_logic_vector(0 to 6);
163 sseg1 : out std_logic_vector(0 to 6);
164 sseg2 : out std_logic_vector(0 to 6);
165 sseg3 : out std_logic_vector(0 to 6);
167 int_req : out interrupt_t
170 end component writeback_stage;
174 end package core_pkg;