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;
25 jump_result : in instruction_addr_t;
26 prediction_result : in instruction_addr_t;
27 branch_prediction_bit : in std_logic;
28 alu_jump_bit : in std_logic;
31 instruction : out instruction_word_t;
32 prog_cnt : out instruction_addr_t
34 end component fetch_stage;
38 component decode_stage is
41 RESET_VALUE : std_logic;
52 instruction : in instruction_word_t;
53 prog_cnt : in instruction_addr_t;
54 reg_w_addr : in std_logic_vector(REG_ADDR_WIDTH-1 downto 0);
55 reg_wr_data : in gp_register_t;
56 reg_we : in std_logic;
60 -- reg1_rd_data : out gp_register_t;
61 -- reg2_rd_data : out gp_register_t;
62 branch_prediction_res : out instruction_word_t;
63 branch_prediction_bit : out std_logic;
65 to_next_stage : out dec_op
67 end component decode_stage;
73 instruction : in instruction_word_t;
74 instr_spl : out instruction_rec
78 end component decoder;
80 component execute_stage is
84 RESET_VALUE : std_logic
86 --LOGIC_ACT : std_logic;
93 dec_instr : in dec_op;
94 regfile_val : in gp_register_t;
95 reg_we : in std_logic;
96 reg_addr : in gp_addr_t;
97 ext_reg : in extmod_rec;
99 result : out gp_register_t;--reg
100 result_addr : out gp_addr_t;--reg
101 addr : out word_t; --memaddr
102 data : out gp_register_t; --mem data --ureg
103 alu_jump : out std_logic;--reg
104 brpr : out std_logic; --reg
105 wr_en : out std_logic;--regop --reg
106 dmem : out std_logic;--memop
107 dmem_write_en : out std_logic;
108 hword : out std_logic;
109 byte_s : out std_logic;
111 ext_data_out : out gp_register_t
113 end component execute_stage;
117 component writeback_stage is
119 -- active reset value
120 RESET_VALUE : std_logic;
121 -- active logic value
122 LOGIC_ACT : std_logic
128 reset : in std_logic;
130 result : in gp_register_t; --reg (alu result or jumpaddr)
131 result_addr : in gp_addr_t; --reg
132 address : in word_t; --ureg
133 ram_data : in word_t; --ureg
134 alu_jmp : in std_logic; --reg
135 br_pred : in std_logic; --reg
136 write_en : in std_logic; --reg (register file)
137 dmem_en : in std_logic; --ureg (jump addr in mem or in address)
138 dmem_write_en : in std_logic; --ureg
139 hword : in std_logic; --ureg
140 byte_s : in std_logic; --ureg
142 regfile_val : out gp_register_t;
143 reg_we : out std_logic;
144 reg_addr : out gp_addr_t;
145 jump_addr : out instruction_addr_t;
146 jump : out std_logic;
148 bus_tx : out std_logic;
150 sseg0 : out std_logic_vector(0 to 6);
151 sseg1 : out std_logic_vector(0 to 6);
152 sseg2 : out std_logic_vector(0 to 6);
153 sseg3 : out std_logic_vector(0 to 6)
155 end component writeback_stage;
159 end package core_pkg;