1 |
2 |
idiolatrie |
--------------------------------------------------------------------------------
|
2 |
|
|
-- MIPS™ I CPU --
|
3 |
|
|
--------------------------------------------------------------------------------
|
4 |
|
|
-- --
|
5 |
|
|
-- REFERENCES --
|
6 |
|
|
-- --
|
7 |
|
|
-- [1] David A. Patterson, John L. Hennessy, --
|
8 |
|
|
-- Computer Organization and Design, The Hardware/Software Interface, --
|
9 |
|
|
-- Morgan Kaufmann; 4 edition (November 10, 2008), --
|
10 |
|
|
-- ISBN 978-0123744937 --
|
11 |
|
|
-- --
|
12 |
|
|
-- [2] IDT R30xx Family Software Reference Manual --
|
13 |
|
|
-- Revision 1.0, ©1994 Integrated Device Technology, Inc. --
|
14 |
|
|
-- [3] Ion - MIPS(tm) compatible CPU --
|
15 |
|
|
-- <http://opencores.org/project,ion> --
|
16 |
|
|
-- [4] Plasma - most MIPS I(TM) opcodes --
|
17 |
|
|
-- <http://opencores.org/project,plasma> --
|
18 |
|
|
-- --
|
19 |
|
|
--------------------------------------------------------------------------------
|
20 |
|
|
-- Copyright (C)2011 Mathias Hörtnagl <mathias.hoertnagl@gmail.comt> --
|
21 |
|
|
-- --
|
22 |
|
|
-- This program is free software: you can redistribute it and/or modify --
|
23 |
|
|
-- it under the terms of the GNU General Public License as published by --
|
24 |
|
|
-- the Free Software Foundation, either version 3 of the License, or --
|
25 |
|
|
-- (at your option) any later version. --
|
26 |
|
|
-- --
|
27 |
|
|
-- This program is distributed in the hope that it will be useful, --
|
28 |
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
|
29 |
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --
|
30 |
|
|
-- GNU General Public License for more details. --
|
31 |
|
|
-- --
|
32 |
|
|
-- You should have received a copy of the GNU General Public License --
|
33 |
|
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>. --
|
34 |
|
|
--------------------------------------------------------------------------------
|
35 |
|
|
library ieee;
|
36 |
|
|
use ieee.std_logic_1164.all;
|
37 |
|
|
use ieee.numeric_std.all;
|
38 |
|
|
|
39 |
|
|
library work;
|
40 |
|
|
use work.mips1.all;
|
41 |
|
|
use work.tcpu.all;
|
42 |
|
|
|
43 |
|
|
package icpu is
|
44 |
|
|
|
45 |
|
|
type cpu_in_t is record
|
46 |
|
|
clk : std_logic;
|
47 |
|
|
rst : std_logic;
|
48 |
|
|
hld : std_logic;
|
49 |
|
|
irq : std_logic_vector(7 downto 0);
|
50 |
|
|
ins : std_logic_vector(31 downto 0);
|
51 |
|
|
dat : std_logic_vector(31 downto 0);
|
52 |
|
|
end record;
|
53 |
|
|
|
54 |
|
|
type cpu_out_t is record
|
55 |
|
|
iadr : std_logic_vector(31 downto 0);
|
56 |
|
|
dadr : std_logic_vector(31 downto 0);
|
57 |
|
|
we : std_logic;
|
58 |
|
|
sel : std_logic_vector(3 downto 0);
|
59 |
|
|
dat : std_logic_vector(31 downto 0);
|
60 |
|
|
-- synthesis translate_off
|
61 |
|
|
op : op_t;
|
62 |
|
|
alu : alu_op_t;
|
63 |
|
|
rimm : rimm_op_t;
|
64 |
|
|
cp0op : cp0_op_t;
|
65 |
|
|
cp0reg : cp0_reg_t;
|
66 |
|
|
-- synthesis translate_on
|
67 |
|
|
end record;
|
68 |
|
|
|
69 |
|
|
component cpu is
|
70 |
|
|
port(
|
71 |
|
|
ci : in cpu_in_t;
|
72 |
|
|
co : out cpu_out_t
|
73 |
|
|
);
|
74 |
|
|
end component;
|
75 |
|
|
|
76 |
|
|
end icpu;
|