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

Subversion Repositories t48

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

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 295 arniml
-- $Id: t8039_notri.vhd 295 2009-04-01 19:32:48Z arniml $
7 155 arniml
--
8
-- Copyright (c) 2004, 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 t8039_notri is
51
 
52
  generic (
53
    gate_port_input_g : integer := 1
54
  );
55
 
56
  port (
57 211 arniml
    xtal_i        : in  std_logic;
58 220 arniml
    xtal_en_i     : in  std_logic;
59 211 arniml
    reset_n_i     : in  std_logic;
60
    t0_i          : in  std_logic;
61
    t0_o          : out std_logic;
62
    t0_dir_o      : out std_logic;
63
    int_n_i       : in  std_logic;
64
    ea_i          : in  std_logic;
65
    rd_n_o        : out std_logic;
66
    psen_n_o      : out std_logic;
67
    wr_n_o        : out std_logic;
68
    ale_o         : out std_logic;
69
    db_i          : in  std_logic_vector( 7 downto 0);
70
    db_o          : out std_logic_vector( 7 downto 0);
71
    db_dir_o      : out std_logic;
72
    t1_i          : in  std_logic;
73
    p2_i          : in  std_logic_vector( 7 downto 0);
74
    p2_o          : out std_logic_vector( 7 downto 0);
75
    p2l_low_imp_o : out std_logic;
76
    p2h_low_imp_o : out std_logic;
77
    p1_i          : in  std_logic_vector( 7 downto 0);
78
    p1_o          : out std_logic_vector( 7 downto 0);
79
    p1_low_imp_o  : out std_logic;
80
    prog_n_o      : out std_logic
81 155 arniml
  );
82
 
83
end t8039_notri;
84
 
85
 
86
library ieee;
87
use ieee.numeric_std.all;
88
 
89
use work.t48_core_comp_pack.t48_core;
90 226 arniml
use work.t48_core_comp_pack.generic_ram_ena;
91 155 arniml
 
92
architecture struct of t8039_notri is
93
 
94
  signal xtal3_s          : std_logic;
95
  signal dmem_addr_s      : std_logic_vector( 7 downto 0);
96
  signal dmem_we_s        : std_logic;
97
  signal dmem_data_from_s : std_logic_vector( 7 downto 0);
98
  signal dmem_data_to_s   : std_logic_vector( 7 downto 0);
99
  signal pmem_data_s      : std_logic_vector( 7 downto 0);
100
 
101
  signal p1_in_s,
102
         p1_out_s         : std_logic_vector( 7 downto 0);
103
  signal p2_in_s,
104
         p2_out_s         : std_logic_vector( 7 downto 0);
105
 
106 226 arniml
  signal vdd_s            : std_logic;
107
 
108 155 arniml
begin
109
 
110 226 arniml
  vdd_s <= '1';
111
 
112 155 arniml
  -----------------------------------------------------------------------------
113
  -- Check generics for valid values.
114
  -----------------------------------------------------------------------------
115
  -- pragma translate_off
116
  assert gate_port_input_g = 0 or gate_port_input_g = 1
117
    report "gate_port_input_g must be either 1 or 0!"
118
    severity failure;
119
  -- pragma translate_on
120
 
121
 
122
  -- no Program memory available
123
  pmem_data_s <= (others => '0');
124
 
125
 
126
  t48_core_b : t48_core
127
    generic map (
128
      xtal_div_3_g        => 1,
129
      register_mnemonic_g => 1,
130
      include_port1_g     => 1,
131
      include_port2_g     => 1,
132
      include_bus_g       => 1,
133
      include_timer_g     => 1,
134
      sample_t1_state_g   => 4
135
    )
136
    port map (
137 211 arniml
      xtal_i        => xtal_i,
138 220 arniml
      xtal_en_i     => xtal_en_i,
139 211 arniml
      reset_i       => reset_n_i,
140
      t0_i          => t0_i,
141
      t0_o          => t0_o,
142
      t0_dir_o      => t0_dir_o,
143
      int_n_i       => int_n_i,
144
      ea_i          => ea_i,
145
      rd_n_o        => rd_n_o,
146
      psen_n_o      => psen_n_o,
147
      wr_n_o        => wr_n_o,
148
      ale_o         => ale_o,
149
      db_i          => db_i,
150
      db_o          => db_o,
151
      db_dir_o      => db_dir_o,
152
      t1_i          => t1_i,
153
      p2_i          => p2_in_s,
154
      p2_o          => p2_out_s,
155
      p2l_low_imp_o => p2l_low_imp_o,
156
      p2h_low_imp_o => p2h_low_imp_o,
157
      p1_i          => p1_in_s,
158
      p1_o          => p1_out_s,
159
      p1_low_imp_o  => p1_low_imp_o,
160
      prog_n_o      => prog_n_o,
161
      clk_i         => xtal_i,
162
      en_clk_i      => xtal3_s,
163
      xtal3_o       => xtal3_s,
164
      dmem_addr_o   => dmem_addr_s,
165
      dmem_we_o     => dmem_we_s,
166
      dmem_data_i   => dmem_data_from_s,
167
      dmem_data_o   => dmem_data_to_s,
168
      pmem_addr_o   => open,
169
      pmem_data_i   => pmem_data_s
170 155 arniml
    );
171
 
172
 
173
  -----------------------------------------------------------------------------
174
  -- Gate port 1 and 2 input bus with respetive output value
175
  -----------------------------------------------------------------------------
176
  gate_ports: if gate_port_input_g = 1 generate
177
    p1_in_s <= p1_i and p1_out_s;
178
    p2_in_s <= p2_i and p2_out_s;
179
  end generate;
180
 
181
  pass_ports: if gate_port_input_g = 0 generate
182
    p1_in_s <= p1_i;
183
    p2_in_s <= p2_i;
184
  end generate;
185
 
186
  p1_o <= p1_out_s;
187
  p2_o <= p2_out_s;
188
 
189
 
190 226 arniml
  ram_128_b : generic_ram_ena
191 155 arniml
    generic map (
192 226 arniml
      addr_width_g => 7,
193
      data_width_g => 8
194 155 arniml
    )
195
    port map (
196 226 arniml
      clk_i => xtal_i,
197
      a_i   => dmem_addr_s(6 downto 0),
198
      we_i  => dmem_we_s,
199
      ena_i => vdd_s,
200
      d_i   => dmem_data_to_s,
201
      d_o   => dmem_data_from_s
202 155 arniml
    );
203
 
204
end struct;

powered by: WebSVN 2.1.0

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