OpenCores
URL https://opencores.org/ocsvn/leros/leros/trunk

Subversion Repositories leros

[/] [leros/] [trunk/] [vhdl/] [core/] [leros_types.vhd] - Blame information for rev 4

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 martin
--
2
--  Copyright 2011 Martin Schoeberl <masca@imm.dtu.dk>,
3
--                 Technical University of Denmark, DTU Informatics. 
4
--  All rights reserved.
5
--
6
-- Redistribution and use in source and binary forms, with or without
7
-- modification, are permitted provided that the following conditions are met:
8
-- 
9
--    1. Redistributions of source code must retain the above copyright notice,
10
--       this list of conditions and the following disclaimer.
11
-- 
12
--    2. Redistributions in binary form must reproduce the above copyright
13
--       notice, this list of conditions and the following disclaimer in the
14
--       documentation and/or other materials provided with the distribution.
15
-- 
16
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS
17
-- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18
-- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
19
-- NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20
-- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
-- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22
-- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
-- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
-- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
-- 
27
-- The views and conclusions contained in the software and documentation are
28
-- those of the authors and should not be interpreted as representing official
29
-- policies, either expressed or implied, of the copyright holder.
30
-- 
31
 
32
library ieee;
33
use ieee.std_logic_1164.all;
34
use ieee.numeric_std.all;
35
 
36
package leros_types is
37
 
38
        -- should this later go to a lerso_config package?
39
        constant DM_BITS : integer := 8;
40
        constant IM_BITS : integer := 9;
41
 
42
        type alu_log_type is (op_and, op_or, op_xor, op_ld);
43
 
44
        type decode_type is record
45
                op : alu_log_type;
46
                al_ena : std_logic;
47
                ah_ena : std_logic;
48
                log_add : std_logic;
49
                add_sub : std_logic;
50
                shr : std_logic;
51
                sel_imm : std_logic;
52
                store : std_logic;
53
                outp : std_logic;
54
                inp : std_logic;
55
                -- the following are used *in* the decode stage, not in the ex stage
56
                indls : std_logic;
57
                br_op : std_logic;
58
                jal : std_logic;
59
                loadh : std_logic;
60
        end record;
61
 
62
        type im_in_type is record
63
                rdaddr : std_logic_vector(IM_BITS-1 downto 0);
64
                wraddr : std_logic_vector(IM_BITS-1 downto 0);
65
                wrdata : std_logic_vector(15 downto 0);
66
                wren : std_logic;
67
        end record;
68
 
69
        type im_out_type is record
70
                data : std_logic_vector(15 downto 0);
71
        end record;
72
 
73
        type fedec_in_type is record
74
                accu : std_logic_vector(15 downto 0);
75
                dm_data : std_logic_vector(15 downto 0);
76
        end record;
77
 
78
        type fedec_out_type is record
79
                dec : decode_type;
80
                imm : std_logic_vector(15 downto 0);
81
                dm_addr : std_logic_vector(DM_BITS-1 downto 0);
82
                pc : std_logic_vector(IM_BITS-1 downto 0);
83
        end record;
84
 
85
--      type ex_in_type is record
86
--              dec : decode_type;
87
--              imm : std_logic_vector(15 downto 0);
88
--      end record;
89
 
90
        type ex_out_type is record
91
                accu : std_logic_vector(15 downto 0);
92
                dm_data : std_logic_vector(15 downto 0);
93
        end record;
94
 
95
        type io_out_type is record
96
                addr : std_logic_vector(7 downto 0);
97
                rd : std_logic;
98
                wr : std_logic;
99
                wrdata : std_logic_vector(15 downto 0);
100
        end record;
101
 
102
        type io_in_type is record
103
                rddata : std_logic_vector(15 downto 0);
104
        end record;
105
 
106
 
107
end package;
108
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.