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

Subversion Repositories t48

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

powered by: WebSVN 2.1.0

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