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

Subversion Repositories t48

[/] [t48/] [tags/] [rel_1_0/] [rtl/] [vhdl/] [system/] [t8039_notri.vhd] - Blame information for rev 292

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 155 arniml
-------------------------------------------------------------------------------
2
--
3
-- T8039 Microcontroller System
4
-- 8039 toplevel without tri-states
5
--
6 262 arniml
-- $Id: t8039_notri.vhd,v 1.5 2006-07-14 01:13:32 arniml Exp $
7
-- $Name: not supported by cvs2svn $
8 155 arniml
--
9
-- Copyright (c) 2004, Arnim Laeuger (arniml@opencores.org)
10
--
11
-- All rights reserved
12
--
13
-- Redistribution and use in source and synthezised forms, with or without
14
-- modification, are permitted provided that the following conditions are met:
15
--
16
-- Redistributions of source code must retain the above copyright notice,
17
-- this list of conditions and the following disclaimer.
18
--
19
-- Redistributions in synthesized form must reproduce the above copyright
20
-- notice, this list of conditions and the following disclaimer in the
21
-- documentation and/or other materials provided with the distribution.
22
--
23
-- Neither the name of the author nor the names of other contributors may
24
-- be used to endorse or promote products derived from this software without
25
-- specific prior written permission.
26
--
27
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
29
-- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30
-- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
31
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37
-- POSSIBILITY OF SUCH DAMAGE.
38
--
39
-- Please report bugs to the author, but before you do so, please
40
-- make sure that this is not a derivative work and that
41
-- you have the latest version of this file.
42
--
43
-- The latest version of this file can be found at:
44
--      http://www.opencores.org/cvsweb.shtml/t48/
45
--
46
-------------------------------------------------------------------------------
47
 
48
library ieee;
49
use ieee.std_logic_1164.all;
50
 
51
entity t8039_notri is
52
 
53
  generic (
54
    gate_port_input_g : integer := 1
55
  );
56
 
57
  port (
58 211 arniml
    xtal_i        : in  std_logic;
59 220 arniml
    xtal_en_i     : in  std_logic;
60 211 arniml
    reset_n_i     : in  std_logic;
61
    t0_i          : in  std_logic;
62
    t0_o          : out std_logic;
63
    t0_dir_o      : out std_logic;
64
    int_n_i       : in  std_logic;
65
    ea_i          : in  std_logic;
66
    rd_n_o        : out std_logic;
67
    psen_n_o      : out std_logic;
68
    wr_n_o        : out std_logic;
69
    ale_o         : out std_logic;
70
    db_i          : in  std_logic_vector( 7 downto 0);
71
    db_o          : out std_logic_vector( 7 downto 0);
72
    db_dir_o      : out std_logic;
73
    t1_i          : in  std_logic;
74
    p2_i          : in  std_logic_vector( 7 downto 0);
75
    p2_o          : out std_logic_vector( 7 downto 0);
76
    p2l_low_imp_o : out std_logic;
77
    p2h_low_imp_o : out std_logic;
78
    p1_i          : in  std_logic_vector( 7 downto 0);
79
    p1_o          : out std_logic_vector( 7 downto 0);
80
    p1_low_imp_o  : out std_logic;
81
    prog_n_o      : out std_logic
82 155 arniml
  );
83
 
84
end t8039_notri;
85
 
86
 
87
library ieee;
88
use ieee.numeric_std.all;
89
 
90
use work.t48_core_comp_pack.t48_core;
91 226 arniml
use work.t48_core_comp_pack.generic_ram_ena;
92 155 arniml
 
93
architecture struct of t8039_notri is
94
 
95
  signal xtal3_s          : std_logic;
96
  signal dmem_addr_s      : std_logic_vector( 7 downto 0);
97
  signal dmem_we_s        : std_logic;
98
  signal dmem_data_from_s : std_logic_vector( 7 downto 0);
99
  signal dmem_data_to_s   : std_logic_vector( 7 downto 0);
100
  signal pmem_data_s      : std_logic_vector( 7 downto 0);
101
 
102
  signal p1_in_s,
103
         p1_out_s         : std_logic_vector( 7 downto 0);
104
  signal p2_in_s,
105
         p2_out_s         : std_logic_vector( 7 downto 0);
106
 
107 226 arniml
  signal vdd_s            : std_logic;
108
 
109 155 arniml
begin
110
 
111 226 arniml
  vdd_s <= '1';
112
 
113 155 arniml
  -----------------------------------------------------------------------------
114
  -- Check generics for valid values.
115
  -----------------------------------------------------------------------------
116
  -- pragma translate_off
117
  assert gate_port_input_g = 0 or gate_port_input_g = 1
118
    report "gate_port_input_g must be either 1 or 0!"
119
    severity failure;
120
  -- pragma translate_on
121
 
122
 
123
  -- no Program memory available
124
  pmem_data_s <= (others => '0');
125
 
126
 
127
  t48_core_b : t48_core
128
    generic map (
129
      xtal_div_3_g        => 1,
130
      register_mnemonic_g => 1,
131
      include_port1_g     => 1,
132
      include_port2_g     => 1,
133
      include_bus_g       => 1,
134
      include_timer_g     => 1,
135
      sample_t1_state_g   => 4
136
    )
137
    port map (
138 211 arniml
      xtal_i        => xtal_i,
139 220 arniml
      xtal_en_i     => xtal_en_i,
140 211 arniml
      reset_i       => reset_n_i,
141
      t0_i          => t0_i,
142
      t0_o          => t0_o,
143
      t0_dir_o      => t0_dir_o,
144
      int_n_i       => int_n_i,
145
      ea_i          => ea_i,
146
      rd_n_o        => rd_n_o,
147
      psen_n_o      => psen_n_o,
148
      wr_n_o        => wr_n_o,
149
      ale_o         => ale_o,
150
      db_i          => db_i,
151
      db_o          => db_o,
152
      db_dir_o      => db_dir_o,
153
      t1_i          => t1_i,
154
      p2_i          => p2_in_s,
155
      p2_o          => p2_out_s,
156
      p2l_low_imp_o => p2l_low_imp_o,
157
      p2h_low_imp_o => p2h_low_imp_o,
158
      p1_i          => p1_in_s,
159
      p1_o          => p1_out_s,
160
      p1_low_imp_o  => p1_low_imp_o,
161
      prog_n_o      => prog_n_o,
162
      clk_i         => xtal_i,
163
      en_clk_i      => xtal3_s,
164
      xtal3_o       => xtal3_s,
165
      dmem_addr_o   => dmem_addr_s,
166
      dmem_we_o     => dmem_we_s,
167
      dmem_data_i   => dmem_data_from_s,
168
      dmem_data_o   => dmem_data_to_s,
169
      pmem_addr_o   => open,
170
      pmem_data_i   => pmem_data_s
171 155 arniml
    );
172
 
173
 
174
  -----------------------------------------------------------------------------
175
  -- Gate port 1 and 2 input bus with respetive output value
176
  -----------------------------------------------------------------------------
177
  gate_ports: if gate_port_input_g = 1 generate
178
    p1_in_s <= p1_i and p1_out_s;
179
    p2_in_s <= p2_i and p2_out_s;
180
  end generate;
181
 
182
  pass_ports: if gate_port_input_g = 0 generate
183
    p1_in_s <= p1_i;
184
    p2_in_s <= p2_i;
185
  end generate;
186
 
187
  p1_o <= p1_out_s;
188
  p2_o <= p2_out_s;
189
 
190
 
191 226 arniml
  ram_128_b : generic_ram_ena
192 155 arniml
    generic map (
193 226 arniml
      addr_width_g => 7,
194
      data_width_g => 8
195 155 arniml
    )
196
    port map (
197 226 arniml
      clk_i => xtal_i,
198
      a_i   => dmem_addr_s(6 downto 0),
199
      we_i  => dmem_we_s,
200
      ena_i => vdd_s,
201
      d_i   => dmem_data_to_s,
202
      d_o   => dmem_data_from_s
203 155 arniml
    );
204
 
205
end struct;
206
 
207
 
208
-------------------------------------------------------------------------------
209
-- File History:
210
--
211
-- $Log: not supported by cvs2svn $
212 262 arniml
-- Revision 1.4  2006/06/21 01:02:35  arniml
213
-- replaced syn_ram with generic_ram_ena
214
--
215 226 arniml
-- Revision 1.3  2006/06/20 00:47:08  arniml
216
-- new input xtal_en_i
217
--
218 220 arniml
-- Revision 1.2  2005/11/01 21:38:10  arniml
219
-- wire signals for P2 low impedance marker issue
220
--
221 211 arniml
-- Revision 1.1  2004/12/03 19:42:34  arniml
222
-- initial check-in
223
--
224 155 arniml
-------------------------------------------------------------------------------

powered by: WebSVN 2.1.0

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