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

Subversion Repositories tg68kc

[/] [tg68kc/] [trunk/] [TG68K_Pack.vhd] - Blame information for rev 2

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

Line No. Rev Author Line
1 2 tobiflex
------------------------------------------------------------------------------
2
------------------------------------------------------------------------------
3
--                                                                          --
4
-- Copyright (c) 2009-2018 Tobias Gubener                                   -- 
5
-- Subdesign fAMpIGA by TobiFlex                                            --
6
-- Patches by MikeJ, Till Harbaum, Rok Krajnk, ...                          --
7
--                                                                          --
8
-- This source file is free software: you can redistribute it and/or modify --
9
-- it under the terms of the GNU Lesser General Public License as published --
10
-- by the Free Software Foundation, either version 3 of the License, or     --
11
-- (at your option) any later version.                                      --
12
--                                                                          --
13
-- This source file is distributed in the hope that it will be useful,      --
14
-- but WITHOUT ANY WARRANTY; without even the implied warranty of           --
15
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            --
16
-- GNU General Public License for more details.                             --
17
--                                                                          --
18
-- You should have received a copy of the GNU General Public License        --
19
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.    --
20
--                                                                          --
21
------------------------------------------------------------------------------
22
------------------------------------------------------------------------------
23
library IEEE;
24
use IEEE.std_logic_1164.all;
25
 
26
package TG68K_Pack is
27
 
28
        type micro_states is (idle, nop, ld_nn, st_nn, ld_dAn1, ld_AnXn1, ld_AnXn2, st_dAn1, ld_AnXnbd1, ld_AnXnbd2, ld_AnXnbd3,
29
                                                  ld_229_1, ld_229_2, ld_229_3, ld_229_4, st_229_1, st_229_2, st_229_3, st_229_4,
30
                                                  st_AnXn1, st_AnXn2, bra1, bsr1, bsr2, nopnop, dbcc1, movem1, movem2, movem3,
31
                                                  andi, pack1, pack2, pack3, op_AxAy, cmpm, link1, link2, unlink1, unlink2, int1, int2, int3, int4, rte1, rte2, rte3,
32
                                                  rtd1, rtd2, trap0, trap1, trap2, trap3,
33
                                                  trap4, trap5, trap6, movec1, movep1, movep2, movep3, movep4, movep5, rota1, bf1,
34
                                                  mul1, mul2, mul_end1,  mul_end2, div1, div2, div3, div4, div_end1, div_end2);
35
 
36
        constant opcMOVE        : integer := 0; --
37
        constant opcMOVEQ       : integer := 1; --
38
        constant opcMOVESR      : integer := 2; --
39
        constant opcADD         : integer := 3; --
40
        constant opcADDQ        : integer := 4; --
41
        constant opcOR          : integer := 5; --
42
        constant opcAND         : integer := 6; --
43
        constant opcEOR         : integer := 7; --
44
        constant opcCMP         : integer := 8; --
45
        constant opcROT         : integer := 9; --
46
        constant opcCPMAW       : integer := 10;
47
        constant opcEXT         : integer := 11; --
48
        constant opcABCD        : integer := 12; --
49
        constant opcSBCD        : integer := 13; --
50
        constant opcBITS        : integer := 14; --
51
        constant opcSWAP        : integer := 15; --
52
        constant opcScc         : integer := 16; --
53
        constant andiSR         : integer := 17; --
54
        constant eoriSR         : integer := 18; --
55
        constant oriSR          : integer := 19; --
56
        constant opcMULU        : integer := 20; --
57
        constant opcDIVU        : integer := 21; --
58
        constant dispouter      : integer := 22; --
59
        constant rot_nop        : integer := 23; --
60
        constant ld_rot_cnt     : integer := 24; --
61
        constant writePC_add    : integer := 25; --
62
        constant ea_data_OP1    : integer := 26; --
63
        constant ea_data_OP2    : integer := 27; --
64
        constant use_XZFlag     : integer := 28; --
65
        constant get_bfoffset   : integer := 29; --
66
        constant save_memaddr   : integer := 30; --
67
        constant opcCHK         : integer := 31; --
68
        constant movec_rd       : integer := 32; --
69
        constant movec_wr       : integer := 33; --
70
        constant Regwrena       : integer := 34; --
71
        constant update_FC      : integer := 35; --
72
        constant linksp         : integer := 36; --
73
        constant movepl         : integer := 37; --
74
        constant update_ld      : integer := 38; --
75
        constant OP1addr        : integer := 39; --
76
        constant write_reg      : integer := 40; --
77
        constant changeMode     : integer := 41; --
78
        constant ea_build       : integer := 42; --
79
        constant trap_chk       : integer := 43; --
80
        constant store_ea_data  : integer := 44; --
81
        constant addrlong       : integer := 45; --
82
        constant postadd        : integer := 46; --
83
        constant presub         : integer := 47; --
84
        constant subidx         : integer := 48; --
85
        constant no_Flags       : integer := 49; --
86
        constant use_SP         : integer := 50; --
87
        constant to_CCR         : integer := 51; --
88
        constant to_SR          : integer := 52; --
89
        constant OP2out_one     : integer := 53; --
90
        constant OP1out_zero    : integer := 54; --
91
        constant mem_addsub     : integer := 55; --
92
        constant addsub         : integer := 56; --
93
        constant directPC       : integer := 57; --
94
        constant direct_delta   : integer := 58; --
95
        constant directSR       : integer := 59; --
96
        constant directCCR      : integer := 60; --
97
        constant exg            : integer := 61; --
98
        constant get_ea_now     : integer := 62; --
99
        constant ea_to_pc       : integer := 63; --
100
        constant hold_dwr       : integer := 64; --
101
        constant to_USP         : integer := 65; --
102
        constant from_USP       : integer := 66; --
103
        constant write_lowlong  : integer := 67; --
104
        constant write_reminder : integer := 68; --
105
        constant movem_action   : integer := 69; --
106
        constant briefext       : integer := 70; --
107
        constant get_2ndOPC     : integer := 71; --
108
        constant mem_byte       : integer := 72; --
109
        constant longaktion     : integer := 73; --
110
        constant opcRESET           : integer := 74; --
111
        constant opcBF              : integer := 75; --
112
        constant opcBFwb            : integer := 76; --
113
        constant opcPACK            : integer := 77; --
114
        constant opcUNPACK          : integer := 78; --
115
        constant hold_ea_data   : integer := 79; --
116
        constant store_ea_packdata  : integer := 80; --
117
        constant exec_BS         : integer := 81; --
118
--      constant    : integer := 75; --
119
--      constant         : integer := 76; --
120
--      constant         : integer := 7; --
121
--      constant         : integer := 7; --
122
--      constant         : integer := 7; --
123
 
124
        constant lastOpcBit     : integer := 81;
125
 
126
        component TG68K_ALU
127
        generic(
128
                MUL_Mode :integer;          --0=>16Bit,  1=>32Bit,  2=>switchable with CPU(1),  3=>no MUL,  
129
                MUL_Hardware :integer;   --0=>no,         1=>yes,  
130
                DIV_Mode :integer;               --0=>16Bit,  1=>32Bit,  2=>switchable with CPU(1),  3=>no DIV,  
131
                BarrelShifter :integer   --0=>no,     1=>yes,    2=>switchable with CPU(1)  
132
                );
133
        port(
134
                clk                     : in std_logic;
135
        Reset                   : in std_logic;
136
        clkena_lw               : in std_logic:='1';
137
        execOPC                 : in bit;
138
        decodeOPC               : in bit;
139
        exe_condition           : in std_logic;
140
        exec_tas                        : in std_logic;
141
        long_start                      : in bit;
142
                  non_aligned        : in  std_logic;
143
        movem_presub            : in bit;
144
        set_stop                        : in bit;
145
        Z_error                 : in bit;
146
        rot_bits                : in std_logic_vector(1 downto 0);
147
                exec                : in bit_vector(lastOpcBit downto 0);
148
        OP1out                  : in std_logic_vector(31 downto 0);
149
        OP2out                  : in std_logic_vector(31 downto 0);
150
        reg_QA                  : in std_logic_vector(31 downto 0);
151
        reg_QB                  : in std_logic_vector(31 downto 0);
152
        opcode                  : in std_logic_vector(15 downto 0);
153
--        datatype              : in std_logic_vector(1 downto 0);
154
        exe_opcode              : in std_logic_vector(15 downto 0);
155
        exe_datatype            : in std_logic_vector(1 downto 0);
156
        sndOPC                  : in std_logic_vector(15 downto 0);
157
        last_data_read          : in std_logic_vector(15 downto 0);
158
        data_read                       : in std_logic_vector(15 downto 0);
159
        FlagsSR                 : in std_logic_vector(7 downto 0);
160
                micro_state                     : in micro_states;
161
                bf_ext_in               : in std_logic_vector(7 downto 0);
162
                bf_ext_out              : out std_logic_vector(7 downto 0);
163
                bf_shift                : in std_logic_vector(5 downto 0);
164
                bf_width                : in std_logic_vector(5 downto 0);
165
                bf_ffo_offset       : in std_logic_vector(31 downto 0);
166
                bf_loffset              : in std_logic_vector(4 downto 0);
167
 
168
        set_V_Flag              : buffer bit;
169
        Flags                   : buffer std_logic_vector(7 downto 0);
170
        c_out                   : buffer std_logic_vector(2 downto 0);
171
        addsub_q                : buffer std_logic_vector(31 downto 0);
172
        ALUout                  : out std_logic_vector(31 downto 0)
173
        );
174
        end component;
175
 
176
end;

powered by: WebSVN 2.1.0

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