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

Subversion Repositories tdm

[/] [tdm/] [trunk/] [code/] [tdm_cont/] [core/] [tdm_core_top.vhd] - Blame information for rev 4

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

Line No. Rev Author Line
1 4 khatib
-------------------------------------------------------------------------------
2
-- Title      : TDM controller top
3
-- Project    : TDM controller
4
-------------------------------------------------------------------------------
5
-- File       : tdm_cont_top.vhd
6
-- Author     : Jamil Khatib  <khatib@ieee.org>
7
-- Organization:  OpenCores.org
8
-- Created    : 2001/05/14
9
-- Last update:2001/05/22
10
-- Platform   : 
11
-- Simulators  : NC-sim/linux, Modelsim XE/windows98
12
-- Synthesizers: Leonardo
13
-- Target      : 
14
-- Dependency  : ieee.std_logic_1164
15
--               tdm.components_pkg
16
-------------------------------------------------------------------------------
17
-- Description:  tdm controller that reads and writes E1 bit rate through
18
-- ST-bus interface
19
-------------------------------------------------------------------------------
20
-- Copyright (c) 2001  Jamil Khatib
21
-- 
22
-- This VHDL design file is an open design; you can redistribute it and/or
23
-- modify it and/or implement it after contacting the author
24
-- You can check the draft license at
25
-- http://www.opencores.org/OIPC/license.shtml
26
-------------------------------------------------------------------------------
27
-- Revisions  :
28
-- Revision Number :   1
29
-- Version         :   0.1
30
-- Date            :  2001/05/09
31
-- Modifier        :  Jamil Khatib  <khatib@ieee.org>
32
-- Desccription    :  Created
33
-- ToOptimize      :
34
-- Known Bugs      : 
35
-------------------------------------------------------------------------------
36
-- $Log: not supported by cvs2svn $
37
-- Revision 1.1  2001/05/24 22:48:56  jamil
38
-- TDM Initial release
39
--
40
-------------------------------------------------------------------------------
41
LIBRARY ieee;
42
USE ieee.std_logic_1164.ALL;
43
 
44
LIBRARY tdm;
45
USE tdm.components_pkg.ALL;
46
 
47
ENTITY tdm_cont_top_ent IS
48
 
49
  PORT (
50
    -- Wishbone Interface
51
    CLK_I  : IN  STD_LOGIC;             -- system clock
52
    RST_I  : IN  STD_LOGIC;             -- system reset
53
    ACK_O  : OUT STD_LOGIC;             -- acknowledge
54
    ADR_I  : IN  STD_LOGIC_VECTOR(2 DOWNTO 0);  -- address
55
    CYC_I  : IN  STD_LOGIC;             -- Bus cycle
56
    DAT_I  : IN  STD_LOGIC_VECTOR(31 DOWNTO 0);  -- Input data
57
    DAT_O  : OUT STD_LOGIC_VECTOR(31 DOWNTO 0);  -- Output data
58
    RTY_O  : OUT STD_LOGIC;             -- retry
59
    STB_I  : IN  STD_LOGIC;             -- strobe
60
    WE_I   : IN  STD_LOGIC;             -- Write
61
    TAG0_O : OUT STD_LOGIC;             -- TAG0 (TxDone)
62
    TAG1_O : OUT STD_LOGIC;             -- TAG1_O (RxRdy)
63
-- ST-Bus interface
64
    C2     : IN  STD_LOGIC;             -- ST-Bus clock
65
    DSTi   : IN  STD_LOGIC;             -- ST-Bus input Data
66
    DSTo   : OUT STD_LOGIC;             -- ST-Bus output Data
67
    F0_n   : IN  STD_LOGIC;             -- St-Bus Framing pulse
68
    F0od_n : OUT STD_LOGIC              -- ST-Bus Delayed Framing pulse
69
 
70
    );
71
 
72
END tdm_cont_top_ent;
73
 
74
 
75
ARCHITECTURE tdm_top_str OF tdm_cont_top_ent IS
76
 
77
 
78
  SIGNAL rst_n        : STD_LOGIC;
79
  SIGNAL NoChannels   : STD_LOGIC_VECTOR(4 DOWNTO 0);
80
  SIGNAL DropChannels : STD_LOGIC_VECTOR(4 DOWNTO 0);
81
  SIGNAL RxD          : STD_LOGIC_VECTOR(7 DOWNTO 0);
82
  SIGNAL TxD          : STD_LOGIC_VECTOR(7 DOWNTO 0);
83
  SIGNAL Tx_en0       : STD_LOGIC;
84
  SIGNAL Tx_en1       : STD_LOGIC;
85
  SIGNAL Tx_en2       : STD_LOGIC;
86
  SIGNAL Rx_en0       : STD_LOGIC;
87
  SIGNAL Rx_en1       : STD_LOGIC;
88
  SIGNAL Rx_en2       : STD_LOGIC;
89
  SIGNAL SerDo        : STD_LOGIC;
90
  SIGNAL SerDi        : STD_LOGIC;
91
 
92
  SIGNAL TxValidData : STD_LOGIC;
93
  SIGNAL TxWrite     : STD_LOGIC;
94
  SIGNAL TxRdy       : STD_LOGIC;
95
 
96
  SIGNAL RxRead          : STD_LOGIC;
97
  SIGNAL RxRdy           : STD_LOGIC;
98
  SIGNAL RxValidData     : STD_LOGIC;
99
  SIGNAL BufferDataAvail : STD_LOGIC;
100
  SIGNAL RxLineOverflow  : STD_LOGIC;
101
 
102
 
103
  SIGNAL TxDone      : STD_LOGIC;
104
  SIGNAL WrBuff      : STD_LOGIC;
105
  SIGNAL TxData      : STD_LOGIC_VECTOR(7 DOWNTO 0);
106
  SIGNAL TxOverflow  : STD_LOGIC;
107
  SIGNAL TxUnderflow : STD_LOGIC;
108
  SIGNAL ReadBuff    : STD_LOGIC;
109
  SIGNAL RxData      : STD_LOGIC_VECTOR(7 DOWNTO 0);
110
  SIGNAL RxOverflow  : STD_LOGIC;
111
  SIGNAL HDLCen      : STD_LOGIC;
112
 
113
 
114
BEGIN  -- tdm_top_str
115
 
116
  rst_n <= NOT RST_I;
117
 
118
 
119
  tdm_cont : tdm_cont_ent
120
    PORT MAP (
121
      rst_n          => rst_n,
122
      C2             => C2,
123
      DSTi           => DSTi,
124
      DSTo           => DSTo,
125
      F0_n           => F0_n,
126
      F0od_n         => F0od_n,
127
      CLK_I          => CLK_I,
128
      NoChannels     => NoChannels,
129
      DropChannels   => DropChannels,
130
      RxD            => RxD,
131
      RxValidData    => RxValidData,
132
      FramErr        => RxLineOverflow,
133
      RxRead         => RxRead,
134
      RxRdy          => RxRdy,
135
      TxErr          => TxUnderflow,
136
      TxD            => TxD,
137
      TxValidData    => TxValidData,
138
      TxWrite        => TxWrite,
139
      TxRdy          => TxRdy,
140
      EnableSerialIF => HDLCen,
141
      Tx_en0         => Tx_en0,
142
      Tx_en1         => Tx_en1,
143
      Tx_en2         => Tx_en2,
144
      Rx_en0         => Rx_en0,
145
      Rx_en1         => Rx_en1,
146
      Rx_en2         => Rx_en2,
147
      SerDo          => SerDo,
148
      SerDi          => SerDi);
149
 
150
  TxBuff : TxTDMBuff
151
    PORT MAP (
152
      CLK_I       => CLK_I,
153
      rst_n       => rst_n,
154
      TxD         => TxD,
155
      TxValidData => TxValidData,
156
      TxWrite     => TxWrite,
157
      TxRdy       => TxRdy,
158
      WrBuff      => WrBuff,
159
      TxData      => TxData,
160
      NoChannels  => NoChannels,
161
      DropChannels => DropChannels,
162
      TxDone      => TxDone,
163
      TxOverflow  => TxOverflow);
164
 
165
  RxBuff : RxTDMBuff
166
    PORT MAP (
167
      CLK_I           => CLK_I,
168
      rst_n           => rst_n,
169
      RxD             => RxD,
170
      RxRead          => RxRead,
171
      RxRdy           => RxRdy,
172
      RxValidData     => RxValidData,
173
      BufferDataAvail => BufferDataAvail,
174
      ReadBuff        => ReadBuff,
175
      RxData          => RxData,
176
      RxError         => RxOverflow);
177
 
178
 
179
  wb_if : tdm_wb_if_ent
180
    PORT MAP (
181
      CLK_I          => CLK_I,
182
      RST_I          => RST_I,
183
      ACK_O          => ACK_O,
184
      ADR_I          => ADR_I,
185
      CYC_I          => CYC_I,
186
      DAT_I          => DAT_I,
187
      DAT_O          => DAT_O,
188
      RTY_O          => RTY_O,
189
      STB_I          => STB_I,
190
      WE_I           => WE_I,
191
      TAG0_O         => TAG0_O,
192
      TAG1_O         => TAG1_O,
193
      TxDone         => TxDone,
194
      WrBuff         => WrBuff,
195
      TxData         => TxData,
196
      TxOverflow     => TxOverflow,
197
      TxUnderflow    => TxUnderflow,
198
      RxRdy          => BufferDataAvail,
199
      ReadBuff       => ReadBuff,
200
      RxData         => RxData,
201
      RxOverflow     => RxOverflow,
202
      RxLineOverflow => RxLineOverflow,
203
      HDLCen         => HDLCen,
204
      NoChannels     => NoChannels,
205
      DropChannels   => DropChannels);
206
 
207
 
208
END tdm_top_str;

powered by: WebSVN 2.1.0

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