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

Subversion Repositories ppx16

[/] [ppx16/] [trunk/] [rtl/] [vhdl/] [PPX_Pack.vhd] - Blame information for rev 22

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 jesus
--
2
-- PIC16xx compatible microcontroller core
3
--
4 14 jesus
-- Version : 0224
5 3 jesus
--
6
-- Copyright (c) 2001-2002 Daniel Wallner (jesus@opencores.org)
7
--
8
-- All rights reserved
9
--
10
-- Redistribution and use in source and synthezised forms, with or without
11
-- modification, are permitted provided that the following conditions are met:
12
--
13
-- Redistributions of source code must retain the above copyright notice,
14
-- this list of conditions and the following disclaimer.
15
--
16
-- Redistributions in synthesized form must reproduce the above copyright
17
-- notice, this list of conditions and the following disclaimer in the
18
-- documentation and/or other materials provided with the distribution.
19
--
20
-- Neither the name of the author nor the names of other contributors may
21
-- be used to endorse or promote products derived from this software without
22
-- specific prior written permission.
23
--
24
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
26
-- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27
-- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
28
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34
-- POSSIBILITY OF SUCH DAMAGE.
35
--
36
-- Please report bugs to the author, but before you do so, please
37
-- make sure that this is not a derivative work and that
38
-- you have the latest version of this file.
39
--
40
-- The latest version of this file can be found at:
41 14 jesus
--      http://www.opencores.org/cvsweb.shtml/ppx16/
42 3 jesus
--
43
-- Limitations :
44
--
45
-- File history :
46
--
47
 
48
library IEEE;
49
use IEEE.std_logic_1164.all;
50
 
51
package PPX_Pack is
52
 
53
        component PPX_ALU
54
        generic(
55
                InstructionLength : integer
56
        );
57
        port (
58
                Clk                     : in std_logic;
59
                ROM_Data        : in std_logic_vector(InstructionLength - 1 downto 0);
60
                A                       : in std_logic_vector(7 downto 0);
61
                B                       : in std_logic_vector(7 downto 0);
62 11 jesus
                Q                       : out std_logic_vector(7 downto 0);
63 3 jesus
                Skip            : in std_logic;
64
                Carry           : in std_logic;
65
                Z_Skip          : out std_logic;
66
                STATUS_d        : out std_logic_vector(2 downto 0);
67
                STATUS_Wr       : out std_logic_vector(2 downto 0)
68
        );
69
        end component;
70
 
71
        component PPX_Ctrl
72
        generic(
73
                InstructionLength : integer
74
        );
75
        port(
76 11 jesus
                Clk                     : in std_logic;
77 14 jesus
                Reset_n                 : in std_logic;
78 11 jesus
                ROM_Data        : in std_logic_vector(InstructionLength - 1 downto 0);
79 3 jesus
                Inst            : in std_logic_vector(InstructionLength - 1 downto 0);
80 11 jesus
                Skip            : in std_logic;
81 3 jesus
                File_Wr         : out std_logic;
82
                W_Wr            : out std_logic;
83
                Imm_Op          : out std_logic;
84 11 jesus
                A2Res           : out std_logic;
85 3 jesus
                B2Res           : out std_logic;
86
                Push            : out std_logic;
87
                Pop                     : out std_logic;
88
                Goto            : out std_logic;
89
                IRet            : out std_logic;
90
                B_Skip          : out std_logic;
91
                Sleep           : out std_logic
92
        );
93
        end component;
94
 
95
        component PPX_PCS
96
        generic(
97
                PC_Width                : integer;
98
                StackAddrWidth  : integer;
99
                TopBoot                 : boolean
100
        );
101
        port(
102
                Clk                             : in std_logic;
103
                Reset_n                 : in std_logic;
104
                CS                              : in std_logic;
105
                Wr                              : in std_logic;
106
                Data_In                 : in std_logic_vector(7 downto 0);
107
                Addr_In                 : in std_logic_vector(PC_Width - 3 downto 0);
108
                PCLATH                  : in std_logic_vector(4 downto 0);
109
                STATUS                  : in std_logic_vector(6 downto 5);
110
                NPC                             : out std_logic_vector(PC_Width - 1 downto 0);
111
                Int                             : in std_logic;
112
                Sleep                   : in std_logic;
113
                Push                    : in std_logic;
114
                Pop                             : in std_logic;
115
                Goto                    : in std_logic
116
        );
117
        end component;
118
 
119
        component PPX16
120
        generic(
121
                InstructionLength       : integer;
122
                ROMAddressWidth         : integer;
123
                StackAddrWidth          : integer;
124
                TopBoot                         : boolean
125
        );
126
        port(
127
                Clk                     : in std_logic;
128
                Reset_n         : in std_logic;
129
                ROM_Addr        : out std_logic_vector(ROMAddressWidth - 1 downto 0);
130
                ROM_Data        : in std_logic_vector(InstructionLength - 1 downto 0);
131
                Int_Trig        : in std_logic;
132
                GIE                     : in std_logic;
133
                Int_Acc         : out std_logic;
134
                Int_Ret         : out std_logic;
135
                File_Addr       : out std_logic_vector(InstructionLength - 6 downto 0);
136
                File_Addr_r     : out std_logic_vector(InstructionLength - 6 downto 0);
137
                File_Wr         : out std_logic;
138 11 jesus
                W_Wr            : out std_logic;
139 3 jesus
                Instruction     : out std_logic_vector(InstructionLength - 1 downto 0);
140 11 jesus
                Op_Bus          : in std_logic_vector(7 downto 0);
141
                W                       : out std_logic_vector(7 downto 0);
142
                STATUS          : out std_logic_vector(7 downto 0);
143
                FSR                     : out std_logic_vector(7 downto 0);
144
                PCLATH          : out std_logic_vector(4 downto 0);
145
                Res_Bus         : out std_logic_vector(7 downto 0)
146 3 jesus
        );
147
        end component;
148
 
149
        component PPX_RAM
150
        generic(
151
                Bottom          : integer;
152
                Top                     : integer;
153
                AddrWidth       : integer
154
        );
155
        port(
156
                Clk                     : in std_logic;
157
                CS                      : in std_logic;
158
                Wr                      : in std_logic;
159
                Addr            : in std_logic_vector(AddrWidth - 1 downto 0);
160
                Data_In         : in std_logic_vector(7 downto 0);
161
                Data_Out        : out std_logic_vector(7 downto 0)
162
        );
163
        end component;
164
 
165
        component PPX_Port
166
        port(
167
                Clk                     : in std_logic;
168
                Reset_n         : in std_logic;
169 11 jesus
                Port_Wr         : in std_logic;
170 3 jesus
                Tris_Wr         : in std_logic;
171
                Data_In         : in std_logic_vector(7 downto 0);
172 11 jesus
                Port_In         : out std_logic_vector(7 downto 0);
173
                Tris            : out std_logic_vector(7 downto 0);
174 3 jesus
                IOPort          : inout std_logic_vector(7 downto 0)
175
        );
176
        end component;
177
 
178
        component PPX_TMR
179
        port(
180
                Clk                     : in std_logic;
181
                Reset_n         : in std_logic;
182
                CKI                     : in std_logic;
183
                SE                      : in std_logic;
184
                CS                      : in std_logic;
185
                PS                      : in std_logic_vector(2 downto 0);
186
                PSA                     : in std_logic;
187
                TMR_Sel         : in std_logic;
188
                Wr                      : in std_logic;
189
                Data_In         : in std_logic_vector(7 downto 0);
190
                Data_Out        : out std_logic_vector(7 downto 0);
191
                TOF                     : out std_logic
192
        );
193
        end component;
194
 
195
end PPX_Pack;

powered by: WebSVN 2.1.0

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