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

Subversion Repositories t400

[/] [t400/] [trunk/] [rtl/] [vhdl/] [system/] [t411.vhd] - Blame information for rev 176

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

Line No. Rev Author Line
1 2 arniml
-------------------------------------------------------------------------------
2
--
3
-- T411 system toplevel.
4
--
5 173 arniml
-- $Id: t411.vhd,v 1.2 2008-08-23 11:19:20 arniml Exp $
6
-- $Name: not supported by cvs2svn $
7 2 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
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33
-- 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 t411 is
53
 
54
  generic (
55
    opt_ck_div_g         : integer := t400_opt_ck_div_16_c;
56
    opt_l_out_type_7_g   : integer := t400_opt_out_type_std_c;
57
    opt_l_out_type_6_g   : integer := t400_opt_out_type_std_c;
58
    opt_l_out_type_5_g   : integer := t400_opt_out_type_std_c;
59
    opt_l_out_type_4_g   : integer := t400_opt_out_type_std_c;
60
    opt_l_out_type_3_g   : integer := t400_opt_out_type_std_c;
61
    opt_l_out_type_2_g   : integer := t400_opt_out_type_std_c;
62
    opt_l_out_type_1_g   : integer := t400_opt_out_type_std_c;
63
    opt_l_out_type_0_g   : integer := t400_opt_out_type_std_c;
64
    opt_d_out_type_1_g   : integer := t400_opt_out_type_std_c;
65
    opt_d_out_type_0_g   : integer := t400_opt_out_type_std_c;
66
    opt_g_out_type_2_g   : integer := t400_opt_out_type_std_c;
67
    opt_g_out_type_1_g   : integer := t400_opt_out_type_std_c;
68
    opt_g_out_type_0_g   : integer := t400_opt_out_type_std_c;
69
    opt_so_output_type_g : integer := t400_opt_out_type_std_c;
70
    opt_sk_output_type_g : integer := t400_opt_out_type_std_c
71
  );
72
  port (
73
    ck_i      : in    std_logic;
74
    ck_en_i   : in    std_logic;
75
    reset_n_i : in    std_logic;
76
    io_l_b    : inout std_logic_vector(7 downto 0);
77
    io_d_o    : out   std_logic_vector(1 downto 0);
78
    io_g_b    : inout std_logic_vector(2 downto 0);
79
    si_i      : in    std_logic;
80
    so_o      : out   std_logic;
81
    sk_o      : out   std_logic
82
  );
83
 
84
end t411;
85
 
86
 
87
use work.t400_system_comp_pack.t410_notri;
88
 
89
architecture struct of t411 is
90
 
91
  signal io_l_from_t410_s,
92
         io_l_en_s         : std_logic_vector(7 downto 0);
93
  signal io_d_from_t410_s,
94
         io_d_en_s         : std_logic_vector(3 downto 0);
95
  signal io_g_to_t410_s,
96
         io_g_from_t410_s,
97
         io_g_en_s         : std_logic_vector(3 downto 0);
98
 
99
  signal so_s,
100
         so_en_s           : std_logic;
101
  signal sk_s,
102
         sk_en_s           : std_logic;
103
 
104
  signal gnd_s             : std_logic;
105
 
106
begin
107
 
108
  gnd_s <= '0';
109
 
110
  -----------------------------------------------------------------------------
111
  -- T411 without tri-states
112
  -----------------------------------------------------------------------------
113
  t410_notri_b : t410_notri
114
    generic map (
115
      opt_ck_div_g         => opt_ck_div_g,
116
      opt_cko_g            => t400_opt_cko_crystal_c,
117
      opt_l_out_type_7_g   => opt_l_out_type_7_g,
118
      opt_l_out_type_6_g   => opt_l_out_type_6_g,
119
      opt_l_out_type_5_g   => opt_l_out_type_5_g,
120
      opt_l_out_type_4_g   => opt_l_out_type_4_g,
121
      opt_l_out_type_3_g   => opt_l_out_type_3_g,
122
      opt_l_out_type_2_g   => opt_l_out_type_2_g,
123
      opt_l_out_type_1_g   => opt_l_out_type_1_g,
124
      opt_l_out_type_0_g   => opt_l_out_type_0_g,
125
      opt_d_out_type_3_g   => t400_opt_out_type_std_c,
126
      opt_d_out_type_2_g   => t400_opt_out_type_std_c,
127
      opt_d_out_type_1_g   => opt_d_out_type_1_g,
128
      opt_d_out_type_0_g   => opt_d_out_type_0_g,
129
      opt_g_out_type_3_g   => t400_opt_out_type_std_c,
130
      opt_g_out_type_2_g   => opt_g_out_type_2_g,
131
      opt_g_out_type_1_g   => opt_g_out_type_1_g,
132
      opt_g_out_type_0_g   => opt_g_out_type_0_g,
133
      opt_so_output_type_g => opt_so_output_type_g,
134
      opt_sk_output_type_g => opt_sk_output_type_g
135
    )
136
    port map (
137
      ck_i      => ck_i,
138
      ck_en_i   => ck_en_i,
139
      reset_n_i => reset_n_i,
140
      cko_i     => gnd_s,
141
      io_l_i    => io_l_b,
142
      io_l_o    => io_l_from_t410_s,
143
      io_l_en_o => io_l_en_s,
144
      io_d_o    => io_d_from_t410_s,
145
      io_d_en_o => io_d_en_s,
146
      io_g_i    => io_g_to_t410_s,
147
      io_g_o    => io_g_from_t410_s,
148
      io_g_en_o => io_g_en_s,
149
      si_i      => si_i,
150
      so_o      => so_s,
151
      so_en_o   => so_en_s,
152
      sk_o      => sk_s,
153
      sk_en_o   => sk_en_s
154
    );
155
 
156
 
157
  -----------------------------------------------------------------------------
158
  -- Tri-states for output drivers
159
  -----------------------------------------------------------------------------
160
  io_l_tri: for idx in 7 downto 0 generate
161
    io_l_b(idx)  <=   io_l_from_t410_s(idx)
162
                    when io_l_en_s(idx) = '1' else
163
                      'Z';
164
  end generate;
165
  --
166
  io_d_tri: for idx in 1 downto 0 generate
167
    io_d_o(idx)  <=   io_d_from_t410_s(idx)
168
                    when io_d_en_s(idx) = '1' else
169
                      'Z';
170
  end generate;
171
  --
172
  io_g_tri: for idx in 2 downto 0 generate
173
    io_g_b(idx)  <=   io_g_from_t410_s(idx)
174
                    when io_g_en_s(idx) = '1' else
175
                      'Z';
176
  end generate;
177
  io_g_to_t410_s <= io_g_from_t410_s(3) & io_g_b;
178
  --
179
  so_o           <=   so_s
180
                    when so_en_s = '1' else
181
                      'Z';
182
  --
183
  sk_o           <=   sk_s
184
                    when sk_en_s = '1' else
185
                      'Z';
186
 
187
end struct;
188
 
189
 
190
-------------------------------------------------------------------------------
191
-- File History:
192
--
193
-- $Log: not supported by cvs2svn $
194 173 arniml
-- Revision 1.1.1.1  2006/05/06 01:56:45  arniml
195
-- import from local CVS repository, LOC_CVS_0_1
196
--
197 2 arniml
-------------------------------------------------------------------------------

powered by: WebSVN 2.1.0

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