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

Subversion Repositories t48

[/] [t48/] [tags/] [rel_1_0/] [rtl/] [vhdl/] [t8243/] [t8243_sync_notri.vhd] - Blame information for rev 277

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

Line No. Rev Author Line
1 247 arniml
-------------------------------------------------------------------------------
2
--
3
-- The T8243 synchronous toplevel without tri-state signals
4
--
5
-- $Id: t8243_sync_notri.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_sync_notri is
51
 
52
  port (
53
    -- System Interface -------------------------------------------------------
54
    clk_i     : in  std_logic;
55
    clk_en_i  : in  std_logic;
56
    reset_n_i : in  std_logic;
57
    -- Control Interface ------------------------------------------------------
58
    cs_n_i    : in  std_logic;
59
    prog_n_i  : in  std_logic;
60
    -- Port 2 Interface -------------------------------------------------------
61
    p2_i      : in  std_logic_vector(3 downto 0);
62
    p2_o      : out std_logic_vector(3 downto 0);
63
    p2_en_o   : out std_logic;
64
    -- Port 4 Interface -------------------------------------------------------
65
    p4_i      : in  std_logic_vector(3 downto 0);
66
    p4_o      : out std_logic_vector(3 downto 0);
67
    p4_en_o   : out std_logic;
68
    -- Port 5 Interface -------------------------------------------------------
69
    p5_i      : in  std_logic_vector(3 downto 0);
70
    p5_o      : out std_logic_vector(3 downto 0);
71
    p5_en_o   : out std_logic;
72
    -- Port 6 Interface -------------------------------------------------------
73
    p6_i      : in  std_logic_vector(3 downto 0);
74
    p6_o      : out std_logic_vector(3 downto 0);
75
    p6_en_o   : out std_logic;
76
    -- Port 7 Interface -------------------------------------------------------
77
    p7_i      : in  std_logic_vector(3 downto 0);
78
    p7_o      : out std_logic_vector(3 downto 0);
79
    p7_en_o   : out std_logic
80
  );
81
 
82
end t8243_sync_notri;
83
 
84
 
85
use work.t8243_comp_pack.t8243_core;
86
 
87
architecture struct of t8243_sync_notri is
88
 
89
  signal prog_n_q       : std_logic;
90
  signal clk_rise_en_s,
91
         clk_fall_en_s  : std_logic;
92
 
93
begin
94
 
95
  -----------------------------------------------------------------------------
96
  -- Process edge_detect
97
  --
98
  -- Purpose:
99
  --   Implements the sequential element required for edge detection
100
  --   on the PROG input.
101
  --
102
  edge_detect: process (clk_i, reset_n_i)
103
  begin
104
    if reset_n_i = '0' then
105
      prog_n_q <= '1';
106
    elsif rising_edge(clk_i) then
107
      if clk_en_i = '1' then
108
        prog_n_q <= prog_n_i;
109
      end if;
110
    end if;
111
  end process edge_detect;
112
  --
113
  -----------------------------------------------------------------------------
114
 
115
 
116
  -- clock enables to detect rising and falling edges of PROG
117
  clk_rise_en_s <= clk_en_i and
118
                   not prog_n_q and prog_n_i;
119
  clk_fall_en_s <= clk_en_i and
120
                   prog_n_q and not prog_n_i;
121
 
122
 
123
  -----------------------------------------------------------------------------
124
  -- The T8243 Core
125
  -----------------------------------------------------------------------------
126
  t8243_core_b : t8243_core
127
    generic map (
128
      clk_fall_level_g => 1
129
    )
130
    port map (
131
      clk_i         => clk_i,
132
      clk_rise_en_i => clk_rise_en_s,
133
      clk_fall_en_i => clk_fall_en_s,
134
      reset_n_i     => reset_n_i,
135
      cs_n_i        => cs_n_i,
136
      prog_n_i      => prog_n_i,
137
      p2_i          => p2_i,
138
      p2_o          => p2_o,
139
      p2_en_o       => p2_en_o,
140
      p4_i          => p4_i,
141
      p4_o          => p4_o,
142
      p4_en_o       => p4_en_o,
143
      p5_i          => p5_i,
144
      p5_o          => p5_o,
145
      p5_en_o       => p5_en_o,
146
      p6_i          => p6_i,
147
      p6_o          => p6_o,
148
      p6_en_o       => p6_en_o,
149
      p7_i          => p7_i,
150
      p7_o          => p7_o,
151
      p7_en_o       => p7_en_o
152
    );
153
 
154
end struct;
155
 
156
 
157
-------------------------------------------------------------------------------
158
-- File History:
159
--
160
-- $Log: not supported by cvs2svn $
161
-------------------------------------------------------------------------------

powered by: WebSVN 2.1.0

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