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

Subversion Repositories t80

[/] [t80/] [trunk/] [rtl/] [vhdl/] [T80_RegX.vhd] - Blame information for rev 47

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 35 jesus
--
2
-- T80 Registers for Xilinx Select RAM
3
--
4 36 jesus
-- Version : 0244
5 35 jesus
--
6
-- Copyright (c) 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
--      http://www.opencores.org/cvsweb.shtml/t51/
42
--
43
-- Limitations :
44
--
45
-- File history :
46
--
47
--      0242 : Initial release
48
--
49 36 jesus
--      0244 : Removed UNISIM library and added componet declaration
50
--
51 35 jesus
 
52
library IEEE;
53
use IEEE.std_logic_1164.all;
54
use IEEE.numeric_std.all;
55
 
56
entity T80_Reg is
57
        port(
58
                Clk                     : in std_logic;
59
                CEN                     : in std_logic;
60
                WEH                     : in std_logic;
61
                WEL                     : in std_logic;
62
                AddrA           : in std_logic_vector(2 downto 0);
63
                AddrB           : in std_logic_vector(2 downto 0);
64
                AddrC           : in std_logic_vector(2 downto 0);
65
                DIH                     : in std_logic_vector(7 downto 0);
66
                DIL                     : in std_logic_vector(7 downto 0);
67
                DOAH            : out std_logic_vector(7 downto 0);
68
                DOAL            : out std_logic_vector(7 downto 0);
69
                DOBH            : out std_logic_vector(7 downto 0);
70
                DOBL            : out std_logic_vector(7 downto 0);
71
                DOCH            : out std_logic_vector(7 downto 0);
72
                DOCL            : out std_logic_vector(7 downto 0)
73
        );
74
end T80_Reg;
75
 
76
architecture rtl of T80_Reg is
77
 
78 36 jesus
        component RAM16X1D
79
                port(
80
                        DPO             : out std_ulogic;
81
                        SPO             : out std_ulogic;
82
                        A0              : in std_ulogic;
83
                        A1              : in std_ulogic;
84
                        A2              : in std_ulogic;
85
                        A3              : in std_ulogic;
86
                        D               : in std_ulogic;
87
                        DPRA0   : in std_ulogic;
88
                        DPRA1   : in std_ulogic;
89
                        DPRA2   : in std_ulogic;
90
                        DPRA3   : in std_ulogic;
91
                        WCLK    : in std_ulogic;
92
                        WE              : in std_ulogic);
93
        end component;
94
 
95 35 jesus
        signal  ENH             : std_logic;
96
        signal  ENL             : std_logic;
97
 
98
begin
99
 
100
        ENH <= CEN and WEH;
101
        ENL <= CEN and WEL;
102
 
103
        bG1: for I in 0 to 7 generate
104
        begin
105
                Reg1H : RAM16X1D
106
                        port map(
107
                        DPO => DOBH(i),
108
                        SPO => DOAH(i),
109
                        A0 => AddrA(0),
110
                        A1 => AddrA(1),
111
                        A2 => AddrA(2),
112
                        A3 => '0',
113
                        D => DIH(i),
114
                        DPRA0 => AddrB(0),
115
                        DPRA1 => AddrB(1),
116
                        DPRA2 => AddrB(2),
117
                        DPRA3 => '0',
118
                        WCLK => Clk,
119
                        WE => ENH);
120
                Reg1L : RAM16X1D
121
                        port map(
122
                        DPO => DOBL(i),
123
                        SPO => DOAL(i),
124
                        A0 => AddrA(0),
125
                        A1 => AddrA(1),
126
                        A2 => AddrA(2),
127
                        A3 => '0',
128
                        D => DIL(i),
129
                        DPRA0 => AddrB(0),
130
                        DPRA1 => AddrB(1),
131
                        DPRA2 => AddrB(2),
132
                        DPRA3 => '0',
133
                        WCLK => Clk,
134
                        WE => ENL);
135
                Reg2H : RAM16X1D
136
                        port map(
137
                        DPO => DOCH(i),
138
                        SPO => open,
139
                        A0 => AddrA(0),
140
                        A1 => AddrA(1),
141
                        A2 => AddrA(2),
142
                        A3 => '0',
143
                        D => DIH(i),
144
                        DPRA0 => AddrC(0),
145
                        DPRA1 => AddrC(1),
146
                        DPRA2 => AddrC(2),
147
                        DPRA3 => '0',
148
                        WCLK => Clk,
149
                        WE => ENH);
150
                Reg2L : RAM16X1D
151
                        port map(
152
                        DPO => DOCL(i),
153
                        SPO => open,
154
                        A0 => AddrA(0),
155
                        A1 => AddrA(1),
156
                        A2 => AddrA(2),
157
                        A3 => '0',
158
                        D => DIL(i),
159
                        DPRA0 => AddrC(0),
160
                        DPRA1 => AddrC(1),
161
                        DPRA2 => AddrC(2),
162
                        DPRA3 => '0',
163
                        WCLK => Clk,
164
                        WE => ENL);
165
        end generate;
166
 
167
end;

powered by: WebSVN 2.1.0

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