1 |
2 |
jeunes2 |
-- This file is part of the marca processor.
|
2 |
|
|
-- Copyright (C) 2007 Wolfgang Puffitsch
|
3 |
|
|
|
4 |
|
|
-- This program is free software; you can redistribute it and/or modify it
|
5 |
|
|
-- under the terms of the GNU Library General Public License as published
|
6 |
|
|
-- by the Free Software Foundation; either version 2, or (at your option)
|
7 |
|
|
-- any later version.
|
8 |
|
|
|
9 |
|
|
-- This program is distributed in the hope that it will be useful,
|
10 |
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11 |
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
12 |
|
|
-- Library General Public License for more details.
|
13 |
|
|
|
14 |
|
|
-- You should have received a copy of the GNU Library General Public
|
15 |
|
|
-- License along with this program; if not, write to the Free Software
|
16 |
|
|
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
17 |
|
|
|
18 |
|
|
-------------------------------------------------------------------------------
|
19 |
|
|
-- MARCA execution stage
|
20 |
|
|
-------------------------------------------------------------------------------
|
21 |
|
|
-- entity for the execution pipeline stage
|
22 |
|
|
-------------------------------------------------------------------------------
|
23 |
|
|
|
24 |
|
|
-------------------------------------------------------------------------------
|
25 |
|
|
-- Wolfgang Puffitsch
|
26 |
|
|
-- Computer Architecture Lab, Group 3
|
27 |
|
|
-------------------------------------------------------------------------------
|
28 |
|
|
|
29 |
|
|
library IEEE;
|
30 |
|
|
use IEEE.std_logic_1164.all;
|
31 |
|
|
|
32 |
|
|
use work.marca_pkg.all;
|
33 |
|
|
|
34 |
|
|
entity execute is
|
35 |
|
|
|
36 |
|
|
port (
|
37 |
|
|
clock : in std_logic;
|
38 |
|
|
reset : in std_logic;
|
39 |
|
|
|
40 |
|
|
busy : out std_logic;
|
41 |
|
|
stall : in std_logic;
|
42 |
|
|
|
43 |
|
|
pc_in : in std_logic_vector(REG_WIDTH-1 downto 0);
|
44 |
|
|
pcchg : out std_logic;
|
45 |
|
|
pc_out : out std_logic_vector(REG_WIDTH-1 downto 0);
|
46 |
|
|
|
47 |
|
|
dest_in : in std_logic_vector(REG_COUNT_LOG-1 downto 0);
|
48 |
|
|
dest_out : out std_logic_vector(REG_COUNT_LOG-1 downto 0);
|
49 |
|
|
|
50 |
|
|
src1 : in std_logic_vector(REG_COUNT_LOG-1 downto 0);
|
51 |
|
|
src2 : in std_logic_vector(REG_COUNT_LOG-1 downto 0);
|
52 |
|
|
|
53 |
|
|
aop : in ALU_OP;
|
54 |
|
|
mop : in MEM_OP;
|
55 |
|
|
iop : in INTR_OP;
|
56 |
|
|
|
57 |
|
|
op1 : in std_logic_vector(REG_WIDTH-1 downto 0);
|
58 |
|
|
op2 : in std_logic_vector(REG_WIDTH-1 downto 0);
|
59 |
|
|
imm : in std_logic_vector(REG_WIDTH-1 downto 0);
|
60 |
|
|
|
61 |
|
|
unit : in UNIT_SELECTOR;
|
62 |
|
|
target_in : in TARGET_SELECTOR;
|
63 |
|
|
target_out : out TARGET_SELECTOR;
|
64 |
|
|
|
65 |
|
|
result : out std_logic_vector(REG_WIDTH-1 downto 0);
|
66 |
|
|
|
67 |
|
|
fw_ena : in std_logic;
|
68 |
|
|
fw_dest : in std_logic_vector(REG_COUNT_LOG-1 downto 0);
|
69 |
|
|
fw_val : in std_logic_vector(REG_WIDTH-1 downto 0);
|
70 |
|
|
|
71 |
|
|
ext_in : in std_logic_vector(IN_BITS-1 downto 0);
|
72 |
|
|
ext_out : out std_logic_vector(OUT_BITS-1 downto 0));
|
73 |
|
|
|
74 |
|
|
end execute;
|