1 |
247 |
arniml |
-------------------------------------------------------------------------------
|
2 |
|
|
--
|
3 |
|
|
-- The T8243 asynchronous toplevel
|
4 |
|
|
--
|
5 |
|
|
-- $Id: t8243.vhd,v 1.1 2006-07-13 22:53:56 arniml Exp $
|
6 |
|
|
-- $Name: not supported by cvs2svn $
|
7 |
|
|
--
|
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/t48/
|
44 |
|
|
--
|
45 |
|
|
-------------------------------------------------------------------------------
|
46 |
|
|
|
47 |
|
|
library ieee;
|
48 |
|
|
use ieee.std_logic_1164.all;
|
49 |
|
|
|
50 |
|
|
entity t8243 is
|
51 |
|
|
|
52 |
|
|
port (
|
53 |
|
|
-- Control Interface ------------------------------------------------------
|
54 |
|
|
cs_n_i : in std_logic;
|
55 |
|
|
prog_n_i : in std_logic;
|
56 |
|
|
-- Port 2 Interface -------------------------------------------------------
|
57 |
|
|
p2_b : inout std_logic_vector(3 downto 0);
|
58 |
|
|
-- Port 4 Interface -------------------------------------------------------
|
59 |
|
|
p4_b : inout std_logic_vector(3 downto 0);
|
60 |
|
|
-- Port 5 Interface -------------------------------------------------------
|
61 |
|
|
p5_b : inout std_logic_vector(3 downto 0);
|
62 |
|
|
-- Port 6 Interface -------------------------------------------------------
|
63 |
|
|
p6_b : inout std_logic_vector(3 downto 0);
|
64 |
|
|
-- Port 7 Interface -------------------------------------------------------
|
65 |
|
|
p7_b : inout std_logic_vector(3 downto 0)
|
66 |
|
|
);
|
67 |
|
|
|
68 |
|
|
end t8243;
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
use work.t8243_comp_pack.t8243_async_notri;
|
72 |
|
|
|
73 |
|
|
architecture struct of t8243 is
|
74 |
|
|
|
75 |
|
|
signal p2_s,
|
76 |
|
|
p4_s,
|
77 |
|
|
p5_s,
|
78 |
|
|
p6_s,
|
79 |
|
|
p7_s : std_logic_vector(3 downto 0);
|
80 |
|
|
signal p2_en_s,
|
81 |
|
|
p4_en_s,
|
82 |
|
|
p5_en_s,
|
83 |
|
|
p6_en_s,
|
84 |
|
|
p7_en_s : std_logic;
|
85 |
|
|
|
86 |
|
|
signal vdd_s : std_logic;
|
87 |
|
|
|
88 |
|
|
begin
|
89 |
|
|
|
90 |
|
|
vdd_s <= '1';
|
91 |
|
|
|
92 |
|
|
|
93 |
|
|
-----------------------------------------------------------------------------
|
94 |
|
|
-- The asynchronous T8243
|
95 |
|
|
-----------------------------------------------------------------------------
|
96 |
|
|
t8243_async_notri_b : t8243_async_notri
|
97 |
|
|
port map (
|
98 |
|
|
reset_n_i => vdd_s, -- or generate power-on reset
|
99 |
|
|
cs_n_i => cs_n_i,
|
100 |
|
|
prog_n_i => prog_n_i,
|
101 |
|
|
p2_i => p2_b,
|
102 |
|
|
p2_o => p2_s,
|
103 |
|
|
p2_en_o => p2_en_s,
|
104 |
|
|
p4_i => p4_b,
|
105 |
|
|
p4_o => p4_s,
|
106 |
|
|
p4_en_o => p4_en_s,
|
107 |
|
|
p5_i => p5_b,
|
108 |
|
|
p5_o => p5_s,
|
109 |
|
|
p5_en_o => p5_en_s,
|
110 |
|
|
p6_i => p6_b,
|
111 |
|
|
p6_o => p6_s,
|
112 |
|
|
p6_en_o => p6_en_s,
|
113 |
|
|
p7_i => p7_b,
|
114 |
|
|
p7_o => p7_s,
|
115 |
|
|
p7_en_o => p7_en_s
|
116 |
|
|
);
|
117 |
|
|
|
118 |
|
|
|
119 |
|
|
-----------------------------------------------------------------------------
|
120 |
|
|
-- Bidirectional pad structures
|
121 |
|
|
-----------------------------------------------------------------------------
|
122 |
|
|
p2_b <= p2_s
|
123 |
|
|
when p2_en_s = '1' else
|
124 |
|
|
(others => 'Z');
|
125 |
|
|
p4_b <= p4_s
|
126 |
|
|
when p4_en_s = '1' else
|
127 |
|
|
(others => 'Z');
|
128 |
|
|
p5_b <= p5_s
|
129 |
|
|
when p5_en_s = '1' else
|
130 |
|
|
(others => 'Z');
|
131 |
|
|
p6_b <= p6_s
|
132 |
|
|
when p6_en_s = '1' else
|
133 |
|
|
(others => 'Z');
|
134 |
|
|
p7_b <= p7_s
|
135 |
|
|
when p7_en_s = '1' else
|
136 |
|
|
(others => 'Z');
|
137 |
|
|
|
138 |
|
|
end struct;
|
139 |
|
|
|
140 |
|
|
|
141 |
|
|
-------------------------------------------------------------------------------
|
142 |
|
|
-- File History:
|
143 |
|
|
--
|
144 |
|
|
-- $Log: not supported by cvs2svn $
|
145 |
|
|
-------------------------------------------------------------------------------
|