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;
29 int_req : in interrupt_t;
32 instruction : out instruction_word_t;
33 prog_cnt : out instruction_addr_t
35 end component fetch_stage;
39 component decode_stage is
42 RESET_VALUE : std_logic;
53 instruction : in instruction_word_t;
54 prog_cnt : in instruction_addr_t;
55 reg_w_addr : in std_logic_vector(REG_ADDR_WIDTH-1 downto 0);
56 reg_wr_data : in gp_register_t;
57 reg_we : in std_logic;
61 -- reg1_rd_data : out gp_register_t;
62 -- reg2_rd_data : out gp_register_t;
63 branch_prediction_res : out instruction_word_t;
64 branch_prediction_bit : out std_logic;
66 to_next_stage : out dec_op
68 end component decode_stage;
74 instruction : in instruction_word_t;
75 instr_spl : out instruction_rec
79 end component decoder;
81 component execute_stage is
85 RESET_VALUE : std_logic
87 --LOGIC_ACT : std_logic;
94 dec_instr : in dec_op;
95 regfile_val : in gp_register_t;
96 reg_we : in std_logic;
97 reg_addr : in gp_addr_t;
98 ext_reg : in extmod_rec;
100 result : out gp_register_t;--reg
101 result_addr : out gp_addr_t;--reg
102 addr : out word_t; --memaddr
103 data : out gp_register_t; --mem data --ureg
104 alu_jump : out std_logic;--reg
105 brpr : out std_logic; --reg
106 wr_en : out std_logic;--regop --reg
107 dmem : out std_logic;--memop
108 dmem_write_en : out std_logic;
109 hword : out std_logic;
110 byte_s : out std_logic;
112 ext_data_out : out gp_register_t
114 end component execute_stage;
118 component writeback_stage is
120 -- active reset value
121 RESET_VALUE : std_logic;
122 -- active logic value
123 LOGIC_ACT : std_logic
129 reset : in std_logic;
131 result : in gp_register_t; --reg (alu result or jumpaddr)
132 result_addr : in gp_addr_t; --reg
133 address : in word_t; --ureg
134 ram_data : in word_t; --ureg
135 alu_jmp : in std_logic; --reg
136 br_pred : in std_logic; --reg
137 write_en : in std_logic; --reg (register file)
138 dmem_en : in std_logic; --ureg (jump addr in mem or in address)
139 dmem_write_en : in std_logic; --ureg
140 hword : in std_logic; --ureg
141 byte_s : in std_logic; --ureg
143 regfile_val : out gp_register_t;
144 reg_we : out std_logic;
145 reg_addr : out gp_addr_t;
146 jump_addr : out instruction_addr_t;
147 jump : out std_logic;
149 bus_tx : out std_logic;
150 bus_rx : in std_logic;
152 sseg0 : out std_logic_vector(0 to 6);
153 sseg1 : out std_logic_vector(0 to 6);
154 sseg2 : out std_logic_vector(0 to 6);
155 sseg3 : out std_logic_vector(0 to 6);
157 int_req : out interrupt_t
160 end component writeback_stage;
164 end package core_pkg;