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

Subversion Repositories t400

[/] [t400/] [trunk/] [rtl/] [vhdl/] [system/] [t420.vhd] - Blame information for rev 173

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

Line No. Rev Author Line
1 15 arniml
-------------------------------------------------------------------------------
2
--
3
-- T420 system toplevel.
4
--
5 173 arniml
-- $Id: t420.vhd,v 1.7 2008-08-23 11:19:20 arniml Exp $
6
-- $Name: not supported by cvs2svn $
7 15 arniml
--
8
-- Copyright (c) 2006 Arnim Laeuger (arniml@opencores.org)
9
--
10
-- All rights reserved
11
--
12
-- Redistribution and use in source and synthezised forms, with or without
13
-- modification, are permitted provided that the following conditions are met:
14
--
15
-- Redistributions of source code must retain the above copyright notice,
16
-- this list of conditions and the following disclaimer.
17
--
18
-- Redistributions in synthesized form must reproduce the above copyright
19
-- notice, this list of conditions and the following disclaimer in the
20
-- documentation and/or other materials provided with the distribution.
21
--
22
-- Neither the name of the author nor the names of other contributors may
23
-- be used to endorse or promote products derived from this software without
24
-- specific prior written permission.
25
--
26
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
28
-- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29
-- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
30
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 173 arniml
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 15 arniml
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
-- POSSIBILITY OF SUCH DAMAGE.
37
--
38
-- Please report bugs to the author, but before you do so, please
39
-- make sure that this is not a derivative work and that
40
-- you have the latest version of this file.
41
--
42
-- The latest version of this file can be found at:
43
--      http://www.opencores.org/cvsweb.shtml/t400/
44
--
45
-------------------------------------------------------------------------------
46
 
47
library ieee;
48
use ieee.std_logic_1164.all;
49
 
50
use work.t400_opt_pack.all;
51
 
52
entity t420 is
53
 
54
  generic (
55 39 arniml
    opt_ck_div_g         : integer := t400_opt_ck_div_8_c;
56 55 arniml
    opt_cko_g            : integer := t400_opt_cko_crystal_c;
57 15 arniml
    opt_l_out_type_7_g   : integer := t400_opt_out_type_std_c;
58
    opt_l_out_type_6_g   : integer := t400_opt_out_type_std_c;
59
    opt_l_out_type_5_g   : integer := t400_opt_out_type_std_c;
60
    opt_l_out_type_4_g   : integer := t400_opt_out_type_std_c;
61
    opt_l_out_type_3_g   : integer := t400_opt_out_type_std_c;
62
    opt_l_out_type_2_g   : integer := t400_opt_out_type_std_c;
63
    opt_l_out_type_1_g   : integer := t400_opt_out_type_std_c;
64
    opt_l_out_type_0_g   : integer := t400_opt_out_type_std_c;
65 110 arniml
    opt_microbus_g       : integer := t400_opt_no_microbus_c;
66 138 arniml
    opt_d_out_type_3_g   : integer := t400_opt_out_type_std_c;
67
    opt_d_out_type_2_g   : integer := t400_opt_out_type_std_c;
68 15 arniml
    opt_d_out_type_1_g   : integer := t400_opt_out_type_std_c;
69
    opt_d_out_type_0_g   : integer := t400_opt_out_type_std_c;
70 138 arniml
    opt_g_out_type_3_g   : integer := t400_opt_out_type_std_c;
71 15 arniml
    opt_g_out_type_2_g   : integer := t400_opt_out_type_std_c;
72
    opt_g_out_type_1_g   : integer := t400_opt_out_type_std_c;
73
    opt_g_out_type_0_g   : integer := t400_opt_out_type_std_c;
74
    opt_so_output_type_g : integer := t400_opt_out_type_std_c;
75
    opt_sk_output_type_g : integer := t400_opt_out_type_std_c
76
  );
77
  port (
78
    ck_i      : in    std_logic;
79
    ck_en_i   : in    std_logic;
80
    reset_n_i : in    std_logic;
81 55 arniml
    cko_i     : in    std_logic;
82 15 arniml
    io_l_b    : inout std_logic_vector(7 downto 0);
83
    io_d_o    : out   std_logic_vector(3 downto 0);
84
    io_g_b    : inout std_logic_vector(3 downto 0);
85
    io_in_i   : in    std_logic_vector(3 downto 0);
86
    si_i      : in    std_logic;
87
    so_o      : out   std_logic;
88
    sk_o      : out   std_logic
89
  );
90
 
91
end t420;
92
 
93
 
94
use work.t400_system_comp_pack.t420_notri;
95
 
96
architecture struct of t420 is
97
 
98
  signal io_l_from_t420_s,
99
         io_l_en_s         : std_logic_vector(7 downto 0);
100
  signal io_d_from_t420_s,
101
         io_d_en_s         : std_logic_vector(3 downto 0);
102 27 arniml
  signal io_g_from_t420_s,
103 15 arniml
         io_g_en_s         : std_logic_vector(3 downto 0);
104
 
105
  signal so_s,
106
         so_en_s           : std_logic;
107
  signal sk_s,
108
         sk_en_s           : std_logic;
109
 
110
begin
111
 
112
  -----------------------------------------------------------------------------
113
  -- T420 without tri-states
114
  -----------------------------------------------------------------------------
115
  t420_notri_b : t420_notri
116
    generic map (
117 138 arniml
      opt_type_g           => t400_opt_type_420_c,
118 15 arniml
      opt_ck_div_g         => opt_ck_div_g,
119 55 arniml
      opt_cko_g            => opt_cko_g,
120 15 arniml
      opt_l_out_type_7_g   => opt_l_out_type_7_g,
121
      opt_l_out_type_6_g   => opt_l_out_type_6_g,
122
      opt_l_out_type_5_g   => opt_l_out_type_5_g,
123
      opt_l_out_type_4_g   => opt_l_out_type_4_g,
124
      opt_l_out_type_3_g   => opt_l_out_type_3_g,
125
      opt_l_out_type_2_g   => opt_l_out_type_2_g,
126
      opt_l_out_type_1_g   => opt_l_out_type_1_g,
127
      opt_l_out_type_0_g   => opt_l_out_type_0_g,
128 110 arniml
      opt_microbus_g       => opt_microbus_g,
129 138 arniml
      opt_d_out_type_3_g   => opt_d_out_type_3_g,
130
      opt_d_out_type_2_g   => opt_d_out_type_2_g,
131 15 arniml
      opt_d_out_type_1_g   => opt_d_out_type_1_g,
132
      opt_d_out_type_0_g   => opt_d_out_type_0_g,
133 138 arniml
      opt_g_out_type_3_g   => opt_g_out_type_3_g,
134 15 arniml
      opt_g_out_type_2_g   => opt_g_out_type_2_g,
135
      opt_g_out_type_1_g   => opt_g_out_type_1_g,
136
      opt_g_out_type_0_g   => opt_g_out_type_0_g,
137
      opt_so_output_type_g => opt_so_output_type_g,
138
      opt_sk_output_type_g => opt_sk_output_type_g
139
    )
140
    port map (
141
      ck_i      => ck_i,
142
      ck_en_i   => ck_en_i,
143
      reset_n_i => reset_n_i,
144 55 arniml
      cko_i     => cko_i,
145 15 arniml
      io_l_i    => io_l_b,
146
      io_l_o    => io_l_from_t420_s,
147
      io_l_en_o => io_l_en_s,
148
      io_d_o    => io_d_from_t420_s,
149
      io_d_en_o => io_d_en_s,
150 27 arniml
      io_g_i    => io_g_b,
151 15 arniml
      io_g_o    => io_g_from_t420_s,
152
      io_g_en_o => io_g_en_s,
153
      io_in_i   => io_in_i,
154
      si_i      => si_i,
155
      so_o      => so_s,
156
      so_en_o   => so_en_s,
157
      sk_o      => sk_s,
158
      sk_en_o   => sk_en_s
159
    );
160
 
161
 
162
  -----------------------------------------------------------------------------
163
  -- Tri-states for output drivers
164
  -----------------------------------------------------------------------------
165
  io_l_tri: for idx in 7 downto 0 generate
166
    io_l_b(idx)  <=   io_l_from_t420_s(idx)
167
                    when io_l_en_s(idx) = '1' else
168
                      'Z';
169
  end generate;
170
  --
171
  io_d_tri: for idx in 3 downto 0 generate
172
    io_d_o(idx)  <=   io_d_from_t420_s(idx)
173
                    when io_d_en_s(idx) = '1' else
174
                      'Z';
175
  end generate;
176
  --
177
  io_g_tri: for idx in 3 downto 0 generate
178
    io_g_b(idx)  <=   io_g_from_t420_s(idx)
179
                    when io_g_en_s(idx) = '1' else
180
                      'Z';
181
  end generate;
182
  --
183
  so_o           <=   so_s
184
                    when so_en_s = '1' else
185
                      'Z';
186
  --
187
  sk_o           <=   sk_s
188
                    when sk_en_s = '1' else
189
                      'Z';
190
 
191
end struct;
192
 
193
 
194
-------------------------------------------------------------------------------
195
-- File History:
196
--
197
-- $Log: not supported by cvs2svn $
198 173 arniml
-- Revision 1.6  2006/06/11 13:49:18  arniml
199
-- * hand generic opt_type_g down to t420_notri
200
-- * full generic list
201
--
202 138 arniml
-- Revision 1.5  2006/06/05 20:04:11  arniml
203
-- connect microbus generic
204
--
205 110 arniml
-- Revision 1.4  2006/05/23 01:16:05  arniml
206
-- routi CKO to t400_core
207
--
208 55 arniml
-- Revision 1.3  2006/05/20 02:49:04  arniml
209
-- select CK divide by 8
210
--
211 39 arniml
-- Revision 1.2  2006/05/17 00:38:31  arniml
212
-- connect missing input direction for IO G
213
--
214 27 arniml
-- Revision 1.1  2006/05/14 22:29:01  arniml
215
-- initial check-in
216
--
217 15 arniml
-------------------------------------------------------------------------------

powered by: WebSVN 2.1.0

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